Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AT_CellularSMS::list_messages support index 0 in SMS inbox #11249

Merged
merged 2 commits into from
Aug 20, 2019

Commits on Aug 16, 2019

  1. Make AT_CellularSMS support index 0 in SMS inbox

    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.
    Marcin Radomski committed Aug 16, 2019
    Configuration menu
    Copy the full SHA
    17f6f1c View commit details
    Browse the repository at this point in the history
  2. Update test_AT_CellularSMS_get_sms

    0 is now a valid value
    Marcin Radomski committed Aug 16, 2019
    Configuration menu
    Copy the full SHA
    ce0bb7f View commit details
    Browse the repository at this point in the history