Issues with FRC Pi Image and Microsoft HD-3000

Hello All,

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.

Is there something I’m missing?

Thanks,
David Fiel
Team 5401

Check the permissions. That is sometimes the problem. “ls -l /dev/video*” and make sure the account you are using has r/w permissions.

The default permission has rw for all users. The only difference is the pi camera has a ‘+’ permission at the end, which I am not familiar with

That “+” indicates that there are ACL permissions on the device. You can list them with “getfacl”. But it does not sound like that is the problem.

You can also check “dmesg” to see if the driver seems to be good. If you have the Pi desktop up, you could try tools like “cheese” or “guvcview”.

Dmesg doesn’t have anything related to the camera other than the standard USB enumeration

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.

Yes, the camera itself is fine. We have 3 of the HD-3000 cameras, and they all work under Windows, but none of the cameras work on the Pi.

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

v4l2:

pi@frcvision(ro):~$ v4l2-ctl --list-devices
mmal service 16.1 (platform:bcm2835-v4l2):
        /dev/video0

Microsoft® LifeCam HD-3000: Mi (usb-3f980000.usb-1.1.3):
        /dev/video1

pi@frcvision(ro):~$ v4l2-ctl -d 1 --list-ctrls
                     brightness (int)    : min=30 max=255 step=1 default=-8193 value=133
                       contrast (int)    : min=0 max=10 step=1 default=57343 value=5
                     saturation (int)    : min=0 max=200 step=1 default=57343 value=83
 white_balance_temperature_auto (bool)   : default=1 value=1
           power_line_frequency (menu)   : min=0 max=2 default=2 value=2
      white_balance_temperature (int)    : min=2800 max=10000 step=1 default=57343 value=4500 flags=inactive
                      sharpness (int)    : min=0 max=50 step=1 default=57343 value=25
         backlight_compensation (int)    : min=0 max=10 step=1 default=57343 value=0
                  exposure_auto (menu)   : min=0 max=3 default=0 value=3
              exposure_absolute (int)    : min=5 max=20000 step=1 default=156 value=156 flags=inactive
                   pan_absolute (int)    : min=-201600 max=201600 step=3600 default=0 value=0
                  tilt_absolute (int)    : min=-201600 max=201600 step=3600 default=0 value=0
                  zoom_absolute (int)    : min=0 max=10 step=1 default=57343 value=0

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.

I updated to the latest FRCVision image, and it worked. Not sure what was broken with the original release

I’m having this problem as well. You say there is a new image and it works? The image I’ve been using is 2019-01-14-FRCVision.img

Thanks

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.

I have it working with 1 camera, but it will not recognize a second. This is on multiple boots.

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.

1 Like

I’ll be there tomorrow night. I really appreciate the support!

It is recognizing the camera at an OS level.

6562141526630337249

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):

rw
sudo apt install acl
getfacl /dev/video*


Ok it still didnt turn on the 2nd camera but it still recognizes it on OS level.

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?