• Community
  • Making OAK D code run with OAK D Lite?

I'm using the gen2-head-posture-detection code from the depthai-experiments repository. It works fine with my OAK D but when I try & use it with an OAK D Lite I get a connection error,

 File d:\depth_ai\depthai-experiments\gen2-head-posture-detection\main.py:168
    with dai.Device() as device:

RuntimeError: No available devices

What am I missing here?

The error message you're seeing, RuntimeError: No available devices, indicates that the DepthAI library is unable to find your OAK D Lite device. Here are a few steps you can take to troubleshoot this issue:

  1. Check your USB connection: Make sure your OAK D Lite is properly connected to your computer via a USB3 cable. If you're using a USB2 cable and want USB2 bandwidth, you need to specify the USB2 protocol. A bad USB cable can often cause connection issues.

  2. Discover connected devices: You can use the DepthAI API to discover all connected OAK cameras. Here's a code snippet that finds all OAK cameras and prints their MxIDs (unique identifier) and their XLink state:

$$
import depthai
for device in depthai.Device.getAllAvailableDevices():
print(f"{device.getMxId()} {device.state}")
$$

  1. Specify the device: If you have multiple OAK devices connected, you may need to specify which device you want to use in your code. You can do this by providing the MxID, IP address, or USB path to the depthai.Device constructor:

$$
device_info = depthai.DeviceInfo("14442C108144F1D000") # MXID
with depthai.Device(pipeline, device_info) as device:

...

$$

  1. Check for device recognition: If you still can't connect to the OAK camera, you can check if your system recognizes the device by executing lsusb | grep 03e7 in your terminal. You should see a line similar to Bus 001 Device 120: ID 03e7:2485 Intel Movidius MyriadX.

If none of these steps resolve your issue, please provide additional information such as the name of your OAK camera, the version of the DepthAI library and bootloader you're using, and any crash logs or error messages you're seeing.

Sources: