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

Handle SMS responses #104

Merged
merged 6 commits into from Dec 17, 2020
Merged

Conversation

janakelarsson
Copy link
Contributor

Hi, the current code will mis-interpret an SMS response for any SMS with the content "OK".

In this case the AT command response will contain "+CMGL: ...\r\nOK\r\n" which will be caught in MODEM::poll() during the readout of the response, and break the interpreter.

The pull request contains special handling of "+CMGL:" responses.

I tried to make the change as small as possible, and with as small runtime overhead as possible. It checks if the response contains an SMS response once, and if not, continues with the old code.

@janakelarsson
Copy link
Contributor Author

Changed to be more robust. Still minimal code changes, but now the change makes sure that SMS content is ignored altogether. No longer adds a new _atCommandState value.

Copy link
Contributor

@aentinger aentinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thank you @janakelarsson 🚀

@aentinger aentinger merged commit 5cfc6a5 into arduino-libraries:master Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants