X-Air OSC control

M/X Air Digital Mixer Series
Post Reply
jhockin
Posts: 4
Joined: Mon Feb 26, 2024 10:55 pm

X-Air OSC control

Post by jhockin »

I'm trying to get AutoHotKey to change snapshots (scenes) on our X-Air-18, but I'm getting no love from the UDP packets I'm creating.
I've no problem changing snapshot with the (now old) X-Air software on our PC or a tablet. When I do that, I can see, with Wireshark, what the packet data should look like and I can reproduce the packet data.
But I'm getting no response on the X-Air. I am using the correct IP address and port number.
Is there some other handshaking I need to do before sending the /-snap/load address?
Is a single /-snap/load insufficient to make the change?

Thanks!
kmitchell
Posts: 248
Joined: Fri Apr 16, 2021 6:15 pm

Re: X-Air OSC control

Post by kmitchell »

@jhockin Welcome to the forums.

How are you encoding the OSC message? That's usually the source of the problems. If the encoding is wrong, the mixer will just ignore the message.
kmitchell
Posts: 248
Joined: Fri Apr 16, 2021 6:15 pm

Re: X-Air OSC control

Post by kmitchell »

Since you mentioned AHK, you may want to check out @pvannatto 's XAir Live Toolbox.

https://behringer.world/viewforum.php?f=58
jhockin
Posts: 4
Joined: Mon Feb 26, 2024 10:55 pm

Re: X-Air OSC control

Post by jhockin »

Thanks. I’m coding the message as null-terminated strings, aligned on 4-byte boundaries, with a long integer for the snapshot number. The packet looks *exactly* like the ones I can capture with Wireshark. I’ll check out Paul’s toolbox.
jhockin
Posts: 4
Joined: Mon Feb 26, 2024 10:55 pm

Re: X-Air OSC control

Post by jhockin »

Solved my problem today. OSC requires big-endian integers and AutoHotKey was sending little-endian. It really helped to have the toolbox from @pvannatto
Then I could use Wireshark to see the difference between what AHK was sending and what it should have been.
So, for anyone wanting to use AHK to manage an X-Air, it's as simple as using the AHK winsock extension to connect to the mixer (IP address and port).
Then you build the command with appropriate syntax (and endianness) and send that off. All I'm using it for is to change snapshots, so I don't even need to handle responses from the mixer.
kmitchell
Posts: 248
Joined: Fri Apr 16, 2021 6:15 pm

Re: X-Air OSC control

Post by kmitchell »

jhockin wrote: Mon Feb 26, 2024 11:42 pm Thanks. I’m coding the message as null-terminated strings, aligned on 4-byte boundaries, with a long integer for the snapshot number. The packet looks *exactly* like the ones I can capture with Wireshark. I’ll check out Paul’s toolbox.
Indeed, that is very strange. Maybe it isn't the OSC encoding but something else with the packet itself.

Just to confirm, when you say "no response" you mean that the mixer doesn't do anything, right? If you are looking for a mixer reply message, you have to hold onto and listen on the "source port" that sent the message. If you are looking at WireShark, I suspect you know all of this already but just making sure.
jhockin
Posts: 4
Joined: Mon Feb 26, 2024 10:55 pm

Re: X-Air OSC control

Post by jhockin »

kmitchell wrote: Tue Feb 27, 2024 8:46 pm Maybe it isn't the OSC encoding
The OSC / X-Air documentation clearly states that integers must be big-endian. I just wasn't thinking about the PC being little-endian. So the integer snapshot number I created as 0x00000001 was seen by the mixer as 0x01000000!
kmitchell wrote: Tue Feb 27, 2024 8:46 pm Just to confirm, when you say "no response" you mean that the mixer doesn't do anything, right?
Oh, sorry @kmitchell, everything works perfectly. I could see the change in snapshot on our tablet. I meant that I don't have to wait for any response from the mixer after loading a snapshot. That means I don't have to set up a listener.
Last edited by jhockin on Wed Feb 28, 2024 3:02 am, edited 1 time in total.
User avatar
pvannatto
Posts: 1378
Joined: Wed Apr 14, 2021 3:48 pm
Location: Ontario, Canada

Re: X-Air OSC control

Post by pvannatto »

jhockin wrote: Tue Feb 27, 2024 8:41 pm It really helped to have the toolbox from @pvannatto
Glad it was a help.
Paul Vannatto
Global Moderator
kmitchell
Posts: 248
Joined: Fri Apr 16, 2021 6:15 pm

Re: X-Air OSC control

Post by kmitchell »

pvannatto wrote: Tue Feb 27, 2024 10:31 pm
jhockin wrote: Tue Feb 27, 2024 8:41 pm It really helped to have the toolbox from @pvannatto
Glad it was a help.
Isn't it refreshing to have tools developed by actual users.
Post Reply

Return to “M/X-Air Digital Mixers”