Not able to see fmu topics with ROS2 Discovery server enabled


I am trying to set up Discovery server on my off board computer. The server is running on an AWS EC2 instance.
When I use serial connection from flight controller to my off board computer I am able to see the PX4 fmu/out topics but not able to echo it.

But, when I run PX4 on my laptop (SITL), everything works as expected.

I am running the uxrce agent with

MicroXRCEAgent serial -b 3000000 -D /dev/ttyTHS0 -c /home/eve-vhx/config.yaml


<?xml version="1.0" encoding="UTF-8" ?>
    <profiles xmlns="">
        <participant profile_name="super_client_profile" is_default_profile="true">
                            <RemoteServer prefix="">
                                            <address>my remote IP</address>

I can access other topics like /chatter on my remote machine. Issue is only with PX4 topics. Any help is appreciated! Thanks!

Hi abhikrishnan, I did not use serial for ROS2 Discovery. You mentioned that you could not echo the topics

Feels that it could be a problem with the mismatched messages between the flightcontroller and the offboard ros messages. There is a workaround here:

Thanks for the reply.
However, I figured out the issue. It was related to setting UXRCE_DDS_PTCFG parameter on PX4.

I have mentioned what worked for me here,