Re: New device wiring option

Daniel O'Connor via freebsd-arch <[email protected]>
Newsgroups gmane.os.freebsd.architechture
Message-ID <[email protected]>

> On 15 Apr 2021, at 14:47, Poul-Henning Kamp <[email protected]> wrote:
> 
> --------
> Bjoern A. Zeeb writes:
> 
>> Probably USB as well?  Having 10 serial consoles on USB Hubs and unplugging
>> one “early” one it is easy to end up re-numbering the entire chain after a
>> reboot.  Not sure if this really fits into your problem/implementation domain.
> 
> My solution to that specific problem is the following entry in /etc/devd:
> 
> 	attach 500 {
> 		match "device-name"     "uftdi[0-9]*";
> 		match "vendor"          "0x0403";
> 		match "product"         "(0x6001|0x6015)";
> 		action "ln -fs /dev/cua$ttyname /dev/cua_$sernum";
> 	};
> 	
> 	notify 500 {
> 		match "system"          "USB";
> 		match "subsystem"       "DEVICE";
> 		match "type"            "DETACH";
> 		match "vendor"          "0x0403";
> 		match "product"         "(0x6001|0x6015)";
> 		action "rm -f /dev/cua_$sernum";
> 	};

I wrote a more general version of this, although when I did testing the serial number was not available so I had to store it for deletion later.

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[email protected]"
USB serial ports by serial number.eml (message/rfc822, 2.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.