TouchOSCs network settings are slowly killing me...

LXConsole support and feedback
Post Reply
Johan Söderberg
Posts: 294
Joined: Mon Sep 01, 2008 12:35 pm
Contact:

TouchOSCs network settings are slowly killing me...

Post by Johan Söderberg »

I´ve never been much of a friend of Network settings.
It all seems a bit like Voodoo to me. :evil:

I have a layout that´s been working fine to control LXConsole from an iPad before, but a few months ago it suddenly stopped working in one direction. I still get feedback back from the computer to the iPad, but can't send from the iPad. This just suddenly occured... Maybe an OSX update could be the cause? I don´t know...

Its all a bit confusing because if I in LXConsole I set it to only receive (external- OSC in) the iPad app finds the connection, but it doesn't send no nothing...

using Version 4.2.0 (9720.1)

Image
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

Your phone is set to a different network (and probably class of address/subnet) than the one you have selected in the Mac. IPv4 addresses are divided into four octets. Depending on the class of address, one or more of the octets for a node refers to its network. The remainder define which specific host the node is on that network.

10.90.34.202 is a class A address. This means that the first octet (10) is the network and the final three octets (90.34.202) denote the specific host on that network.

192.168.1.65 is a class C address. This means that the first three octets (192.168.1) are the network and the last octet (65) is the host.

The subnet mask for the node generally reflects the class of address. The subnet mask for a class A address (without further sub-netting) will be 255.0.0.0. The subnet mask for a class C address will be 255.255.255.0. Note that there is a "255" for every octet that belongs to the network portion and a zero for every octet that is part of the host portion.

The way the IP works is that only computers on the same network talk to each other. So, one node with a class A address generally won't be able to reach a node with a class C address.

One way to look at this is that when comparing two addresses to see if they are reachable from each other, they must match in every octet where the subnet mask contains "255". (You can further divide a network using the subnet mask. But, lets just assume that you're not in a situation where that's going to happen--each octet in the mask is either 255 or zero).

Your iPad is probably getting its IP address through DHCP from a router. That router is set to dole out class C addresses on the private network 192.168.1.x. The iPad can have only one network interface. However, the Mac might have more than one that both use the network hardware. You might, for example, have a static class A address 10.90.24.202. And, also have an address assigned using DHCP, maybe 192.168.1.64. This is pretty likely if LXConsole can send OSC to the iPad. The only way this can happen is through an interface assigned to the same network. In this case, the class C network 192.168.1.x.

Now, the reverse direction is not possible because LXConsole is using the 10.90.34.202 address to listen for OSC. And we know that does not have the same network portion of its address (10) as the iPad (192.168.1).

You have a couple of choices. First, you could simply select the Mac's 10.x.x.x address (assuming again that it has one) in LXConsole's preferences. With the Touch OSC setup shown, this should work. The other possibility is to assign a static class A address to the iPad using the settings app. Both of these solutions involve making sure that both the sender (iPad) and receiver (LXConsole) are using addresses that are part of the same network. The drawback to the latter solution is that with a static class A address, the router will not allow other network traffic, such as from mail and your browser out to the greater internet.

If, your Mac indeed also has a dhcp assigned 192.168.1.x address. You can also set LXConsole's OSC preferences to "Any Interface". However, if your Mac only had an static class A 10.x.x.x address, it would not ever be able to communicate with an iPad with a class C 192.168.1.x address. Which should be clear because network 10 is not the same as network 192.168.1 and only nodes on the same network can talk to each other.

For those reading this with further curiosity, each class of address has a single network that is reserved as the "private" network. For class A addresses, the private network is 10. For class C addresses, the private network is 192.168.1. This is why you often see IPv4 addresses using these two networks assigned by a wireless router. (172.16 is the network for class B). Addresses on private networks only exist behind a router and are never used as public IP addresses.
Johan Söderberg
Posts: 294
Joined: Mon Sep 01, 2008 12:35 pm
Contact:

Thanks

Post by Johan Söderberg »

Ive reluctantly learned a little bit more Tcp/ip from this I guess.

Ive got it working again and found that one thing I did wrong over and over again was that I thought I had to click the "found host" in my iPad - it´s always one or two lines named LX_OSC.
If i both send and receive OSC I get two hosts, so I usually shut the OSC output off in LXConsole before I try to set the ips cause theres no way to tell the sending from the receiving and I thought I had to pick one. Turns out that was a no, no...

For some reason TouchOsc changes the IP number I'd written (192.168...) to the one I use against my ethernet connected ODE (10.1....) every time I chose that found host.
If I just avoid clicking that "found host" I get to keep the IP number that I had entered, and it works fine over the wifi net.

How and why TouchOSC does this is still a mystery, but I can live with that
:)

Thank you for your patient and excellent support Claude.
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

The reason that Touch OSC changes the IP when you tap Found Host is that it gets an IP address from Bonjour--Apple's Plug and Play network discovery protocol. There's no way to guarantee which of the Mac's IP addresses you will get through Bonjour. Sometimes you get the one you want and sometimes... not.

There does not seem to be a way around this. When the Mac has two IP addresses available on the network, you have to pay attention and enter the correct one manually (Or, disable the unwanted interface using "Make Service Inactive" in the Mac's Network Preferences; click Apply; enable OSC in LXConsole; choose the only available address from Bonjour in Touch OSC; use Network Preferences to make the other network connection active again (don't forget to click "Apply" )

I've looked for a way to force Bonjour to report only one IPAddress, but it seems like this is automatic to OS X and can't be accessed by individual applications. I think what happens is that Bonjour reports all the available addresses. Touch OSC always picks the first one from the list. And there's no guarantee to the order, even changing the service order in the Mac's Network Preferences does not seem to make a difference.
nizer
Posts: 157
Joined: Sun Jan 23, 2011 1:27 pm
Location: Virginia
Contact:

Switch to lemur

Post by nizer »

Switch to lemur you'll never look back. I just deleted touchosc from my devices.
Mark Nizer
mark@nizer.com
Post Reply