I encountered the following error while installing PyLabRobot on Debian on a Raspberry Pi connected to a Hamilton STAR:
lh = LiquidHandler(backend=STAR(read_timeout=600), deck=STARLetDeck())
await lh.setup()
>>> USBError: [Errno 13] Access denied (insufficient permissions)
This problem can be solved as follows:
Find your USB connections with the lsusb
CLI tool.
> lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 17ef:608d Lenovo Optical Mouse
Bus 001 Device 008: ID 08af:8000 Hamilton Bonaduz AG ML STAR
Bus 001 Device 003: ID 05ac:024f Apple, Inc. Aluminium Keyboard (ANSI)
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
In this case, we are interested in 08af:8000 Hamilton Bonaduz AG ML STAR
. We add this device to the usb rules using the nano text editor:
sudo nano /etc/udev/rules.d/99-usb.rules
Add the following line, replacing XXXX by the vendor ID 08af
and YYYY by the product ID 8000
:
SUBSYSTEM=="usb", ATTR{idVendor}=="XXXX", ATTR{idProduct}=="YYYY", MODE="0666"
Save the file by pressing CTRL + O, then press Enter, and exit by pressing CTRL + X. Alternatively, you can use vi
to edit this text file.
Reload the udev
rules:
sudo udevadm control --reload-rules
sudo udevadm trigger
Reboot and this should fix your permission issue.