USB serial ports by serial number
Hans Petter Selasky
hps at selasky.org
Tue Nov 19 14:15:06 UTC 2019
On 2019-10-08 16:20, Ed Maste wrote:
> On Thu, 3 Oct 2019 at 02:43, Oleksandr Rybalko <ray at ddteam.net> wrote:
>>
>> Hi,
>>
>> Looks like you are lucky guy :)
>> Most of USB-serial devices have "very stable" serial number :)
>> more than 50% have S/N "0123456789".
>
> cp210x USB-serial devices are ubiquitous and cheap and it's easy to
> set the serial number.
>
> I have a trivial port of the 'cp210x-cfg' tool at
> https://github.com/emaste/cp210x-cfg.
Hi,
How about the following:
We can add a TUNEABLE search to every USB device attach, which if set,
will serve as the base unit number for that device.
Then you could simply add to /boot/loader.conf :
hint.usb.0.1.1.1.0.unit=128
hint.usb.0.1.1.2.0.unit=129
These numbers can be printed by usbconfig for example, based on:
1) Host controller number [0..xxx]
2) Array of USB port numberr [1.255]
3) Interface index number [0..xxx]
To help setting up the system.
--HPS
More information about the freebsd-usb
mailing list