Re: USB serial device naming
Alexandr Rybalko <ray <at> dlink.ua>
2010-05-05 09:18:41 GMT
Hi,
On Wed, 5 May 2010 10:46:30 +0200
Milan Obuch <freebsd-usb <at> dino.sk> wrote:
>> On Wednesday 05 May 2010 09:52:15 Hans Petter Selasky wrote:
>> > Hi,
>> >
>> > Maybe you can make PR on the issue and assign it to USB. Currently there is
>> > no way of knowing which /dev/cuaUXXX belongs to which USB device. Probably
>> > we can add the USB bus and address number as a part of the device
>> > coordinates. So that /dev/ugen1.1 only creates /dev/cuaU1.1.xxx entries.
>> > And then we can also remove the current unit number allocation structure I
>> > guess, if we use:
>> >
>> > /dev/cuaU1.1.<iface_number>.<optional_sub_modem_unit>
>> >
>> > The only problem is: Will we break any existing applications?
>> >
>>
>> Well, yes, to some extent :) Problem with this naming convention is name
>> changes with every port change - that is, if you pull USB cable out and plug
>> it in another port. There was already some older thread about naming on
>> freebsd-usb list (end of April 2009). But if devd receives all necessary
>> informations in attach event, then it is possible to rewrite config files or
>> create symlink in /dev directory or something like this to handle this
>> situation.
I think better way is use device connection path in name.
User know to which port of hub they attach device, so name like /dev/cuaU.h0p1.h2p3 (root hub 0, port 1, hub
(Continue reading)