Example program demonstrating sending and reading SMS messages from the cellular modem using the MTSAS library.

Dependencies:   mbed-src mtsas

Files at this revision

API Documentation at this revision

Comitter:
Vanger
Date:
Tue Aug 12 21:49:38 2014 +0000
Parent:
3:7fac2f012338
Child:
5:597d5a5e9d24
Commit message:
Code review 2 fixes

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Aug 07 21:40:17 2014 +0000
+++ b/main.cpp	Tue Aug 12 21:49:38 2014 +0000
@@ -28,30 +28,31 @@
     MTSSerialFlowControl* io = new MTSSerialFlowControl(D8, D2, D3, D6);
     
     /** Freescale KL46Z
-    * To configure the pins for the Freescale KL46Z board, use configuration B
-    * Uncomment the following line to use the Freescale KL46Z board
+    * To configure the serial pins for the Freescale KL46Z board, use MTSAS jumper
+    * configuration B. Uncomment the following line to use the Freescale KL46Z board
     */
     //MTSSerialFlowControl* io = new MTSSerialFlowControl(D2, D9, D3, D6);
     
     /** Freescale K64F
-    * To configure the pins for the Freescale KL46Z board, use configuration A
-    * Uncomment the following line to use the Freescale KL46F board
+    * To configure the serial pins for the Freescale K64F board, use MTSAS jumper
+    * configuration A. Uncomment the following line to use the Freescale K64F 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); 
     
     //Creates a radio object
     Cellular* radio = CellularFactory::create(io);
-    radio->configureSignals(D4,D7,RESET);
-    Transport::setTransport(radio);
     
     if (! radio) {
         logFatal("Failed to initialize radio");
         return 1;
     }
     
+    radio->configureSignals(D4,D7,RESET);
+    Transport::setTransport(radio);
+    
     //Set radio APN
     for (int i = 0; i < 10; i++) {
         if (i >= 10) {