Listening for UDP (OSC) with Teensy

Status
Not open for further replies.

skiff

New member
Hello,

I've been trying to receive UDP packets on Teensy over Wifi. Ultimately, the packets will contain OSC messages, but I'm having some reliability issues with an Adafruit Airlift Wifi Co-processor that has me stuck on Udp.parsePacket() in the WifiNINA library. It works for a while, and then gives up and stops responding (see link below for more on this, code included).

I started with this cool project as the basis, and purchased the same board:
https://github.com/j3nsykes/OSC_propShield/

If you're curious, here is my post over at Adafruit that shows where I'm stuck:
https://forums.adafruit.com/viewtopic.php?f=53&t=171694

I'm starting to second guess my choice of hardware/architecture. Receiving UDP packets would seem like a simple/common use case - and I'm not trying to do anything fancy in that department. Looking for reliability with relatively low latency - the latency is great, the reliability is not. I went with that breakout board so it could handle the network layers so I can focus on the application layer on the Teensy. I'm trying to avoid reinventing the wheel writing network stack code just so I can get strings out of UDP packets. Unfortunately, now I have a monolithic network processor which is very hard to debug and is failing randomly. Adafruit support also seems mystified. I should mention that sending OSC over UDP works wonderfully and is very stable. The verdict from Adafruit seems to be that this ESP32 shield works great to send UDP, but is not so great at receiving it.

After reading lots of posts here, the Airlift/WifiNINA combo seemed like the closest thing to a best practice solution with straight forward hookup and code examples for adding Wifi communication to Teensy. However, I've also seen a lot of posts where people get into the weeds with various versions of the ESP32/Airlift firmware and different forks of the WifiNINA library. I'm reluctant to upgrade the firmware since there have been reports of upgraded boards not working with the Adafruit WifiNINA fork. Plus, the python script for the FW update doesn't play well with Teensy.

So I'm here looking for advice on a better approach. Instead of polling a co-processor with Udp.parsePacket(), should I instead be looking at an Arduino programmable board like this
https://www.adafruit.com/product/2598
or this
https://www.adafruit.com/product/2821
and run something light and simple to listen for UDP and forward the data to the Teensy over serial? Anyone have this working?

The OSC library I'm using (https://github.com/CNMAT/OSC/) has examples that can parse incoming OSC messages from SLIPSerial.

Any advice or examples of this would be greatly appreciated. I know it is more common to send OSC than to listen for it, but I can't be the only one trying to do this.

Thanks!
 
Status
Not open for further replies.
Back
Top