Sending raw UDP packets to lighting program
So i’m quite new to max and have been trying to trigger a lighting program that takes simple string commands (example. Y"hello world",10,13) over ethernet. Sadly I haven’t been given much to work on in the company’s forum. The packets are UDP/IP based and should go to port 6553 in broadcast mode.
The structure of the UDP/IP packets are:
where long32 is 4 bytes, word16 is 2 bytes and byte is 1 byte.
I figured the aka.datagram might be the way of doing this but I was unable to get the lighting program to respond to any of the values or strings (be they in hex or ascii). Being quite a newbie i figure i must be missing the proper steps to create the packet correctly. Any help, guidance or ideas would greatly be appreciated.
Thank you for the quick reply! It looks great, i’m new to programming in general(just completing my first programming class) as I study theatre, but i’m able to grasp everything. Thank you! Its become apparent i wouldn’t of been able to blindly do this without your very generous help! I’m excited to test this tomorrow!
did you try the networking objects in my library? Namely,
[sadam.udpReceiver]. You can send/receive raw binary streams with them (so, you just have to send your data from byte to byte to the object and when you
bang it, it would send the packeted stream to the specified network address — no additional formatting like OSC or anything else would be performed).
You can access it here: http://www.sadam.hu/software
Hope that helps,
Thanks for the heads up Siska Ádám, I ran across your library just after posting. I’m in north america and didn’t expect any replies until much later (3AM now). DiGiTaLFX looks to have given me an excellent solution but I think your right in that [sadam.udpSender] is one of the tools that could handle this. I’m excited to checkout all the other goodies that also reside within your library.
Forums > MaxMSP