Raspberry Pi 4, two HD Cameras connected to it, only one showing up

When I have both of the HD Cameras connected to the RPI 4 with each having their own usb connection I only have one able to output a video stream. When I have only one connected I am able to get a video stream from both cameras. When I run the command usb-devices I get the following:

pi@testingpi:~ $ usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=05.15
S:  Manufacturer=Linux 5.15.32-v8+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 4
D:  Ver= 2.10 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2109 ProdID=3431 Rev=04.21
S:  Product=USB2.0 Hub
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 26 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=32e4 ProdID=9422 Rev=01.00
S:  Manufacturer=H264 USB Camera
cat: bNumInterfaces: No such file or directory
cat: bConfigurationValue: No such file or directory
cat: bmAttributes: No such file or directory
cat: bMaxPower: No such file or directory
C:  #Ifs= 0 Cfg#= 0 Atr= MxPwr=
cat: '/sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bInterfaceNumber': No such file or directory
cat: '/sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bAlternateSetting': No such file or directory
cat: '/sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bNumEndpoints': No such file or directory
cat: '/sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bInterfaceClass': No such file or directory
cat: '/sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bInterfaceSubClass': No such file or directory
cat: '/sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bInterfaceProtocol': No such file or directory
/usr/bin/usb-devices: 79: printf: (none): expected numeric value
I:  If#=0x Alt= 0 #EPs= 0 Cls=() Sub= Prot= Driver=

T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#= 14 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=32e4 ProdID=9422 Rev=01.00
S:  Manufacturer=H264 USB Camera
S:  Product=H264 USB Camera
S:  SerialNumber=2020032801
C:  #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I:  If#=0x1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#=0x2 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#=0x3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:  If#=0x4 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=05.15
S:  Manufacturer=Linux 5.15.32-v8+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

Both cameras work perfectly when connected to other computers (such as a macbook or a dell xps 15 running ubuntu), but when connected to the RPI 4 only one will output a video stream. Any advice would be greatly appreciated.

Edit:
When running usb-devices again, I noticed that the output for the cameras changed. It seems to work sometimes…

 pi@testingpi:~ $ usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=05.15
S:  Manufacturer=Linux 5.15.32-v8+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 4
D:  Ver= 2.10 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2109 ProdID=3431 Rev=04.21
S:  Product=USB2.0 Hub
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 96 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=32e4 ProdID=9422 Rev=01.00
S:  Manufacturer=H264 USB Camera
S:  Product=H264 USB Camera
S:  SerialNumber=2020032801
C:  #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I:  If#=0x1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#=0x2 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#=0x3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:  If#=0x4 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio

T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#= 14 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=32e4 ProdID=9422 Rev=01.00
S:  Manufacturer=H264 USB Camera
S:  Product=H264 USB Camera
S:  SerialNumber=2020032801
C:  #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I:  If#=0x1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#=0x2 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#=0x3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:  If#=0x4 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=05.15
S:  Manufacturer=Linux 5.15.32-v8+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

Hi @msle237, welcome to the forum :slight_smile:

Both your output blocks contain the following

which seems to indicate two cameras being detected as connected (hence the separate ports (Port=), counts (Cnt=), and device numbers (Dev#=)). That said, something appears to have gone wrong in your first block while identifying the first camera, as there are error messages and some of the information is missing - I’m not sure why that would be the case.

My main ideas would be that either the Raspberry Pi has an insufficient power supply, or too much power is being drawn from the USB bus (or both). Are there any other devices connected that are being powered by the Raspberry Pi, either via USB or in general?

I appreciate your response and welcome,
During testing last night there was nothing else besides the two usb webcams. It was powered off a 20W AC/DC wall adapter. When we move past testing there is supposed to be another USB web cam (same type) as well as a serial link between the Pi and an arduino, so I really hope that power is not the issue here.
Our use case is rather unique in that the camera has its wires extended (using another usb wire that we just cut the ends off) then into a bulgin connector
(
12 pin connector – PX0410/12p/6570 12
pin front panel – PXO412/12s
), then into the raspberry pi via usb. However, the cameras wouldn’t work on another laptop if our connections were faulty in any way would they? My apologies if any of that is confusing.

This may be relevant:

Thank you! I’ll solder a better usb cable to it and try again. The cable that we’re using is a cheap-o cable from Amazon so that might be the problem. Again thank you! I’ll update this thread with the status once I finish.

1 Like

@EliotBR Thank you so much for your help. I changed the webcams over to shielded USB cable and they both work perfectly!

2 Likes