Test of USSD commands transmission over the Vodafone network with the Vodafone library
Dependencies: VodafoneUSBModem mbed-rtos mbed
Fork of VodafoneK3770USSDTestBeta by
main.cpp
- Committer:
- donatien
- Date:
- 2012-10-30
- Revision:
- 2:9aa67cb35d0e
- Parent:
- 1:e5d64ece3a8c
File content as of revision 2:9aa67cb35d0e:
#include "mbed.h" #include "VodafoneUSBModem.h" #define USSD_COMMAND "*#134#" void test(void const*) { VodafoneUSBModem modem; char result[32]; printf("Sending %s on USSD channel\n", USSD_COMMAND); int ret = modem.sendUSSD(USSD_COMMAND, result, 32); if(ret) { printf("Send USSD command returned %d\n", ret); } printf("Result of command: %s\n", result); while(1) { } } int main() { Thread testTask(test, NULL, osPriorityNormal, 1024 * 4); DigitalOut led(LED1); while(1) { led=!led; Thread::wait(1000); } return 0; }