Notification of SMS received

Solved
bhirsch's picture
bhirsch
Junior(0)

Is there any way to receive a notification when an sms is received.

(SMS to the device can be sent from the control center)

Thank you

jflynn129's picture
jflynn129
Moderator(3)

there is an example SMS applicatioin at https://os.mbed.com/teams/Avnet/code/SMS_demo/

In this demo you set up a time-interval in which the software will check for received SMS messages. If a message is received, it calls a user define/registered function.

bhirsch's picture
bhirsch
Junior(0)

Seems the module it self is not providing a call back rather you can query the module a few seconds.

Is that correct?

I'm wondering about the power usage to be constantly polling. I'm not sure if that would efficient on a battery operated device.

Thanks

jflynn129's picture
jflynn129
Moderator(3)

Correct, when we implemented the SW, there was no data/sms notifications from the device so we had to poll for data.  I'm told that the later versions of Firmware support data notifications but haven't tried to implement them myself.  I still don't think it gives you an interrupt when data is available so you still have to poll the device though.

bhirsch's picture
bhirsch
Junior(0)

Seems you are supposed be able to recieve a callback of sorts through unsolicited result codes with setting  AT+CNMI but it doesnt work by me. I only get the code by sending an AT.

Is the unsolicited result codes by definition supposed to automatically be sent?

Can someone try and see if it works by them?

Thank you

bhirsch's picture
bhirsch
Junior(0)

Actually I got it to work. I was testing on the debug port, when I tried on the regular one it worked. (I'm using the IMS2).

I think this is great for sending simple commands down. I think the potential is tremendous. For a really low cost iot device with really low monthly fees.