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
Copy file name to clipboardExpand all lines: Sensors/overview.md
+18-5Lines changed: 18 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,28 @@ plugged in.
18
18
19
19
In order to do this we have to follow the next steps:
20
20
21
-
- List attributes for device:
22
-
`udevadm info --name=/dev/ttyUSBx --attribute-walk` - where x is a number matching your device port.
23
-
- In the attributes list look out for the attributes that is unique for each device (e.g. `idVendor`, `idProduct`)
21
+
- List attributes for device with lsusb:
22
+
lsusb output looks like this:
23
+
`Bus 001 Device 005: ID **1234**:**5678** Some Device Name`
24
+
VENDOR_ID is the first four-digit hex number (1234 in this example). PRODUCT_ID is the second (5678). Use those values (without "0x") in your udev rule.
24
25
- If you found those attributes open (or create and open if it does not exist) the following file: `/etc/udev/rules.d/99-usb-serial.rules`
25
-
- If the unique attributes were found, write a similar rule in the file we just opened: `SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", SYMLINK+="ping360"
26
+
- If the unique attributes were found, write a similar rule in the file we just opened: `SUBSYSTEM=="tty", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", SYMLINK+="ping360"
26
27
`. In this case, the command we used is specifically made for the Ping360 sonar from Blue Robotics)
27
28
- Apply the rules: `sudo udevadm control --reload-rules && sudo udevadm trigger`
28
29
- To check if rules were applied correctly execute: `ls /dev/ping360 -l`. In general cases, replace ping360 with the name
29
30
inserted in the SYMLINK attribute of the created rule.
0 commit comments