raspberry pi oscquery listeners with udpreceive

Peter Nyboer's icon

I am trying the example patch in

but I'm not getting expected results.
I know I'm able to communicate with my instance on the Raspberry Pi: I can send a parameter to the synth at rnboplay.local:1234 with something like:

/rnbo/inst/0/params/vol .23

and see the slider change in the web interface, and hear the result.

However, when I try to add a listener with

/rnbo/listeners/add 192.168.5.151:8003

or

/rnbo/listeners/add rnboplay.local:8003

I would expect parameter data coming out of [udpreceive 8003] when I make changes in the web interface on the instance or when I send a parameter over osc as above.

Additionally, using the above "add" commands, I'd expect changes in the JSON when I load the URL rnboplay.local:5678/rnbo/listeners/entries but it remains the same before I added any entries. Similarly, the osc command "/rnbo/listeners/entries" doesn't return any data.

Any help would be appreciated. It just seems like the listeners aren't working.

Alex Norman's icon

It looks like the subpatcher [p maxurl] isn't correctly setting up the host.. I've done it manually like so:

and then I can add listeners

Peter Nyboer's icon

Thanks for the reply.
I hardcoded my address into UDPsend, but I realize it's not a host setting issue, as I have always been able to send parameter changes to the Rpi from the patch. I've double checked my IP address, and tried

/rnbo/listeners/add 192.168.5.151:8003 

Here's a video of what I'm seeing. Maybe my expectation of what this does is not correct?

rnbo listener issue.mp4

For the record, I tried rolling back to the original patch and exported the example rnbo code to my pi, but it still didn't work as expected.

Max 8.6.5 on intel mac 12.7.6

Alex Norman's icon

I'm curious if you have a firewall or something in place, or, is your PI on the same network that resolves that IP you gave? 192.168.5.151 ?

You can test this out by sshing to your pi, making sure you have liblo-tools installed and trying to send a message directly via oscsend.

sudo apt-get install liblo-tools
oscsend osc.udp://192.168.5.151:8003 /foo/bar

do you see /foo/bar in max?

Peter Nyboer's icon

Dammit, looks like my brain was in IP knots! I understand my mistake.

"'/rnbo/listeners/add' followed by the 'ipv4 address:port number' will add the numbered port to the runner on the Pi" : it is now obvious that the ip address required here is the IP address of my Mac that is hosting the OSCquery_example.pat. That IP 192.168.5.40, so

/rnbo/listeners/add 192.168.5.40:8003

opens up the listener and I can start viewing parameter data coming from the raspberry pi.

Thanks for sticking with me :) What clued me in was your oscsend command: the IP you put in there is the IP of my Pi, so it didn't make any sense to me why I would try to send an OSC message to the Pi from the Pi. Ha ha ha.

Alex Norman's icon

Ha, okay! I get that it is confusing!

For future readers, the listener value you send is the numeric IP and port of the computer and program that you want the runner to send OSC to, in this case, a [udprecieve 8003] in Max running on a computer.

You may end up wanting to send to a program running on the pi itself, you can use 127.0.0.1 for the IP in that case.

Peter Nyboer's icon

It could be worth a little edit on the example patch for future dum dums like me.

"Add the ipv4 address of the computer running this patch and add a new port."

I'm not sure there's a cross-platform way to get the local IP, but a little patch that fetches the local ip (maybe using shell?) could be handy.

Peter