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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the documentation on docs.rs Kevin explains how to add permissions on Linux to enable access to the USB ports.
In my efforts to work thru this, I did the following (mostly the same as Kevin's instructions):
Move to .rules folder:
cd /etc/udev/rules.d
Create new .rules file using (required) admin privileges
sudo nano 70-plugdev-usb.rules
Add to file per Kevin's instructions:
SUBSYSTEM=="usb", MODE="660", GROUP="plugdev"
I think I could have been more permission-limiting by also adding to the file:
ATTRS{idProduct}=="XXXX", ATTRS{idVendor}=="YYYY",
To find
XXXX
andYYYY
, uselsusb
command to get the hex values of formatXXXX : YYYY
.These are the same numbers required in the Rust code:
.find(|d| d.vendor_id() == 0xXXXX && d.product_id() == 0xYYYY)
Reload udev rules:
sudo udevadm trigger
Now my serial device fails due to "Stall" rather than lack of permissions. Yay !!!
Reference:
https://elinux.org/Accessing_Devices_without_Sudo
Beta Was this translation helpful? Give feedback.
All reactions