This class provides SMS, USSD and modem file system support for u-blox modules on the C027 and C030 boards (excepting the C030 N2xx flavour) from mbed 5.5 onwards.
Dependents: example-ublox-at-cellular-interface-ext example-ublox-cellular-driver-gen HelloMQTT ublox_new_driver_test ... more
Revision 9:a5389248c8d0, committed 2018-08-31
- Comitter:
- fahim.alavi@u-blox.com
- Date:
- Fri Aug 31 16:21:57 2018 +0500
- Parent:
- 8:e6f6bf43a5d1
- Commit message:
- Sara-R410m read block has start delay, adding it in library
Changed in this revision
UbloxCellularDriverGen.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e6f6bf43a5d1 -r a5389248c8d0 UbloxCellularDriverGen.cpp --- a/UbloxCellularDriverGen.cpp Tue Jul 24 13:06:55 2018 +0000 +++ b/UbloxCellularDriverGen.cpp Fri Aug 31 16:21:57 2018 +0500 @@ -675,11 +675,12 @@ // of 100 ms (for short files) timer.reset(); timer.start(); - timeLimit = FILE_BUFFER_SIZE * 4 / ((MBED_CONF_UBLOX_CELL_BAUD_RATE / 8) / 1000); - if (timeLimit < 100) { - timeLimit = 100; - } + + // Add startup delay + timeLimit = 200+ FILE_BUFFER_SIZE * 4 / ((MBED_CONF_UBLOX_CELL_BAUD_RATE / 8) / 1000); + sz_read = 0; + while ((sz_read < blockSize) && (timer.read_ms() < timeLimit)) { ch = _at->getc(); if (ch >= 0) { @@ -695,8 +696,8 @@ offset += sz_read; _at->recv("OK"); } else { - debug_if(_debug_trace_on, "blockSize %d but only received %d bytes\n", blockSize, sz_read); - success = false; + debug_if(_debug_trace_on, "blockSize %d but only received %d bytes, configured retry\n", blockSize, sz_read); + //success = false; } } else { success = false;