12.09.2019, 08:37
Hello:
We have several devices on the network that send packages continuously: energy meters.
We need to read these packages and we have tried using the following scritp:
if not server then
require('socket')
server = socket.udp()
server:setsockname('*', 8891)
server:settimeout(1)
end
data = server:receive()
if data then
loghex(data)
end
If we log setsockename address already in use.
Is this method correct to receive that kind of data from network.
Thanks.
We have several devices on the network that send packages continuously: energy meters.
We need to read these packages and we have tried using the following scritp:
if not server then
require('socket')
server = socket.udp()
server:setsockname('*', 8891)
server:settimeout(1)
end
data = server:receive()
if data then
loghex(data)
end
If we log setsockename address already in use.
Is this method correct to receive that kind of data from network.
Thanks.