udev: how to rename a device from a usb dongle that creates 3 devices?
I want to rename what in my host is set up as /dev/ttyUSB0 when I plugin my usbdongle to something like: /dev/modemWhatever
I know this is done with udev rules however I want to know how to tell each of the 3 devices from each other.
The device creates 3 ttyUSBx devices: ttyUSB0, 1 and 2.
When I request for information from them to udevadm I see the same information for all of them so I can't really tell which is which.
The basic documentation for creating rules can be found here:
In essence you just need to find something unique about each of the devices to match against, and set up an action for it. I recommend not trying to change the original device name though, just create a symlink to it with the name you want.
If you can't find anything unique, then I don't think it's possible to set up completely-fixed devices for them. From what you've posted so far, it seems that only the device path is different. If they always get created in the same order, perhaps you could use that.
(Full disclosure: I have not yet set up anything like this myself, I've only done a bit of playing around with it.)
|All times are GMT -5. The time now is 08:39 PM.|