Automatically Detect IP And Fill In

Jan 11, 2013 at 9:27am

Automatically Detect IP And Fill In

Hi,
I have a “UDP Send” Object which sends data to my iPad. My problem is that the IP address of my iPad frequently changes if say, I connect on an ad-hoc network or over wireless. This means that whenever I want MAX to send to my ipad I have to figure out the ip address of my ipad, then open the max patch, then enter the ip address of my ipad and re-save it.
Is there a way to automatically find the ip address of a device and plug it into the UDP send object?
My iPad runs the Lemur App and the lemur editor tells me the ipad’s IP address and that is how I get the number which I then code into the MAx patch I would be grateful for any help.
Thanks.

#66009
Jan 11, 2013 at 10:12am

If you put the hostname of your iPad as the first argument to udpsend instead of its IP that should do it. I think an iPad’s hostname is defined by it’s name set via iTunes.

#237668
Jan 11, 2013 at 5:25pm

If the iPad offers any service announcements via Zeroconf, you might get some joy with this:

https://github.com/cassiel/zeroconf

You’d still need to do a click-to-select, but hopefully no typing of IPs.

#237669
Jan 12, 2013 at 2:29am

Thanks guys.
David, you were right, all I had to do was put in the ipad’s hostname (which can be set in several ways) and then add “.local”
so i had mIpad.local
Also, for anyone curious, on the lemur app, you can set the osc target as computername.local (but actually put “computer’s name”)
I wonder if this means you could send osc messages to a computer not on your network, but across the country.

#237670
Jan 12, 2013 at 2:30am

And cassiel, I would be interested in what the items in that depository do, but it was a little unclear to me at this point.

#237671

You must be logged in to reply to this topic.