Environment
- Host OS: Ubuntu 22.04 LTS
- depthai: 2.30.0.0
- Python: 3.10
- Hardware: OAK-FFC-4P (DD2090 4CAM FFC R7M1E7)
Issue Summary
While stress-testing IMU start/stop cycles with the attached script I observe:
- At 100 Hz the camera survives > 100 consecutive start/stop cycles without any problem.
- At 200 Hz (or any higher rate) the device disappears from USB after a handful of cycles (≤ 30).
lsusb no longer lists the device.
dmesg shows usb disconnect.
- The only recovery is a physical re-plug or power cycle.
- We have reproduced this on multiple PCs; OAK-D-Pro does not show the same behaviour.
Reproduction Steps
- Run the script below.
- Change the frequency argument in
imu.enableIMUSensor(..., 200) to ≥ 200.
- Within 10–30 iterations the script times out because it can no longer find the device with the specified MXID.
What I’ve Already Tried
- Replaced USB cable with a high-quality USB3-certified one.
- Powered the board from a dedicated 5 V / 3 A supply instead of the host port.
- Firmware is the one bundled with depthai 2.30.0.0 (0.0.28).
Reproduction Script (Python 3)
#!/usr/bin/env python3
import time
import depthai as dai
DEVICE_ID = "mxid" # replace with your camera’s MXID
CYCLES = 100
FREQ_HZ = 200 # 100 → OK, ≥200 → disconnects
def connect_with_retry():
for attempt in range(1, 51):
devs = dai.Device.getAllAvailableDevices()
info = next((d for d in devs if DEVICE_ID in {d.mxid, d.name}), None)
if info:
print(f" ✓ (attempts: {attempt})")
return info
if attempt % 5 == 0:
print(".", end="", flush=True)
time.sleep(0.2)
print(" ✗ (timeout)")
exit(1)
def one_cycle():
print(f"┌── Connecting to {DEVICE_ID} ", end="", flush=True)
with dai.Device(connect_with_retry()) as device:
pipeline = dai.Pipeline()
imu = pipeline.create(dai.node.IMU)
imu_out = pipeline.create(dai.node.XLinkOut)
imu.enableIMUSensor(dai.IMUSensor.GYROSCOPE_RAW, FREQ_HZ)
imu_out.setStreamName("imu")
imu.out.link(imu_out.input)
device.startPipeline(pipeline)
imu_queue = device.getOutputQueue("imu", maxSize=50, blocking=False)
t0 = time.monotonic()
print("├── Collecting IMU data... ", end="", flush=True)
while device.isPipelineRunning() and time.monotonic() - t0 < 2:
imu_queue.get()
print("Completed")
print("└── Pipeline stopped")
if __name__ == "__main__":
print(f"🚀 Starting IMU test sequence [{CYCLES} cycles @ {FREQ_HZ} Hz]\n")
for i in range(CYCLES):
print(f"▶ Cycle #{i+1:03d}")
one_cycle()
if i + 1 < CYCLES:
print("⏳ Pausing 1 s...\n")
time.sleep(1)
print("\n✅ All test cycles completed")
Question
Is this a known firmware limitation, or could it be a host-side streaming/reset issue?
Any work-arounds or upcoming fixes would be greatly appreciated.