Go Down

Topic: MKR1400 GSM: receive SMS latency (Read 920 times) previous topic - next topic


Mar 12, 2018, 02:48 pm Last Edit: Mar 12, 2018, 05:23 pm by cinivzr
I am using the MKR1400 as an SMS gateway. The goal is to receive a SMS and to do something as quickly as possible.

I have a setup with my MKR1400, a 2500mAh battery, the provided antenna, and a SIM card from a UK contractor.

I'm using the ReceiveSMS example without the delay(1000) to get it running as fast as possible but there's always a latency of 5 to 7 seconds between the moment where the SMS is sent from my phone to when it's received by the Arduino.

When I put the SIM card into a phone, it receives the SMS after around 3 seconds.

I looked inside the library but I couldn't find a delay or something blocking or slowing down the SMS fetching... Does anyone have a similar problem?

Thanks a lot!


Okay so I've figured it out, when communicating with the onboard SARA-U201 GSM module I've notice that the CNMI parameter was set to 1,0,0,0

I did some research on general SMS settings and I found out that the CNMI needs to be configured to 1,2,0,0

I've setup up the Arduino to program this at the end of the setup function.
Then, when a SMS is received by the module, it is automatically transferred to the Arduino, usually within 4 seconds. I then wrote a piece of code that reads the GSMserial and parses the message to extract the content of the SMS and getting rid of the rest.

I assume that the sms.avaialble() was polling the GSM module at a regular interval, which is why it was way slower than this new configuration...

Go Up