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?
This uses mxj net.local to get the IP addresses assigned to a computer (you may have more than one!)
There’s also an example how to get your "outside" IP – the one assigned by the ISP. Sometimes that is handy, too.
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 3423.3oc0c08qahiE+468uBuQiTeXRSwlOBL6SilcenOrqFsZkVspc1JRv2D ZIPVvo21cz7+9Z6iIAHPvP.tbqTStFGvG+ymu7wGa98GeXwljuQyVf9IzGPO 7vu+3COHuj3BOnJ+vhC9eaajel7ms3.MKyeGcwRnNF8aL40+yeLk+6PQ9mh2 teSZxyYzTzdF63O8t287yOuJJ7qgAgwYrzSGnwrrUaSNj+PhBioaSNEKeRD0 EiOcH4DKhxjsKVc0v.Yqkr4yuk3je+OkDyh8OPkU8yog9Q40.OA12ORg93hE neqvMkE9+jUfMVYboYCiya0bZ4nOa69v3ceJktkAOIKh3dPlFxuHldxuVux. 8ah64Od7QwGK0DU4fg.UtBUORYbXL96aRnoeLtE37iw+KJ5f+WnncoTeF5u8 9+x6Qa4cyzjnHZZ1pZwayZwaiqwaLoc7tDnRNCpGSoYbpzmElDWBCIRTy1V7 kg5iKiPo61Hok5GbvsN3Prwqr4eIGdQV8cvYyIFKIdgt7kXiF4913Gu6BGnt 8FGGI9fMrjcJi7O6UmoI4WOuUDuU1qWgMvZ2UW+RJAlCKNRXwwCJzSXIl9Lu Ccs7GhS+YgAz2+qZCJliNnnAuBQBGNXYA2BBUx6glpfBEVva1vH5W45H3BnE ZgGV3e7XgK+PgaQ.feNQ9fbVd9RgwvkLNeoT5WCyu+0vE4CKOlWYNgaKYq8f wRKPf0sf1.9.3tnjsegFT7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l5E56ju.dJ7evtO5W96+se 9epuwNq9Jgou7jSg23R30NiBeBksm+X4ehkeR3eFKtPrnbLQeVG6WPVG09fB qxSJ0wmy.y8H1GwHLR+2VPXmWRHQEM45ORaGJkw56sLtOu6jJtizGDUtX0qv .733vLbdT8tvi5CKtufyhPogg.KXgynLKB0l.++7A4t7929wUM+G+P8nlcMn lWePsl1912KJhgU3QsQXcGEQMXaY6eTvfUOLQpw8Zi9BSCldY0qvMvn9HoDR 3QHVauAICg2fCnhIb9qSFXWJXLFXzgu8Yw7LVIC7m9rOjof8ocIK0F4oA1GY aUdK7.HU0vjqvqqCOdoH0qyBZccTwuNh3WMvoK4XpA0rt3hcNpTS4zeUq76d boGhFzS4znabomR4JpVIN13SOj1FublV5oU9G6oidzQXub1iLtziFjyzgNxN dqbOtyL5Y8LidlNxwUGlYqoidVqC8LcJepzTu3Jmw15hOSiwcr4Pv+bUpwYI CuNrK0HvV7QV5RCMb8.sL+NgRjZYtquNSBt5V485mfTp7d7qx6uupu293Os+ 3w++MDzBf -----------end_max5_patcher-----------
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 …
That’s a really cool keyboard! And the magic protocol sounds really interesting, too.
But, for Miguel’s situation, it seems that each computer is sending on a unique port, so each one really needs only to send its ip once. And if worse comes to worse, he can send a message every once in a while to remind everyone of the IPs. Magic? no. Optimal? far from it. Functional? Yeah, probably!
"Make it work!"
thanks for these peter!
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.
Really nice looking keyboard and the magic protocol sounds awesome!
@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.
Forums > MaxMSP