2

I have problems with the sim900. When I'm reading the serial port and the sim900 module receives a sms. It send an alert via serial port and cause problems with the reading.

I have tried using this command "AT+CNMI=0,0,0,0,0", it works fine if I really don't need sms, but I need them. what can i do if i don't want to receive new sms message notifications when I'm reading the serial port???

Thanks!

Alex
  • 21
  • 2

1 Answers1

3

You may use AT+CNMI command to enable or disable New Message Indication messages on uart. Keep in mind that you wont get any notification for a message that is received when notifications are disabled so you need to implement a check for it.

You may either delete all existing messages using the AT+CMGD=1,4 command before disabling the notifications and check for all messages after after resuming notifications or implement any other check.

TO ENABLE NOTIFICATIONS "AT+CNMI=1,2,0,0,0"

TO DISABLE NOTIFICATIONS "AT+CNMI=0,0,0,0,0"

dmSherazi
  • 3,743
  • 5
  • 37
  • 62