![]() |
SMS not received - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: SMS not received (/showthread.php?tid=5940) |
SMS not received - andrepneves@gmail.com - 20.03.2025 Hi, We are using a LogicMachine5 Reactor GSM to send SMS in case of alarm of some variables. The script uses a for to send the message to multiple numbers, with a delay between them. You can see the code below (I changed the phone numbers with generic ones for security purposes). The problem is that not every SMS is received. What could be causing this? Is there any way to check if the SMS is received? Thank you in advance, André Neves Code: require('user.sms') RE: SMS not received - admin - 21.03.2025 See this post on how to add additional logging to the SMS script: https://forum.logicmachine.net/showthread.php?tid=5403&pid=38043#pid38043 RE: SMS not received - andrepneves@gmail.com - 23.05.2025 Hello, I've updated the scripts as indicated on the link from @admin but some users are still not receiveing the messages. It's not always the same user, it's random. In the alerts, the SMS handler indicate that all messages are sent but not all are received. Please help, the client is using this LM to check high priority alarms and with this behavior is system simply isn't reliable. Thanks in advance. BR, André Neves RE: SMS not received - admin - 26.05.2025 Restart the SMS script after making changes to the library. RE: SMS not received - andrepneves@gmail.com - 26.05.2025 Did a reboot to the LM. There are still some SMS that get lost in the process. RE: SMS not received - admin - 26.05.2025 Check that you have replaced AT:read() in the library correctly. When done correctly it will log everything that the modem sends to LM. RE: SMS not received - andrepneves@gmail.com - 26.05.2025 Chage AT:read with the version here https://forum.logicmachine.net/showthread.php?tid=5403&pid=38043#pid38043 when sending SMS the log looks like the 1st image. In standby, it's always logging 'timeout' as shown in the second image RE: SMS not received - admin - 26.05.2025 Update the function once more, it won't spam the log with empty messages. Code: function AT:read(timeout) Post your logs when SMS does not reach the recipient. RE: SMS not received - andrepneves@gmail.com - 26.05.2025 Users Nº1 and 4 didn't get the SMS. I think they'tre the ones with +CMS ERROR:665 Log in attach. Thank's for the quick reply RE: SMS not received - admin - 26.05.2025 This error indicates poor network signal quality. Check this thread on how to monitor signal level: https://forum.logicmachine.net/showthread.php?tid=5369&pid=34692#pid34692 RE: SMS not received - andrepneves@gmail.com - 03.06.2025 Those scripts only return 'unknown' to the group object. In the log we get +CSQ:15,99 /16,99 so we think this is not a signal quality issue. In five SMS 2 are lost on average. I don't know if its related, but i'm not able to read objects via SMS. It's not important for this project but I'd like to give it a try. Is there any way to take the line object to the main function (via return maybe)? My idea was to repeat the send every time we get that '+CMS ERROR: 665' RE: SMS not received - admin - 03.06.2025 Log the sending result in the resident script, it should be OK if the message is sent. Code: local res = modem:sendsms(msg:sub(1, sep - 1), msg:sub(sep + 1)) The message can be retried several times like this: Code: for retry = 1, 5 do RE: SMS not received - andrepneves@gmail.com - 04.06.2025 It's strange that it keeps failing some of the messages, but I think this will work with this safety. We hope to avoid the problem. I've added an alert if all the retrys fail just to let the user know via LM that someone didn't get the text. Thank you for your assist. |