arduino-libraries / Arduino_Cellular

A library which provides a toolkit for interacting with the official Arduino Pro 4G Modules.
Mozilla Public License 2.0
3 stars 3 forks source link

[ACELL05] SMS messages not sent and/or include the AT Command #21

Open aliphys opened 1 month ago

aliphys commented 1 month ago

As part of the library test for the Arduino_Cellular library, I (in Sweden 🇸🇪 ) have not been able to consistently send SMS messages, even when both the cellular HTTP(S) connectivity is achieved and the SIM card (Telenor and Lyca Mobile) is able to send messages from my phone.

Replication of this issue has been challenging, since @t-wojo in the US 🇺🇸 and @martab1994 in Italy 🇮🇹 have not had the same issues. @WolfRorDev however has had issues, showing that this is not a one-off problem.

Using this sketch, I was able to consistently (ish) display the following:

Screenshot from phone, displaying the text messages recieved ![Untitled](https://github.com/arduino-libraries/Arduino_Cellular/assets/75624145/172e256c-c080-47de-badc-a09e42300bc5)

Diagnosis

Given that the modem interpreted the AT command as part of the text message, it is possible that the AT command for setting the board into text mode is not registered prior to sending the text by sendSMS(). Merging https://github.com/arduino-libraries/Arduino_Cellular/pull/15 may fix this, by doing the following before calling the AT+CMGS command:

aliphys commented 1 month ago

SMS messages not being sent reliably has been replicated in Sweden 🇸🇪 by @i-herrera

aliphys commented 1 month ago

TLDR

Details

With https://github.com/arduino-libraries/Arduino_Cellular/issues/21 merged, there still is an intermittent problem which seems hard to reproduce consistently. In summary, I can share the following observations at this stage:

Diagnosis

✨ Thanks @pedromsousalima for helping troubleshoot the issue

alrvid commented 1 month ago

That's an interesting combination of observations.

As far as I know, Telenor and Comviq (a Tele2 brand) uses equipment from the same supplier for their 4G networks, while Telia uses equipment from a completely different supplier, and ThingsMobile is some kind of MVNO that can run over all the major operator's networks depending on the situation. So, Telenor working and Comviq not working might point to some kind of configuration difference in their networks. They could have different setups for filtering of things like invalid characters, or detection of what they think are otherwise malformed messages intended as some kind of attack. As far as I know, the billing function for SMS is hooked into the earliest part of the processing chain (they want you to pay for sending malformed messages, spamming, etc), so that can explain why the messages were billed without ever appearing on the receiving end. This also points to the fact that the messages are probably regarded as invalid somehow by the operator - they are probably sent malformed, and therefore first billed, and then dropped to protect the network and the receiver.