Skip to main content

Range and Ping Commands

There are two primary pshell commands for ranging and acoustic test transmissions:

  • range
  • ping

Range Command

The range command sends a two-way range request using the specified software transmit-power setting.

This command issues a range request and sends it to the specified module (modem, echosounder, or transponder) at the configured remote ID. The remote module holds the request for a predetermined amount of time, then replies with a range response. Popoto then sends a range report containing the distance between the devices, the configured speed of sound, and the computed round-trip time.

  • Modem: The first modem requests a range response, and the second modem sends a range reply after receiving the request. The round-trip time is computed and scaled with the configured speed of sound to compute the time-of-flight range.
  • Transponder: This works similarly to the modem, but instead of exchanging digital messages, the signaling is done via tones.
  • Echosounder: The echosounder sends a chirp, as configured in the echosounder variables, and listens for its echo reflection to determine the distance to the surface or bottom.
The speed of sound and the ranging hold time are configurable parameters. If you change the ranging hold time, both the local and remote modules must be configured with the same hold time. Otherwise, Popoto may report incorrect range values.

Syntax

range <transmit-power-setting> [module]

Examples

range 20
range 20 transponder
range 20 echosounder

Example response:

{"Range":500.002441,"Roundtrip Delay":666.669922,"SpeedOfSound":1500.000000,"Units":"m, ms, meters per second"}

If there is a timeout:

{"Alert":"Timeout"}

Ping Command

The ping command sends an acoustic test message.

This API sends the text "Popoto Test Message" using the configured data rate and specified software transmit-power setting when the module is set to modem. For the pinger module, it sends a tonal ping as configured with the pinger:<configuration variables>.

Calling ping with a transmit-power setting latches that setting in the transmitter for subsequent transmissions.

  • Modem (default): Sends the text "Popoto Test Message."
  • Pinger: Sends a tonal ping as configured with the pinger:<configuration variables>.

Syntax

ping <transmit-power-setting> [module]

Examples

ping 10
ping 10 pinger

Example output:

Sends a test message (Popoto Test Message) using transmit-power setting 10