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.
Dependencies: M2XStreamClient jsonlite mbed
Fork of MTSAS_Cellular_Connect_Example_F411 by
Diff: main.cpp
- Revision:
- 9:0ed53023033b
- Parent:
- 8:95c226a1dca7
- Child:
- 10:2e6637cca9d7
diff -r 95c226a1dca7 -r 0ed53023033b main.cpp
--- a/main.cpp Tue Aug 05 14:40:12 2014 +0000
+++ b/main.cpp Thu Aug 07 20:31:02 2014 +0000
@@ -5,8 +5,8 @@
//Modify to match your apn if you are using an HSPA radio with a SIM card
const char APN[] = "";
- //Sets the log level to INFO, which is about midway on priority levels
- //Possible levels: FATAL, ERROR, WARNING, INFO, DEBUG, TRACE, NONE
+ //Sets the log level to INFO, higher log levels produce more log output.
+ //Possible levels: NONE, FATAL, ERROR, WARNING, INFO, DEBUG, TRACE
MTSLog::setLogLevel(MTSLog::INFO_LEVEL);
/** STMicro Nucelo F401RE
@@ -21,19 +21,18 @@
/** Freescale KL46Z
* To configure the pins for the Freescale KL46Z board, use configuration B
- * for the SocketModem.
- * Uncomment te following line to use the Freescale KL46Z board
+ * Uncomment the following line to use the Freescale KL46Z board
*/
//MTSSerialFlowControl* io = new MTSSerialFlowControl(D2, D9, D3, D6);
- /** Freescale KL64F
+ /** Freescale K64F
* To configure the pins for the Freescale KL46Z board, use configuration A
* for the SocketModem.
* Uncomment te following line to use the Freescale KL46F board
*/
//MTSSerialFlowControl* io = new MTSSerialFlowControl(D1, D0, D3, D6);
- //Sets the baudrate for communicating with the radio
+ //Sets the baud rate for communicating with the radio
io->baud(115200);
//Create radio object
@@ -41,6 +40,11 @@
radio->configureSignals(D4,D7,RESET);
Transport::setTransport(radio);
+ if (! radio) {
+ logFatal("Failed to initialize radio");
+ return 1;
+ }
+
//Set radio APN
for (int i = 0; i < 10; i++) {
if (i >= 10) {
