# Cerulean 450 SS with ping-python

**URL:** <https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444>\
**Category:** General Discussion\
**Created:** [July 16, 2024, 4:20pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444 "2024-07-16T16:20:08Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![td1191](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@td1191](https://discuss.bluerobotics.com/u/td1191)\
**Post date:** [July 16, 2024, 4:20pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/1 "2024-07-16T16:20:08Z")

</div>

Hi all,

I’m new here. I’m trying to use a Raspberry Pi to communicate and get data from a Cerulean 450 Side Scan sonar using Python via the UDP Ethernet port. I tried using the script simplePingExample.py with the IP 192.168.2.92 (default IP) to check the connection, but I keep receiving “Failed to init Ping!”. Could you direct me to a source to find out more information about connecting to 450 SS via Python and Ethernet connection? Do I have to write my own communication code using the PingMessage class?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [July 16, 2024, 9:38pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/2 "2024-07-16T21:38:41Z")

</div>

Hi @td1191 -  
While some Cerulean products do use the Ping protocol to communicate, the script you mention is not intended for use with them! The example file you reference is intended for use with the [Ping2 SingleBeam sonar.](https://bluerobotics.com/store/sonars/echosounders/ping-sonar-r2-rp/)

The intended interface for Cerulean Sonars is the [SonarView application](https://ceruleansonar.com/pages/sonarview), which can be installed on your computer or as an Extension in BlueOS.

If you are trying to develop your own code to interface with a Cerulean product, you could try [asking them for input!](https://ceruleansonarhelp.zendesk.com/hc/en-us/requests/new)

---

<div class="post-metadata">

**Author:** ![ljlukis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ljlukis/32/3983_2.png) [@ljlukis](https://discuss.bluerobotics.com/u/ljlukis)\
**Post date:** [July 16, 2024, 11:29pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/3 "2024-07-16T23:29:16Z")

</div>

Ton, I think I responded to you on our zendesk support forum already, but on another note, I would recommend TCP vs. UDP to communicate with the Omnsican 450 side scan.

---

<div class="post-metadata">

**Author:** ![td1191](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@td1191](https://discuss.bluerobotics.com/u/td1191)\
**Post date:** [July 17, 2024, 3:43am UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/4 "2024-07-17T03:43:23Z")

</div>

Thank you for your response, Tony. Please correct me if I’m wrong, but does BlueOS replace Raspian OS if I want to run on a Raspberry Pi? I have a few other functions to run on Raspian, and I want to acquire data from the 450 SS at the same time.

---

<div class="post-metadata">

**Author:** ![td1191](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@td1191](https://discuss.bluerobotics.com/u/td1191)\
**Post date:** [July 17, 2024, 3:54am UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/5 "2024-07-17T03:54:40Z")

</div>

Thank you for your response, Larry. I was about to establish a socket to talk to the 450 SS. However, I’m a bit confused with the command described in the [API](https://docs.ceruleansonar.com/c/v/omniscan-450/programming-api). If I understand correctly, I only need to send os\_ping\_params (2197) to start/stop the pinging state. So what about the os\_mono\_profil (2198)? Is that the return packet that the socket from the Pi should listen to?

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [July 17, 2024, 4:13am UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/6 "2024-07-17T04:13:11Z")

</div>

Hi @td1191 -  
That’s correct - [BlueOS](https://blueos.cloud/docs/blueos/latest/overview/) is a flavor of linux for the Raspberry Pi that strives to make it easier to develop marine robotics applications. You can likely accomplish your other functions in BlueOS in parallel to communicating with the 450SS.

---

<div class="post-metadata">

**Author:** ![td1191](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@td1191](https://discuss.bluerobotics.com/u/td1191)\
**Post date:** [July 17, 2024, 12:47pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/7 "2024-07-17T12:47:28Z")

</div>

Thank you for clarifying. Is it possible to just install and run SonarView Linux version on Raspberry Pi 5?

---

<div class="post-metadata">

**Author:** ![ljlukis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ljlukis/32/3983_2.png) [@ljlukis](https://discuss.bluerobotics.com/u/ljlukis)\
**Post date:** [July 17, 2024, 3:37pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/8 "2024-07-17T15:37:52Z")

</div>

Correct, os\_mono\_profile is the signal information for each ping that will be sent to the host application.

---

<div class="post-metadata">

**Author:** ![ljlukis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ljlukis/32/3983_2.png) [@ljlukis](https://discuss.bluerobotics.com/u/ljlukis)\
**Post date:** [July 17, 2024, 3:39pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/9 "2024-07-17T15:39:09Z")

</div>

Yes there is a BlueOS extension version of SonarView that can run directly on the BlueOS host CPU (RPi).

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [July 17, 2024, 4:06pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/10 "2024-07-17T16:06:17Z")

</div>

BlueOS doesn’t support Raspberry Pi 5 - yet! It is possible to run SonarView on a Pi4 as an extension, you may be able to run the standalone linux SonarView on the Desktop on a Raspberry Pi (not running BlueOS)…

---

<div class="post-metadata">

**Author:** ![td1191](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@td1191](https://discuss.bluerobotics.com/u/td1191)\
**Post date:** [July 17, 2024, 4:40pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/11 "2024-07-17T16:40:53Z")

</div>

I downloaded the AppImage file for SonarView (both x86 and arm64) and tried unzipping it using xarchiver but it shows “Archive format is not recognised”. I’m currently using a RPi 5 running Raspian OS. Is it possible to run BlueOS Docker image in a container in RPi 5 just for SonarView?

Edit: I was able to run [SonarView docker image](https://docs.ceruleansonar.com/c/v/sonarview/installation/docker) on the RPi 5 without any issue so far. However, if the sonar scanners are controlled by SonarView, how can we combine the motion of the vehicle to the scanned data from the sensor?

---

<div class="post-metadata">

**Author:** ![td1191](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@td1191](https://discuss.bluerobotics.com/u/td1191)\
**Post date:** [July 17, 2024, 7:29pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/12 "2024-07-17T19:29:08Z")

</div>

Thank you for the clarification, Larry. How can the motion of the vehicle be combined with this scanned data from the os\_mono\_profile?

---

<div class="post-metadata">

**Author:** ![ljlukis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ljlukis/32/3983_2.png) [@ljlukis](https://discuss.bluerobotics.com/u/ljlukis)\
**Post date:** [July 18, 2024, 12:42am UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/13 "2024-07-18T00:42:35Z")

</div>

Well, that’s what SonarView does. If you don’t want to or can’t use SonarView, then it’s up to you to figure out what to do with the data.

---

<div class="post-metadata">

**Author:** ![ljlukis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ljlukis/32/3983_2.png) [@ljlukis](https://discuss.bluerobotics.com/u/ljlukis)\
**Post date:** [July 18, 2024, 12:47am UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/14 "2024-07-18T00:47:20Z")

</div>

If you can explain more about the vehicle and the application, we might have further suggestions.

Just for example, on the Blue Boat with BlueOS, you can use SonarView to start Omniscan(s) pinging and logging data, then disconnect from the vehicle while it executes an autonomous mission. On its return you can reconnect with SonarView to stop the pining, close the log, then use SonarView to play through the log files you have collected. You can also then export the data for subsequent processing in other software.

---

<div class="post-metadata">

**Author:** ![td1191](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@td1191](https://discuss.bluerobotics.com/u/td1191)\
**Post date:** [July 18, 2024, 11:28am UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/15 "2024-07-18T11:28:58Z")

</div>

Actually, my question is about these [sample videos here](https://ceruleansonar.com/pages/os450_image_samples). How does SonarView obtain the heading and the depth of the vehicle to generate these playbacks after recording?

---

<div class="post-metadata">

**Author:** ![ljlukis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/ljlukis/32/3983_2.png) [@ljlukis](https://discuss.bluerobotics.com/u/ljlukis)\
**Post date:** [July 18, 2024, 4:13pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/16 "2024-07-18T16:13:40Z")

</div>

I’m not the expert so I might not be saying this quite right, but SonarView subscribes to vehicle position and heading messages from MAVLINK. These messages are also recorded in the svlog file.

As for altitude from the bottom, SonarView discerns this from the ping data. The 3D renderings are based on this altitude and the assumption of a flat bottom

---

<div class="post-metadata">

**Author:** ![NickNothom](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/nicknothom/32/4607_2.png) [@NickNothom](https://discuss.bluerobotics.com/u/NickNothom)\
**Post date:** [July 18, 2024, 5:36pm UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/17 "2024-07-18T17:36:30Z")

</div>

SonarView pulls vehicle data from the [mavlink2rest](https://github.com/mavlink/mavlink2rest) api, which is built in to BlueOS but can also be installed standalone.

That data is stored in the .svlog file encapsulated in one of our packets, along with all of the sonar data.

We look at the Attitude message for the heading. We use local\_position\_ned if it’s available, otherwise we fall back to using the position from global\_position\_int.

---

<div class="post-metadata">

**Author:** ![td1191](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@td1191](https://discuss.bluerobotics.com/u/td1191)\
**Post date:** [July 21, 2024, 5:05am UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/18 "2024-07-21T05:05:43Z")

</div>

Thanks for the explanation, Nick. If we have a custom vehicle running a custom firmware on a RPi with SonarView docker file, is there a way for us to integrate the vehicle’s motion to the record from SonarView? For example, is there a document describing how mavlink2rest was used with SonarView to obtain the scans in [this link](https://ceruleansonar.com/pages/os450_image_samples)? Furthermore, is there a way to encode the binary data ourselves to the svlog format so SonarView can read it?

Sorry that I ask many questions. I just want to make sure I utilize the available resource/documents before I spend the effort to write my own communication code for the Cerulean 450 SS from scratch for my custom vehicle. I really appreciate all your help!

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [July 24, 2024, 1:47am UTC](https://discuss.bluerobotics.com/t/cerulean-450-ss-with-ping-python/17444/19 "2024-07-24T01:47:17Z")

</div>

Hi @td1191 -  
If your vehicle ran BlueOS, it would already be running Mavlink2Rest and you could install the SonarView extension - this seems the easiest approach. You can run other Ardupilot firmware with BlueOS and the Navigator (or Pixhawk) autopilots.

If you don’t want to run BlueOS, you could likely install Mavlink2Rest on your system and configure it to receive the vehicle motion data from your autopilot.

Writing your own code to log position and sonar data is a big undertaking, so the BlueOS route would definitely be our recommendation!
