uXRCE-DDS Client and Agent Not Connecting with Kakute H7 and RPi5 (USB-to-TTL, PX4 v1.15.4, ROS 2 Jazzy)

Setup:

  • Hardware: Kakute H7 flight controller, Raspberry Pi 5 (RPi5) as companion computer.
  • Firmware version of PX4: 1.15.4
  • Software:
    • RPi5: Ubuntu 24.04, ROS 2 Jazzy.
    • uXRCE-DDS Agent: Tried v3.0.1 and v2.4.2, both built from source
  • Connection: USB-to-TTL
    • Wiring: TELEM2 TX → USB-to-TTL RX, TELEM2 RX → USB-to-TTL TX, GND → GND.
    • USB-to-TTL appears as /dev/ttyUSB0 on RPi5.
  • PX4 Parameters (set in QGroundControl):
    MAV_1_CONFIG = 0
    UXRCE_DDS_CFG = 102
    SER_TEL2_BAUD = 921600
    
    

Issue:

The uXRCE-DDS client (on Kakute H7) and agent (on RPi5) fail to connect. The client shows “Running, disconnected,” and the agent stays “waiting for connection.” Running ros2 topic list only shows /rosout and /parameter_events, indicating no uXRCE-DDS topics. However, the same USB-to-TTL setup works perfectly with MAVSDK, confirming hardware and wiring are functional.

Troubleshooting Steps:

  1. Initial Serial Connection (following PX4 guide):

    • Connected TELEM2 to RPi5 GPIO UART (/dev/ttyAMA0).

    • Configured /boot/firmware/config.txt:

      enable_uart=1
      dtoverlay=disable-bt
      dtoverlay=uart0
      
    • Started agent:

      sudo MicroXRCEAgent serial --dev /dev/ttyAMA0 -b 921600
      

      Output: “running…” but no connection.

      rpi520u300@rpi520u300-desktop:~/Micro-XRCE-DDS-Agent$ sudo MicroXRCEAgent serial --dev /dev/ttyUSB0 -b 57600
      [1750728069.062257] info     | TermiosAgentLinux.cpp | init                     | running...             | fd: 3
      [1750728069.062747] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
      
    • Client auto-starts (UXRCE_DDS_CFG = 102). Restarted manually:

      uxrce_dds_client start -t serial -d /dev/ttyS1 -b 921600
      

      Status:

      nsh> uxrce_dds_client status
      INFO  [uxrce_dds_client] Running, disconnected
      INFO  [uxrce_dds_client] Using transport:     serial
      INFO  [uxrce_dds_client] timesync converged: false
      uxrce_dds_client: cycle: 0 events, 0us elapsed, 0.00us avg, min 0us max 0us 0.000us rms
      uxrce_dds_client: cycle interval: 0 events, 0.00us avg, min 0us max 0us 0.000us rms
      
    • ros2 topic list showed only /rosout and /parameter_events

  2. Switched to USB-to-TTL (inspired by forum posts):

    • Referenced threads suggesting USB-to-TTL fixes:

    • Updated agent command:

      sudo MicroXRCEAgent serial --dev /dev/ttyUSB0 -b 921600 -v 6
      

      Output: “running…” with no connection.

    • Client restarted:

      uxrce_dds_client start -t serial -d /dev/ttyS1 -b 921600 -v
      

      Status remains “disconnected.”

    • Tried agent versions v3.0.1 and v2.4.2 (built with FastDDS 2.14.2).

    • Tested baud rates 115200 and 57600:

      SER_TEL2_BAUD = 115200
      uxrce_dds_client start -t serial -d /dev/ttyS1 -b 115200
      sudo MicroXRCEAgent serial --dev /dev/ttyUSB0 -b 115200 -v 6
      

      No connection.

    • screen /dev/ttyUSB0 921600 shows garbled data, and RX light flashes, indicating TELEM2 is sending data.

    • Verified /dev/ttyUSB0:

      ls -l /dev/ttyUSB*
      crw-rw---- 1 root dialout 188, 0 Jun 23 14:00 /dev/ttyUSB0
      

      User in dialout group, tested udev rule for permissions.

  3. Confirmed Hardware with MAVSDK:

    • Configured:

      MAV_1_CONFIG = 102 (TELEM2)
      UXRCE_DDS_CFG = 0 (Disabled)
      SER_TEL2_BAUD = 57600
      
    • Ran:

      cd MAVSDK/examples/takeoff_and_land
      cmake -Bbuild -S.
      cmake --build build -j4
      build/takeoff_and_land serial:///dev/ttyUSB0:921600
      

      Drone controlled successfully, confirming USB-to-TTL, wiring, and TELEM2 functionality.

Update
Apparently it worked after changing the uXRCE parameter from TELEM2 to TELEM1

UXRCE_DDS_CFG = TELEM1

Then I start the agent and client as usual (ttyS0 is the device for port TELEM1 on Kakute H7)

uxrce_dds_client start -t serial -d /dev/ttyS0 -b 921600
sudo MicroXRCEAgent serial --dev /dev/ttyUSB0 -b 921600

Then the agent and client are connected
I still don’t understand why using TELEM2 wouldn’t connect but at least the problem is solved.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.