[arm-allstar] simpleusb realtime RX telemetry

Tony Ross ynotssor at yahoo.com
Sun Oct 1 13:16:33 EST 2017


On 10/01/2017 12:14 AM, "Richard Bateman via arm-allstar" wrote:

> Does anyone know if there is a way from a script (or the asterisk
> console) to get the simpleusb RX telemetry like in the "V" option of
> simpleusb-tune-menu?
>
> REALTIME RX TELEMETRY DISPLAY:
>      COS     |   COS   |  COS   |  CTCSS  |   CTCSS    |  PTT
> (composite) | (input) | (test) | (input) | (override) |
> ^C CLEAR    |  KEYED  | CLEAR  |  CLEAR  |   CLEAR    | CLEAR
>
> I just want to get the status of those 6 items for use in a monitoring script.

Use "expect" after installing it via "pacman -S expect". Then build the 
script:

autoexpect /usr/bin/simpleusb-tune-menu

and after entering the desired inputs "V" etc., run the resultant script 
from the command line or via cron, and parse its output to get what you 
want, e.g.:

# ./script.exp | grep -A3 "^REAL"
REALTIME RX TELEMETRY DISPLAY:
     COS     |   COS   |  COS   |  CTCSS  |   CTCSS    | PTT
(composite) | (input) | (test) | (input) | (override) |
    CLEAR    |  CLEAR  | CLEAR  | IGNORE  |   CLEAR    | CLEAR

The man pages for expect and autoexpect are of course more informative, 
but this simple example should pique your interest as it meets your request.

.


More information about the arm-allstar mailing list