Jump to content

usb dongles mapping to /dev


gogoer

Recommended Posts

Hello.

I have orange pi system with 3 USB-UART converters. After system boot i can find them in /dev as /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2. But after system reboot converters can be not at same positions. Is there any way to make first converter /dev/ttyUSB0, second /dev/ttyUSB1 etc. ?

Link to comment
Share on other sites

Good question !

 

The name depends not only on boot but also change if you plug / unplug devices ...

 

I have the same problem when I try to work with 2 micro-controllers at the same time. This can certainly be done with an "udev rule".

 

There is some response here :

 

https://www.domoticz.com/wiki/PersistentUSBDevices

 

In section : filtering by "devpath" :

 

SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ATTRS{devpath}=="1.2", SYMLINK+="ttyUSB-arduino1"

SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ATTRS{devpath}=="1.5", SYMLINK+="ttyUSB-arduino2"

 

The solution will depend on usage and usb hub configuration. And writing and debugging udev rules is not easy.

Link to comment
Share on other sites

thank you for your answer!!!

my problem that uart adapters are the same! they are totally identical, their serial numbers are the same)

is there any way to resolv this issue?? or it better to you different adapters and write rules as you advised?

Link to comment
Share on other sites

22 hours ago, gogoer said:

thank you for your answer!!!

my problem that uart adapters are the same! they are totally identical, their serial numbers are the same)

is there any way to resolv this issue?? or it better to you different adapters and write rules as you advised?

 

The method "filtering by devpath" I have indicated before is targeted at providing a solution in that case. The match is done for a type of (identical) devices (same idVendor/idProduct) and the device name chosen according to the index of USB port.

Link to comment
Share on other sites

2 hours ago, arox said:

 

The method "filtering by devpath" I have indicated before is targeted at providing a solution in that case. The match is done for a type of (identical) devices (same idVendor/idProduct) and the device name chosen according to the index of USB port.


This is great! I had a similar problem to solve :)

Link to comment
Share on other sites

3 hours ago, lanefu said:


This is great! I had a similar problem to solve :)

I would like DT overlay could handle that sort of thing. (I may suggest here something completely stupid because I know nothing about DT).

 

Using an overkilled dynamic system configuration system like udev to make a static configuration is somewhere strange ...

Link to comment
Share on other sites

9 minutes ago, arox said:

Using an overkilled dynamic system configuration system like udev to make a static configuration is somewhere strange ..


I think udev is appropriate.. its a situation that could just as easily be needed on a x86 machine w/o device tree to enforce enumeration

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines