File tree 2 files changed +33
-8
lines changed
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
60
60
Create this file in ` /etc/udev/rules.d ` with the content shown below.
61
61
62
62
``` console
63
- $ cat /etc/udev/rules.d/99 -microbit.rules
63
+ $ cat /etc/udev/rules.d/69 -microbit.rules
64
64
```
65
65
66
66
``` text
67
67
# 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"
69
74
```
70
75
71
76
Then reload the udev rules with:
72
77
73
78
``` console
74
- $ sudo udevadm control --reload-rules
79
+ $ sudo udevadm control --reload
75
80
```
76
81
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
+ ```
78
87
79
88
Now, go to the [ next section] .
80
89
Original file line number Diff line number Diff line change @@ -18,20 +18,36 @@ $ # ^^^ ^^^
18
18
```
19
19
20
20
In 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:
22
22
23
23
``` console
24
24
$ 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
26
26
```
27
27
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
29
44
rules] and try re-loading them with:
30
45
31
46
[ udev rules ] : linux.md#udev-rules
32
47
33
48
``` console
34
- $ sudo udevadm control --reload-rules
49
+ $ sudo udevadm control --reload
50
+ $ sudo udevadm trigger
35
51
```
36
52
37
53
# All
You can’t perform that action at this time.
0 commit comments