• Community
  • Raspberry Pi 3b and OAK-D-IOT-75 'rgb' (X_LINK_ERROR)

I'm working with an OAK-D-IOT-75 camera and a Raspberry Pi 3B and when I try to run a very simple code I get an error: qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequence: 185, resource id: 0, major code: 140 (Unknown), minor code: 20

Traceback (most recent call last):

File "/home/oleks/Documents/code/code.py", line 25, in <module>

in_rgb = q_rgb.get()

RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'rgb' (X_LINK_ERROR)'.

I also use usb2, but everything works fine on a Windows machine. All the programs that I launched, as well as the demo version, but it does not want to work on the raspberry.
My code:
import cv2
import depthai

width, height = 640, 480

pipeline = depthai.Pipeline()

cam_rgb = pipeline.createColorCamera()
cam_rgb.setPreviewSize(width, height)
cam_rgb.setInterleaved(False)
cam_rgb_out = pipeline.createXLinkOut()
cam_rgb_out.setStreamName("rgb")
cam_rgb.preview.link(cam_rgb_out.input)

with depthai.Device(pipeline) as device:
q_rgb = device.getOutputQueue("rgb")

while True:
in_rgb = q_rgb.get()
frame = in_rgb.getCvFrame()

cv2.imshow('Camera', frame)

if cv2.waitKey(1) & 0xFF == ord('q'):
break

cv2.destroyAllWindows()
I will be very grateful for your help!

    Hi Oleksii
    What version of depthai are you running on the Raspberry? Also, when running the device with usb2, try using:
    with depthai.Device(pipeline, usb2Mode=True) as device: to force usb2.

    Thanks,
    Jaka

    Hello and thanks for your reply. The depthai version is 2.21.2.0. When changing to with depthai.Device(pipeline, usb2Mode=True) as device: nothing helped.

    • erik replied to this.