Topics

asl.macro documentation / examples #analog_bridge


Tom
 

Where do I find asl.macro documantation and examples ?
Tom  / K5TRA


Steve N4IRS
 

Are you talking about using DVSwitch Mobile with ASL or controlling AB/MB from ASL?

On 8/11/2020 10:22 AM, Tom wrote:
Where do I find asl.macro documantation and examples ?
Tom  / K5TRA


Tom
 

ASL to control. I see provisions for that in the files; but no detail.


Steve N4IRS
 

For what you are doing, you will use the macro functions to run a external program. That program is dvswitch.sh If you run dvswitch.sh without any parameters:

root@dvswitch:/var/www/html# /opt/Analog_Bridge/dvswitch.sh
Usage:
/opt/Analog_Bridge/dvswitch.sh
         { version | mode | tune | ambesize | ambemode | slot | update | tlvAudio | usrpAudio | usrpCodec | tlvPorts |
           info | show | lookup | mute | message | macro |
           pushfile | collectProcessDataFiles | collectProcessPushDataFiles | pushurl | collectProcessPushDataFilesHTTP }
         version {AB|MB|ALL}                             Show version of dvswitch.sh, Analog_Bridge or MMDVM_Bridge
         mode {DMR|NXDN|P25|YSF|DSTAR}                   Set Analog_Bridge digital mode
         tune tg                                         Tune to specific TG/Reflector
         ambesize {72|88|49}                             Set number of bits for ambe data
         ambemode {DMR|NXDN|P25|YSFN|YSFW|DSTAR}         Set AMBE mode
         slot {1|2}                                      Set DMR slot to transmit on
         update                                          Update callsign and host databases
         tlvAudio mode gain                              Set AMBE audio mode and gain
         usrpAudio mode gain                             Set PCM audio mode and gain
         usrpAgc threshold slope decay                   Set PCM audio agc threshold slope and decay
         usrpCodec {SLIN|ULAW|ADPCM}                     Set AB -> DVSM/UC audio codec
         tlvPorts rxport txport                          Set Analog_Bridge receive and transmit ports
         info                                            Update ABInfo and send to DVSM/UC
         show                                            Pretty print the ABInfo json file
         lookup                                          Lookup a DMR ID/call in the local database
         mute {OFF|USRP|TLV|BOTH}                        Cause Aanlog_Bridge to mute a stream
         message msg                                     Send a text message to DVSM/UC
         macro {file|text}                               Send a macro collection to DVSM
         pushfile file                                   Push file to DVSM
         pushurl url                                     Push URL to DVSM
         collectProcessDataFiles                         Collect and prepare DVSM data files
         collectProcessPushDataFiles                     Collect, prepare and upload DVSM data files
         collectProcessPushDataFilesHTTP                 Collect, prepare and upload DVSM data files over http
         reloadDatabase                                  Tell AB to reload database files into memory
         getEnabledModes                                 Return the list of enabled modes in MB.ini

for example you would create a macro to run a external program in rpt.conf
73 = /opt/MMDVM_Bridge/dvswitch.sh tune 10200

dvswitch.sh would tell AB and MB to change TG to 10200

dvswitch.sh update
dvswitch.sh would download all the host files and databases needed to /var/lib/dvswitch and /var/lib/mmdvm

Steve N4IRS
 

On 8/11/2020 10:43 AM, Tom wrote:
ASL to control. I see provisions for that in the files; but no detail.


Tom
 

Yes, I looked at the dvswitch.sh yesterday. Pretty cool. My question is implementation from ASL.

I typically call shell scripts with a function in the following way: 
997=cmd, /usr/local/sbin/on_normal.sh           ; Set ON_normal state

1)  Are you saying that I don't need       cmd,   preceeding the path/file ?
2)  Is the dvswitch.sh call in the [functions] or [macro] stanza ?

Tom


Steve N4IRS
 

Yes you need cmd (copy and paste error)
It's in the same place as your 997 [functions] off the top of my head.

On 8/11/2020 11:43 AM, Tom wrote:
Yes, I looked at the dvswitch.sh yesterday. Pretty cool. My question is implementation from ASL.

I typically call shell scripts with a function in the following way: 
997=cmd, /usr/local/sbin/on_normal.sh           ; Set ON_normal state

1)  Are you saying that I don't need       cmd,   preceeding the path/file ?
2)  Is the dvswitch.sh call in the [functions] or [macro] stanza ?

Tom