Home        Store        Learn        Blog

Ping Echosounder via pingproxy.py shown in PingViewer but no output

Hello everyone,
we are trying to set up the Ping Echosounder with a custom Raspberry using pingproxy.py provided in the ping-python package.

The device appears in PingViewer’s device manager


but when trying to connect the output stays empty:

However, an Pingviewer output is shown Ping Echo when the device is connected directly via USB to the PC. Also the simplePingExample.py works just fine on the raspberry:

Here’s our system info:
Raspbian GNU/Linux 11 (bullseye)
Python 3.9.2
Windows10 + Pingviewer v2.3.0

Also we ensured that Pingviewer is run as Admin and is allowed in firewall as well.

For a very short moment I could noticed that a connection was established:


but after a few seconds, the connection status switched back to “green”.

Not sure what else could be the problem…

Best Regards
Chris

Hi @cbusse1, sorry for the delay on getting to this.

Which ping-python version are you using?

I’ve just tried changing my Companion computer to use Python 3 for pingproxy and it seems to be having the same behaviour, so this may be a bug in the library. I’ve brought it up with our software team and we’re looking into it.

We’ve raised a Github issue for it if you want to track the progress, but I’ll also comment an update here when it’s solved.

Green is supposed to represent a working connection, and red means the connection is not available/reliable. When it’s green it should be working, but appears not to be.

Hi @EliotBR !
Thanks for forwarding the issue.
I’ve installed ping-python library using pip install bluerobotics-ping.
Then I downloaded the pingproxy.py from Github (see link above).

For my understanding, a constant red indicator symbol (after connecting) would be fine as it would mean that the connection was established and that the socket cannot be used again from another application.

Another question for clarification, in the Ping Viewer documentation I found this paragraph:

Ping Viewer by default expects to communicate with a vehicle that contains a companion computer, or any other component that can provide MAVLink messages via an UDP server with the IP address 192.168.2.2 and port 14660.
Note: The UDP server IP address and port can’t be configured with the actual version of Ping-Viewer.

(From https://docs.bluerobotics.com/ping-viewer/mavlink-integration/ )

Does it mean that I need to run the ping1d_mavlink_driver.py (from
companion/ping1d_mavlink_driver.py at master · bluerobotics/companion · GitHub )
in conjunction with ping-proxy or was ping-proxy designed to work stand-alone together with ping-viewer?

Best regards
Chris

@patrickelectric managed to find and fix the issue, so you should be able to pip install --upgrade bluerobotics-ping to get the new properly working version (0.1.4) :slight_smile:

That shouldn’t be necessary - it should get automatically downloaded by the pip install. If you delete your second download you should be able to find the one from pip with whereis pingproxy.py. On my Companion computer it’s at /usr/local/bin/pingproxy.py, which I expect is likely the same for yours, but it may be different on Bullseye. Regardless, once you know where it’s located you can add that directory to your PATH if you want to be able to conveniently access the files/scripts in it :slight_smile:

That’s incorrect. As mentioned in my previous comment

Pingproxy should be able to run by itself, and Ping Viewer should be able to connect to a Ping device through it when it’s running. The page you linked to also mentions

ping1d_mavlink_driver.py is actually an unrelated thing, which converts Ping distance measurements into MAVLink DISTANCE_SENSOR messages so that the measured distance can be seen, used, and recorded by programs like QGroundControl :slight_smile:

1 Like

Hey guys, thanks for fixing it!
I tested and it works for me now too!

Again regarding Mavlink driver: If I want to forward the DISTANCE_SENSOR msgs to the Pixhawk so that they’re logged onto the flash SD card, would it be sufficient to just use ping1d_mavlink_driver.py, or would I also need to run the mavproxy similarly to as it’s done on your companion?

Best regards
Chris

Great to hear :slight_smile:

ping1d_mavlink_driver.py is set up to make a MAVLink connection over UDP. It would be possible to change the script to make a serial connection directly to the Pixhawk, but that only makes sense if that’s the only program on the Raspberry Pi that needs to communicate via MAVLink with the Pixhawk.

If you have a more standard setup where some other program on the Raspberry Pi needs to talk to the Pixhawk, or the Raspberry Pi is serving as a passthrough for communication to elsewhere (e.g. a topside computer), then you’ll need mavproxy or some other MAVLink router that can handle multiple simultaneous connections.