File tree Expand file tree Collapse file tree 2 files changed +33
-8
lines changed Expand file tree Collapse file tree 2 files changed +33
-8
lines changed Original file line number Diff line number Diff line change @@ -60,21 +60,30 @@ These rules let you use USB devices like the micro:bit without root privilege, i
6060Create this file in ` /etc/udev/rules.d ` with the content shown below.
6161
6262``` console
63- $ cat /etc/udev/rules.d/99 -microbit.rules
63+ $ cat /etc/udev/rules.d/69 -microbit.rules
6464```
6565
6666``` text
6767# CMSIS-DAP for microbit
68- SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", ATTR{idProduct}=="0204", MODE:="666"
68+
69+ ACTION!="add|change", GOTO="microbit_rules_end"
70+
71+ SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", ATTR{idProduct}=="0204", TAG+="uaccess"
72+
73+ LABEL="microbit_rules_end"
6974```
7075
7176Then reload the udev rules with:
7277
7378``` console
74- $ sudo udevadm control --reload-rules
79+ $ sudo udevadm control --reload
7580```
7681
77- If you had any board plugged to your computer, unplug them and then plug them in again.
82+ If you had any board plugged to your computer, unplug them and then plug them in again, or run the following command.
83+
84+ ``` console
85+ $ sudo udevadm trigger
86+ ```
7887
7988Now, go to the [ next section] .
8089
Original file line number Diff line number Diff line change @@ -18,20 +18,36 @@ $ # ^^^ ^^^
1818```
1919
2020In my case, the micro: bit got connected to the bus #1 and got enumerated as the device #65 . This means the
21- file ` /dev/bus/usb/001/065 ` * is* the micro: bit . Let's check its permissions:
21+ file ` /dev/bus/usb/001/065 ` * is* the micro: bit . Let's check the file permissions:
2222
2323``` console
2424$ ls -l /dev/bus/usb/001/065
25- crw-rw-rw-. 1 root root 189, 64 Sep 5 14:27 /dev/bus/usb/001/065
25+ crw-rw-r--+ 1 nobody nobody 189, 64 Sep 5 14:27 /dev/bus/usb/001/065
2626```
2727
28- The permissions should be ` crw-rw-rw- ` . If it's not ... then check your [ udev
28+ The permissions should be ` crw-rw-r--+ ` , note the ` + ` at the end, then see your access rights by running the following command.
29+
30+ ``` console
31+ $ getfacl /dev/bus/usb/001/065
32+ getfacl: Removing leadin '/' from absolute path names
33+ # file: dev/bus/usb/001/065
34+ # owner: nobody
35+ # group: nobody
36+ user::rw-
37+ user:<YOUR-USER-NAME>:rw-
38+ group::rw-
39+ mask::rw-
40+ other::r-
41+ ```
42+
43+ You should see your username in the list above with the ` rw- ` permissions, if not ... then check your [ udev
2944rules] and try re-loading them with:
3045
3146[ udev rules ] : linux.md#udev-rules
3247
3348``` console
34- $ sudo udevadm control --reload-rules
49+ $ sudo udevadm control --reload
50+ $ sudo udevadm trigger
3551```
3652
3753# All
You can’t perform that action at this time.
0 commit comments