Sonarview bash script

We’re looking to run sonarview on a raspberry pi 5 without the monitor.
For example, we want to be able to start sonarview and start recording svlog files and xtf files directly upon powering up the raspberry pi 5 and was wondering if this is a possibility?

Hi @nathan_1 -
Welcome to the forums!

SonarView can run on BlueOS, which has support in beta for the pi 5. It always runs “headless” meaning no monitor is attached! You can reach the device at its default ethernet IP address of 192.168.2.2, and control SonarView from there to log sonar data. It is not possible, to my knowledge, to have SonarView automatically start recording when the system boots up!

Thank you! Do you know if there’s a way to run headless within the raspberry pi environment?

Hi @nathan_1
I’m a bit confused - BlueOS is a headless OS, meaning if you connect a monitor no GUI is presented. Access to the interface is accomplished entirely via your browser…
Are you asking about something else?

Hello Tony, yes. We saw online that we can install SonarView on the Raspberry Pi OS (Raspbian). Sonarview works in this scenario if we have a monitor attached. But if we don’t have a monitor attached, Sonarview throws a segfault error code indicating that it needs a monitor. We’re wondering if there’s a work around solution? We’d like to stay in the raspberry pi os environment as we have additional processing done in this environment.

Hi @nathan_1,

How are you installing SonarView?

@tony-white is specifically referring to the version that’s provided as a BlueOS Extension, which runs as a Docker container that provides a web interface, and can be interacted with using a web-based API (in which case even if there aren’t documented commands for the different button options, you should be able to find them out from your browser’s network monitor options when you click the actual buttons).

We haven’t worked with the standard version (which you can install from Cerulean’s website), and it’s quite likely that one expects to have a desktop environment available for its display.

It should still be possible to run the BlueOS version even if you’re not actually using BlueOS on your Raspberry Pi, but there may be some connectivity services that BlueOS normally provides that you would need to run yourself if SonarView is reliant on them.

1 Like

I’ve tried installing it using Cerulean’s website on an arm device as well as directly installing BlueOS on the Pi itself.
I’ll try running it as a docker container, next. Thanks for the advice!
I was wondering if you’re able to run the docker container and sonar view application from the command line in this scenario?

As mentioned the BlueOS extension uses a web interface, so if you monitor the network traffic (e.g. using your browser’s network tools) when you’re navigating in that interface you can likely find the relevant URLs for each API endpoint you care about (i.e. the ones relevant for your desired button presses), in which case you can replicate those API requests using your preferred approach (e.g. curl commands, or a Python script, etc).

You can also ask Cerulean directly, and they may be able to direct you to a more straightforward approach.

Ah, that makes sense. Thanks for the help Eliot! I’ll also reach out toe Cerulean directly and see their suggestions too. Really appreciate the help you’ve given me!

1 Like

Hello Eliot,
Just a follow up with some observations of trying to use the API endpoints. We’re getting this Javascript enabled error message and were wondering if there’s a way around it/a fix for it?

Is there a reason you’re trying to fetch the entire BlueOS interface via the command line?

I’d recommend loading SonarView in a normal browser window and navigating through the web interface to determine which API endpoints are relevant, after which you can do your headless API requests specifically to those endpoints instead of fetching an entire application.