This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Receive UDP string
#3
(24.08.2017, 17:51)admin Wrote: Resident script:
Code:
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

Super, thanks admin.

but what I need to add to script, if an example I send ASCII 'group 1/1/1 on' (HEX 67 72 6f 75 70 20 31 2f 31 2f 31 20 6f 6e) to LM from other device and LM set group 1/1/1 to "TRUE" or to "1" or to something else regarding this group data type? And what sleep interval better to set for this resident script or it does not matter?? No so experienced with LUA, how convert "data" from this script and compare with my ASCII or HEX I send to LM to make changes in groups regarding received data??

By the way found free packet sender: https://packetsender.com/download
can be used to send as example data to LM using UDP for some testing. Works fine but I see some delays, but I send data to LM over WiFi...
Reply


Messages In This Thread
Receive UDP string - by leonidas - 24.08.2017, 13:16
RE: Receive UDP string - by admin - 24.08.2017, 17:51
RE: Receive UDP string - by AlexLV - 24.08.2017, 22:47
RE: Receive UDP string - by leonidas - 28.08.2017, 05:25
RE: Receive UDP string - by admin - 28.08.2017, 08:54
RE: Receive UDP string - by AlexLV - 04.09.2017, 08:41
RE: Receive UDP string - by Diggerz - 15.02.2021, 01:38
RE: Receive UDP string - by admin - 15.02.2021, 07:46
RE: Receive UDP string - by Diggerz - 18.02.2021, 08:56
RE: Receive UDP string - by admin - 18.02.2021, 08:58

Forum Jump: