ZED 2i wrong serial number (Yocto)

I’m trying to setup a Yocto image to connect to a ZED 2i from a Jetson Xavier NX 8GB target. I’m using the langdale branch from yocto as well as the same branch in meta-tegra (jetpack 5.0.2) . I’m using a Seeed Studio J2021 carrier board which is similar to the Jetson Xavier NX Dev Kit. I have the ZED 2i camera connected to a USB 3.0 port on the carrier board. I can see the ZED 2i camera and ZED-2i HID INTERFACE on the usb bus. When I run Tutorial 1 - Hello ZED app (with sdk_verbose=1), it claims it connected to the camera but the FW version and serial number are wrong. It then fails to find the calibration file since the serial number is wrong. I’ve attached the output from the kernel logs as well as the Tutorial App / ZED SDK.

Any idea why the ZED SDK can’t find the ZED HID device even though it is clearly on the bus with the correct serial number?

Log messages when camera connected

[11813.923430] usb 2-3.3: new SuperSpeed Gen 1 USB device number 22 using tegra-xusb
[11813.944503] usb 2-3.3: New USB device found, idVendor=2b03, idProduct=f880, bcdDevice= 1.00
[11813.944704] usb 2-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[11813.944863] usb 2-3.3: Product: ZED 2i
[11813.944955] usb 2-3.3: Manufacturer: Technologies, Inc.
[11813.945066] usb 2-3.3: SerialNumber: OV0001
[11813.959515] uvcvideo: Found UVC 1.10 device ZED 2i (2b03:f880)
[11813.985413] input: ZED 2i: ZED 2i as /devices/platform/3610000.xhci/usb2/2-3/2-3.3/2-3.3:1.0/input/input34
[11814.027175] usb 1-2.3.2: new full-speed USB device number 32 using tegra-xusb
[11814.129198] usb 1-2.3.2: New USB device found, idVendor=2b03, idProduct=f881, bcdDevice= 3.09
[11814.129405] usb 1-2.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11814.129585] usb 1-2.3.2: Product: ZED-2i HID INTERFACE
[11814.129700] usb 1-2.3.2: Manufacturer: STEREOLABS
[11814.129812] usb 1-2.3.2: SerialNumber: 31932880
[11814.134233] hid-generic 0003:2B03:F881.0026: hiddev96,hidraw0: USB HID v1.11 Device [STEREOLABS ZED-2i HID INTERFACE] on usb-3610000.xhci-2.3.2/input0

Output from Tutorial 1 - Hello ZED App:

[ZED][WARNING] libhid error: -99
[ZED][WARNING] [ZED] Sensors could not be initialized. Some modules (AI-based) might not work correctly.
[ZED][INFO] [Init] Camera successfully opened.
[ZED][INFO] [Init] Camera FW version: 4294967295
[ZED][INFO] [Init] Video mode: HD1080@30
[ZED][INFO] [Init] No calibration file found for SN 4294967295. Downloading...
Error CALIBRATION FILE NOT AVAILABLE, exit program.
[ZED][INFO] [Init] Unable to download calibration file.
* Option 1: Launch ZED Explorer App with --dc 4294967295
* Option 2: Download your calibration file on https://calib.stereolabs.com

Log messages when Tutorial 1 - hello ZED runs

[12540.723659] usb 1-2.3.2: reset full-speed USB device number 32 using tegra-xusb
[12540.830709] hid-generic 0003:2B03:F881.0027: hiddev96,hidraw0: USB HID v1.11 Device [STEREOLABS ZED-2i HID INTERFACE] on usb-3610000.xhci-2.3.2/input0
[12540.857482] usbhid 1-2.3.2:1.0: can't add hid device: -32
[12540.857683] usbhid: probe of 1-2.3.2:1.0 failed with error -32
[12540.877263] usbhid 1-2.3.2:1.0: can't add hid device: -32
[12540.877432] usbhid: probe of 1-2.3.2:1.0 failed with error -32
[12540.885728] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.887380] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.888744] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.890075] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.891406] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.892729] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.894062] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.895595] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.897128] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.898591] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.899916] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.901255] uvcvideo: Failed to query (GET_LEN) UVC control 2 on unit 4: -71 (exp. 2).
[12540.916889] usb 2-3.3: USB disconnect, device number 22
[12540.949649] tegra-xusb 3610000.xhci: WARN Event TRB for slot 4 ep 2 with no TDs queued?
[12541.043444] usb 1-2.3.2: USB disconnect, device number 32
[12541.755442] usb 2-3.3: new SuperSpeed Gen 1 USB device number 23 using tegra-xusb
[12541.776480] usb 2-3.3: New USB device found, idVendor=2b03, idProduct=f880, bcdDevice= 1.00
[12541.776681] usb 2-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[12541.776837] usb 2-3.3: Product: ZED 2i
[12541.776932] usb 2-3.3: Manufacturer: Technologies, Inc.
[12541.777047] usb 2-3.3: SerialNumber: OV0001
[12541.791441] uvcvideo: Found UVC 1.10 device ZED 2i (2b03:f880)
[12541.817539] input: ZED 2i: ZED 2i as /devices/platform/3610000.xhci/usb2/2-3/2-3.3/2-3.3:1.0/input/input35
[12541.855173] usb 1-2.3.2: new full-speed USB device number 33 using tegra-xusb
[12541.957204] usb 1-2.3.2: New USB device found, idVendor=2b03, idProduct=f881, bcdDevice= 3.09
[12541.957414] usb 1-2.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[12541.957576] usb 1-2.3.2: Product: ZED-2i HID INTERFACE
[12541.957692] usb 1-2.3.2: Manufacturer: STEREOLABS
[12541.957791] usb 1-2.3.2: SerialNumber: 31932880
[12541.961652] hid-generic 0003:2B03:F881.0028: hiddev96,hidraw0: USB HID v1.11 Device [STEREOLABS ZED-2i HID INTERFACE] on usb-3610000.xhci-2.3.2/input0

Hi @gp1234
we never used the ZED 2i on a Yocto-based distribution, so I must get more information to understand the possible cause of your issue.

Does the application work correctly if executed with root permissions?
The ZED 2i requires particular permissions to access the USB data, under Ubuntu, we install a set of udev rules for this reason. Can you check if they are valid also under Yocto?

Currently, I run everything as root, so I should be ok permission-wise. I have installed the udev rules (99-slabs.rules) included with the SDK. Are there any specific kernel modules related to the USB hid device that I could be missing? Yocto tends to install a bare minimum set of modules by default.

according to this, it seems an issue with the UVC module.

Can you try the zed-open-capture driver?
It’s open source, so you can debug it to understand what UVC call is failing.

Thank you. I’ll get that built in yocto and let you know if I still have issues.

It appears that I just needed to add hidapi to the image. I’m able to run the sample program now and connect to the camera successfully.

1 Like

Thank you for the feedback and good job :clap: