From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

How to use UDP to send OSC (Open Sound Control) command?

I am using a controller which is controlled by using OSC.
The controller has USB and Ethernet connector, and I am trying to use UDP to communicate with it.
I have difficuties with setting port and sending OSC commands.
Can anyone help me with this?
Message 1 of 20
Hey Bui-

I assume you are using LabVIEW to do the UDP communication.  There can be several problems along the way, so it's important to weed out exactly where your VI is failing.

First, lets make sure that you have proper network communication. Can you ping the controller kit or establish communication with one of the MAKE utilities like mchelp (found here)

Once you verify that you have proper network connectivity to the controller, you need to be sure that you are formatting teh OSC packet correctly. It might be useful to use a utility like Ethereal to capture both the mchelper and LabVIEW packets and compare them.

Once you verify your packet formation, you should be good to go. Just for reference, here, is the OSC specification.

0 Kudos
Message 2 of 20
Thanks for the reply.
I am sure that the network communication is working properly, but problems show up when I tried to run it with Labview UDP example VI.
It says the same network is been used at the same time, but I am using only Labview to communicate with the controller.
So for OSC, it is basically sending strings but with different style of command?
0 Kudos
Message 3 of 20

What error does labVIEW throw (error number/description or screenshot would be helpful)?

Also, I took at alook at the protocol for OSC and it look slike its all string based, but you might want to use Ethereal to verify that.

0 Kudos
Message 4 of 20
It shows error 60.
And when I change ports around, it shows error 56 and never goes through.
0 Kudos
Message 5 of 20
Error 60 means that that port is already in use. There might be another program on your computer communicating over port 60. You can use Ethereal and look for traffic on port 60 to try and identify if there is a program already using it. Also, you might be looking at a firewall issue. Double check both your windows firewall and and additional firewalls you may have installed to make sure that port 60 is open and useable.
0 Kudos
Message 6 of 20
Can you please explain a little about  comparing Labview and OSC packets?
How do I do after comparing?

I still get the port error, I will have to check again.
Message 7 of 20
You can use the progam called Ethereal (linked in my first post) to capture network traffic and analyze the formation of the packets. I suggest downloading the program and playing around with it. Once you are confortable using Ethereal to capture and filter packets, you can start looking at the packets sent by the MAKE program and LabVIEW.
0 Kudos
Message 8 of 20

Hi, I captured both packets but I dont really know how to modify labview to send the same as MAKE.

Here is the simple command I sent using MAKE and I captured it. (I typed   /appled/1/state 1 in the mchelper program)

0000  ac de 48 5f ff ff 00 11  25 d3 30 b9 08 00 45 00             ..H_.... %.0...E.
0010  00 34 1e 05 00 00 80 11  9a 37 c0 a8 00 c8 c0 a8        .4...... .7......
0020  00 64 27 10 27 10 00 20  27 28 2f 61 70 70 6c 65         .d'.'..  '(/apple
0030  64 2f 31 2f 73 74 61 74  65 00 2c 69 00 00 00 00          d/1/stat e.,i....
0040  00 01                                              ..              


Here is how Labview send data via UDP

0000  ac de 48 5f ff ff 00 11  25 d3 30 b9 08 00 45 00          ..H_.... %.0...E.
0010  00 22 20 89 00 00 80 11  97 c5 c0 a8 00 c8 c0 a8     ." ..... ........
0020  00 64 27 10 27 10 00 0e  30 1e 3c 64 61 74 61 3e     .d'.'... 0.<data>


Can you give me a little help on this?



0 Kudos
Message 9 of 20

Sounds like you need to learn how to create OSC packets. Try here.

0 Kudos
Message 10 of 20