[arm-allstar] simpleusb realtime RX telemetry

Richard Bateman richard at batemansr.us
Sun Oct 1 23:02:59 EST 2017


Hey Doug,

This is *super* helpful.  I'm hesitant to turn on the archive log
since I don't actually want to store it, I just want to watch it and
report metrics into an influxdb that I can query later to see what the
repeater has been doing; this is part of my efforts to figure out
exactly what is happening with some (probably RF, maybe electrical)
issues I'm having with my repeater. I figure the more info I'm
tracking the easier it'll be to tell what is happening; I send the
info to another system to be aggregated.

I assume when you talk about "the manager" you mean the AMI? I have
been trying to figure out how to use that and am having trouble
getting anything useful out of it. Do you by chance have any sample
code that connects and gets these types of events from it? Just
something that "tails" the event log without writing to disk would be
a perfect starting point, or something I could modify to do that.  I
actually have a lot of thoughts about what I could do with that, maybe
solving some other things I'd thought I couldn't do =]

Thanks again for your help,

73

Richard
KD7BBC

On Sun, Oct 1, 2017 at 6:30 PM, "Doug Crompton via arm-allstar"
<arm-allstar at hamvoip.org> wrote:
> I am not sure what your goal is here but these signals or status points are
> available from the Asterisk manager and/or the archive log. I would not
> recommend running the simpleusb-tune-menu script on a continual basis.
>
> I extract log information using a perl script here to log all rxkeys and
> rxunkeys indicating a nodes keying up and down. All status information is
> available in the log. You can do the same thing with the manager. This is
> the way it is done in allmon or supermon.
>
> If you want to use the log you can log all Asterisk activity using the
> archivedir command. I save ALL log info to a 64G USB stick. On a very busy
> hub it has about .5G used in a year. Here are the commands -
>
> archivedir=/media/MS1
> archiveaudio=0          ; Disable saving .wav files
>
> I labelled the Stick MS1 and formatted it ext4. It is also important to
> turn off audio archiving as that takes a lot of space and would not be
> necessary for status updating.
>
> Here is an example of some of the data you would see. It shows links and
> linkdisc. This is a hub so the rxkey is incoming key from a particular node
> then it txkeys all the connected nodes. The same happens on unkey in the
> opposite direction. The idea is to filter what you want and use it as
> status.
>
> 0171001000050,LINK,46210
> 20171001000125,TXKEY,MAIN
> 20171001000130,TXUNKEY,MAIN
> 20171001000514,LINK,43659
> 20171001000830,LINKDISC,43659
> 20171001002140,RXKEY,44036
> 20171001002140,TXKEY,MAIN
> 20171001002140,TXKEY,40961
> 20171001002140,TXKEY,46277
> 20171001002140,TXKEY,40561
> 20171001002140,TXKEY,46210
> 20171001002140,TXKEY,44006
> 20171001002140,TXKEY,45512
> 20171001002140,TXKEY,43542
> 20171001002140,TXKEY,43855
> 20171001002140,TXKEY,46421
> 20171001002140,TXKEY,45619
> 20171001002140,TXKEY,27034
> 20171001002140,TXKEY,46138
> 20171001002140,TXKEY,28258
> 20171001002140,TXKEY,29299
> 20171001002140,TXKEY,42532
> 20171001002140,TXKEY,46252
> 20171001002140,TXKEY,41750
> 20171001002140,TXKEY,41814
> 20171001002140,TXKEY,42064
> 20171001002140,TXKEY,42291
> 20171001002140,TXKEY,28325
> 20171001002140,TXKEY,42593
> 20171001002140,TXKEY,45763
> 20171001002140,TXKEY,40879
> 20171001002140,TXKEY,45609
> 20171001002140,TXKEY,46343
> 20171001002140,TXKEY,40532
> 20171001002140,TXKEY,41791
> 20171001002140,TXKEY,41139
> 20171001002140,TXKEY,43963
> 20171001002140,TXKEY,28796
> 20171001002140,TXKEY,41253
> 20171001002140,TXKEY,29980
> 20171001002140,TXKEY,29971
> 20171001002140,TXKEY,46415
> 20171001002140,TXKEY,44178
> 20171001002140,TXKEY,42119
> 20171001002140,TXKEY,29272
> 20171001002140,TXKEY,41195
> 20171001002141,RXUNKEY,44036
> 20171001002141,TXUNKEY,44178
> 20171001002141,TXUNKEY,40961
> 20171001002141,TXUNKEY,40561
> 20171001002141,TXUNKEY,44006
> 20171001002141,TXUNKEY,45512
> 20171001002141,TXUNKEY,43542
>
>
> *73 Doug*
>
> *WA3DSP*
>
> *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
>
>
> On Sun, Oct 1, 2017 at 2:16 PM, "Tony Ross via arm-allstar" <
> arm-allstar at hamvoip.org> wrote:
>
>> 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.
>>
>> .
>> _______________________________________________
>>
>> arm-allstar mailing list
>> arm-allstar at hamvoip.org
>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>
>> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> _______________________________________________
>
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org


More information about the arm-allstar mailing list