Fork of ublox-cellular-base to add LARA-R2 support
Fork of ublox-cellular-base by
Diff: UbloxCellularBase.cpp
- Revision:
- 8:a15349fcab25
- Parent:
- 7:c2cf27a981b3
- Child:
- 9:2c997d7df4c6
- Child:
- 10:c4281fa79b8f
diff -r c2cf27a981b3 -r a15349fcab25 UbloxCellularBase.cpp --- a/UbloxCellularBase.cpp Thu Sep 21 20:29:57 2017 +0000 +++ b/UbloxCellularBase.cpp Mon Oct 30 14:46:22 2017 +0000 @@ -688,7 +688,7 @@ // Initialise the modem. bool UbloxCellularBase::init(const char *pin) { - bool gotImsi = false; + int x; MBED_ASSERT(_at != NULL); if (!_modem_initialised) { @@ -705,11 +705,11 @@ // Try a few times to get the IMSI (since on some modems this can // take a while to be retrieved, especially if a SIM PIN // was set) - for (int x = 0; (x < 3) && !(gotImsi = get_imsi()); x++) { + for (x = 0; (x < 3) && !get_imsi(); x++) { wait_ms(1000); } - if (gotImsi) { + if (x < 3) { // If we got the IMSI, can get the others if (get_imei() && // Get international mobile equipment identifier get_meid() && // Probably the same as the IMEI set_sms()) { // And set up SMS