Shows how to send and receive SMS messages using a Vodafone USB dongle.
Dependencies: VodafoneUSBModem mbed-rtos mbed
Diff: main.cpp
- Revision:
- 4:9bfe20a36f47
- Parent:
- 2:60fd177f8a6a
- Child:
- 5:92271e224db9
diff -r bb67c6ba4998 -r 9bfe20a36f47 main.cpp --- a/main.cpp Fri Nov 30 13:57:17 2012 +0000 +++ b/main.cpp Tue Oct 08 20:17:44 2013 +0000 @@ -8,7 +8,7 @@ #include "mbed.h" #include "VodafoneUSBModem.h" -#define TEST_NUMBER "YOUR_NUMBER" +#define TEST_NUMBER "+491799051492" #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) {