Solving USB Connection Issues on Linux
The Supernova, the Pulsar and the Atira need one udev rule on Linux, installed once. Without it, the current user cannot open the adapter. This applies to Mission Control 3 (desktop and mc3.binho.io), PyCosmicSDK and CosmicSDK.
On Windows and macOS, see Windows and macOS.
Symptoms
Section titled “Symptoms”-
The adapter is not found, although
lsusblists it. -
PyCosmicSDK lists the adapter with an empty serial number.
-
Opening the adapter fails with an error such as:
Open connection failed. Exception type: <class 'OSError'>. Exception message: open failed.
Install the udev Rule
Section titled “Install the udev Rule”This is the same rule that ships with CosmicSDK (udev/65-binho-hid.rules) and that PyCosmicSDK documents.
1. Create the Rules File
Section titled “1. Create the Rules File”sudo nano /etc/udev/rules.d/65-binho-hid.rulesKeep the 65- prefix: the uaccess tag only works from a rules file that sorts before 73-seat-late.rules.
2. Add the Rules
Section titled “2. Add the Rules”# Binho Supernova: commands (HID) and large transfers (USB). Same ID in the bootloader.SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="82fc", MODE="0660", GROUP="plugdev", TAG+="uaccess"SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="82fc", MODE="0660", GROUP="plugdev", TAG+="uaccess"
# Binho Pulsar: commands (HID) and large transfers (USB). Same ID in the bootloader.SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="82fd", MODE="0660", GROUP="plugdev", TAG+="uaccess"SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="82fd", MODE="0660", GROUP="plugdev", TAG+="uaccess"
# Binho Atira: HID control and USB (CMSIS-DAP and SPI bulk).SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="8347", MODE="0660", GROUP="plugdev", TAG+="uaccess"SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="8347", MODE="0660", GROUP="plugdev", TAG+="uaccess"
# Binho Atira bootloader.SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="82fe", MODE="0660", GROUP="plugdev", TAG+="uaccess"SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="82fe", MODE="0660", GROUP="plugdev", TAG+="uaccess"
# Serial ports of the Supernova, Pulsar and Atira: keep the distribution's group, add the logged-in user.SUBSYSTEM=="tty", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="82fc", TAG+="uaccess"SUBSYSTEM=="tty", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="82fd", TAG+="uaccess"SUBSYSTEM=="tty", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="8347", TAG+="uaccess"| Part of the rule | What it does |
|---|---|
hidraw lines | Access to the HID interface, which carries every command. |
usb lines | Access to the USB interface used for large (bulk) transfers. Without them, ordinary transfers work but large transfers are unavailable. |
TAG+="uaccess" | Gives the logged-in user access. This covers distributions without a plugdev group, such as Fedora and Arch. |
GROUP="plugdev" | Also gives the plugdev group access, where it exists (Debian, Ubuntu). For remote or headless sessions, add the current user to it: sudo usermod -aG plugdev $USER, then log out and back in. |
3. Reload the Rules
Section titled “3. Reload the Rules”sudo udevadm control --reload-rulessudo udevadm triggerThen unplug and replug the adapter so the new permissions apply. If the adapter still cannot be opened, reboot the computer.
Check the Adapter
Section titled “Check the Adapter”Check that the adapter’s HID node is readable by the current user. With the adapter plugged in:
ls -l /dev/hidraw*getfacl /dev/hidraw* 2>/dev/null | grep -B3 "user:$USER"A Binho node shows crw-rw---- with group plugdev, or an ACL entry for the current user. Then open the adapter from the tool. With PyCosmicSDK:
python -c "import pycosmicsdk; print(pycosmicsdk.list_devices())"
