Re: Mapping USB-ports "by slot" rather than by "usb attributes"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ahhhh..... (sorry for my stupid realisation-originated-question), for
the same serial-cable types with identical "idVendor" and "idProduct",
are they guaranteed to have unique serial-numbers?

We have the Prolific-PL2303-Serial-To-USB-converters with ID 067b:2303.
Right now I have two of these pieces, and they have identical 067b:2303, but

          udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' | head -n1

gives different serial-numbers for these two pieces.



Can I generalize this to any piece of the same cable-type?
If yes, I should be done :)


Either ways, thanks a ton Greg and Felipe for your prompt responses !!!



Thanks and Regards,
Ajay

On Tue, Sep 13, 2016 at 11:30 AM, Felipe Balbi
<felipe.balbi@xxxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> Ajay Garg <ajaygargnsit@xxxxxxxxx> writes:
>> Hi All.
>>
>> Till now, we had a single usb-serial-cable, that we needed to
>> associate to a static tty-name.
>> http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/
>> worked perfect for our purpose (till now).
>>
>>
>> However, we now require that multiple "identical" usb-serial-cables be
>> inserted in our device, and we want to associate static tty-names to
>> slots, something like ::
>>
>> slot-1 ==> always /dev/ttyUSB0
>> slot-2 ==> always /dev/ttyUSB1
>>
>> and so on ...
>>
>> Since all slots will contain "identical" usb-serial-cables, so the
>> solution at http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/
>> (if I am not wrong) breaks.
>
> They should still have separate Serial Numbers, right? Anyway, it's not
> hard to find a device without Serial number.
>
>> So, is there a solution to our requirement (probably via udev-rules)?
>> If yes, I will be grateful to receive any pointers.
>
> You can use the symlinks in /dev/serial/by-path/. See if that's enough
> for you.
>
> --
> balbi



-- 
Regards,
Ajay
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux