I have so many commands that i need help to setup my SIM800L module. Tutorials i have seen so far involves the messages going directly to the mCu this is problematic for me because if the mCU is currently bussy doing something as of the moment and multiple messages arrive. The buffer would fill up without getting read.

I would like my program logic to be like this:

Wait for new messages/ do some other stuff -> check inbox -> if new message -> read message -> delete read messages-> repeat...

Would this be possible? Im having a hard time finding the commands for these actions. I know that setting how messages are handled are set by AT+CNMI= i could not understand the datasheet. I have also came across this command : AT+CMGL="ALL" and AT+CMGD=X which deletes the read message.

AT+CMGL= ALL seems dangerous because if too much pending message is present it would overflow the buffer i set in my arduino (256 bytes). Is there a command thats just 1 at a time?

so the sequence of commands would be:

AT+????? //tells the module to save incoming to memory

AT+CMGL="XXX" //read one unread if present
AT+CMGD=??    //CMGL should return a number identifier which i can then use for delete
//do something else or loop though all unread messages.

Can anyone help me sort this out?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.