03.06.2025, 12:43
Use this script (resident, sleep time = 0) to catch HDL messages. You need to configure your gateway to forward messages to LM. You will have to check opcode and additional field values to determine the HDL packet contents.
Code:
if not sock then
require('user.hdl')
sock = socket.udp()
sock:settimeout(60)
sock:setsockname('*', 6000)
HDL.init()
end
data = sock:receive()
if data then
packet, err = HDL.decode(data)
if packet then
packet.additional = lmcore.strtohex(packet.additional)
log('HDL packet', packet)
else
log('HDL error', err)
end
end