Logic Machine Forum
ArtNet packet UDP - 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: ArtNet packet UDP (/showthread.php?tid=1544)



ArtNet packet UDP - Jayce - 21.08.2018

Hello, I'm trying to control LED matrix wall through knx. I have it setup to ArtNET and I need to send an UDP packet to IP address with following HEX: 


41 72 74 2d 4e 65 74 00 00 50 00 0e 01 00 0e 00 02 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

and this port: 6454

Could you please help me with this? 


RE: ArtNet packet UDP - admin - 21.08.2018

See examples here:
https://forum.logicmachine.net/showthread.php?tid=1391

You need to change universe number to 0x0E.


RE: ArtNet packet UDP - Jayce - 21.08.2018

Thank you very much, I'm still a bit confused where to put the HEX and the port.


RE: ArtNet packet UDP - admin - 21.08.2018

You don't need to put hex anywhere. Script generates valid ArtNet data packet and sends it to port 6454 (0x1936). You need to set correct IP, universe number and provide array of values. There's also an example with direct mapping to objects.


RE: ArtNet packet UDP - Jayce - 21.08.2018

All right, I understand. Thank you once again.


RE: ArtNet packet UDP - Jayce - 22.08.2018

I wanted to test this, but since the LED matrix wall isn't physically installed yet, I tried downloading software called "The ArtNetominator" which can recieve ArtNET packets. Then I modified the script accordingly:

Code:
ip = '192.168.1.43' --DHCP ip address of my PC
universe = 0x0E --14 as you said
data = '255' --don't know what to put here
artnet_dmx(ip, 0, 0, universe, { data })

After that I tried running the script which sent a packet that I successfully got in the software (screenshot 1).
The technician that will be installing the LED matrix sent me mail with an IP, default port (6454) and HEX. He said that I need to somehow send packet that contains HEX which I sent above. Do you have any idea how to make it work?


RE: ArtNet packet UDP - admin - 22.08.2018

You can send raw data like this but it only makes sense if you have a pre-defined array of values you want to set:
Code:
data = string.char(0x41, 0x72, 0x74, 0x2d, 0x4e, 0x65, 0x74, 0x00, 0x00, 0x50,
  0x00, 0x0e, 0x01, 0x00, 0x0e, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00)
sock = require('socket').udp()
sock:sendto(data, '192.168.1.204', 6454)
sock:close()