P
P
Pavel Bykov2018-08-21 14:33:01
linux
Pavel Bykov, 2018-08-21 14:33:01

Is it possible to change the DEVNAME parameter in udev for a usb device?

Is it possible in any way to change the DEVNAME of the usb device connection (see the picture below)?
ti1yI5z.png
What would be /dev/ttyUSB0 instead of /dev/ttyUSB5.
Tried to do it through this rule

DRIVERS=="cp210x", ATTRS{interface}=="CP2102 USB to UART Bridge Controller", KERNEL="/dev/ttyUSB5"

and such a rule
DRIVERS=="cp210x", ATTRS{interface}=="CP2102 USB to UART Bridge Controller", DEVNAME="/dev/ttyUSB5"

But it doesn't work...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Bykov, 2018-08-21
@mafof

Solved the problem with this rule

DRIVERS=="cp210x", SYMLINK+="ttyUSB5"

A
Antony, 2018-08-21
@RiseOfDeath

Can.
On a vskidka from the rule, you can throw, for starters, everything superfluous. For example ATTRS{interface}=="CP2102 USB to UART Bridge Controller" - it's better to bind to Vendor ID and Model ID (I don't guarantee that they are called that way, I forgot over the years)
Unfortunately, over the years I don't remember how I did it ( the truth was tied to a specific port where it is plugged).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question