Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Identifying individual USB units where you have several of the same type?

  1. #1
    Join Date
    Oct 2015
    Location
    N60 E20
    Posts
    135

    Default Identifying individual USB units where you have several of the same type?

    OpenSUSe 42.2

    Specifically this is in connection with TVHeadend, but posting here as
    I think it is a general HW question.

    Is there any easy way to identify/name USB devices where you have
    several, identical on the same USB BUS? Ie for instance a number of
    RTL2832-tuners?

    In the OS, they appear as "tuner1", "tuner2" etc and it is not always
    easy to know which is which?

    - Anders Gustafsson
    The Aaland Islands (N60 E20)


  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,804

    Default Re: Identifying individual USB units where you have several of the same type?

    I poked around a little bit and
    Code:
    lsusb -v
    gives (amongst a lot of info) a parameter iSerial:
    Code:
    boven:/dev # lsusb -v | grep iSerial
      iSerial                 0 
      iSerial                 3 20021111153705700
      iSerial                 3 CN7592H1KH04TJ
      iSerial                 0 
      iSerial                 0 
      iSerial                 0 
      iSerial                 1 0000:00:1d.7
      iSerial                 1 0000:00:1d.0
      iSerial                 1 0000:00:1d.1
      iSerial                 1 0000:00:1d.2
      iSerial                 1 0000:00:1d.3
    boven:/dev #
    The lower ones in this list are for the USB hubs and thus "invented", but to me it looks that the two at the beginning are real serials read from the device. Give it a try.
    Henk van Velden

  3. #3
    Join Date
    Oct 2015
    Location
    N60 E20
    Posts
    135

    Default Re: Identifying individual USB units where you have several of the same type?

    Hcvv,
    > The lower ones in this list are for the USB hubs and thus "invented",
    > but to me it looks that the two at the beginning are real serials read
    > from the device. Give it a try.


    Thanks! Will do!

    - Anders Gustafsson
    The Aaland Islands (N60 E20)


  4. #4
    Join Date
    Oct 2015
    Location
    N60 E20
    Posts
    135

    Default Re: Identifying individual USB units where you have several of the same type?

    Bus 004 Device 005: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838
    DVB-T
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.00
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x0bda Realtek Semiconductor Corp.
    idProduct 0x2838 RTL2838 DVB-T
    bcdDevice 1.00
    iManufacturer 1 Realtek
    iProduct 2 RTL2838UHIDIR
    iSerial 3 00000001

    Bus 004 Device 004: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838
    DVB-T
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.00
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x0bda Realtek Semiconductor Corp.
    idProduct 0x2838 RTL2838 DVB-T
    bcdDevice 1.00
    iManufacturer 1 Realtek
    iProduct 2 RTL2838UHIDIR
    iSerial 3 00000001
    bNumConfigurations 1

    They seem pretty identical

    Oddly, when the problem happens, ie one tuner hangs, lsusb will just
    hang. I need to reboot the system.
    - Anders Gustafsson
    The Aaland Islands (N60 E20)


  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,804

    Default Re: Identifying individual USB units where you have several of the same type?

    First a hint on how to use these forums:

    There is an important, but not easy to find feature on the forums.

    Please in the future use CODE tags around copied/pasted computer text in a post. It is the # button in the tool bar of the post editor. When applicable copy/paste complete, that is including the prompt, the command, the output and the next prompt.


    Then.
    I see that both have the same iSerial (and everything else).
    When the manufacturer does not attach a different serial number (or other id) to the individual items, I assume nobody, even a computer, can see the difference between them.
    Henk van Velden

  6. #6

    Default Re: Identifying individual USB units where you have several of the same type?

    If you know which one is hanging you can go to /sys/bus/pci/drivers/xhci_hcd/ and reset the individual USB ports.


    As an example if the usb port is: 0000:07:00.0 then:

    Code:
    echo -n 0000:07:00.0 > unbind
    echo -n 0000:07:00.0 > bind
    To reset all my USB ports I run:

    Code:
    #!/bin/bash
    
    if ! cd /sys/bus/pci/drivers/xhci_hcd
    then
      echo ERROR: Cannot cd to xhci_hcd directory!
      exit 1
    fi
    
    for i in ????:??:??.?
    do
      echo -n "$i" > unbind
      echo -n "$i" > bind
    done
    I don’t have anything to hide, but I don’t have anything I want to show you either.

  7. #7
    Join Date
    Oct 2015
    Location
    N60 E20
    Posts
    135

    Default Re: Identifying individual USB units where you have several of the same type?

    Thanks, noted.

    - Anders Gustafsson
    The Aaland Islands (N60 E20)


  8. #8
    Join Date
    Oct 2015
    Location
    N60 E20
    Posts
    135

    Default Re: Identifying individual USB units where you have several of the same type?

    Hcvv,
    > Please in the future use CODE tags around copied/pasted computer text in
    > a post.


    I know, but I am posting through nntp

    Does it work then?

    <code>
    this is code
    </code>

    - Anders Gustafsson
    The Aaland Islands (N60 E20)


  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,804

    Default Re: Identifying individual USB units where you have several of the same type?

    Quote Originally Posted by AndersG View Post
    Hcvv,
    > Please in the future use CODE tags around copied/pasted computer text in
    > a post.


    I know, but I am posting through nntp

    Does it work then?

    <code>
    this is code
    </code>

    - Anders Gustafsson
    The Aaland Islands (N60 E20)
    It is [ and ] instead of < and >.
    Henk van Velden

  10. #10

    Default Re: Identifying individual USB units where you have several of the same type?

    I'm not a hardware expert, and this is for a different distro, but may point you in the right direction for unique names:

    https://www.embeddedrelated.com/showarticle/1053.php
    I don’t have anything to hide, but I don’t have anything I want to show you either.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •