13.06.2023, 08:30
You can also perform RS232 self-test. Remove the ZigBee app, connect RS232 RX/TX on LM together and run this script once. You will see the result in the Alerts tab.
Code:
port = require('serial').open('/dev/RS232')
str = '1234567890'
port:flush()
for i = 1, 100 do
port:write(str)
res = port:read(#str, 1)
if not res or res ~= str then
fail = true
break
end
end
alert(fail and 'ERROR' or 'OK')