doc:appunti:linux:sa:renaming_usb_devices
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | doc:appunti:linux:sa:renaming_usb_devices [2021/06/09 12:29] (current) – created niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Renaming USB serial devices ====== | ||
+ | |||
+ | When you connect an **usb-serial** adapter to a GNU/Linux host, it gets named something like **ttyUSB0**. Other similar devices get the name with subsequent numbers: **ttyUSB1**, | ||
+ | |||
+ | In the following examples you can assign a predictable name by **USB slot position** or by **vendor/ | ||
+ | |||
+ | Once the device is connected, inspect the udev subsystem about it; | ||
+ | |||
+ | < | ||
+ | udevadm info -a -p $(udevadm info -q path -n / | ||
+ | </ | ||
+ | |||
+ | You can choose among many attributes to identify the device. | ||
+ | |||
+ | The following example will identify the device by the USB position, which is also reported by **dmesg**: | ||
+ | |||
+ | < | ||
+ | usb 1-2.3: pl2303 converter now attached to ttyUSB0 | ||
+ | </ | ||
+ | |||
+ | Create a file **/ | ||
+ | |||
+ | < | ||
+ | ACTION==" | ||
+ | </ | ||
+ | |||
+ | Otherwise you can select by vendor/ | ||
+ | |||
+ | < | ||
+ | ACTION==" | ||
+ | </ | ||
+ | |||
+ | Let the udev subsystem to re-read the rules: | ||
+ | |||
+ | < | ||
+ | udevadm trigger | ||
+ | </ | ||
+ | |||
+ | Now, when you plug the USB adapter, a symlink will be created **%%/ | ||
+ | |||
+ | If more than one rule match, more than one symlink will be created. | ||
doc/appunti/linux/sa/renaming_usb_devices.txt · Last modified: 2021/06/09 12:29 by niccolo