Implementation of the CellularInterface for u-blox C027 and C030 (non-N2xx flavour) modems that uses the IP stack on-board the cellular modem, hence not requiring LWIP (and so less RAM) and allowing any AT command exchanges to be carried out at the same time as data transfers (since the modem remains in AT mode all the time). This library may be used from mbed 5.5 onwards. If you need to use SMS, USSD or access the modem file system at the same time as using the CellularInterface then use ublox-at-cellular-interface-ext instead.
Dependents: example-ublox-cellular-interface example-ublox-cellular-interface_r410M example-ublox-mbed-client example-ublox-cellular-interface ... more
Revision 7:3b2ca10cc23a, committed 2017-06-30
- Comitter:
- rob.meades@u-blox.com
- Date:
- Fri Jun 30 13:29:19 2017 +0100
- Parent:
- 6:63dad754c267
- Child:
- 8:edac5187d765
- Commit message:
- Connect now fails correctly if it cannot achieve a connection, rather than trying for ever.
Changed in this revision
UbloxATCellularInterface.cpp | Show annotated file Show diff for this revision Revisions of this file |
UbloxATCellularInterface.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/UbloxATCellularInterface.cpp Thu Jun 15 14:04:26 2017 +0100 +++ b/UbloxATCellularInterface.cpp Fri Jun 30 13:29:19 2017 +0100 @@ -225,12 +225,12 @@ **********************************************************************/ // Get the next set of credentials, based on IMSI. -void UbloxATCellularInterface::get_next_credentials(const char * config) +void UbloxATCellularInterface::get_next_credentials(const char ** config) { - if (config) { - _apn = _APN_GET(config); - _uname = _APN_GET(config); - _pwd = _APN_GET(config); + if (*config) { + _apn = _APN_GET(*config); + _uname = _APN_GET(*config); + _pwd = _APN_GET(*config); } _apn = _apn ? _apn : ""; @@ -364,7 +364,7 @@ // Attempt to connect do { // Set up APN and IP protocol for PDP context - get_next_credentials(config); + get_next_credentials(&config); _auth = (*_uname && *_pwd) ? _auth : NSAPI_SECURITY_NONE; if ((_dev_info.dev != DEV_TOBY_L2) && (_dev_info.dev != DEV_MPCI_L2)) { success = activate_profile(_apn, _uname, _pwd, _auth);
--- a/UbloxATCellularInterface.h Thu Jun 15 14:04:26 2017 +0100 +++ b/UbloxATCellularInterface.h Fri Jun 30 13:29:19 2017 +0100 @@ -312,7 +312,7 @@ /** Get the next set of credentials from the database. */ - virtual void get_next_credentials(const char * config); + virtual void get_next_credentials(const char ** config); /** Activate one of the on-board modem's connection profiles. *