You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the xkeys library for a project on Raspberry Pi. Everything is going well but recently have wanted to use rebootDevice() function which doesn't seem to do anything on the Raspberry Pi. I've added some logging statements directly in the library code and see them executed when rebootDevice() is called but the watcher registers no 'disconnected' and 'connected' events triggered by the reboot (as would occur on a normal, non-raspberrypi, machine). I use those events to track what devices are currently attached to the machine, so missing those events is a big problem.
In case it's a hardware issue due to running on a Raspberry Pi 3 which is now not so recent, I've ordered a Raspberry Pi 4 in the hope that the newer hardware may have better USB implementation.
In the meantime I thought of refactoring my app so that after such a rebootDevice() call, I could just restart the watcher and therefore have an accurate accounting of the attached devices. However there is then a problem with stopping the current watcher. Here is CLI output of setting up a watcher, then immediately stopping it:
I found this possibly related issue where someone suggested a patch which I applied and rebuilt the usb-detection module. It helped somewhat in that there is now no Segmentation fault when running that CLI example, also now see the "Stopping..." logged, but still have all those Symbol entries pending.
Today I tried exactly the same (unpatched) code on a Raspberry Pi v4 (previously using Pi v3) and all worked perfectly. I'm putting this one down to hardware.
I'm using the xkeys library for a project on Raspberry Pi. Everything is going well but recently have wanted to use rebootDevice() function which doesn't seem to do anything on the Raspberry Pi. I've added some logging statements directly in the library code and see them executed when rebootDevice() is called but the watcher registers no 'disconnected' and 'connected' events triggered by the reboot (as would occur on a normal, non-raspberrypi, machine). I use those events to track what devices are currently attached to the machine, so missing those events is a big problem.
In case it's a hardware issue due to running on a Raspberry Pi 3 which is now not so recent, I've ordered a Raspberry Pi 4 in the hope that the newer hardware may have better USB implementation.
In the meantime I thought of refactoring my app so that after such a rebootDevice() call, I could just restart the watcher and therefore have an accurate accounting of the attached devices. However there is then a problem with stopping the current watcher. Here is CLI output of setting up a watcher, then immediately stopping it:
whereas, if I run the same node commands on a non-raspberrypi machine, the .stop() function works as expected:
Any ideas, insights on either of these issues?
The text was updated successfully, but these errors were encountered: