webcamd, usb and two webcams - only one works
Thomas Steen Rasmussen
thomas at gibfest.dk
Thu Nov 26 12:04:53 UTC 2020
Hello USB friends :)
I am having a hard time trying to get two webcams working simultaneously
on FreeBSD 12.2-STABLE r367109 GENERIC amd64.
Each webcam works by itself, for example when taking a snapshot with
pwcview:
sudo pwcview -h -c 1 -o foo.jpg -d /dev/video0
The webcam creates two video devices, video0 and video1. When I plug in
the second webcam video2 and video3 are created. But trying to use the
device doesn't work, pwcview hangs forever and multimedia/motion
complains about timeouts when speaking to the camera.
If I swap the cameras around then "the other one" works, so I know both
cameras are fine.
It seems somehow webcamd or maybe something in the usb system doesn't
like having two cameras in my setup.
I tried temporarily replacing one of the webcams with another model, but
the same result: the first webcam works, but the next one does not.
The webcams look like this to FreeBSD:
===============================
$ sudo usbconfig -d ugen0.5 dump_all_desc
ugen0.5: <Jieli Technology USB PHY 2.0> at usbus0, cfg=0 md=HOST
spd=HIGH (480Mbps) pwr=ON (500mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x00ef <Miscellaneous device>
bDeviceSubClass = 0x0002
bDeviceProtocol = 0x0001
bMaxPacketSize0 = 0x0040
idVendor = 0x1224
idProduct = 0x2a25
bcdDevice = 0x0100
iManufacturer = 0x0001 <Jieli Technology>
iProduct = 0x0002 <USB PHY 2.0>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001
Configuration index 0
bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x0273
bNumInterfaces = 0x0004
bConfigurationValue = 0x0001
iConfiguration = 0x0000 <no string>
bmAttributes = 0x0080
bMaxPower = 0x00fa
Additional Descriptor
bLength = 0x08
bDescriptorType = 0x0b
bDescriptorSubType = 0x00
RAW dump:
0x00 | 0x08, 0x0b, 0x00, 0x02, 0x0e, 0x03, 0x00, 0x06
Interface 0
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0000
bAlternateSetting = 0x0000
bNumEndpoints = 0x0001
bInterfaceClass = 0x000e <Video device>
bInterfaceSubClass = 0x0001
bInterfaceProtocol = 0x0000
iInterface = 0x0006 <USB CAMERA>
Additional Descriptor
bLength = 0x0d
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x0d, 0x24, 0x01, 0x00, 0x01, 0x67, 0x00, 0x80,
0x08 | 0xc3, 0xc9, 0x01, 0x01, 0x01
Additional Descriptor
bLength = 0x12
bDescriptorType = 0x24
bDescriptorSubType = 0x02
RAW dump:
0x00 | 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00,
0x08 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff,
0x10 | 0xff, 0x1f
Additional Descriptor
bLength = 0x0b
bDescriptorType = 0x24
bDescriptorSubType = 0x05
RAW dump:
0x00 | 0x0b, 0x24, 0x05, 0x02, 0x01, 0x00, 0x00, 0x02,
0x08 | 0xff, 0xff, 0x00
Additional Descriptor
bLength = 0x1a
bDescriptorType = 0x24
bDescriptorSubType = 0x06
RAW dump:
0x00 | 0x1a, 0x24, 0x06, 0x03, 0x70, 0x33, 0xf0, 0x28,
0x08 | 0x11, 0x63, 0x2e, 0x4a, 0xba, 0x2c, 0x68, 0x90,
0x10 | 0xeb, 0x33, 0x40, 0x16, 0x08, 0x01, 0x02, 0x01,
0x18 | 0x00, 0x00
Additional Descriptor
bLength = 0x1a
bDescriptorType = 0x24
bDescriptorSubType = 0x06
RAW dump:
0x00 | 0x1a, 0x24, 0x06, 0x04, 0x94, 0x73, 0xdf, 0xdd,
0x08 | 0x3e, 0x97, 0x27, 0x47, 0xbe, 0xd9, 0x04, 0xed,
0x10 | 0x64, 0x26, 0xdc, 0x67, 0x08, 0x01, 0x03, 0x01,
0x18 | 0x00, 0x00
Additional Descriptor
bLength = 0x09
bDescriptorType = 0x24
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x09, 0x24, 0x03, 0x05, 0x01, 0x01, 0x00, 0x04,
0x08 | 0x00
Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0085 <IN>
bmAttributes = 0x0003 <INTERRUPT>
wMaxPacketSize = 0x0040
bInterval = 0x0004
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x05
bDescriptorType = 0x25
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x05, 0x25, 0x03, 0x40, 0x00
Interface 1
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0000
bNumEndpoints = 0x0000
bInterfaceClass = 0x000e <Video device>
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>
Additional Descriptor
bLength = 0x0f
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x0f, 0x24, 0x01, 0x02, 0xe1, 0x00, 0x84, 0x00,
0x08 | 0x05, 0x02, 0x01, 0x00, 0x01, 0x00, 0x00
Additional Descriptor
bLength = 0x0b
bDescriptorType = 0x24
bDescriptorSubType = 0x06
RAW dump:
0x00 | 0x0b, 0x24, 0x06, 0x01, 0x02, 0x00, 0x01, 0x00,
0x08 | 0x00, 0x00, 0x00
Additional Descriptor
bLength = 0x1e
bDescriptorType = 0x24
bDescriptorSubType = 0x07
RAW dump:
0x00 | 0x1e, 0x24, 0x07, 0x01, 0x00, 0x00, 0x05, 0xd0,
0x08 | 0x02, 0x00, 0x00, 0x2f, 0x0d, 0x00, 0x00, 0x5e,
0x10 | 0x1a, 0x00, 0x20, 0x1c, 0x00, 0x80, 0x1a, 0x06,
0x18 | 0x00, 0x01, 0x80, 0x1a, 0x06, 0x00
Additional Descriptor
bLength = 0x1e
bDescriptorType = 0x24
bDescriptorSubType = 0x07
RAW dump:
0x00 | 0x1e, 0x24, 0x07, 0x02, 0x00, 0x80, 0x02, 0xe0,
0x08 | 0x01, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0xca,
0x10 | 0x08, 0x00, 0x60, 0x09, 0x00, 0x80, 0x1a, 0x06,
0x18 | 0x00, 0x01, 0x80, 0x1a, 0x06, 0x00
Additional Descriptor
bLength = 0x16
bDescriptorType = 0x24
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x16, 0x24, 0x03, 0x00, 0x03, 0x00, 0x05, 0xd0,
0x08 | 0x02, 0x80, 0x02, 0xe0, 0x01, 0x40, 0x01, 0xf0,
0x10 | 0x00, 0x04, 0x01, 0x05, 0x0a, 0x14
Additional Descriptor
bLength = 0x06
bDescriptorType = 0x24
bDescriptorSubType = 0x0d
RAW dump:
0x00 | 0x06, 0x24, 0x0d, 0x01, 0x01, 0x04
Additional Descriptor
bLength = 0x1b
bDescriptorType = 0x24
bDescriptorSubType = 0x04
RAW dump:
0x00 | 0x1b, 0x24, 0x04, 0x02, 0x02, 0x59, 0x55, 0x59,
0x08 | 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00,
0x10 | 0xaa, 0x00, 0x38, 0x9b, 0x71, 0x10, 0x01, 0x00,
0x18 | 0x00, 0x00, 0x00
Additional Descriptor
bLength = 0x1e
bDescriptorType = 0x24
bDescriptorSubType = 0x05
RAW dump:
0x00 | 0x1e, 0x24, 0x05, 0x01, 0x00, 0x00, 0x05, 0xd0,
0x08 | 0x02, 0x00, 0x00, 0x2f, 0x0d, 0x00, 0x00, 0x5e,
0x10 | 0x1a, 0x00, 0x20, 0x1c, 0x00, 0x80, 0x84, 0x1e,
0x18 | 0x00, 0x01, 0x80, 0x84, 0x1e, 0x00
Additional Descriptor
bLength = 0x1e
bDescriptorType = 0x24
bDescriptorSubType = 0x05
RAW dump:
0x00 | 0x1e, 0x24, 0x05, 0x02, 0x00, 0x80, 0x02, 0xe0,
0x08 | 0x01, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0xca,
0x10 | 0x08, 0x00, 0x60, 0x09, 0x00, 0x80, 0x1a, 0x06,
0x18 | 0x00, 0x01, 0x80, 0x1a, 0x06, 0x00
Additional Descriptor
bLength = 0x12
bDescriptorType = 0x24
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x12, 0x24, 0x03, 0x00, 0x03, 0x00, 0x05, 0xd0,
0x08 | 0x02, 0x80, 0x02, 0xe0, 0x01, 0x40, 0x01, 0xf0,
0x10 | 0x00, 0x00
Additional Descriptor
bLength = 0x06
bDescriptorType = 0x24
bDescriptorSubType = 0x0d
RAW dump:
0x00 | 0x06, 0x24, 0x0d, 0x01, 0x01, 0x04
Interface 1 Alt 1
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0001
bNumEndpoints = 0x0001
bInterfaceClass = 0x000e <Video device>
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>
Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0084 <IN>
bmAttributes = 0x0005 <ASYNC-ISOCHRONOUS>
wMaxPacketSize = 0x1400
bInterval = 0x0001
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x08
bDescriptorType = 0x0b
bDescriptorSubType = 0x02
RAW dump:
0x00 | 0x08, 0x0b, 0x02, 0x02, 0x01, 0x02, 0x00, 0x05
Interface 2
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0002
bAlternateSetting = 0x0000
bNumEndpoints = 0x0000
bInterfaceClass = 0x0001 <Audio device>
bInterfaceSubClass = 0x0001
bInterfaceProtocol = 0x0000
iInterface = 0x0005 <USB Microphone>
Additional Descriptor
bLength = 0x09
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x09, 0x24, 0x01, 0x00, 0x01, 0x26, 0x00, 0x01,
0x08 | 0x03
Additional Descriptor
bLength = 0x0c
bDescriptorType = 0x24
bDescriptorSubType = 0x02
RAW dump:
0x00 | 0x0c, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x01,
0x08 | 0x03, 0x00, 0x00, 0x00
Additional Descriptor
bLength = 0x08
bDescriptorType = 0x24
bDescriptorSubType = 0x06
RAW dump:
0x00 | 0x08, 0x24, 0x06, 0x03, 0x01, 0x01, 0x03, 0x00
Additional Descriptor
bLength = 0x09
bDescriptorType = 0x24
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x09, 0x24, 0x03, 0x02, 0x01, 0x01, 0x00, 0x03,
0x08 | 0x00
Interface 3
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0003
bAlternateSetting = 0x0000
bNumEndpoints = 0x0000
bInterfaceClass = 0x0001 <Audio device>
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0005 <USB Microphone>
Interface 3 Alt 1
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0003
bAlternateSetting = 0x0001
bNumEndpoints = 0x0001
bInterfaceClass = 0x0001 <Audio device>
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0005 <USB Microphone>
Additional Descriptor
bLength = 0x07
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x07, 0x24, 0x01, 0x02, 0x01, 0x01, 0x00
Additional Descriptor
bLength = 0x0b
bDescriptorType = 0x24
bDescriptorSubType = 0x02
RAW dump:
0x00 | 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
0x08 | 0x40, 0x1f, 0x00
Endpoint 0
bLength = 0x0009
bDescriptorType = 0x0005
bEndpointAddress = 0x0082 <IN>
bmAttributes = 0x0001 <ISOCHRONOUS>
wMaxPacketSize = 0x0100
bInterval = 0x0004
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x07
bDescriptorType = 0x25
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00
Interface 3 Alt 2
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0003
bAlternateSetting = 0x0002
bNumEndpoints = 0x0001
bInterfaceClass = 0x0001 <Audio device>
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0005 <USB Microphone>
Additional Descriptor
bLength = 0x07
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x07, 0x24, 0x01, 0x02, 0x01, 0x01, 0x00
Additional Descriptor
bLength = 0x0b
bDescriptorType = 0x24
bDescriptorSubType = 0x02
RAW dump:
0x00 | 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
0x08 | 0x80, 0x3e, 0x00
Endpoint 0
bLength = 0x0009
bDescriptorType = 0x0005
bEndpointAddress = 0x0082 <IN>
bmAttributes = 0x0001 <ISOCHRONOUS>
wMaxPacketSize = 0x0100
bInterval = 0x0004
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x07
bDescriptorType = 0x25
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00
Interface 3 Alt 3
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0003
bAlternateSetting = 0x0003
bNumEndpoints = 0x0001
bInterfaceClass = 0x0001 <Audio device>
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0005 <USB Microphone>
Additional Descriptor
bLength = 0x07
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x07, 0x24, 0x01, 0x02, 0x01, 0x01, 0x00
Additional Descriptor
bLength = 0x0b
bDescriptorType = 0x24
bDescriptorSubType = 0x02
RAW dump:
0x00 | 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
0x08 | 0x44, 0xac, 0x00
Endpoint 0
bLength = 0x0009
bDescriptorType = 0x0005
bEndpointAddress = 0x0082 <IN>
bmAttributes = 0x0001 <ISOCHRONOUS>
wMaxPacketSize = 0x0100
bInterval = 0x0004
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x07
bDescriptorType = 0x25
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00
Interface 3 Alt 4
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0003
bAlternateSetting = 0x0004
bNumEndpoints = 0x0001
bInterfaceClass = 0x0001 <Audio device>
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0005 <USB Microphone>
Additional Descriptor
bLength = 0x07
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x07, 0x24, 0x01, 0x02, 0x01, 0x01, 0x00
Additional Descriptor
bLength = 0x0b
bDescriptorType = 0x24
bDescriptorSubType = 0x02
RAW dump:
0x00 | 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
0x08 | 0x80, 0xbb, 0x00
Endpoint 0
bLength = 0x0009
bDescriptorType = 0x0005
bEndpointAddress = 0x0082 <IN>
bmAttributes = 0x0001 <ISOCHRONOUS>
wMaxPacketSize = 0x0100
bInterval = 0x0004
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x07
bDescriptorType = 0x25
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00
===============================
Both are connected to a USB hub, but I have tried connecting one
directly to the computer, which is a pcengines APU3C4 btw. It did not
make a difference.
What can I try to troubleshoot/debug this? Any more info needed?
Thanks! :)
Best regards,
Thomas Steen Rasmussen
More information about the freebsd-usb
mailing list