Search code examples
c++routesdata-distribution-serviceros2

In Fast-DDS, Set IP From Localhost to Certain LAN


I am newbie in DDS and C++, and I used fastrtps to run dds code(dynamic example) in a raspberry(ubuntu server), which was successful. However, when I move subscribe part to another raspberry, two raspberries cannot find each other.

So far, I guess there are two reason:

  1. My cellphone(android) has firewall. Should I change cellphone to switch?
  2. I should use API to set raspberry-self ip, but I cannot find it suit for the example code result of command lsof -i -P -n

This is example code DynamicHelloWorldExample.

Thanks ><


Solution

  • Finally, I turn off firewall(command below) on both raspberries, not cellphone.

    sudo ufw disable

    Thanks every one trying to help me.