Logic Machine Forum
LM5 with RS232 router TRB142 - 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: LM5 with RS232 router TRB142 (/showthread.php?tid=5968)



LM5 with RS232 router TRB142 - ferrim - 15.04.2025

Hi all,
I would like to replace some USB sticks that I have been using for years with LM to send SMS with Teltonika TRB142 (RS232 at 115200). 

I am using a LM5 Lite with latest fw and the outgoing SMS work fine while I have problems sending commands such as: W 3/1/1 355

I have done some tests and it seems to me that there is a problem in reading the content of the SMS and if I try to manually put the pdu string received from the TRB in the sms variable (see red box) of the user.sms file all work fine.

Any hints?

Tnx

   


RE: LM5 with RS232 router TRB142 - ferrim - 16.04.2025

This is the serial communication LM<-->TRB142 from LM reboot to SMS receive,
It seems correct to me and I don't understand why incoming SMS are not processed.
HTH


RE: LM5 with RS232 router TRB142 - admin - 16.04.2025

Follow this and post what you get in Logs:
https://forum.logicmachine.net/showthread.php?tid=5403&pid=38043#pid38043

And log what is the result of parsing SMS PDU:
Code:
res, sms = pcall(AT.parsepdu, sms)
log(res, sms)



RE: LM5 with RS232 router TRB142 - ferrim - 16.04.2025

Log screenshot:


RE: LM5 with RS232 router TRB142 - admin - 16.04.2025

This might be caused by disabled "echo" mode on the modem.

In resident script add this:
Code:
-- enable echo mode
modem:send('ATE1')

After these lines:
Code:
-- delete all saved messages
modem:send('AT+CMGD=1,4')



RE: LM5 with RS232 router TRB142 - ferrim - 16.04.2025

Thank you Admin, 
great support as usual!