Tigge / openant

ANT and ANT-FS Python Library
MIT License
174 stars 80 forks source link

Permissions for nonroot - usb.core #50

Closed tkelemen closed 3 years ago

tkelemen commented 4 years ago

Thanks for the awesome work on this project.

I had a quick question about permissions for the usb.core package. The examples work when I used sudo, but I cannot figure out where to update the permissions to add other users/usergroups.

Thanks!

$ python3 heart_rate_monitor.py Driver available: [<class 'ant.base.driver.SerialDriver'>, <class 'ant.base.driver.USB2Driver'>, <class 'ant.base.driver.USB3Driver'>]

Tigge commented 4 years ago

Thank you. The setup.py tries to install udev rules to make the ANT devices available to all users. These can also be manually installed by running sudo python setup.py udev_rules or manually copying the file in resources/ to your udev folder (usually /etc/udev/rules.d I think, but can depend on what system you are using).