How do I check OSCin Status?

I need to make a ui indicator that my OSCin CHOP (with 0-1 integers) is connected, active and healthy. There doesn’t seem to be any members in the class and the only way I’ve found to do so is to monitor the cooktime difference between when there are packets coming in and not, but this seems imprecise.
I’ve tried using the dat, but any callbacks (eg setting an absFrame at message time and comparing it to current absFrame in another chop) cost .5 millis, in contrast to .01 millis with the chop.
Until I can figure out osc timetags on a teensy, are there any better ways to do this?

Have you checked the Info CHOP for useful info?

One thing to note about OSC in general though is that it’s a “connection-less” protocol (when using the default UDP messaging), unlike TCP that does handshakes, so OSC nodes are just waiting for stuff to come down the pipe. You might be able to use the UDT setting since UDT is reliable connection, but I’m not quite sure how the behind the scenes UDT implementation is setup. Some more info at link below about general connection protocols:

derivative.ca/wiki099/index … _Protocols

As Elburz said OSC over UDP protocol is connection-less, so there is no confirmation of connection or anything you send.

UDT protocol is deprecated by its developers and will also be removed from TD in future versions.

What I usually do for live environments is to make an OSC heartbeat which sends a message every x seconds so you know the connection is up. On the receiving end make each heartbeat trigger a Timer CHOP of x+2 seconds length, after which you declare the connection lost and you can do a reconnect action or whatever you want. Each received heartbeat message resets the Timer CHOP.

Also the TCP/IP DAT recently got connection information in TD experimental. If you connect an Info CHOP you’ll see a new channel ‘connections’.

I’m aware it’s not socketed, but because it holds the last message it got the chop is identical to when it is actually receiving, apart from the cook time.
Heartbeat is not a bad idea, maybe I’ll make a dummy channel come from the microcontroller. Thanks!

As Idz said, heart-beats are how we keep track of things, easy and clear and you can setup the interval to your own comfort level.

Hey folks,

I was recently just asking myself this same question while making a “faux” modular synth in TD. I’d intended to light up a status LED on the panel UI if the iOS app TouchOSC was connected. I couldnt find a flag for it, so I created my own hacky workaround.

Basically just looking to see if the noisy accelerometer data is present, and setting a logic gate after some simple channel processing. Totally wouldnt work at all without acc data, but for my purposes it does the trick.

I’m a total newb, and was pretty stoked about this hack, so I thought I’d share.
Theres a few comment texts in the network for details.
Maybe someone will find this useful.

ALSO, happy to see the info here about OSC being connectionless, and the workarounds you’ve all developed. Super useful. Thanks!

-Casey
OSCconnectionHack.toe (7.71 KB)