Skip to content

SIM800: SMS reading and deleting support#80

Open
tonyputi wants to merge 1 commit intovshymanskyy:masterfrom
sallemi-iot:features/sms
Open

SIM800: SMS reading and deleting support#80
tonyputi wants to merge 1 commit intovshymanskyy:masterfrom
sallemi-iot:features/sms

Conversation

@tonyputi
Copy link
Copy Markdown

@tonyputi tonyputi commented Sep 17, 2017

  • using as default storage the simcard
  • added support to sms interrupt configuration "CFGRI"
  • added support to delete one or all sms inside simcard
  • added support to read sms by index

@vshymanskyy
Copy link
Copy Markdown
Owner

vshymanskyy commented Sep 17, 2017

Thank you! that's really a valuable addition. I'll test this out and try to integrate it.

@tonyputi
Copy link
Copy Markdown
Author

tonyputi commented Sep 18, 2017 via email

@thbl
Copy link
Copy Markdown

thbl commented Oct 15, 2017

+1

@vshymanskyy
Copy link
Copy Markdown
Owner

Sorry, I've been quite busy - I'll try to find some time for reviewing this soon.

Comment thread TinyGsmClientSIM800.h
sendAT(GF("+CMGF=1"));
if(waitResponse() != 1) return false;

sendAT(GF("CMGD="), i);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Change "CMGD=" to "+CMGD="

Comment thread TinyGsmClientSIM800.h
sendAT(GF("+CMGF=1"));
if(waitResponse() != 1) return false;
sendAT(GF("+CSDH=1"));
if(waitResponse() != 1) return false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Better do "+CMGF=1" and "+CSDH=1" on init() instead of everytime and each sms function.

Comment thread TinyGsmClientSIM800.h
if(waitResponse(GF(GSM_NL "+CMGR:"))) {
streamSkipUntil('\n');
msg = stream.readStringUntil('\n');
return true;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Need to wait for OK.
return waitResponse() == 1;

Comment thread TinyGsmClientSIM800.h
if(waitResponse() != 1) return false;

sendAT(GF("+CMGR="), i);
if(waitResponse(GF(GSM_NL "+CMGR:"))) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

if (waitResponse(GF(GSM_NL "+CMGR:"), GFP(GSM_OK), GFP(GSM_ERROR)) == 1) {

@thbl
Copy link
Copy Markdown

thbl commented Nov 24, 2017

@vshymanskyy have you tested this ? :)

Comment thread TinyGsmClientSIM800.h
sendAT(GF("+CMGR="), i);
if(waitResponse(GF(GSM_NL "+CMGR:"))) {
streamSkipUntil('\n');
msg = stream.readStringUntil('\n');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unfortunately, if the message has line breaks, stream.readStringUntil('\n'); will skip the rest of the message.

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.

5 participants