Ping 360, problem with decode sensor log

Hi,

I have a ping 360 sonar which I have been testing lately and run into some problems while trying to decode the log files. First, I did not update the firmware (original firmware from around 2020) and had some connection issues with pingviewer. After I updated to the latest firmware these connection issues were solved and the scanning speed improved. Anyhow, when I try to replay the log files with pingviewer the replay is lagging a lot. If I replay the data logged before firmware update the replay plays smoothly (apart from the times there was connection issues during the logging).

I have used the python code in

“ping-viewer/examples/decode_sensor_binary_log.py at master · bluerobotics/ping-viewer · GitHub”

to dig into the log files and it works with the data logged with the old firmware, but the data logged with the latest firmware does not open. I get error:

“AttributeError: ‘PingMessage’ object has no attribute ‘mode’”

Has some else had any problems decoding ping360 log files after the firmware update?

For information, I am running the ping 360 sonar with a win 11 laptop directly.

Hi @Ilkka,

To clarify:

  1. You are running Ping Viewer 2.6.0, on a Windows 11 laptop

  2. Your Ping360 firmware has been recently updated to v3.3.8

  3. In Ping Viewer, you are trying to replay log files, which works well with files created before the firmware update, but is jerky/laggy with new files?

    • I’m not sure we’ve tested the replay functionality with the new firmware. The faster scanning speed is from a new protocol message with lower communication overheads, but it’s possible the replay functionality is having some issues with it. I’ve raised this internally to see if someone knows more.
  4. In Python, you are trying to decode log files, which works well with files created before the firmware update, but is failing with new files?

    • That decoding script hasn’t been tested with files from the new firmware, so while I’d expect it to work it’s possible there are some problems. I’m away from my testing setup at the moment, so I won’t be able to replicate your issue until at least next week, but if you’re able to post a short log file from the new firmware then I can potentially try to look into it sooner.
    • It could also be helpful if you can post the full error traceback, rather than just the summary message, along with the command you’re using to run the file, and/or any modifications / custom code you’re using to try to process the log file.

I’d be interested to hear if you can replay the new files in SonarView.
Cheers,
Larry

Hi Eliot,

Thanks for the reply. Replay with log file recorded with new firmware is jerky/laggy. I have tested this with two different laptops so should not be PC issue.

I can elaborate a litlle bit on on the encode code part because I had to modify the code a bit. In the current encode_sensor_binary_log.py at your github there seems to be a bug on row 152 as it already gives warning in spyder when I open the code (undefined name ‘self’). The code works for some logs but with some logs it fails at this point. I guess it depends if there is some errors in the log as this code part is to my understanding related to error handling.

I should say I am not very good programmer so to fix this problem I gave the code to ChatGPT for fixing and it did notice the problem and then proposed a correction (chatGPT comment: To fix this, recover must be an instance method, not a class method. That way, you can access instance attributes like self.failed_bytes.). I also changed the code so that I can give the log file in the code and not as argument (easier for testing). Anyhow, after these changes I can read the old log file but with new log file it crashes as stated earlier. Here is the complete error traceback:

Traceback (most recent call last):

File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\users\ipera\dropbox\omat projektit\2025_ping360\fixed_pingviewer_log2.py:218
print(decoded_message)

File ~\AppData\Roaming\Python\Python311\site-packages\brping\pingmessage.py:264 in repr

  • payload_string += "\n - " + attr + ": " + str(getattr(self, attr))*

AttributeError: ‘PingMessage’ object has no attribute ‘mode’

Here is the modified code I am using:

And here is a log file logged with the new firmware:

-Ilkka

Hi Larry,

I tested this, old and new log files seem to work without lagging in sonarview. I haven’t used Sonarview before, should it also show the time stamp on the left lower corner? My logs show only zero time.

-Ilkka

Oh good. Thanks for trying it out.

The reason the time isn’t showing on SonarView is because the .bin file was generated from Ping Viewer. That’s also why “time based playback” doesn’t work correctly either but if you used SonarView when you were doing the scans those would work normally. You can also arrange to get heading info into the log file. It’s automatic if you’re on a vehicle supporting MAVLink2REST, but you can also set up a session to bring in heading from an NMEA stream if available.

Hi Larry,

Thanks for the information. I checked the SonarView more closely and the integration of GPS data with NMEA strings would be very interesting option for me. I am thinking of a GPS dongle connected with USB to PC and then including this data to the sonar data with SonarView.

-Ilkka

Hi @EliotBR, have you been able to look at the log file decoding error? I logged couple of new files with the ping 360 sonar but run into the same error.

I’ve started looking into it, and got to the same stage as you, but unfortunately haven’t yet had time to look into it further. It doesn’t help that I ran into an Issue that means I can’t test replaying with Ping Viewer at the moment.

Hi Eliot,

Thanks for the update, good to know its been looked into!

I found the cause of the Python parsing issue - it should be resolved with a new release of the library.

If you don’t want to wait for that you can install the latest deployment of the library code with:

pip install git+https://github.com/bluerobotics/ping-python@deployment

EDIT: v0.2.0 is now released, so you can just

pip install --upgrade bluerobotics-ping

to get the latest version :slight_smile:

Note that this is unrelated to the Ping Viewer stuttering issue, and only resolves the Python programmatic access side of things.

1 Like

Thanks, seems to work now !

1 Like