Shows how to send and receive SMS messages using a Vodafone USB dongle.

Dependencies:   VodafoneUSBModem mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
ashleymills
Date:
Tue Oct 08 20:21:53 2013 +0000
Parent:
4:9bfe20a36f47
Child:
6:a98b70f27320
Commit message:
Uncommented wakeup section and put dummy number in.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Oct 08 20:17:44 2013 +0000
+++ b/main.cpp	Tue Oct 08 20:21:53 2013 +0000
@@ -8,7 +8,7 @@
 #include "mbed.h"
 #include "VodafoneUSBModem.h"
 
-#define TEST_NUMBER "+491799051492"
+#define TEST_NUMBER "0000"
 #define MAX_SMS_LEN 256
 
 int main() {
@@ -26,9 +26,9 @@
     
    // send a wake-up SMS
    DBG("Sending test SMS to %s",TEST_NUMBER);
-   //if(modem.sendSM(TEST_NUMBER,"Hello!")!=0) {
-   //   DBG("Error sending test SMS!");
-   //}
+   if(modem.sendSM(TEST_NUMBER,"Hello!")!=0) {
+      DBG("Error sending test SMS!");
+   }
     
    // loop forever printing received SMSs
    while(1) {