Topics

Analog_Bridge remote control (TLV) commands exposed.

Steve N4IRS
 

Mike and I have been working on a utility to help people manage or control Analog_Bridge "on the fly" There are a number of reasons people would want to do this:

1: Change Talk Groups / Reflectors on the fly (tune)
2: Change to Digital Voice mode Analog_Bridge is in (mode)
3: Change audio levels (tlvAudio, usrpAudio)
4: Mute audio from Analog_Bridge (mute)
5: Notify DVSM/UC of the current configuration of Analog_Bridge
6: Display a message on the DVSM/UC screen

Commands can help you query current configuration and other troubleshooting.
Push updated data files (TG / Reflector lists) to DVSM/UC

These commands expand the capabilities of systems using Analog_Bridge.
In a ASL to DMR bridge, you can change talk groups without restarting Analog_Bridge.
With a DVSM system, you can change modes without having to restart Analog_Bridge.

Most commands take a parameter, for example mode:
mode {DMR|NXDN|P25|YSF|DSTAR}
The mode command without a parameter returns the current mode. This can be used in scripts as a variable. For example:

# Ask Analog_Bridge what is the current mode
mode=`./dvswitch.sh mode`
# Send a message (toast) to DVSM
./dvswitch.sh message "Changing to parrot $mode"

Below is the current list of commands.
root@omv:/opt/Analog_Bridge# ./dvswitch.sh

Usage:
./dvswitch.sh
         { mode | tune | ambesize | ambemode | slot | update | tlvAudio | usrpAudio | tlvPorts |
           info | show | lookup | mute | message |
           pushfile | collectProcessDataFiles | collectProcessPushDataFiles | pushurl | collectProcessPushDataFilesHTTP }
         tune {tg|reflector}                             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
         mode {DMR|NXDN|P25|YSF|DSTAR}                   Set Analog_Bridge digital mode
         update                                          Update callsign databases
         tlvAudio gain                                   Set AMBE audio gain
         usrpAudio gain                                  Set PCM audio gain
         tlvPorts rxport txport                          Set Analog_Bridge receive and transmit ports
         mute {OFF|USRP|TLV|BOTH}                        Cause Aanlog_Bridge to mute a stream
         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
         message msg                                     Send a text message to DVSM/UC
         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

Steve N4IRS
 

I have received a few direct questions about this topic. I would prefer questions be asked here so all can learn from the question / answer but I'll try to cover the subject here.

Some people are under the impression that the changes to Analog_Bridge and the addition of dvswitch.sh are for DVSwitch Mobile(DVSM) and USRP Client(UC). This could not be further from the truth. The first version of Analog_Bridge was built to provide a method of bridging AllStarLink(ASL) to the DMR networks. Analog_Bridge has it's roots in ASL and we always consider the impact of any change.

I believe most of the ASL to Digital bridges in use today are single mode. I expect mostly DMR but I'm sure there are other modes in use. To build a multi-mode ASL bridge required some script  jiu jitsu to change modes. The same method I used for the example multi-mode DVSM was used to change modes in a ASL to Digital bridge.
Create 5 copies of Analog_Bridge.ini (DMR.ini, YSF.ini, NXDN.ini, P25INI and DSTAR.ini
Edit each mode ini file to reflect the mode. Don't forget to set the TX and RX ports to match those defined in DVSwitch.ini.
Create 5 macros for ASL that copies the proper .ini file over Analog_Bridge.ini and restart Analog_Bridge.
Not elegant, but it works. I'll say it again, don't forget to set the proper TX and RX ports! 

Now let's do the same thing with dvswitch.sh:
Create 5 macros in ASL, each with a a single command and a parameter. dvswitch.sh mode DMR or dvswitch.sh mode YSF. You get the idea.
That's it. dvswitch.sh will read DVSwitch.ini then find the desired mode. dvswitch.sh will tell Analog_Bridge to change mode and ports to match the running instance of MMDVM_Bridge. That's it, you are now on a new mode.
So, you want to change to a different Talk Group or Reflector? Create a macro for ASL with the command dvswitch.sh tune 3112138 or dvswitch.sh tune ysfreflector.net:42000 and you are on the new Talk Group or Reflector.

Now let's get cute. I want ASL to tell me what mode and TG it's currently pointed at. dvswitch.sh is your friend here too. I won't build the whole script but in pseudo code:
ask dvswitch the current mode with dvswitch.sh mode (no parameter)
ask dvswitch.sh the current Talk Group with dvswitch.sh tune (no parameter)
take the results of those 2 commands and ask ASL to say "tuned to Talk Group $tg on mode $mode"

You get the idea. 

As we move forward with the fork of AllStarLink, we will expand the ability of AllStarLink to interact with Analog_Bridge. The first project will be to expand chan_usrp. The channel driver is simple and perfect to communicate more to Analog_Bridge. Some scripting will always be required but USRP has a lot of room to expand. If you have some ideas for what you would like to see join us in the subgroup for the fork <https://dvswitch.groups.io/g/DVSwitch-ASL>. Your ideas are welcome.

Waldek SP2ONG
 

Steve,

Thanks for updates Ananlog_Bridge and MMDVM_Brideg.

the script dvswitch.sh script not yet available?


On Tue, Nov 5, 2019 at 09:49 AM, Steve N4IRS wrote:
dvswitch.sh

Steve N4IRS
 

Waldek,
We have a few additions to make. I will push it to github in the next day or so.

73, Steve

On 11/6/19 4:36 AM, Waldek SP2ONG wrote:
Steve,

Thanks for updates Ananlog_Bridge and MMDVM_Brideg.

the script dvswitch.sh script not yet available?


On Tue, Nov 5, 2019 at 09:49 AM, Steve N4IRS wrote:
dvswitch.sh

Steve N4IRS
 

Waldek,
I have pushed the initial release of dvswitch.sh to github.

73, Steve N4IRS

On 11/6/2019 4:36 AM, Waldek SP2ONG wrote:
Steve,

Thanks for updates Ananlog_Bridge and MMDVM_Brideg.

the script dvswitch.sh script not yet available?


On Tue, Nov 5, 2019 at 09:49 AM, Steve N4IRS wrote:
dvswitch.sh

Steve N4IRS
 

We have pushed the initial of dvswitch.sh (V1.4) to the github repository for Analog_Bridge <https://github.com/DVSwitch/Analog_Bridge>
The example configuration files for ASL have been updated to reflect using the new script to change modes and TG/Reflectors.
We have also updated all binaries for Analog_Bridge and MMDVM_Bridge. In the future (Starting in December), We will update all of the apt packages for the DVSwitch programs. We will do this once a month.
In December, we will be adding a number of "support" programs that DVSwitch uses to github and the apt repository.

Please test out the new script and binaries. We need to hear of any issues that crop up BEFORE they are pushed to apt.

For DVSwitch,
Steve N4IRS and Mike N4IRR 

K4VL
 

How would I update those without corrupting my asterisk build. I ran apt-get update and apt-get upgrade and now asterisk failed to start back up. Luckily I backed up the image the other day.


On Wed, Nov 6, 2019 at 9:09 AM Steve N4IRS <szingman@...> wrote:
We have pushed the initial of dvswitch.sh (V1.4) to the github repository for Analog_Bridge <https://github.com/DVSwitch/Analog_Bridge>
The example configuration files for ASL have been updated to reflect using the new script to change modes and TG/Reflectors.
We have also updated all binaries for Analog_Bridge and MMDVM_Bridge. In the future (Starting in December), We will update all of the apt packages for the DVSwitch programs. We will do this once a month.
In December, we will be adding a number of "support" programs that DVSwitch uses to github and the apt repository.

Please test out the new script and binaries. We need to hear of any issues that crop up BEFORE they are pushed to apt.

For DVSwitch,
Steve N4IRS and Mike N4IRR 

Steve N4IRS
 

What hardware platform?
apt-get update/upgrade are not going to install anything below. Everything is on github for now.

On 11/6/2019 3:23 PM, K4VL wrote:
How would I update those without corrupting my asterisk build. I ran apt-get update and apt-get upgrade and now asterisk failed to start back up. Luckily I backed up the image the other day.

On Wed, Nov 6, 2019 at 9:09 AM Steve N4IRS <szingman@...> wrote:
We have pushed the initial of dvswitch.sh (V1.4) to the github repository for Analog_Bridge <https://github.com/DVSwitch/Analog_Bridge>
The example configuration files for ASL have been updated to reflect using the new script to change modes and TG/Reflectors.
We have also updated all binaries for Analog_Bridge and MMDVM_Bridge. In the future (Starting in December), We will update all of the apt packages for the DVSwitch programs. We will do this once a month.
In December, we will be adding a number of "support" programs that DVSwitch uses to github and the apt repository.

Please test out the new script and binaries. We need to hear of any issues that crop up BEFORE they are pushed to apt.

For DVSwitch,
Steve N4IRS and Mike N4IRR 

K4VL
 

Raspberry Pi 3


On Wed, Nov 6, 2019 at 2:39 PM Steve N4IRS <szingman@...> wrote:
What hardware platform?
apt-get update/upgrade are not going to install anything below. Everything is on github for now.

On 11/6/2019 3:23 PM, K4VL wrote:
How would I update those without corrupting my asterisk build. I ran apt-get update and apt-get upgrade and now asterisk failed to start back up. Luckily I backed up the image the other day.

On Wed, Nov 6, 2019 at 9:09 AM Steve N4IRS <szingman@...> wrote:
We have pushed the initial of dvswitch.sh (V1.4) to the github repository for Analog_Bridge <https://github.com/DVSwitch/Analog_Bridge>
The example configuration files for ASL have been updated to reflect using the new script to change modes and TG/Reflectors.
We have also updated all binaries for Analog_Bridge and MMDVM_Bridge. In the future (Starting in December), We will update all of the apt packages for the DVSwitch programs. We will do this once a month.
In December, we will be adding a number of "support" programs that DVSwitch uses to github and the apt repository.

Please test out the new script and binaries. We need to hear of any issues that crop up BEFORE they are pushed to apt.

For DVSwitch,
Steve N4IRS and Mike N4IRR 

Steve N4IRS
 

This is from the readme included with the image zip file:
There may have been updates to the operating system and AllStarLink since this image was built.
Run the following commands after the first time you boot.

sudo apt-mark hold raspberrypi-kernel-headers raspberrypi-kernel
sudo apt-get update
sudo apt-get upgrade -y 
sudo reboot

<http://dvswitch.org/files/ASL_Images/Raspberry_Pi/Stretch/ASL_1.01-20180228-armhf-raspbian-stretch-image.readme>


On 11/6/2019 4:12 PM, K4VL wrote:
Raspberry Pi 3

On Wed, Nov 6, 2019 at 2:39 PM Steve N4IRS <szingman@...> wrote:
What hardware platform?
apt-get update/upgrade are not going to install anything below. Everything is on github for now.

On 11/6/2019 3:23 PM, K4VL wrote:
How would I update those without corrupting my asterisk build. I ran apt-get update and apt-get upgrade and now asterisk failed to start back up. Luckily I backed up the image the other day.

On Wed, Nov 6, 2019 at 9:09 AM Steve N4IRS <szingman@...> wrote:
We have pushed the initial of dvswitch.sh (V1.4) to the github repository for Analog_Bridge <https://github.com/DVSwitch/Analog_Bridge>
The example configuration files for ASL have been updated to reflect using the new script to change modes and TG/Reflectors.
We have also updated all binaries for Analog_Bridge and MMDVM_Bridge. In the future (Starting in December), We will update all of the apt packages for the DVSwitch programs. We will do this once a month.
In December, we will be adding a number of "support" programs that DVSwitch uses to github and the apt repository.

Please test out the new script and binaries. We need to hear of any issues that crop up BEFORE they are pushed to apt.

For DVSwitch,
Steve N4IRS and Mike N4IRR 


K4VL
 

Thank you 
Will I need to do this every time I update or just once?

On Wed, Nov 6, 2019 at 3:14 PM Steve N4IRS <szingman@...> wrote:
This is from the readme included with the image zip file:
There may have been updates to the operating system and AllStarLink since this image was built.
Run the following commands after the first time you boot.

sudo apt-mark hold raspberrypi-kernel-headers raspberrypi-kernel
sudo apt-get update
sudo apt-get upgrade -y 
sudo reboot

<http://dvswitch.org/files/ASL_Images/Raspberry_Pi/Stretch/ASL_1.01-20180228-armhf-raspbian-stretch-image.readme>


On 11/6/2019 4:12 PM, K4VL wrote:
Raspberry Pi 3

On Wed, Nov 6, 2019 at 2:39 PM Steve N4IRS <szingman@...> wrote:
What hardware platform?
apt-get update/upgrade are not going to install anything below. Everything is on github for now.

On 11/6/2019 3:23 PM, K4VL wrote:
How would I update those without corrupting my asterisk build. I ran apt-get update and apt-get upgrade and now asterisk failed to start back up. Luckily I backed up the image the other day.

On Wed, Nov 6, 2019 at 9:09 AM Steve N4IRS <szingman@...> wrote:
We have pushed the initial of dvswitch.sh (V1.4) to the github repository for Analog_Bridge <https://github.com/DVSwitch/Analog_Bridge>
The example configuration files for ASL have been updated to reflect using the new script to change modes and TG/Reflectors.
We have also updated all binaries for Analog_Bridge and MMDVM_Bridge. In the future (Starting in December), We will update all of the apt packages for the DVSwitch programs. We will do this once a month.
In December, we will be adding a number of "support" programs that DVSwitch uses to github and the apt repository.

Please test out the new script and binaries. We need to hear of any issues that crop up BEFORE they are pushed to apt.

For DVSwitch,
Steve N4IRS and Mike N4IRR 


Steve N4IRS
 

Just once

On 11/6/2019 4:16 PM, K4VL wrote:
Thank you 
Will I need to do this every time I update or just once?

On Wed, Nov 6, 2019 at 3:14 PM Steve N4IRS <szingman@...> wrote:
This is from the readme included with the image zip file:
There may have been updates to the operating system and AllStarLink since this image was built.
Run the following commands after the first time you boot.

sudo apt-mark hold raspberrypi-kernel-headers raspberrypi-kernel
sudo apt-get update
sudo apt-get upgrade -y 
sudo reboot

<http://dvswitch.org/files/ASL_Images/Raspberry_Pi/Stretch/ASL_1.01-20180228-armhf-raspbian-stretch-image.readme>


On 11/6/2019 4:12 PM, K4VL wrote:
Raspberry Pi 3

On Wed, Nov 6, 2019 at 2:39 PM Steve N4IRS <szingman@...> wrote:
What hardware platform?
apt-get update/upgrade are not going to install anything below. Everything is on github for now.

On 11/6/2019 3:23 PM, K4VL wrote:
How would I update those without corrupting my asterisk build. I ran apt-get update and apt-get upgrade and now asterisk failed to start back up. Luckily I backed up the image the other day.

On Wed, Nov 6, 2019 at 9:09 AM Steve N4IRS <szingman@...> wrote:
We have pushed the initial of dvswitch.sh (V1.4) to the github repository for Analog_Bridge <https://github.com/DVSwitch/Analog_Bridge>
The example configuration files for ASL have been updated to reflect using the new script to change modes and TG/Reflectors.
We have also updated all binaries for Analog_Bridge and MMDVM_Bridge. In the future (Starting in December), We will update all of the apt packages for the DVSwitch programs. We will do this once a month.
In December, we will be adding a number of "support" programs that DVSwitch uses to github and the apt repository.

Please test out the new script and binaries. We need to hear of any issues that crop up BEFORE they are pushed to apt.

For DVSwitch,
Steve N4IRS and Mike N4IRR