Open avparker opened 6 years ago
I have reproduced the same behaviour with another version of the same script running on a ODROID C2 (ARM based, similar to a Raspberry Pi), running Ubuntu 16.04, Node version 8.2.1.
If I run the script on the two machines at the same time, the events are usually but not always printed at the same time. i.e. One machine will detect the button, but the other won't.
Furthermore, I hacked the bin/findbutton script, and ran it at the same time as the above app using node-dash-button (on the chromebook). Occasionally either the findbutton script or the app will print the event but the other won't print it until some other button is pressed (the app removes duplicates thanks to the code in node-dash-button, which the findbutton script doesn't).
I have also tried detecting only a single button (i.e. not passing an array), and also see similar behaviour.
I can only guess that the pcap "events" are getting "stuck" in a queue of some sort.
I have registered for the event for 3 buttons by passing an array of mac addresses (code below). I often see one or more of the following (often in combination)
Example scenario from my real testing
Another scenario from my real testing
Any idea what's going on? I am running inside an ubuntu 16.04 (xenial) chroot on an Asus Chromebook C302, with node version 8.3.0.