Core Base Classes for the Light Endpoints
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: main.cpp
- Revision:
- 154:6e60f310ab78
- Parent:
- 152:659a8ebcbe93
- Child:
- 155:582462821bd7
--- a/main.cpp Wed Apr 02 18:15:49 2014 +0000 +++ b/main.cpp Thu Apr 03 00:50:36 2014 +0000 @@ -107,11 +107,25 @@ return NULL; } + #ifdef CELLULAR_NETWORK + int _ublox_cell_connect_status = 0; + int getUbloxConnectStatus() { return _ublox_cell_connect_status; } + #endif + // main entry point int main() { #ifdef CELLULAR_NETWORK C027 c027; + c027.mdmUsbEnable(true); + c027.mdmPower(true); + c027.mdmReset(); + c027.mdmWakeup(); UBLOX_MODEM modem(NC,true,1); + modem.power(true); + Thread::wait(1000); + _ublox_cell_connect_status = modem.connect("internet"); + if (_ublox_cell_connect_status) pc.printf("Unable to connect cell modem\r\n"); + else pc.printf("Cell modem connected!\r\n"); #endif #ifdef NETWORK_MUTEX network_mutex = new Mutex();