Home        Store        Learn        Blog

Problem while connecting Ping Sonar to Raspberry Pi

I am trying to connect Ping Sonar to Raspberry Pi, and this Raspberry is connected to the Topside Computer via Ethernet. The Raspberry has the Companion software installed v0.0.17, and it is also connected to Pixhawk. The sonar is connected to the Raspberry with the BLUART adapter.

I have followed all the steps to create the endpoints and routings, creating a bidirectional connection between the UDP adress and the Serial port correspondent to the Ping Sonar with a Baud Rate of 115200.

When trying to display the results of the sonar in PingViewer, I select UDP connection with the adress mentioned above, and I cannot see any results. Otherwise, this configuration works when I try the PingViewer connecting directly the sonar to the Serial port of the computer.

I have checked all the cables and connections, and I can ping the Raspberry from the topside computer.

Am I missing something to start the communication? Can you guess where the problem comes from?

Thank you

Hello Fran,

The Ping Sonar should be plug and play, there is no need to do additional routing. It is possible that the route you made is conflicting with the driver built into the Companion.

Please try removing this manual routes, restarting, and try again. Also make sure that you are using the latest stable release of Ping Viewer.

If this doesn’t work, I advise you to flash a fresh 0.0.17 image.


I removed the additional routing and now the connection works. The problem now is that the sensor only measures few times until it is stopped. The white led (RX) is blinking every moment, but the green one (TX) stops blinking when Ping Viewer stops measuring. When this happens I need to restart both Ping Viewer and the RaspberryPi.

Do you know where the problem comes from?


Hi Fran,

Can you provide ping-viewer GUI log from this event ?
Check the documentation for the correct path of this log files.


I think it should be a problem of the green cable (TX), its connection between male and female is quite unstable. However, it seems to me quite strange that the program is running correctly when I connect the sonar directly to the serial port of my PC. When I try to do the communication through the Raspberry, it suddenly stops.

I attach the last GUI log.


20190802-154106550.txt (89.9 KB)

Hi Fran,

From the log, it appears that after some time the sensor is not replying anymore.
Are you using this same cable in your desktop to test ?
I would recommend to create a new cable or to connect with the cable in your computer and move and poke the cable to check that is working without bad connection.

1 Like