Sending OSC from Max to another Computer/Lighting Console
Apr 05 2018 | 10:46 am
Hi brains trust,
I'm hoping someone here may know how I can send OSC messages from Max to another computer? In this case, I'm actually sending to an ETC Ion Lighting console. The connection needs to be hardwired, so it would go from iMac with Max to router to console via Cat5 network cable.
I have tried using the udpsend but do not know how to get the message out of Max. Any help would be greatly appreciated. I can provide more context if needed.
Thanks in advance for your help.
- Feb 10 2022 | 1:11 pmHi Nathan, did you find a solution for this? I'm trying to do the same thing. I went to a theatre today and tried to connect Max to an ETC Ion XE lighting console, part of the EOS family. I connected the Ethernet (Cat5) and it automatically found my computer (and there seemed to be some communication as I could spot through Wireshark some messages with the name of the theater coming through UDP, and the console shows 'online'). However, real OSC communication didn't work. I used the udpsend and udpreceive objects set to the standard IP of the console (192.168.100.30) and tried different ports. I also tried to set my Windows ethernet properties to this static IP (TCP/IPv4) and subnet mask. I was sending messages like /eos/ping or /eos/chan/1=0 etc, but nothing seemed to work. The ping message should return /eos/out/ping to the udpreceive according to the manual, but that didn't happen. I'm stuck now. My firewall is off by the way. Do the ports for Rx and Tx need to be different? And the ports set for the UDP objects? Am I right to set the IP in the Windows adapter settings (TCP/IPv4)? It seemed that when I tried to send other ping messages directly from the lighting console to Max I received (on the lighting console) "error 10013, request failed with socket error". Anyone else has any idea of how to do this properly? What could I be missing?
- Feb 10 2022 | 9:56 pmOk. Where to start?!Are you connected to a wider network or are you trying to connect your PC directly to the lighting unit with a single Ethernet cable? Whilst it can be made to work on a direct connection with a single cable, Windows is actually dire at doing this and it can be a nightmare getting it work (unlike Macs that seem to cope with minimal fuss!). Ideally, you need to create some sort of a network with at least a switch, a DHCP server or, better still, a router between the two. Alternatively, if the lighting unit has a DHCP server then turn it on and let it generate the network settings for your PC.What you must not do is give the PC the same address settings as the lighting unit - neither will be able to send or receive anything! The PC address must be different, even if by just one point, eg 192.168.100.31. This might not work if you are on a wider network and you happen to pick an address used by another device - hence why using DHCP on an unfamiliar network is the better option. If there is a router in the system or the lighting unit has a DHCP server then set your PC to use DHCP rather than a fixed address.With UDP, it is the norm for send and receive to use two different port numbers. There are rare exceptions (like my dreaded Behringer mixer that uses the same port for both). Unfortunately, there are no standards for defining port numbers so I'm assuming that you can get the lighting unit to tell you what it is using. The PC must be sending to the receive port of the lighting unit and the receive port on the PC must match the send port on the lighting unit. Source Audio will tell you to broadcast from your PC using 255.255.255.255 as the address in the udpsend object but that doesn't help much with udpreceive if you need two way communication, and he uses Mac's that do networking properly unlike Windows that doesn't!!!I had nightmares using OSC over UDP in my project until I came across the Sadam Library - accessible through the Package Manager in Max. You'll need to install Sadam to use it. This was my solution:I've attached the bit of code here if you want to paste it into your patch to try:OSC messages are sent from your patch via a corresponding "s OSCOut" object and responses received via a corresponding "r OSCIn" - or you can just create your own connections. The two message boxes will display the most recent sent and received OSC messages.You will need to change three other things - the address in the Sadam.udpClient object needs to be the address of your lighting unit (192.168.100.30). The "dst_port" number needs to be changed to the receive port on the lighting unit and "src_port" needs to be changed to the port number it sends on.Press the RESET bang to initialise the configuration.The "p X-Mix OSC Debug" embedded patch contains a message roll of the last 64 messages sent and received for debugging purposes - click the "X" control to enable it and double click the "p X-Mix OSC Debug " object to view the message log.I hope that this helps in some way!
- Feb 10 2022 | 10:25 pmOh, and thanks for the WireShark tip!
- Feb 10 2022 | 11:15 pmHi Andrew, thanks so much for your complete answer!! I think my mistake was probably setting up the IP to be the same on both sides. I remember setting up an art-net controller in the past to control some LEDs and the IP had to be the same, but it seems with OSC and the console it's a different situation. I got Sadam and this code seems amazing, thanks so much. Yes, Wireshark is brilliant for network stuff. I will try again next week and hopefully, this will be sorted!!
- Feb 11 2022 | 9:43 amI had a quick skim through the EOS manuals (nice unit!). It does appear to have a DHCP server but it is an installation option so you should turn it on if it’s been enabled on your unit. Then set your PC network interface to use DHCP to get its configuration settings from the EOS. Also, make sure that you’re using the correct Ethernet socket on the EOS as the two ports have different configurations. According to the manual, 192.168.100.30 is the default address for socket number 2.They recommend using port numbers 8000 and 8001 for UDP but they can be changed to whatever you like in the EOS System settings. Just make sure you use port numbers above 5000.In theory, you should be able to connect it with a single Ethernet cable directly to your PC but all I can say is “good luck” trying to get Windows to work that way. If you can, at the very least, put a simple unmanaged switch box (not a splitter) in between the two.I hope you get it to work. Looks like it could be a lot of fun!
- Feb 13 2022 | 3:52 pmThe EOS website has good guides on how to set up the IP - you need to be on the same subnet etc in terms of your IP address.
- Feb 14 2022 | 6:37 pmThanks all for the info, I managed to make it work today by using DHCP. Nothing needed to change in my Windows setup (no need to change adapter settings or anything). On the ETC Ion Xe I have the following setup: ION XE:
PORT 2: 192.168.100.30 Subnet mask: 255.255.252.0
OUTPUT PROTOCOLS ---------------------------
sACN off Net2 - EDMX off AVAB UDP off ArrtNet off backup takes over at higher priority ON backup automatically takes control off
INTERFACE PROTOCOLS --------------------------- all off for PORT 2 except: UDP Strings & OSC ON (port 2) standard network, fast file transfer, directed broadcast, TCP format for OSC 1.0
DHCP SERVICE ------------------------ PORT 2 ENABLE ON 192.168.100.31 Number of Adresses 500 Subnet mask: 255.255.252.0 SHOW CONTROL / OSC ------------------------ OSC UDP RX = 8000 OSC UDP TX = 8001And that's all! On Max I have udpsend 192.168.100.30 8000. The ping message still doesn't seem to work (I don't receive anything back), but messages such as /eos/chan/1/full work fine. Now I can design the interactive stuff for the upcoming concert. Thanks!
- Feb 14 2022 | 7:22 pmThat's great! I'm glad you got it working. Have fun (lots)!