When AT+CGML is used to retrieve list of SMS stored in modem inbox,
every message has an associated index. ETSI TS 127 005 v7.0.0 does not
specify what is the allowed range of such indices - all it says is
"integer type; value in the range of location numbers supported by the
associated memory".
Usually, AT modems use positive indexes (starting at 1). Quectel BG96
modem takes a different approach, indexing messages starting at 0.
Current implementation of `AT_CellularSMS::list_messages()` considers
index 0 invalid and ignores such message, effectively making it
impossible to access using mbed-os API.
This commit changes the behavior so that value of 0 is handled as any
other positive message index.
Currently, create_pdu receives a destination address without '+' prefix,
and always sets the "type of address" to "unknown". That means, the
number needs to contain appropriate international number prefix (00/011)
if necessary - which is not the case if the leading + is simply
stripped.
This changes send_sms behavior so that when a SMS is sent to an
international number (indicated by leading +):
- AT+CMGS command receives the number with + prefix,
- created PDU has the "international" flag set.
This prevents RX2 window to be enabled at the same time when repeating
transmission, when QoS repeated TX is in effect. Failure to do so
seems to place the LoRaWAN stack in a state where send() always fails
with WOULD_BLOCK error.
The portable and correct way to include Mbed TLS header files is
"mbedtls/someheader.h". It's Mbed OS specific, unecessary, and incorrect
to use "mbedtls/inc/mbedtls/someheader.h".
Test case printed IP address. If ip address is null, IAR compiled binary fails.
Added check for printing null. If IP address is null, then it prints string 'null'.
Thus far the default position has been after the application plus two
spare sectors. For simplicity and to have a predictable location for the
TDBStore with the default configuration the location is now switched to
the end of the flash. Two last sectors to be exact.
CellularContext now tries to get an IP address after connect and before
sending NSAPI_STATUS_GLOBAL_UP. Even if we don't the IP address from
the modem we will send NSAPI_STATUS_GLOBAL_UP and return success.
Modem has an ip address but for some reason some modems don't
give it to us.