monome / serialosc

multi-device, bonjour-capable monome OSC server
http://monome.org/docs/serialosc/osc
Other
146 stars 32 forks source link

Data sent to localhost not being picked up by serialoscd #31

Closed simonvanderveldt closed 3 years ago

simonvanderveldt commented 6 years ago

serialosc.maxpat sends data to serialoscd using localhost as the address, see https://github.com/monome/serialosc.maxpat/blob/master/serialosc.js#L32

Unfortunately this doesn't work for me. I have to edit lines https://github.com/monome/serialosc.maxpat/blob/master/serialosc.js#L32-L33 and replace localhost with my computer's IP address to get it to work.

I checked the application/patch part by running oscdump 12002 and opening a patch, this results in the following output

dd848059.b4f68be2 /serialosc/list si "localhost" 13288
dd848059.b4f79851 /serialosc/notify si "localhost" 13288

So the messages are correctly being sent and can be received by an application listening on UDP port localhost:12002.

When running serialoscd netstat shows that serialoscd is listening on 0.0.0.0

$ netstat -ulp
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
udp        0      0 0.0.0.0:8080            0.0.0.0:*                           31337/serialosc-dev 
udp        0      0 0.0.0.0:12002           0.0.0.0:*                           31334/serialoscd    

So it seems like there's something going wrong within serialoscd which causes the messages not to be processed/picked up.

Any suggestions/ideas how I can debug this/figure out what's causing this?

I'm using Linux btw, to be specific gentoo with both serialosc as well as libmonome built from current master.

simonvanderveldt commented 6 years ago

I've managed to "fix" this for now by disabling IPv6, so I guess it's caused by the application not actually listening to messages going to the IPv4 address. I'll do a search if I can find a bug for it or an option to pass to liblo to listen to both IPv4 and IPv6.