OSC Broadcasting
-
Dear All,
I've been using 'TouchOsc' to make an iPhone screen to monitor what's going on in my project. (I send text to labels, which works ok.) What I'd like to do is to have more than one 'phone receive the information. As far as I can tell, it's possible, in general, to broadcast UDP by setting the 'target' address to 255.255.255.255, but this doesn't seem to work for me.
If I set up an 'ordinary' address, (e.g. 192.168.1.43) and change it to 255.255.255.255 while sending, the Monitor window reports no change in destination which makes me wonder whether the Actor is not expecting this unusual address. Networking isn't my strong suit, so there probably other reasons why this won't work, but any help would be much appreciated.
Yours,
I
-
Dear @Interluder,
I'm afraid I've never really tested this. What you're trying to do is to make a sort of "multicast" send, so that it is received by all addresses.Now, I just tried this and it seems to work -- on a local machine only though. I set the broadcast address to 255.255.255.255 and then added an OSC Listener. Note that I left the transmit port to 1234 -- because Isadora listens on port 1234 by default. The OSC listener received the information. But when I looked in the Monitor window, it was using 127.0.0.1 (= localhost.) Hmmmm....I went into the code for this. There is a function that converts an internet address (i.e., "troikatronix.com") into the actual 32 bit number that represents this address. If this function fails, it returns hex FFFFFFFF which is 255.255.255.255\. So, Isadora actually ignores this value. The short version: for sure, Isadora is ignoring 255.255.255.255 as an address right now.But I went around this and attempted to send to 255.255.255.255 port 8000 (the receive port for TouchOSC) and the sending function returned an error.This is obviously going to take some further research, as it isn't a simple matter of simply allowing 255.255.255.255 as a target address.Please file a formal bug report so this gets looked at and not forgotten.Sorry that I can't help you further at the moment.Best,Mark -
OK. Further investigation reveals I need to make a special call to enable broadcasting. It does work if I enable this call, and also if I change the code to accept the address 255.255.255.255.
I've just run a test and it works sending data to TouchOSC using 255.255.255.255\. I only have one iPad with me, but I assume if one gets it they will all get it.Also, from my research, it does seem you need a router that has DHCP support. But I suppose if you're using iPads/iPhones, this is a given.Unfortunately you will need to wait until the next update to get access to this feature. We'll be getting something out no later than the end of April, but hopefully sooner than that.Best Wishes,Mark -
Mark,
Thank you for this: it's no problem to wait until the end of the month. And yes, I am doing it via a router, but good to know the restriction for future reference.
Yours,
I