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

Conversation

dextero
Copy link
Contributor

@dextero dextero commented Aug 16, 2019

Description

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.

Tested with Quectel BG96 modem.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Marcin Radomski added 2 commits August 16, 2019 14:19
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.
0 is now a valid value
@ciarmcom ciarmcom requested review from a team August 16, 2019 13:00
@ciarmcom
Copy link
Member

@dextero, thank you for your changes.
@ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

@mbed-ci
Copy link

mbed-ci commented Aug 19, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants