aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2022-03-16 17:38:41 +0100
committerNicolas Schodet2022-03-16 17:41:02 +0100
commit03ab8a68c21272df314d915929903d2168daace5 (patch)
tree68454dfda412df326fa3cca2527badcc151f51f6
parentc1e73fe4bd7a3cf8cc082a0cb325b86b0c99dddc (diff)
Add instructions for udev, to set USB permissions on Linux
Refs https://github.com/schodet/nxt-python/issues/110
-rw-r--r--contrib/60-libnxt.rules3
-rw-r--r--docs/installation.rst15
2 files changed, 18 insertions, 0 deletions
diff --git a/contrib/60-libnxt.rules b/contrib/60-libnxt.rules
new file mode 100644
index 0000000..c2181c6
--- /dev/null
+++ b/contrib/60-libnxt.rules
@@ -0,0 +1,3 @@
+# Allow access to the NXT brick.
+SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0694", ATTR{idProduct}=="0002", \
+ MODE="0660", GROUP="plugdev", TAG+="uaccess"
diff --git a/docs/installation.rst b/docs/installation.rst
index bb95b28..37fe973 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -34,6 +34,21 @@ PyUSB requires libusb or OpenUSB running on your system.
.. _libusb website: http://www.libusb.info
+USB access permissions for Linux
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+You need to allow connection to the NXT brick for your user. If you install
+any package interacting with the NXT brick from your distribution, this is
+usually already done for you (for example, nbc, or libnxt).
+
+In other cases, copy `contrib/60-libnxt.rules` from the NXT-Python source
+distribution to your `/etc/udev/rules.d` directory, then make sure that udev
+see the change: restart your computer or use the following commands::
+
+ sudo udevadm control --reload
+ sudo udevadm trigger
+
+
Bluetooth
---------