Find IP address of device sending OSC data
Sep 30, 2012 at 6:08pm
Find IP address of device sending OSC data
Quick question. I would like to know if there is a way to find the IP address of a device sending data to [udpreceive]
I am working on a piece that will communicate with a large number of devices using TouchOSC. Receiving data is fine since each device transmits on a different (predefined) port so I can know who is talking to my patch. The problem is sending data to specific devices as their IP is set automatically by the wireless router. Is there any undocumented message to [udpreceive ] to find this out? or any external anyone knows?
Oct 3, 2012 at 11:58pm
This uses mxj net.local to get the IP addresses assigned to a computer (you may have more than one!)
– Pasted Max Patch, click to expand. –
Copy all of the following text.Then, in Max, select New From Clipboard.
Oct 4, 2012 at 2:15am
Yes, there is a way to find out from which ip the osc message is coming from.
You’ll have to write an external which opens up a new socket and handles the data parsing itself. Caus every time you receive/send and osc paket you are, sending/receiving an ethernet frame. and inside that frame there is always the information from which ip address this paket was sended. Always. And still i keep asking me again and again why they havent implemented that inside the osc paket, the information is always there.
Unfortunetly, the udpsend / udpreceive filters that information and i do not know if you can access a socket in mxj. In js it is not possible.
In the next weeks we are releasing a firt version of our “magic protocol” which was developed to use the high bandwith of an ethernet connection in combination with the osc protocol. But it also has some extras which gives the users a lot more comfort. With “magic protocol” you can do everything you can with osc. You can even use native osc, native midi and transport it via ethernet, usb or whatelse. But there is no need to assign ip addresses or any other network settings. Also it “sees” other devices and automatically connects them, virtually and physically. Even when using it in complicated network enviroments or when having to devices directly connected, you do not need to assign any setup.
Unfortunetly, the first version which also comes as an external, is just there to connect our hardware, a keyboard with highres data. The reason why we developed the protocol.
In the next months however we are releasing the second release of our protocol. In this you’ll get an external which lets you use the amazing functions. Also we provide an sdk and a framework for every development system so you can access our protocol inside your “normally” programmed applicaton.
In your case, if you just send osc data to a patcher containing our external it will put out the data with ip information in addition.
And, in your case, as an example of our protocol. Having it running in, for example, touchosc and inside your patcher, you can easily see from where the data is coming and beyond that you can use routing, mapping and encapsulation functions.
Also having two patchers running our “magic protocol” external, both patcher running on different machines but connected thru a network, you can simply pass max lists, symbols and messages between these to patchers ..
The “magic protocol” is a sub-product of the development of our keyboard and offers a lot more comfort … And it will be all released OPEN SOURCE …
Oct 4, 2012 at 7:42pm
That’s a really cool keyboard! And the magic protocol sounds really interesting, too.
Oct 4, 2012 at 8:48pm
thanks for these peter!
Oct 5, 2012 at 7:23am
i agree but it seems he is using TouchOSC which does not send out any ip addresses. But i think it supports the “Bonjour”-Protocol so you can easily access that running an Bonjour-Server.
Also think of Multicast and/or Broadcasting ip-addresses on a specific port.
Oct 7, 2012 at 8:42pm
@peter: As Simon pointed out, the devices I need to know IP addresses from are not computers but iphones running TouchOSC. TouchOSC does not send its IP address, just shows it on the configuration screen, and it doesn’t seem to connect to broadcast groups
In case anyone is curious this is for a large piece to be premiered at the Belfast Festival in two weeks. The piece is written for 34 Trumpets and 16 trombones that are distributed all over a shopping centre. Each performer reads from a traditional score and the iphones are just as a ‘conductor’ to give section changes and such (basically a smart metronome).
The solution I have at the moment is locking each device to a static IP address. I wanted to avoid this as I need to setup 50 devices by hand but this should work…
Thanks for your suggestions and looking forward to see the magic protocol when it’s ready.
You must be logged in to reply to this topic.