home/ atoms/ osc-ip-port-addressing

OSC connections require both a destination IP address and a port number to route messages to the correct application

Setting up an OSC connection requires two pieces of addressing information. The IP address identifies the target device on the network (obtainable from system network settings). The port number identifies the application on that device — analogous to an apartment number within a building. Some applications have predefined port numbers, but you can often specify your own; since computers already use many low ports, it is best to aim above about 5000. On restricted public networks such as university eduroam, low ports can be blocked and a value above 31000 may be required. Both sender and receiver must agree on the same port; the sender addresses the message to that port on the receiver’s IP.

Examples

GyrOSC iPhone app: set target IP to the laptop’s WiFi IP address (found in network settings), set port to e.g. 9000. In Max: create [udpreceive 9000] to listen on that port.

Assessment

You want to send OSC messages from a phone to a laptop on university eduroam WiFi. State the two pieces of addressing information you must configure, and explain why a low port number might fail even when the IP is correct.

“The target IP is simply the IP address of device you want to send the message to. On my MacBook, I can go to settings, network, click on the network you are connected to and click details to see your IP address.”
corpus · introduction-to-open-sound-control-osc-mct-blog · chunk 1