• DepthAI-v2Hardware
  • Communication exception (X_LINK_ERROR) on Mac, seemingly not power/cable related

I have a new OAK-D USB camera connected to an M1 MacBook Pro running macOS Sonoma. I keep hitting this error when using models on the camera:

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

Things I've tried based on past threads, with no effect:

  • Powering OAK-D using the included power adapter
  • Changing USB cable (tested with USB 3.0, 3.1 Gen 2, and TB 3 cables)
  • Changing USB port
  • usb2Mode=True

Other info:

  • DepthAI Demo reported USB Connection speed: UsbSpeed.SUPER with all tested cables.
  • The issue only occurs when the camera is using NN models, and its likelihood seems to vary with the node/model in use:
    • I've not encountered the issue when simply capturing OpenCV frames on a loop without any detection model running.
    • It occurs very quickly when using YOLO-based models, e.g. yolo-v3-tiny-tf in the demo. yolo-v3-tf crashes almost instantly.
    • mobilenet-ssd often runs quite a while without crashing.
  • The issue doesn't consistently surface from one particular stream. In the DepthAI Demo, I've seen "Couldn't read data from stream:" 'color', 'right' etc.
  • I set the log level to DEBUG, but I'm not seeing any spikes or patterns in the captured values when the crash occurs.
  • All camera tests in guided_manual_test.py completed successfully.

Any ideas?

  • jakaskerl replied to this.
  • joe-ps Following up: the OAK-D camera has been replaced and the replacement does not have this issue, so we're reasonably certain the original device was faulty.

    Hi joe-ps
    This shows when running the demo, or are you running your own code? If so, could you post your code?

    joe-ps Powering OAK-D using the included power adapter
    Changing USB cable (tested with USB 3.0, 3.1 Gen 2, and TB 3 cables)
    Changing USB port
    usb2Mode=True

    What about the usb hub you are using?

    Thanks,
    Jaka

      jakaskerl Thanks for the reply,

      This shows when running the demo, or are you running your own code?

      I first saw the error in the demo.

      I also tried the API docs' "hello world" tutorial and encountered the error running that too.

      What about the usb hub you are using?

      No external hub was in use for the previous tests: the OAK-D was connected to USB ports on the MBP.

      My Apple Studio Display has a built-in USB hub so I tried that just now. The error occurs when connected to that, too.

      I also have an Ubuntu desktop PC, so I tried that as well. The error occurs when connected to that too.

      Still welcoming any other ideas for debugging this issue, but I'm beginning to suspect it's a defective unit, especially after hitting the same issue when connected to my Linux PC. Is there a firmware version update that's worth checking before I start a return/exchange process?

        Hi joe-ps
        Software:

        • These are pretty basic examples so I doubt anything is wrong with the code.
        • Are you running the latest depthai version? (2.23.0)

        Hardware:

        • From what you have tried I suspected it could have been the hub, but since it doesn't work on linux either, it might just be a faulty device

        Try the version please, if it doesn't work, write to support@luxonis.com and ask for a replacement. Please also add a link to this thread.

        Thanks,
        Jaka

          jakaskerl I was using a previous version of depthai (likely from the installer/demo repo) so I tried upgrading that, but I'm still seeing the same behavior with v2.23.

          Ok, I'll start down the support path and report back here once resolved. Thanks!

            a month later

            joe-ps Following up: the OAK-D camera has been replaced and the replacement does not have this issue, so we're reasonably certain the original device was faulty.