Device/OS: Jetson Nano / Ubuntu 18.04
Python 3
There is a Bluetooth dongle attached.
Joy-Con is connected as seen in UI:
As well as when I do this:
$ hcitool con
Connections:
> ACL B8:78:26:19:C1:8C handle 11 state 1 lm MASTER AUTH ENCRYPT
and
$ bt-device -l
Added devices:
Joy-Con (R) (B8:78:26:19:C1:8C)
I've installed https://github.com/trezor/cython-hidapi from source using instructions (I tried both hidraw and libusb APIs during build.
In both cases this simple code:
import hid
devices = hid.enumerate(0, 0)
print(devices)
Prints out just my wired USB mouse and USB keyboard attached to the device:
[
{'path': b'0001:0006:00', 'vendor_id': 1118, 'product_id': 203, 'serial_number': '', 'release_number': 256, 'manufacturer_string': '', 'product_string': '', 'usage_page': 0, 'usage': 0, 'interface_number': 0},
{'path': b'0001:0004:00', 'vendor_id': 1008, 'product_id': 36, 'serial_number': '', 'release_number': 304, 'manufacturer_string': '', 'product_string': '', 'usage_page': 0, 'usage': 0, 'interface_number': 0}
]
The solution was to use udev rules. These rules worked in my case.
I also end up using a different Python library https://github.com/apmorton/pyhidapi. But I am sure the original cython-hidapi would be as fine.