endpoint C207 radio support
Dependents: mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular
Diff: MBEDUbloxCellRadio.cpp
- Revision:
- 10:83baedde4e85
- Parent:
- 9:c5db2b63ed05
- Child:
- 11:9f031bd67811
--- a/MBEDUbloxCellRadio.cpp Wed Apr 02 04:35:49 2014 +0000 +++ b/MBEDUbloxCellRadio.cpp Wed Apr 02 06:00:08 2014 +0000 @@ -36,23 +36,12 @@ // connect bool MBEDUbloxCellRadio::connect() { if (this->m_connected == false) { - this->logger()->log("powering cell modem..."); - this->m_c027->mdmPower(true); - this->m_c027->mdmReset(); - this->logger()->log("waking up cell modem..."); - this->m_c027->mdmWakeup(); - this->logger()->log("Allocating modem instance..."); - if (this->m_modem != NULL) { - this->logger()->log("powering modem instance..."); - this->m_modem->power(true); - this->logger()->log("waiting a bit..."); - wait_ms(UBLOX_CDMA_DELAY_MS); - this->logger()->log("connecting..."); - int ret = this->m_modem->connect("internet"); - if(ret) this->logger()->log("cellular modem connection FAILED!"); - else this->logger()->log("cellular modem connected!"); - this->m_connected = true; - } + wait_ms(UBLOX_CDMA_DELAY_MS); + this->logger()->log("connecting..."); + int ret = this->m_modem->connect("internet"); + if(ret) this->logger()->log("cellular modem connection FAILED!"); + else this->logger()->log("cellular modem connected!"); + this->m_connected = true; } if (this->m_connected == false) this->logger()->log("cell modem connect FAILED");