Seeed-Studio / Wio_LTE_Arduino_Library

Wio Tracker LTE is boards combined with STM32F405RGT6 and EC21(4G/3G/GPS) module
MIT License
24 stars 12 forks source link

SMSRead.ino not logging incoming Twilio Commands or SMS #6

Closed cskonopka closed 4 years ago

cskonopka commented 5 years ago

I've been testing the Wio LTE for Twilio and I had an issue with the "ReadSMS.ino" example. Whenever I send a SMS via Twilio Functions or POST using the Commands portion of the Twilio Programmable Wireless API the message does not appear in the Serial Monitor. It is not registered within the Arduino IDE so I am unable to collect it and use the message for various operations. Initially I thought that the modem was not reading the incoming Command but the Wio LTE illuminates (blinking red LED 3-5 times) notifying that the message has been received. Within the Twilio Programmable Wireless console I see that the Command has been received by the modem and Twilio.

I found another Seeed example (https://github.com/SeeedJP/WioLTEforArduino/blob/master/examples/sms/ReceiveSMS/ReceiveSMS.ino) that works correctly.

Any thoughts?

lanselambor commented 5 years ago

@cskonopka May I have you help to test for one thing?

  1. Upload ATBypass.ino
  2. Send SMS to the boadrd in your way.
  3. Issue AT comamnd AT+CMGL="REC UNREAD", mark if you can see the message you send before.

There is difference between both libraries,

Wio_LTE_Arduino_Library: List unread SMS treat it as the coming SMS. WioLTEforArduino: Delete the SMS with index 0, and check if the new SMS is existed with index 0.

cskonopka commented 5 years ago

Of course! Any/all help welcomed. I've messed with the AT commands previously and will give it another shot. Ideally would like to get this to work so I can feature both libraries on our docs. Let me give this a whirl later today. Thank you for the response! 💯

cskonopka commented 5 years ago

This is the response I get from AT+CMGL="REC UNREAD"

+CMTI: "ME",1
AT+CMGL=4

+CMGL: 0,0,,29
07912160130350F62404C9926300009110019004532B10C8F79D9C0799E5EF36685C953243
+CMGL: 1,0,,29
07912160130350F62404C9926300009110019004052B10C8F79D9C0799E5EF36685C953243

You need to set it to "Text Mode SMS" to get the messages. This can be done using AT+CMGF=1 before AT+CMGL="REC UNREAD". After AT+CMGF=1 then AT+CMGL="REC UNREAD" the response is the following:

+CMGL: 0,"REC READ","2936",,"19/01/10,09:40:35-32"
Howdy from cURL!
+CMGL: 1,"REC READ","2936",,"19/01/10,09:40:50-32"
Howdy from cURL!

Is the reason why the IDE is not getting the text is because AT+CMGF=1 is not set before CMGL?

lanselambor commented 5 years ago

AT+CMGF=1 has been set, so this is not the problem.

cskonopka commented 5 years ago

Coming back to this, you are correct it is set and is not the problem. Since our discussion I've had no issues with the Wio LTE. Today I started to test a program I made that sent/receive messages and the modem seems to be clogged. Messages are sent to the modem and they are not appearing in the Serial Monitor. The frequency of the messages sent is a min between with a few sporadic every 10 seconds. I will keep investigating it. Have you experienced this before?

Pillar1989 commented 4 years ago

I'll turn this off first, and if you need to talk about it later, you can turn it back on