Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 43:91f11760b50f
- Parent:
- 36:6294a71c9e9e
diff -r 6fb992ed5014 -r 91f11760b50f main.cpp
--- 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