Use a USB3 USB-C cable for maximum bandwidth. The host can power the device, but an external supply is recommended. See Powering OAK Deviceshere.USB3 cables are usually blue inside the USB-A connector. If it is not blue, it may be a USB2 charging cable.
Connecting via a long (>2m) USB cable might cause issues with the connection. If you need to use a longer cable, make sure it's an active USB3 cable.
DepthAI scans USB devices, uploads firmware/pipeline/assets, and starts the pipeline.The fastest test is OAK Viewer. If it finds the device and streams frames, the connection is working.
Debugging
If you see RuntimeError: No available devices, DepthAI did not find a device. Confirm power and a USB3 connection, then use the tabs below.We recommend using the latest depthai version before any kind of troubleshooting.
lsusb
When executing lsusb | grep 03e7, you should see a similar line:
Command Line
1$ lsusb |grep 03e7
2Bus 001 Device 120: ID 03e7:2485 Intel Movidius MyriadX
3# Or, if the device is already booted, you should see:4# Bus 001 Device 001: ID 03e7:f63b Intel Myriad VPU [Movidius Neural Compute Stick]
If you use lsusb -v, it will show USB speed of 480 Mb/s when the device is waiting for connection. After connecting to the device, depthai will upload the firmware, and the speed will change to 5 Gb/s (if USB3 is available).If the bootloader is flashed, the device can enumerate as the bootloader first:
Command Line
1Bus 003 Device 038: ID 03e7:f63c Intel Luxonis Bootloader
FFC-style devices (OAK-FFC 4P/3P/...) can have the bootloader flashed, but it is not required. On a normal device without the bootloader flashed, you should only see the device after an app boots (no bootloader entry).When an app boots, it re-enumerates as:
Only the booted device enumerates as USB3. If it stays at USB2 speed after the app starts, the most common cause is the host-side USB port or cable. Try a different USB3 port, a shorter cable, or a powered USB3 hub.When running dmesg -w and connecting your OAK camera to the host. You should see a similar output in the terminal:
Command Line
1/~$ dmesg -w
23[223940.862544] usb 1-3.2: new high-speed USB device number 120 using xhci_hcd
4[223940.963357] usb 1-3.2: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice=0.015[223940.963364] usb 1-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=36[223940.963368] usb 1-3.2: Product: Movidius MyriadX
7[223940.963371] usb 1-3.2: Manufacturer: Movidius Ltd.
8[223940.963373] usb 1-3.2: SerialNumber: 03e72485
Powering OAK cameras
USB3 is capable of providing up to 900mA of current, while USB2 is capable of providing up to 500mA. OAK cameras draw between 500mA and 900mA, depending on the model and the current workload. Pro version of devices can draw up to 15W (at peaks), depending on the usage of the IR projector and IR illumination LED. It also depends on the host computer. Some computers don't have a powerful USB controllers (eg. SBCs like RaspberryPi, which has eFuse at 1.2A). Host's USB controller will also affect how long of a USB cable you can use, as longer cables have higher resistance and will drop the voltage more. You should externally power OAK cameras if:
You have additional USB devices connected to a RPi USB port that draw too much current. In total, RPi can supply 1.2A, so if all USB devices draw more than 1.2A, brownout will occur.
You have the Pro version of the OAK camera that has IR laser dot projector and IR illumination LED.
We always recommend externally powering your OAK camera, either via:
If you have are using an USB2 cable/USB2 port, have a bad USB3 cable, or are using longer cable (eg. larger than 2.5 meters), you might get an error like X_LINK_COMMUNICATION_NOT_OPEN or X_LINK_ERROR. In such cases, a workaround is to force USB2 communication. This will upload a USB2-version of the firmware to the device, and will limit the communication speed to USB2.To force USB2 mode, you set the maxUsbSpeed=dai.UsbSpeed.HIGH when creating the dai.Device object
Python
1import depthai as dai
2pipeline = dai.Pipeline()3# Populate you pipeline with nodes4# Force USB2 communication5with dai.Device(maxUsbSpeed=dai.UsbSpeed.HIGH)as device:6# ...
Stuck in USB2 mode
Only the booted device enumerates as USB3. If it stays at USB2 speed after the app starts, the most common cause is the host-side USB port or cable. Try a different USB3 port, a shorter cable, or a powered USB3 hub.
After connecting and uploading the pipeline, the connection should be stable, latency should be low (under 0.5 sec), and USB3 downlink should be about 2.5 Gbps.
Debugging
See the debugging tabs below in case the application stops working or if the communication is slow.
Connection drop
If the connection drops after a period of time, there are a few potential issues that could be causing it.
Device crash
Device could crash due to a bug in the firmware, or in the user's application.If there was a firmware bug or (user-defined) pipeline issue, a Crash report will get generated, which you should send over to us (support@luxonis.com).If no crash report was found when running the script linked above, it means that either it's a power issue, or connection dropped (or, less likely, a hardware issue).Alternatively, with depthai 2.28.0, automatic crash report generation is enabled by default. This will send the crash report to Luxonis servers and will include:
crash dump itself
pipeline configuration
depthai version
host operating system version (MacOS/Linux/Windows)
It does not include any user data, images or NN models. It does however include the Script node code. If you wish to disable automatic crash report generation, you can do so by setting the environment variable DEPTHAI_DISABLE_CRASHDUMP_COLLECTION to 1.
Power issue
This is quite a common issue, and it's usually due to the USB controller not being able to provide enough power to the device. It can work for some time and then crash due to a random power spikes.Please read the section above on how to properly power the device (Initial Connection > Powering OAK cameras).
Communication issue
This is also a common issue if the device is moving (eg. on a moving robot), and the USB cable is not properly secured. It can happen that an USB line gets interrupted (disconnected) for a split second, and the device will drop the connection.If that is the case, we'd suggest using an USB3 screw locking cable (Amazon link).
Low speed / High latency
If you noticed low FPS and/or high message latency you should check the following: