📖
Cerulean Sonar Docs
Docs DirectoryStore
SonarView
SonarView
  • Overview
  • Installation
    • Linux
    • macOS
    • Windows
    • BlueOS
    • Docker
  • App Bar Controls
  • Device Discovery and IP Addressing
  • Application Settings
  • Replaying Saved Sonar Files
  • Session Configurations
    • Multiple Omniscans
    • Surveyor + NMEA Heading/Position
    • Omniscan + MAVLink2Rest Position
    • Omniscan + NMEA Heading/Position
  • UTC Time
  • Device Specific Controls
    • Omniscan 450
      • Mounting Setup
      • Device Controls
      • Firmware Update
      • Display Controls
      • Replay Controls
    • S500 Sounder
    • Ping
    • Ping360
  • Hotkeys
  • SonarLink
  • Known Issues
  • Troubleshooting
  • Deprecated
    • Mission Configurations
      • Omniscan 450
      • Surveyor 240-16
  • Legal
Powered by GitBook
On this page
  • HTTP interface
  • Status
  • Listen-Only WebSocket

SonarLink

This information is generally targeted toward advanced applications and 3rd party software that wants to listen in on the SonarView data streams. Most SonarView users can safely ignore.

PreviousHotkeysNextKnown Issues

Last updated 2 months ago

Use Version (or newer) for the following functionality.

The SonarView application comprises browser-compatible web application with all the UI and most of the functionality, plus a second process called SonarLink which handles all connections to the real world that are not possible to access via browser technology.

SonarLink is a node.js server-side application which runs as a separate process from the web-compatible SonarView application. SonarView and SonarLink are bundled together in a single (Electron) executable available for Windows, MacOS, or Linux.

While the bundled application includes both SonarView and SonarLink, SonarView can optionally connect to remote instances of SonarLink rather than the local bundled one. The SonarLink connection are specified in the user settings as documented in .

You can run multiple instance of SonarView on the same computer. In this scenario, only a single SonarLink instance is actually active. This is transparent to the user.

HTTP interface

Among other functions, SonarLink hosts an http interface on port 7077. This interface can be used to access status information as described here.

Status

The /status endpoint reports a bunch of useful information about SonarLink as a JSONobject. This includes SonarLink's host machine and network interfaces, as well as any currently active sessions.

GET http://host:port/status

Where host is the ip address (typically 127.0.0.1 or localhost), and port is 7077.

In particular, this can be used to identify existing sessions and getting their session_id.

Listen-Only WebSocket

Here we describe a scenario where SonarView is connected to a sonar and a 3rd party application wants to "listen in" on all the data coming from the sonar so that it can process the live information in real time.

Here is how you might open a listen-only web socket to an existing session already opened by SonarView. We're assuming SonarLink is running on localhost.

  1. Submit a HTTP GET to http://localhost:7077/status . This will return the current status of SonarLink and list all active sessions. If an appropriate session already exists, find the session id in this JSON object at status.sessions[index].session_id.

  2. Open a WebSocket connection like ws://localhost:7077/connect?session_id=1.

Now all data coming from the sonar (and other devices in the session if any) will be sent to this web socket. The data is a stream of Cerulean Ping Protocol packets. The 3rd party application is then responsible to parse the data and process as desired. For information on the packet formats consult the API section for the particular sonar as well as the document.

1.12.3-beta
Application Settings
Cerulean Ping Protocol