We are using the 2019 FRC Pi image for vision processing. We have the Pi camera working fine (on /dev/video0). We are trying to get the Microsoft camera to work at the same time, so we can have 2 different views. The camera shows up at /dev/video1, and when I issue the “v4l2-ctl --list-devices” command, both cameras are listed. But if I try to do “v4l2-ctl -d 1 --list-ctrls”, there is no output. Adding the camera in the Web UI also gives a blank stream, but lists all the possible video modes.
Are you sure the camera itself is okay? Have you tried plugging it into another Linux machine or tried a different camera? I don’t have the hardware to try to reproduce this today but I’ll try reproducing it later this week.
I just tried it myself and was unable to reproduce the problem you are seeing (this is with a Pi Model 3B+)
relevant dmesg:
[ 2.697320] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 2.801924] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800
[ 2.804565] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.997060] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 3.094390] libphy: lan78xx-mdiobus: probed
[ 3.344798] bcm2835-v4l2: scene mode selected 0, was 0
[ 3.345224] bcm2835-v4l2: V4L2 device registered as video0 - stills mode > 1280x720[ 2.697320] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 2.801924] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800
[ 2.804565] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.344798] bcm2835-v4l2: scene mode selected 0, was 0
[ 3.345224] bcm2835-v4l2: V4L2 device registered as video0 - stills mode > 1280x720
[ 3.365797] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded.
[ 4.003236] uvcvideo: Found UVC 1.00 device Microsoft® LifeCam HD-3000 (045e:0810)
[ 4.013214] uvcvideo 1-1.1.3:1.0: Entity type for entity Extension 5 was not initialized!
[ 4.013235] uvcvideo 1-1.1.3:1.0: Entity type for entity Processing 4 was not initialized!
[ 4.013247] uvcvideo 1-1.1.3:1.0: Entity type for entity Selector 3 was not initialized!
[ 4.013257] uvcvideo 1-1.1.3:1.0: Entity type for entity Camera 1 was not initialized!
[ 4.018456] input: Microsoft® LifeCam HD-3000: Mi as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/input/input0
[ 4.018728] usbcore: registered new interface driver uvcvideo
/dev/video*:
pi@frcvision(ro):~$ ls -l /dev/video*
crw-rw---- 1 root video 81, 0 Jan 15 07:17 /dev/video0
crw-rw---- 1 root video 81, 1 Jan 15 07:17 /dev/video1
It sounds like something strange is happening with your permissions perhaps? I don’t know why it would be different with your Pi than mine with the same image though.
That’s the latest image. Are you seeing the same permissions thing on /dev/video*? I’m wondering if whether something weird can happen on first boot… did you boot for the first time after imaging the SD card with the camera connected? Try reimaging the card and booting the first time with no USB devices attached, then attaching the camera (later boots with the camera attached will be fine). This is just a theory at the moment but it’s worth a try.
Just to double-check, you added the second camera to the vision settings tab and clicked save? If you go to the vision status tab, enable the console, and click terminate, what’s the output?
My previous message is speculating that something goes sideways on the very first boot after imaging the SD card. During the first boot after imaging, different things happen than on subsequent reboots.
I don’t have cameras with me unfortunately. I’ll have to test it when I’m with the students.
When I was trying this Saturday, I had 1 working great. So I added a 2nd USB camera. It would not be selectable in the web interface and I could not find it when I looked for the 2nd cam in the device list. No video1, just video0
Okay. When you next have access, after plugging in the second camera, ssh in and run “dmesg”, and also do “ls -l /dev/video*”. It sounds like it’s not even recognizing the camera at the OS level.
That’s the same issue the other person was reporting, the + indicates an ACL is present, which shouldn’t be happening, and I don’t know what’s setting it. Have you installed any other software on the image? Running the following will help debug (note: need an internet connection on the Pi to run the apt install):
Okay, that’s strange that it ended up that way, but those permissions should work. Two things to look at: what are the contents of /boot/frc.json? Also, if you bring up the webdash for the Pi and go to the Vision Settings tab, are two cameras listed? Do both say “Connected” next to the name? What are the settings for the cameras?