libmapper / webmapper

An HTML5-based graphical interface to libmapper.
http://www.libmapper.org
GNU Lesser General Public License v2.1
17 stars 15 forks source link

Unpredictable device visibility #36

Open bboettcher3 opened 1 year ago

bboettcher3 commented 1 year ago

I've seen that for both on Ubuntu and Windows, some devices (T-Sticks) will show up and disappear unpredictably. To evaluate this a bit more, I used the python bindings to see what was present on the graph. As you can see below, I poll three times in a row for 1 second each, then print the devices on the network. image

T-Stick 311 is seen the 1st time and 3rd time, but not the 2nd time. Aside from this trial, the device flashes in and out of webmapper in different states, sometimes with a few signals, sometimes with all 18, and sometimes with 0. I'm not sure what the cause of this might be. The T-Stick is sending OSC continuously throughout the trials, so the device is connected to the network, yet it's only seen intermittently by the python bindings.

@malloch any ideas what might be causing this?

bboettcher3 commented 1 year ago

a webmapper screenshot when device appear with 0 signals: image and 11 signals (should be 18): image

bboettcher3 commented 1 year ago

Relating to this also, even when the device is visible in python (with 18 signals every time), webmapper may still show the device with 0 signals or no device at all, which probably implies a webmapper bug.

malloch commented 1 year ago

@bboettcher3 can you check whether you see the same behaviour from testmonitor.cpp (in the libmapper test suite)?  Perhaps the T-Stick is being inconsistent sending heartbeat pings. Are any other devices disappearing?

bboettcher3 commented 1 year ago

@malloch I tried with test.exe and my own max test devices, they never disappear. I'd bet you're right about the heartbeat, but how would you explain the varying 0/11/18 signals? Is that a part of the heartbeat?

DocSunset commented 1 year ago

I have also observed behavior fitting this description.

Be sure to monitor your T-Stick's USB serial output (e.g. screen /dev/ttyUSBx). If it's a problem in the T-Stick firmware end of things there may be clues there.

johnty commented 1 year ago

My guess for this behaviour has always been dropped packets over WiFi. I've seen this happen between laptops over WiFi, but not over ethernet... I also recalled differences in reliability depending on networking environment, and the router being used. And on the ESP32 it was always more unreliable as well - there were some routers where the ESP32 device would simply not show up at all while on others it did.

bboettcher3 commented 1 year ago

Be sure to monitor your T-Stick's USB serial output (e.g. screen /dev/ttyUSBx). If it's a problem in the T-Stick firmware end of things there may be clues there.

Yup, did this with no output clues, all seems to be running smoothly.