Set specific IP Address/Port

Revision:
43:91f11760b50f
Parent:
36:6294a71c9e9e
Child:
45:2d57fafd8d73
--- a/main.cpp	Tue Jun 18 06:45:22 2019 +0000
+++ b/main.cpp	Wed Jul 24 15:16:05 2019 +0000
@@ -25,6 +25,23 @@
 // Number of retries /
 #define RETRY_COUNT 3
 
+void BG96_Modem_PowerON(void)
+{
+    DigitalOut BG96_RESET(D7);
+    DigitalOut BG96_PWRKEY(D9);
+ 
+    BG96_RESET = 1;
+    BG96_PWRKEY = 1;
+    wait_ms(200);
+ 
+    BG96_RESET = 0;
+    BG96_PWRKEY = 0;
+    wait_ms(300);
+ 
+    BG96_RESET = 1;
+    wait_ms(5000);
+}
+
 NetworkInterface *iface;
 
 // Echo server hostname
@@ -213,6 +230,10 @@
 #endif
 
     print_function("Establishing connection\n");
+
+    BG96_Modem_PowerON();
+    print_function("M2Mnet(BG96) Power ON\n");
+        
 #if MBED_CONF_MBED_TRACE_ENABLE
     trace_open();
 #else