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
test_main.cpp
00001 /* Universal Socket Modem Interface Library 00002 * Copyright (c) 2013 Multi-Tech Systems 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #include "mbed.h" 00018 #include "include_me.h" 00019 00020 // uncomment only the header corresponding to the test you want to run 00021 //#include "test_ping.h" 00022 //#include "test_SMS.h" 00023 //#include "test_TCP_Socket.h" 00024 //#include "test_TCP_Socket_Echo.h" 00025 //#include "test_MTS_Circular_Buffer.h" 00026 00027 00028 //int main() { 00029 // uncomment only one test at a time 00030 00031 // PING TEST 00032 //testPing(); 00033 00034 /* 00035 // SMS TEST 00036 Transport::setTransport(Transport::CELLULAR); 00037 MTSSerialFlowControl* serial = new MTSSerialFlowControl(PTD3, PTD2, PTA12, PTC8); 00038 serial->baud(115200); 00039 Cellular* cell = Cellular::getInstance(); 00040 cell->init(serial); 00041 while (cell->getRegistration() != Cellular::REGISTERED); 00042 while (cell->setApn("wap.cingular") != SUCCESS); 00043 00044 sendSms(); 00045 while (true) { 00046 receiveSms(); 00047 wait(15); 00048 } 00049 */ 00050 00051 // TCP SOCKET TEST 00052 //testTcpSocket(); 00053 00054 // TCP SOCKET ECHO TEST 00055 //testTcpSocketEcho(); 00056 00057 // CIRCULAR BUFFER TEST 00058 //testMTSCircularBuffer(); 00059 //}
Generated on Tue Jul 12 2022 21:46:23 by 1.7.2