A library for talking to Multi-Tech's Cellular SocketModem Devices.
Dependents: M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more
Diff: tests/test_main.cpp
- Revision:
- 124:6d964b4343c8
- Child:
- 141:571e0ef6c8dc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test_main.cpp Thu Jan 02 18:11:25 2014 +0000 @@ -0,0 +1,47 @@ +#include "mbed.h" +#include "include_me.h" + +// uncomment only the header corresponding to the test you want to run +//#include "test_ping.h" +//#include "test_SMS.h" +//#include "test_TCP_Socket.h" +//#include "test_TCP_Socket_Echo.h" +//#include "test_MTS_Circular_Buffer.h" + + +//int main() { + // uncomment only one test at a time + + // PING TEST + //testPing(); + + /* + // SMS TEST + for (int i = 30; i >= 0; i = i - 2) { + wait(2); + printf("Waiting %d seconds...\n\r", i); + } + Transport::setTransport(Transport::CELLULAR); + MTSSerialFlowControl* serial = new MTSSerialFlowControl(PTD3, PTD2, PTA12, PTC8); + serial->baud(115200); + Cellular* cell = Cellular::getInstance(); + cell->init(serial); + while (cell->getRegistration() != Cellular::REGISTERED); + while (cell->setApn("wap.cingular") != SUCCESS); + + sendSms(); + while (true) { + receiveSms(); + wait(15); + } + */ + + // TCP SOCKET TEST + //testTcpSocket(); + + // TCP SOCKET ECHO TEST + //testTcpSocketEcho(); + + // CIRCULAR BUFFER TEST + //testMTSCircularBuffer(); +//} \ No newline at end of file