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)
hcvv
June 1, 2018, 10:06am
#2
I poked around a little bit and
lsusb -v
gives (amongst a lot of info) a parameter iSerial:
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.
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)
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)
hcvv
June 1, 2018, 4:00pm
#5
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.
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:
echo -n 0000:07:00.0 > unbind
echo -n 0000:07:00.0 > bind
To reset all my USB ports I run:
#!/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
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)
hcvv
June 1, 2018, 9:26pm
#9
AndersG:
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 >.
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
hcvv
June 2, 2018, 9:47am
#12
udev rules might be a solution. But they can only be used when there is a difference between the devices, as the very first paragraph there explains.
As said earlier, when no difference can be found between two devices, there is no base upon which anything can be done.
Hcvv,
> As said earlier, when no difference can be found between two devices,
> there is no base upon which anything can be done.
Yes. I realise that. Anyway, I did update to 42.3 and it seems more
stable now.
Anders Gustafsson
The Aaland Islands (N60 E20)
AndersG:
Hcvv,
> As said earlier, when no difference can be found between two devices,
> there is no base upon which anything can be done.
Yes. I realise that. Anyway, I did update to 42.3 and it seems more
stable now.
Anders Gustafsson
The Aaland Islands (N60 E20)
His comment was directed toward me, not you