Skip to content

[BUG] {RVC4 PoE devices (OAK-4-PRO-W) cannot connect via IP — driver loops indefinitely} #778

Description

@AnishMathewOommen

Check if issue already exists
Searched "X_LINK_GATE RVC4 depthai-ros github luxonis" and "driver loops indefinitely PoE IP depthai-ros" — no existing issue found.


Describe the bug
When connecting to an RVC4-based OAK PoE device (OAK-4-PRO-W) via IP, the driver loops indefinitely printing "Connecting to the device using ip: <device-ip>" without ever connecting, throwing an error, or publishing any topics.

The root cause is in depthai_ros_driver/src/driver.cpp in the startDevice() function. The IP connection block only allows connection when device state is X_LINK_UNBOOTED or X_LINK_BOOTLOADER. However, RVC4 devices report X_LINK_GATE as their ready state, which is not handled — so the connection is silently skipped every retry.


Minimal Reproducible Example

  1. Connect an OAK-4-PRO-W via PoE
  2. Set driver.i_ip in params file to the camera's IP
  3. Launch:
ros2 launch depthai_ros_driver_v3 driver.launch.py params_file:=<your_params>.yaml
  1. Driver prints "Connecting to the device using ip: <device-ip>" in an infinite loop. No error, no topics.

Confirmed Python depthai v3 connects fine to the same device:

import depthai as dai
with dai.Device(dai.DeviceInfo('<device-ip>')) as d:
    print(d.getDeviceName())  # prints OAK-4-PRO-W
    print(d.getConnectedCameras())  # prints all 3 cameras

Expected behavior
Driver should successfully connect to RVC4 PoE devices that report X_LINK_GATE state and start publishing topics.


Screenshots
N/A


Attach system log

  • OS: Ubuntu 22.04 (inside Docker container)
  • ROS version: ROS 2
  • ROS distribution: Humble
  • depthai-ros built from source (v3_humble branch)
  • depthai/depthai-core installed from source as depthai_v3 package in workspace

Package versions:

depthai (Python):              3.1.0
depthai-core (C++ / depthai_v3): 3.2.2
depthai-ros-driver-v3:         3.1.1
depthai-ros-msgs-v3:           3.1.1
depthai-bridge-v3:             3.1.1
depthai-descriptions-v3:       3.1.1

Device state observed via Python:

X_LINK_GATE (XLinkDeviceState)
Platform: X_LINK_RVC4
Protocol: X_LINK_TCP_IP

Fix applied locally:
In depthai_ros_driver/src/driver.cpp, changed:

if(info.state == X_LINK_UNBOOTED || info.state == X_LINK_BOOTLOADER) {

to:

if(info.state == X_LINK_UNBOOTED || info.state == X_LINK_BOOTLOADER || info.state == X_LINK_GATE) {

After rebuilding, driver connects and publishes topics successfully.


Additional context

  • Device: OAK-4-PRO-W
  • Connection: PoE over Ethernet
  • Platform: RVC4
  • X_LINK_GATE is the normal ready state for RVC4 PoE devices
  • Linked PR: PR #779

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions