ALLSTARLINK ECHOLINK BrandMeister DMR

ALLSTARLINK ECHOLINK BrandMeister DMR

In continuation to the previous post regarding Allstarlink on raspberry pi, the following is with reference to allstarlink with echolink and DMR all in one package. I have been testing out ASL versions and chose allstarlink.org distribution. Am sure it shall also work with the HamVoip version.

This post doesnot cover the ASL install and its features and assumes the reader is proficient with the ASL infrastructure. some of the main resources and extracts that were used are at the end




ASL to DMR Bridge how

We are going to take you through installing one of the most requested DVSwitch bridge types, an Analog to DMR bridge. Throughout this document, we will use real node numbers, real DMR IDs and real TG numbers. Where possible those values will be green. Please substitute your numbers.  We will start with a already running ASL node and add the required parts to bridge it to BrandMeister DMR.

Throughout this document we will be testing along the way. If you do not get the expected results as shown, stop, check your work and if it all looks right, ask for help. It is a LOT easier to troubleshoot at the points along the way rather than at the end.

Step 1:
Go to https://radioid.net/register#! and register for your DMR ID. You shall recieve an email from radioid.net after they verify the provided HAM license.

Step 2:
Go to https://brandmeister.network/ and register your account, they shall send you an email confirming your account and dashboard is activated.

Step 3:
Everything we will do from this point on needs root privileges, so once logged in as user repeater:
Gain root privileges
sudo -s

Change to the asterisk configuration file directory:
At the # prompt:
cd /etc/asterisk

Check if asterisk is running:
systemctl status asterisk

root@repeater:/etc/asterisk# systemctl status asterisk
● asterisk.service - Asterisk PBX and telephony daemon
   Loaded: loaded (/lib/systemd/system/asterisk.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-06-04 08:55:52 EDT; 21s ago
     Docs: man:asterisk(8)
  Process: 601 ExecStop=/usr/sbin/asterisk -rx stop now (code=exited, status=0/SUCCESS)
 Main PID: 698 (asterisk)
    Tasks: 21 (
limit: 4915)
   CGroup: /system.slice/asterisk.service
           └─698 /usr/sbin/asterisk -g -f -C /etc/asterisk/asterisk.conf

Jun 04 08:55:52 repeater systemd[1]: Started Asterisk PBX and telephony daemon.

It is much easier to make your changes and then run the program in the foreground to troubleshoot before continuing.

Stop asterisk and get its status:
systemctl stop asterisk
systemctl status asterisk

root@repeater:/etc/asterisk# systemctl stop asterisk
root@repeater:/etc/asterisk
# systemctl status asterisk
● asterisk.service - Asterisk PBX and telephony daemon
   Loaded: loaded (/lib/systemd/system/asterisk.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2018-06-04 08:58:39 EDT; 3s ago
     Docs: man:asterisk(8)
  Process: 739 ExecStop=/usr/sbin/asterisk -rx stop now (code=exited, status=0/SUCCESS)
  Process: 698 ExecStart=/usr/sbin/asterisk -g -f -C /etc/asterisk/asterisk.conf (code=exited, status=0/SUCCESS)
 Main PID: 698 (code=exited, status=0/SUCCESS)

Jun 04 08:55:52 repeater systemd[1]: Started Asterisk PBX and telephony daemon.
Jun 04 08:58:38 repeater systemd[1]: Stopping Asterisk PBX and telephony daemon...
Jun 04 08:58:39 repeater systemd[1]: Stopped Asterisk PBX and telephony daemon.
root@repeater:/etc/asterisk
#

ASL will support multiple nodes on one server. For the bridge, this allows us to easily connect and disconnect ASL from DMR. Not all nodes on ASL need be in the public node list. These type of nodes are called private nodes. We are going to add a private node to ASL. This minimizes the changes required to ASL. The settings for node 1999 are selected to keep unwanted sounds from being sent to DMR from ASL.

Edit /etc/asterisk/rpt.conf
Copy the [1999] stanza from https://dvswitch.groups.io/g/allstarlink/wiki/home
Paste the stanza for the private node at the top of rpt.conf file.

; Radio Repeater configuration file (for use with app_rpt)

; Your Repeater

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[1999]
rxchannel = USRP/127.0.0.1:34001:32001  ; Use the USRP channel driver. Must be enabled in modules.conf
                                        ; 127.0.0.1 = IP of the target application
                                        ; 34001 = UDP port the target application is listening on
                                        ; 32001 = UDP port ASL is listening on

duplex = 0                              ; 0 = Half duplex with no telemetry tones or hang time. Ah, but Allison STILL talks!

hangtime = 0                            ; squelch tail hang time 0
althangtime = 0                         ; longer squelch tail hang time 0

holdofftelem = 1                        ; Hold off all telemetry when signal is present on receiver or from connected nodes
                                        ; except when an ID needs to be done and there is a signal coming from a connected node.

telemdefault = 0                        ; 0 = telemetry output off. Don't send Allison to DMR !!!!!!!!!!!!!!!!! Trust me.

telemdynamic = 0                        ; 0 = disallow users to change the local telemetry setting with a COP command,

linktolink = no                         ; disables forcing physical half-duplex operation of main repeater while
                                        ; still keeping half-duplex semantics (optional)

nounkeyct = 1                           ; Set to a 1 to eliminate courtesy tones and associated delays.

totime = 180000                         ; transmit time-out time (in ms) (optional, default 3 minutes 180000 ms)

idrecording = |ie                       ; id recording or morse string see http://ohnosec.org/drupal/node/87
idtalkover = |ie                        ; Talkover ID (optional) default is none see http://ohnosec.org/drupal/node/129


Next we need to add the configuration for node 1999
In the [nodes] stanza:
 Add:
1999 = radio@127.0.0.1:4569/1999,NONE

The [nodes] stanza should look like this:
[nodes]
; Note, if you are using automatic update for allstar link nodes,
; no allstar link nodes should be defined here. Only place a definition
; for your local nodes, and private (off of allstar link) nodes here.

2100 = radio@127.0.0.1:4569/2100,NONE   ; This must be changed to your node number
1999 = radio@127.0.0.1:4569/1999,NONE

We are finished editing rpt.conf.

Next we must enable the USRP channel driver.
Edit /etc/asterisk/modules.conf
In the [modules] stanza
Change:
noload => chan_usrp.so
To:
load => chan_usrp.so

The line should look like this:
load => chan_usrp.so ;                        GNU Radio interface USRP Channel Driver

Now let’s check our work. Run asterisk in the foreground
asterisk -c

root@repeater:/etc/asterisk# asterisk -c

AllStarLink Asterisk Version 1.01 2/13/2018 GIT Version 004b9dd
Copyright (C) 1999 - 2018 Digium, Inc. Jim Dixon, AllStarLink Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
[ Booting...
[ Reading Master Configuration ]
[ Initializing Custom Configuration Options ]
[Jun  4 09:21:16] NOTICE[871]: dnsmgr.c:394 do_reload: Managed DNS entries will be refreshed every 300 seconds.
[Jun  4 09:21:16] NOTICE[871]: cdr.c:1416 do_reload: CDR simple logging enabled.
[Jun  4 09:21:16] NOTICE[871]: loader.c:874 load_modules: 56 modules will be loaded.
........................................................ ]
Asterisk Ready.
*CLI> [Jun  4 09:21:16] NOTICE[877]: app_rpt.c:22184 rpt_master: Normal Repeater Init  1999
[Jun  4 09:21:16] NOTICE[877]: app_rpt.c:22184 rpt_master: Normal Repeater Init  2100

*CLI>

You can see both the private node (1999) and the public node (2100) have started properly.
Normal Repeater Init  1999
Normal Repeater Init  2100
Exit asterisk with a Control-C

We will now add the private node to /etc/asterisk/extensions.conf
Edit /etc/asterisk/extensions.conf
in the [globals] stanza
add:
NODE1 = 1999
in the [radio-secure] stanza
add:
exten => ${NODE1},1,rpt,${NODE1}  

[globals]
HOMENPA = 999   ; change this to your Area Code
NODE = 2100     ; change this to your node number
NODE1 = 1999    ; This is the private node

[default]
exten => i,1,Hangup

[radio-secure]
exten => ${NODE},1,rpt,${NODE}
exten => ${NODE1},1,rpt,${NODE1}

This completes the changes needed to be made to ASL Time to check our work.

Run asterisk in the foreground
asterisk -c
We can now test the ability to connect the public node (2100) to the private node (1999) that will later be the connection to DMR

At the CLI> prompt type:
rpt cmd 2100 ilink 3 1999
This tells ASL to connect node 2100 to node 1999 in tranceive mode.

 Let’s look at the statistics for node 2100.  At the CLI> prompt type
rpt stats 2100

root@repeater:/etc/asterisk# asterisk -c

AllStarLink Asterisk Version 1.01 2/13/2018 GIT Version 004b9dd
Copyright (C) 1999 - 2018 Digium, Inc. Jim Dixon, AllStarLink Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
[ Booting...
[ Reading Master Configuration ]
[ Initializing Custom Configuration Options ]
[Jun  4 09:34:22] NOTICE[950]: dnsmgr.c:394 do_reload: Managed DNS entries will be refreshed every 300 seconds.
[Jun  4 09:34:22] NOTICE[950]: cdr.c:1416 do_reload: CDR simple logging enabled.
[Jun  4 09:34:22] NOTICE[950]: loader.c:874 load_modules: 56 modules will be loaded.
........................................................ ]
Asterisk Ready.
*CLI> [Jun  4 09:34:22] NOTICE[956]: app_rpt.c:22184 rpt_master: Normal Repeater Init  1999
[Jun  4 09:34:22] NOTICE[956]: app_rpt.c:22184 rpt_master: Normal Repeater Init  2100

*CLI>

*CLI> rpt cmd 2100 ilink 3 1999

*CLI> rpt stats 2100
************************ NODE 2100 STATISTICS *************************

Selected system state............................: 0
Signal on input..................................: NO
System...........................................: ENABLED
Parrot Mode......................................: DISABLED
Scheduler........................................: ENABLED
Tail Time........................................: STANDARD
Time out timer...................................: ENABLED
Incoming connections.............................: ENABLED
Time out timer state.............................: RESET
Time outs since system initialization............: 0
Identifier state.................................: CLEAN
Kerchunks today..................................: 0
Kerchunks since system initialization............: 0
Keyups today.....................................: 1
Keyups since system initialization...............: 1
DTMF commands today..............................: 0
DTMF commands since system initialization........: 0
Last DTMF command executed.......................: N/A
TX time today....................................: 00:00:27:250
TX time since system initialization..............: 00:00:27:250
Uptime...........................................: 00:04:14
Nodes currently connected to us..................: 1999
Autopatch........................................: ENABLED
Autopatch state..................................: DOWN
Autopatch called number..........................: N/A
Reverse patch/IAXRPT connected...................: DOWN
User linking commands............................: ENABLED
User functions...................................: ENABLED

*CLI>

Notice the line:
Nodes currently connected to us..................: 1999

Node 1999 is connected to node  2100. This tells us that our ASL configuration is correct.
Press Control-C to exit asterisk

 It is best practice to build from the outside in. From shore to shore, so to speak. We can now move on to connecting to BrandMeister.

Let’s install the DVSwitch programs needed to connect ASL to BrandMeister:
Make sure your repository list is up to date before trying to install more programs.

Run:
apt-get update
If you see no errors let’s add the DVSwitch programs:

The ASL and DVSwitch Repository are both hosted on dvswitch.org so the DVSwitch programs are available.

Run:
apt-get install dvswitch -y


root@repeater:/etc/asterisk# apt-get install dvswitch -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  analog-bridge binfmt-support dvswitch-base md380-emu mmdvm-bridge qemu-user-static
The following NEW packages will be installed:
  analog-bridge binfmt-support dvswitch dvswitch-base md380-emu mmdvm-bridge qemu-user-static
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.6 MB of archives.
After this operation, 90.5 MB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security stretch/updates/main amd64 qemu-user-static amd64 1:2.8+dfsg-6+deb9u4 [8,985 kB]
Get:2 http://dvswitch.org/ASL_Repository stretch/hamradio amd64 dvswitch-base all 1.01-20180420-7 [1,624 kB]
Get:3 http://http.us.debian.org/debian stretch/main amd64 binfmt-support amd64 2.1.6-2 [59.5 kB]
Get:4 http://dvswitch.org/ASL_Repository stretch/hamradio amd64 analog-bridge amd64 1.1-20180424-9 [155 kB]
Get:5 http://dvswitch.org/ASL_Repository stretch/hamradio amd64 dvswitch all 1.01-20180420-3 [2,144 B]
Get:6 http://dvswitch.org/ASL_Repository stretch/hamradio amd64 md380-emu amd64 1.1-20180424-5 [687 kB]
Get:7 http://dvswitch.org/ASL_Repository stretch/hamradio amd64 mmdvm-bridge amd64 1.1-20180424-5 [1,055 kB]
Fetched 12.6 MB in 2s (5,432 kB/s)
Selecting previously unselected package dvswitch-base.
(Reading database ... 58252 files and directories currently installed.)
Preparing to unpack .../0-dvswitch-base_1.01-20180420-7_all.deb ...
Unpacking dvswitch-base (1.01-20180420-7) ...
Selecting previously unselected package analog-bridge.
Preparing to unpack .../1-analog-bridge_1.1-20180424-9_amd64.deb ...
Unpacking analog-bridge (1.1-20180424-9) ...
Selecting previously unselected package binfmt-support.
Preparing to unpack .../2-binfmt-support_2.1.6-2_amd64.deb ...
Unpacking binfmt-support (2.1.6-2) ...
Selecting previously unselected package dvswitch.
Preparing to unpack .../3-dvswitch_1.01-20180420-3_all.deb ...
Unpacking dvswitch (1.01-20180420-3) ...
Selecting previously unselected package qemu-user-static.
Preparing to unpack .../4-qemu-user-static_1%3a2.8+dfsg-6+deb9u4_amd64.deb ...
Unpacking qemu-user-static (1:2.8+dfsg-6+deb9u4) ...
Selecting previously unselected package md380-emu.
Preparing to unpack .../5-md380-emu_1.1-20180424-5_amd64.deb ...
Unpacking md380-emu (1.1-20180424-5) ...
Selecting previously unselected package mmdvm-bridge.
Preparing to unpack .../6-mmdvm-bridge_1.1-20180424-5_amd64.deb ...
Unpacking mmdvm-bridge (1.1-20180424-5) ...
Setting up binfmt-support (2.1.6-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service.
Setting up dvswitch-base (1.01-20180420-7) ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 17940    0 17940    0     0  18568      0 --:--:-- --:--:-- --:--:-- 18552
Updating /var/lib/mmdvm/XLXHosts.txt ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6478  100  6478    0     0  18100      0 --:--:-- --:--:-- --:--:-- 18145
Created symlink /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service → /lib/systemd/system/systemd-networkd-wait-online.service.
Created symlink /etc/systemd/system/multi-user.target.wants/netcheck.service → /lib/systemd/system/netcheck.service.
Setting up mmdvm-bridge (1.1-20180424-5) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mmdvm_bridge.service → /lib/systemd/system/mmdvm_bridge.service.
Setting up dvswitch (1.01-20180420-3) ...
Setting up analog-bridge (1.1-20180424-9) ...
Created symlink /etc/systemd/system/multi-user.target.wants/analog_bridge.service → /lib/systemd/system/analog_bridge.service.
Processing triggers for systemd (232-25+deb9u3) ...
Setting up qemu-user-static (1:2.8+dfsg-6+deb9u4) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up md380-emu (1.1-20180424-5) ...
Created symlink /etc/systemd/system/multi-user.target.wants/md380-emu.service → /lib/systemd/system/md380-emu.service.
root@repeater:/etc/asterisk#


 This installs Analog_Bridge, MMDVM_Bridge, and md380-emu. The scripts and datafiles needed to support these programs are also installed. Each of the programs is set to start at boot. You don’t have to do anything.

Before we start, Let’s take a look at how this all goes together. Usually in the message board you will see a simple ASCII diagram like this:

ASL <-> Analog_Bridge <-> MMDVM_Bridge <-> BrandMeister

The <-> denotes two way communications between the programs. This is done via UDP ports. Since the DVSwitch programs can be configured to build a large number of different bridges, the number of options can be staggering to a first time user. Focus on the project at hand. In reality there are not too many changes that need to be made. We have tried to be consistent in the naming between programs and to set the default value as someone would use in a simple bridge. Here is a port diagram of what you will be building:

From left to right, we start with The [1999] node stanza. Each node has a rxchannel. This defines how the node communicates. In this case, we will use USRP to communicate with Analog_Bridge. 127.0.0.1 is the address that ASL will send data to Analog_Bridge. 34001 is the UDP port that ASL will send data on. 32001 is the port that ASL will listen for data on.

In Analog_Bridge.ini the [USRP] stanza defines how Analog_Bridge will communicate with another USRP Partner. In this case ASL. 127.0.0.1 is the address that Analog_Bridge will send data to. Port 32001 is the port that Analog_Bridge will send data to ASL on. Port 34001 is the port that Analog_Bridge will listen for data from ASL on.

In Analog_Bridge.ini the [AMBE_AUDIO] stanza defines how Analog_Bridge will communicate with a digital Partner. In this case MMDVM_Bridge. 127.0.0.1 is the address that Analog_Bridge will send data to. Port 31103 is the port that Analog_Bridge will send data to MMDVM_Bridge on. Port 31100 is the port that Analog_Bridge will listen for data from MMDVM_Bridge on.

MMDVM_Bridge is the program that connects to BrandMeister. Let’s check it’s status:
systemctl status mmdvm_bridge

root@repeater:/etc/asterisk# systemctl status mmdvm_bridge
● mmdvm_bridge.service - MMDVM_Bridge Service
   Loaded: loaded (/lib/systemd/system/mmdvm_bridge.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
You will see the status of the mmdvm_bridge service

Good, MMDVM_Bridge is not running though it is enabled, meaning it will start at boot.

Change directory to /opt/MMDVM_Bridge
cd /opt/MMDVM_Bridge

Let’s see what files are in the directory /opt/MMDVM_Bridge
ls

root@repeater:/etc/asterisk# cd /opt/MMDVM_Bridge/
root@repeater:/opt/MMDVM_Bridge# ls
DVSwitch.ini  MMDVM_Bridge  MMDVM_Bridge.ini
root@repeater:/opt/MMDVM_Bridge#
You will see the program and it’s two configuration files.

We will now edit the callsign and Id
Edit /opt/MMDVM_Bridge/MMDVM_Bridge.ini
In the [General] stanza
Change:
Callsign=W1AW
To your callsign:
Callsign=AP2CJ
Change:
Id=1234567
To your DMRID + 2 digit SSID
Id=311213805

The [General] stanza will look like this:
[General]
Callsign=AP2CJ
Id=311213805
Timeout=180
Duplex=0

In the [General] stanza, the callsign is your callsign. For the Id, It is STRONGLY recommended to user your DMRID and append a 2 digit number between 01 and 99. These 2 digits are referred to as SSID For this example that’s 3112138 plus 05. So the Id in the [General] stanza is 311213805. This is how MMDVM_Bridge logs into a BrandMeister Master. This will make it MUCH easier for you to control any static Talk Groups you want for your bridge.

We will now enables the DMR mode in MMDVM_Bridge. 
In the [DMR] stanza
Change
Enable=0
To:
Enable=1

The [DMR] stanza will look like this:
[DMR]
Enable=1
ColorCode=1
EmbeddedLCOnly=1
DumpTAData=0

In this example, we will connect to the BrandMeister Master at 3108.repeater.net
You should use YOUR regional Master here.
In the [DMR_Network] stanza
Change:
Address=dvswitch.org
To:
Address=3108.repeater.net

The [DMR Network] stanza will look like this:

[DMR Network]
Enable=1
Address=3108.repeater.net
Port=62031
Jitter=360
Local=62032
Password=passw0rd
Slot1=0
Slot2=1
Debug=0

Time to test

Run MMDVM_Bridge in the foreground
./MMDVM_Bridge MMDVM_Bridge.ini

root@repeater:/opt/MMDVM_Bridge# ./MMDVM_Bridge MMDVM_Bridge.ini
I: 2018-06-04 14:12:48.435 MMDVM_Bridge:
I: 2018-06-04 14:12:48.435 Portions Copyright (C) 2018 DVSwitch, INAD.
I: 2018-06-04 14:12:48.436 Hacks by Mike N4IRR and Steve N4IRS
I: 2018-06-04 14:12:48.436 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I: 2018-06-04 14:12:48.436 This software is for use on amateur radio networks only,
I: 2018-06-04 14:12:48.436 it is to be used for educational purposes only. Its use on
I: 2018-06-04 14:12:48.436 commercial networks is strictly prohibited.
I: 2018-06-04 14:12:48.436 Copyright(C) 2015-2018 by Jonathan Naylor, G4KLX and others
M: 2018-06-04 14:12:48.437 MMDVM_Bridge-20180423 is starting
M: 2018-06-04 14:12:48.437 Built 15:47:01 May 30 2018 (GitID #9cdea41)
I: 2018-06-04 14:12:48.437 General Parameters
I: 2018-06-04 14:12:48.437     Callsign: N4IRS
I: 2018-06-04 14:12:48.437     Id: 311213805
I: 2018-06-04 14:12:48.438     Duplex: no
I: 2018-06-04 14:12:48.438     Timeout: 180s
I: 2018-06-04 14:12:48.438     D-Star: disabled
I: 2018-06-04 14:12:48.438     DMR: enabled
I: 2018-06-04 14:12:48.438     YSF: disabled
I: 2018-06-04 14:12:48.438     P25: disabled
I: 2018-06-04 14:12:48.439     NXDN: disabled
I: 2018-06-04 14:12:48.439 Modem Parameters
I: 2018-06-04 14:12:48.439     Port: /dev/null
I: 2018-06-04 14:12:48.439     RX Invert: no
I: 2018-06-04 14:12:48.439     TX Invert: no
I: 2018-06-04 14:12:48.439     PTT Invert: no
I: 2018-06-04 14:12:48.440     TX Delay: 100ms
I: 2018-06-04 14:12:48.440     RX Offset: 0Hz
I: 2018-06-04 14:12:48.440     TX Offset: 0Hz
I: 2018-06-04 14:12:48.440     RX DC Offset: 0
I: 2018-06-04 14:12:48.440     TX DC Offset: 0
I: 2018-06-04 14:12:48.440     RF Level: 100.0%
I: 2018-06-04 14:12:48.441     DMR Delay: 0 (0.0ms)
I: 2018-06-04 14:12:48.441     RX Level: 50.0%
I: 2018-06-04 14:12:48.441     CW Id TX Level: 50.0%
I: 2018-06-04 14:12:48.441     D-Star TX Level: 50.0%
I: 2018-06-04 14:12:48.441     DMR TX Level: 50.0%
I: 2018-06-04 14:12:48.442     YSF TX Level: 50.0%
I: 2018-06-04 14:12:48.442     P25 TX Level: 50.0%
I: 2018-06-04 14:12:48.442     NXDN TX Level: 50.0%
I: 2018-06-04 14:12:48.442     RX Frequency: 222340000Hz (222340000Hz)
I: 2018-06-04 14:12:48.442     TX Frequency: 224940000Hz (224940000Hz)
M: 2018-06-04 14:12:48.442 Opening the MMDVM
I: 2018-06-04 14:12:48.442 Display Parameters
I: 2018-06-04 14:12:48.442     Type:
I: 2018-06-04 14:12:48.442 DMR Network Parameters
I: 2018-06-04 14:12:48.442     Address: 3108.repeater.net
I: 2018-06-04 14:12:48.442     Port: 62031
I: 2018-06-04 14:12:48.443     Local: 62032
I: 2018-06-04 14:12:48.443     Jitter: 360ms
I: 2018-06-04 14:12:48.443     Slot 1: disabled
I: 2018-06-04 14:12:48.443     Slot 2: enabled
I: 2018-06-04 14:12:48.443     Mode Hang: 3s
I: 2018-06-04 14:12:48.476 Info Parameters
I: 2018-06-04 14:12:48.477     Callsign: N4IRS
I: 2018-06-04 14:12:48.477     RX Frequency: 222340000Hz
I: 2018-06-04 14:12:48.477     TX Frequency: 224940000Hz
I: 2018-06-04 14:12:48.477     Power: 1W
I: 2018-06-04 14:12:48.477     Latitude: 41.733299deg N
I: 2018-06-04 14:12:48.478     Longitude: -50.399899deg E
I: 2018-06-04 14:12:48.478     Height: 0m
I: 2018-06-04 14:12:48.478     Location: "Iceberg, North Atlantic"
I: 2018-06-04 14:12:48.478     Description: "MMDVM_Bridge"
I: 2018-06-04 14:12:48.478     URL: "https://groups.io/g/DVSwitch"
M: 2018-06-04 14:12:48.478 DMR, Opening DMR Network
I: 2018-06-04 14:12:48.479 RSSI
I: 2018-06-04 14:12:48.479     Mapping File: RSSI.dat
W: 2018-06-04 14:12:48.479 Cannot open the RSSI data file - RSSI.dat
I: 2018-06-04 14:12:48.479 DMR Id Lookups
I: 2018-06-04 14:12:48.479     File: /var/lib/mmdvm/DMRIds.dat
I: 2018-06-04 14:12:48.479     Reload: 24 hours
I: 2018-06-04 14:12:48.618 Loaded 100306 Ids to the DMR callsign lookup table
I: 2018-06-04 14:12:48.618 DMR RF Parameters
I: 2018-06-04 14:12:48.618     Id: 311213805
I: 2018-06-04 14:12:48.618     Color Code: 1
I: 2018-06-04 14:12:48.619     Self Only: no
I: 2018-06-04 14:12:48.619     Embedded LC Only: yes
I: 2018-06-04 14:12:48.619     Dump Talker Alias Data: no
I: 2018-06-04 14:12:48.619     Prefixes: 0
I: 2018-06-04 14:12:48.619     Call Hang: 3s
I: 2018-06-04 14:12:48.619     TX Hang: 3s
I: 2018-06-04 14:12:48.619     Mode Hang: 10s
M: 2018-06-04 14:12:48.619 DMR, Opening INI file: DVSwitch.ini
M: 2018-06-04 14:12:48.620 DMR, Setting [DMR] Address -> 127.0.0.1
M: 2018-06-04 14:12:48.620 DMR, Setting [DMR] TXPort -> 31100
M: 2018-06-04 14:12:48.620 DMR, Setting [DMR] RXPort -> 31103
M: 2018-06-04 14:12:48.620 DMR, Setting [DMR] Slot -> 2
M: 2018-06-04 14:12:48.620 DMR, Transmitting on 127.0.0.1:31100 and listening on port 31103.  Result = 1
M: 2018-06-04 14:12:48.620 MMDVM_Bridge-20180423 is running
I: 2018-06-04 14:12:48.620 Started the DMR Id lookup reload thread
D: 2018-06-04 14:12:58.691 DMR, Sending authorisation
D: 2018-06-04 14:12:58.742 DMR, Sending configuration
M: 2018-06-04 14:12:58.778 DMR, Logged into the master successfully


Here are the important lines for now:

I: 2018-06-04 14:12:48.437 General Parameters
I: 2018-06-04 14:12:48.437     Callsign: N4IRS
I: 2018-06-04 14:12:48.437     Id: 311213805
I: 2018-06-04 14:12:48.438     DMR: enabled

I: 2018-06-04 14:12:48.442 DMR Network Parameters
I: 2018-06-04 14:12:48.442     Address: 3108.repeater.net
I: 2018-06-04 14:12:48.442     Port: 62031

M: 2018-06-04 14:12:48.620 MMDVM_Bridge-20180423 is running
D: 2018-06-04 14:12:58.691 DMR, Sending authorisation
D: 2018-06-04 14:12:58.742 DMR, Sending configuration
M: 2018-06-04 14:12:58.778 DMR, Logged into the master successfully


This verifies the Callsign and the Id used to login to BrandMeister. The BrandMeister Master Address and Port you are connected to and that you have successfully logged in to the Master.

Let’s take a look at BM. Login to your selfcare page at brandmeister.network.
On the left hand side you should see “My hotspots”


Notice that 311213805 is showing the green “plug” icon. That means 311213805 it is connected to BrandMeister. Next let’s take a quick look at it’s edit page. Click on your hotspot number. For the example, that’s 311213805 This will take you to the edit page. In the center of the page you should see Sysops. You should be the only sysop for now. If you got this far you are most of the way there.
 
 

While we are here, we can setup a Static Talk Group to pass through the bridge. We will add the Talk Group number here:
Enter your Talk Group number in the box on the left and click on the right arrow. It will look like this, for the example I used Talkgroup 311222:
At this point, you have both sides of bridge installed and working. Now it is time to connect them together. Since one network is analog and the other network is digital we need to convert the audio between the modes. That is the job of Analog_Bridge.
Press Control-C to stop MMDVM_Bridge.

Check the status of Analog_Bridge
systemctl status analog_bridge

root@repeater:/opt/MMDVM_Bridge# cd /opt/Analog_Bridge/
root@repeater:/opt/Analog_Bridge# systemctl status analog_bridge
● analog_bridge.service - Analog_Bridge Service
   Loaded: loaded (/lib/systemd/system/analog_bridge.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
root@repeater:/opt/Analog_Bridge#

Analog_Bridge is enabled and not running.

Change to the /opt/Analog_Bridge directory
cd /opt/Analog_Bridge


Let’s see what files are in the directory /opt/Analog_Bridge
ls

root@repeater:/opt/Analog_Bridge# ls
Analog_Bridge  Analog_Bridge.ini
root@repeater:/opt/Analog_Bridge#

You should see the program Analog_Bridge and it’s configuration file Analog_Bridge.ini



FOR ASL RPI (https://dvswitch.groups.io/g/main/message/2258)

Let’s see what files are in the directory /opt/Analog_Bridge
; Analog_Bridge configuration file.
;   This file should be placed in either /etc or it can be
;   supplied as a path on the Analog_Bridge command line.

; General Section describes settings for Analog_Bridge itself.
;   For RPI, don't forget to modprobe snd_pcm_oss to get the devices populated
[GENERAL]
logLevel = 2                            ; Show messages and above 0=No logging, 1=Debug, 2=Message, 3=Info, 4=Warning, 5=Error, 6=Fatal

; Metadata management
exportMetadata = true                   ; Export metadata to USRP partner (transcode setups require this)
subscriberFile = /var/lib/dvswitch/subscriber_ids.csv   ; DMR ID to callsign lookup data

; General vocoder setup information
decoderFallBack = true                 ; Allow software AMBE decoding if a hardware decoder is not found
useEmulator = true                     ; Use the MD380 AMBE emulator for AMBE72 (DMR/YSFN/NXDN)
emulatorAddress = 127.0.0.1:2470        ; IP address and port of the server

; Audio devices are normally not needed when in gateway service.  These devices should
; only be set when local monitor or dongle modes are required.
outputAudioDevice = /dev/null           ; Audio device /dev/null, /dev/dsp1, portaudio, etc
inputAudioDevice = /dev/null            ; Only used for dongle mode

; Below values are for using this as a local DMR dongle (no ASL needed)
useMicrophone = false                   ; Use app as just a fancy dongle for DMR
useVox = false                          ; If using dongle mode (useMicrophone), enable VOX
voxDecay = 2                            ; Hang time in seconds
voxTrigger = 200                        ; Value to trip PTT (0-32767)

; Information for xx_Bridges (Where xx is MMDVM, HB, IPSC)
[AMBE_AUDIO]
server = 127.0.0.1                      ; IP address of xx_Bridge.py
fromDMRPort = 31000                     ; AMBE frames from xx_Bridge (should match "toGatewayPort" in xx_Bridge.cfg)
toDMRPort = 31003                       ; AMBE frames from xx_Bridge (should match "fromGatewayPort" in xx_Bridge.cfg)
ambeMode = DMR                          ; DMR, DMR_IPSC, DSTAR, NXDN, P25, YSFN, YSFW
minTxTimeMS = 2000                      ; Minimum time in MS for hang delay
gatewayDmrId = 3112138                  ; ID to use when transmitting from Analog_Bridge
repeaterID = 311213850                  ; ID of source repeater
txTg = 9                                ; TG to use for all frames received from Analog_Bridge -> xx_Bridge
txTs = 2                                ; Slot to use for frames received from Analog_Bridge -> xx_Bridge
colorCode = 1                           ; Color Code to assign DMR frames

; Information for USRP channel driver.  This interface uses PCM to transfer audio information
; There are two typical configurations, ASL and Transcode.  ASL (AllstarLink) is for analog clients connected
; to a digital network.  Transcode is when Analog_Bridge actually points its PCM interfaces back at itself,
; causing a TLV <-- (pcm <--> pcm) --> TLV type of architecture.
;   When using ASL, this matches the rpt.conf ASL file with a setting like:
;   rxchannel = usrp/127.0.0.1:34001:32001
;   When Transcoding, make toASLPort equal to the other instance fromASLPort (crossover)
[USRP]
server = 127.0.0.1                      ; IP address of Allstar/Asterisk
toASLPort = 32001                       ; Analog_Bridge <-- ASL
fromASLPort = 34001                     ; Analog_Bridge --> ASL
aslAudio = AUDIO_UNITY                  ; Audio to ASL (AUDIO_UNITY, AUDIO_USE_AGC, AUDIO_USE_GAIN)
agcGain = -20                           ; Gain (in db) of the AGC filter
dmrAudio = AUDIO_UNITY                  ; Audio from ASL (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_BPF)
dmrGain = 0.35                          ; Gain factor of audio from ASL (0.0-1.0)

; Information for DV3000 hardware decoder
;   There are two configuration modes: IP (AMBEServer) and serial (direct connect hardware)
;   Use top server and port if using AMBEServer
;   Use bottom server/port and serial = true if using the DV3000u (thumbdv)
;   Did you run AMBETest4.py before using this?
[DV3000]
server = 127.0.0.1                      ; IP address of AMBEServer
port = 2460                             ; Port of AMBEServer
; server = /dev/ttyUSB0                 ; Device of DV3000U on this machine
; port = 460800                         ; Baud rate of the dongle
; serial = true                         ; Use serial (DV3000U) or IP





FOR X86 install

Edit /opt/Analog_Bridge/Analog_Bridge.ini
in the [GENERAL] stanza
change:
decoderFallBack = true

The [GENERAL] stanza will look like this:
; General Section describes settings for Analog_Bridge itself.
[GENERAL]
logLevel = 2                            ; Show messages and above 0=No logging, 1=Debug, 2=Message, 3=Info, 4=Warning, 5=Error, 6=Fatal

; Metadata management
exportMetadata = true                   ; Export metadata to USRP partner (transcode setups require this)
subscriberFile = /var/lib/dvswitch/subscriber_ids.csv   ; DMR ID to callsign lookup data

; General vocoder setup information
decoderFallBack = true                  ; Allow software AMBE decoding if a hardware decoder is not found
useEmulator = false                     ; Use the MD380 AMBE emulator for AMBE72 (DMR/YSFN/NXDN)
emulatorAddress = 127.0.0.1:2470        ; IP address and port of the md380 server;s

The [AMBE_AUDIO] stanza sets up the connection to the Partner program.
In this example, MMDVM_Bridge.
RXPort is the UDP port that Analog_Bridge will listen to for data from MMDVM_Bridge.
Address and TXPort are where Analog_Bridge will send data to MMDVM_Bridge.
The default values for Address, RXPort and TXPort are correct for connecting to the [DMR] stanza in MMDVM_Bridge.ini
gatewayDmrId is the DMRID that all analog traffic from ASL will appear to come from when someone is listening on DMR.
repeaterID should match the ID you used to log into BM.
txTg is the Talk Group that traffic from ASL will be sent to BrandMeister.
txTs is the Time Slot the traffic from ASL will be on.

In the [AMBE_AUDIO] stanza
Change:
gatewayDmrId = 3112138
repeaterID = 311213805
txTg = 311222
txPort = 31103
rxPort = 31100

Remember the values in green are for the example. You should use your values here.

CHANGE THE Analog INI
DVSwitch.ini             |       Analog_bridge.ini
[DMR]                    |       [AMBE_AUDIO]
Address = 127.0.0.1      |       server = 127.0.0.1
TXPort = 31100           |       fromDMRPort = 31100
RXPort = 31103           |       toDMRPort = 31103

The [AMBE_AUDIO] stanza will look like this:
; Information for xx_Bridge (Where xx is MMDVM, Quantar, HB, IPSC)
[AMBE_AUDIO]
address = 127.0.0.1                     ; IP address of xx_Bridge
txPort = 31103                          ; Transmit TLV frames to partner on this port
rxPort = 31100                          ; Listen for TLV frames from partner on this port
ambeMode = DMR                          ; DMR, DMR_IPSC, DSTAR, NXDN, P25, YSFN, YSFW (encode PCM to this format)
minTxTimeMS = 2000                      ; Minimum time in MS for hang delay (0-10000)

; The metadata below is used when ASL is the source since it does not have any concept of digital modes
gatewayDmrId = 3112138                  ; ID to use when transmitting from Analog_Bridge
repeaterID = 311213805                  ; ID of source repeater
txTg = 311222                           ; TG to use for all frames sent from Analog_Bridge -> xx_Bridge
txTs = 2                                ; Slot to use for frames sent from Analog_Bridge -> xx_Bridge
colorCode = 1                           ; Color Code to assign DMR frames

Now we will look at the Analog side of the connection:

The [USRP] stanza will look like this:
[USRP]
address = 127.0.0.1                     ; IP address of USRP partner (Allstar/Asterisk or another Analog_Bridge)
txPort = 32001                          ; Transmit USRP frames on this port
rxPort = 34001                          ; Listen for USRP frames on this port
aslAudio = AUDIO_UNITY                  ; Audio to ASL (AUDIO_UNITY, AUDIO_USE_AGC, AUDIO_USE_GAIN)
agcGain = -20                           ; Gain (in db) of the AGC filter
dmrAudio = AUDIO_UNITY                  ; Audio from ASL (AUDIO_UNITY, AUDIO_USE_GAIN, AUDIO_BPF)
dmrGain = 0.35                          ; Gain factor of audio from ASL (0.0-1.0)


The [USRP] stanza is what is used to connect to ASL. This is also where you can tailor the audio in and out of ASL to DMR. For now the defaults will work as is. We are done editing Analog_Bridge. Let’s check our work.
Run Analog_Bridge in the foreground.
./Analog_Bridge Analog_Bridge.ini

root@repeater:/opt/Analog_Bridge# ./Analog_Bridge Analog_Bridge.ini
I: 2018-06-04 15:09:34.104 Analog Bridge Version 1.1 Wed May 30 09:44:39 EDT 2018
I: 2018-06-04 15:09:34.105 Copyright (C) 2018 DVSwitch, INAD.
I: 2018-06-04 15:09:34.105 Created by Mike N4IRR and Steve N4IRS
I: 2018-06-04 15:09:34.105 Analog Bridge comes with ABSOLUTELY NO WARRANTY
I: 2018-06-04 15:09:34.105
I: 2018-06-04 15:09:34.105 This software is for use on amateur radio networks only,
I: 2018-06-04 15:09:34.106 it is to be used for educational purposes only. Its use on
I: 2018-06-04 15:09:34.106 commercial networks is strictly prohibited.
I: 2018-06-04 15:09:34.106
I: 2018-06-04 15:09:34.106 Analog Bridge is starting
M: 2018-06-04 15:09:34.106 Setting [GENERAL] logLevel -> 2
M: 2018-06-04 15:09:34.107 Setting [GENERAL] subscriberFile -> ./subscriber_ids.csv
M: 2018-06-04 15:09:34.107 Setting [GENERAL] exportMetadata -> true
M: 2018-06-04 15:09:34.107 Setting [GENERAL] decoderFallBack -> false
M: 2018-06-04 15:09:34.107 Setting [GENERAL] useEmulator -> false
M: 2018-06-04 15:09:34.107 Setting [GENERAL] emulatorAddress -> 127.0.0.1:2470
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] address -> 127.0.0.1
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] txPort -> 31103
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] rxPort -> 31100
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] ambeMode -> DMR
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] minTxTimeMS -> 2000
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] gatewayDmrId -> 3112138
M: 2018-06-04 15:09:34.109 Setting [AMBE_AUDIO] repeaterID -> 311213805
M: 2018-06-04 15:09:34.109 Setting [AMBE_AUDIO] txTg -> 311222
M: 2018-06-04 15:09:34.109 Setting [AMBE_AUDIO] txTs -> 2
M: 2018-06-04 15:09:34.109 Setting [AMBE_AUDIO] colorCode -> 1
M: 2018-06-04 15:09:34.109 Setting [USRP] address -> 127.0.0.1
M: 2018-06-04 15:09:34.110 Setting [USRP] txPort -> 32001
M: 2018-06-04 15:09:34.110 Setting [USRP] rxPort -> 34001
M: 2018-06-04 15:09:34.110 Setting [USRP] aslAudio -> AUDIO_UNITY
M: 2018-06-04 15:09:34.110 Setting [USRP] agcGain -> -20
M: 2018-06-04 15:09:34.110 Setting [USRP] dmrAudio -> AUDIO_UNITY
M: 2018-06-04 15:09:34.111 Setting [USRP] dmrGain -> 0.35
M: 2018-06-04 15:09:34.111 Setting [DV3000] address -> 127.0.0.1
M: 2018-06-04 15:09:34.111 Setting [DV3000] rxPort -> 2460
W: 2018-06-04 15:09:34.111 ioctl reset error
W: 2018-06-04 15:09:34.111 ioctl speed error
W: 2018-06-04 15:09:34.111 ioctl stereo error
W: 2018-06-04 15:09:34.112 ioctl setfmt error
M: 2018-06-04 15:09:34.112 Audio In/Out Device: /dev/null
I: 2018-06-04 15:09:34.112 Open UDP listener on 127.0.0.1:31100
I: 2018-06-04 15:09:34.112 Open USRP on 127.0.0.1:32001
M: 2018-06-04 15:09:34.112 Connecting to DV3000 hardware......
W: 2018-06-04 15:09:35.121 DV3000 not found at 127.0.0.1:2460
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details
I: 2018-06-06 13:47:08.456 Subscriber IDs file not found.
I: 2018-06-06 13:47:08.456 Default extended metadata <3112138>
I: 2018-06-06 13:47:08.456 Connecting to emulator on host 127.0.0.1:2470
W: 2018-06-06 13:47:08.456 Using software MBE decoder version 1.2.3
W: 2018-06-06 13:47:08.456 Using software OP25 IMBE/AMBE vocoder
I: 2018-06-06 13:47:08.457 Starting Analog_Bridge --> USRP thread
I: 2018-06-06 13:47:08.457 Open UDP listener on 127.0.0.1:34001
I: 2018-06-06 13:47:08.458 Starting USRP --> HB_Bridge thread

Let’s look at the important information:
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] address -> 127.0.0.1
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] txPort -> 31103
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] rxPort -> 31100
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] ambeMode -> DMR
M: 2018-06-04 15:09:34.108 Setting [AMBE_AUDIO] gatewayDmrId -> 3112138
M: 2018-06-04 15:09:34.109 Setting [AMBE_AUDIO] repeaterID -> 311213805

M: 2018-06-04 15:09:34.109 Setting [USRP] address -> 127.0.0.1
M: 2018-06-04 15:09:34.110 Setting [USRP] txPort -> 32001
M: 2018-06-04 15:09:34.110 Setting [USRP] rxPort -> 34001
M: 2018-06-04 15:09:34.110 Setting [USRP] aslAudio -> AUDIO_UNITY
M: 2018-06-04 15:09:34.110 Setting [USRP] agcGain -> -20
M: 2018-06-04 15:09:34.110 Setting [USRP] dmrAudio -> AUDIO_UNITY
M: 2018-06-04 15:09:34.111 Setting [USRP] dmrGain -> 0.35


Analog_Bridge is sending data to MMDVM_Bridge at Address 127.0.0.1 on port 31103 Aanlog_Bridge is listening for data from MMDVM_Bridge on port 31100.
Analog_Bridge is sending analog audio to ASL at Address 127.0.0.1 on port 32001 Analog_Bridge is listening for analog audio from ASL on port 34001.
Audio levels to and from ASL are unity. (no gain or reduction)

Insert Vocoder discussion here:
Analog_Bridge is capable of using three classes of vocoders
Hardware DV3000U, PiDV, DVMega AMBE
Support for DMR, YSFN, NXDN and D-Star
Direct serial and IP (ambe server) modes are supported
Software
The md380-emulator
Support for DMR, YSFN, NXDN
The OP25 vocoder
Support for DMR, YSFN, NXDN, D-Star, P25 and YSFW
Quality vs cost
Will your CPU support all vocoders?
As described in other sections, we support AMBE, IMBE and DSAMBE audio formats, but there are differing levels of support and quality for these formats.
AMBE is supported in hardware (USB or AMBEServer), md380-emulator on supported environments and OP25 vocoder for all platforms.  The md380-emulator is available on x86 and ARM V7 (with div support) which includes the Raspberry Pi 2 and 3, Allwinner H3 and H5 processors.
IMBE is supported in software on all platforms using the OP25 vocoders
DSAMBE (D-Star) is supported in hardware (USB or AMBEServer) and (but you will not be happy) by using the OP25 vocoder.


If you got this far, you are doing well. It’s now time to test everything and see if we missed anything. For this portion you will run all of the bridge programs in the foreground. Each will be in a separate window so you can watch in real time. Again we will work from the outside in.
Let’s start asterisk. We will also tell asterisk to use more verbose logging so that we can see the traffic coming from Analog_Bridge.

Open a window on the bridge
Gain root privileges
sudo -s

At the # prompt:
cd /etc/asterisk

Run asterisk in the foreground
asterisk -c

Make the asterisk messages more verbose
From the CLI> prompt
rpt debug level 6

root@repeater:/opt/Analog_Bridge# cd /etc/asterisk
root@repeater:/etc/asterisk# asterisk -c

AllStarLink Asterisk Version 1.01 2/13/2018 GIT Version 004b9dd
Copyright (C) 1999 - 2018 Digium, Inc. Jim Dixon, AllStarLink Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
[ Booting...
[ Reading Master Configuration ]
[ Initializing Custom Configuration Options ]
[Jun  4 11:26:40] NOTICE[1852]: dnsmgr.c:394 do_reload: Managed DNS entries will be refreshed every 300 seconds.
[Jun  4 11:26:40] NOTICE[1852]: cdr.c:1416 do_reload: CDR simple logging enabled.
[Jun  4 11:26:40] NOTICE[1852]: loader.c:874 load_modules: 56 modules will be loaded.
........................................................ ]
Asterisk Ready.
*CLI> [Jun  4 11:26:40] NOTICE[1858]: app_rpt.c:22184 rpt_master: Normal Repeater Init  1999
[Jun  4 11:26:40] NOTICE[1858]: app_rpt.c:22184 rpt_master: Normal Repeater Init  2100

*CLI>rpt debug level 6
app_rpt Debugging enabled, previous level: 0, new level: 6

*CLI>



Open a another window on the bridge
Gain root privileges
sudo -s

At the # prompt:
cd /opt/MMDVM_Bridge

Start MMDVM_Bridge in the foreground
./MMDVM_Bridge MMDVM_Bridge.ini

root@repeater:/# cd /opt/MMDVM_Bridge/
root@repeater:/opt/MMDVM_Bridge# ./MMDVM_Bridge MMDVM_Bridge.ini
I: 2018-06-04 15:28:54.546 MMDVM_Bridge:
I: 2018-06-04 15:28:54.546 Portions Copyright (C) 2018 DVSwitch, INAD.
I: 2018-06-04 15:28:54.546 Hacks by Mike N4IRR and Steve N4IRS
I: 2018-06-04 15:28:54.546 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I: 2018-06-04 15:28:54.546 This software is for use on amateur radio networks only,
I: 2018-06-04 15:28:54.547 it is to be used for educational purposes only. Its use on
I: 2018-06-04 15:28:54.547 commercial networks is strictly prohibited.
I: 2018-06-04 15:28:54.547 Copyright(C) 2015-2018 by Jonathan Naylor, G4KLX and others
M: 2018-06-04 15:28:54.547 MMDVM_Bridge-20180423 is starting
M: 2018-06-04 15:28:54.547 Built 15:47:01 May 30 2018 (GitID #9cdea41)
I: 2018-06-04 15:28:54.548 General Parameters
I: 2018-06-04 15:28:54.548     Callsign: N4IRS
I: 2018-06-04 15:28:54.548     Id: 311213805
I: 2018-06-04 15:28:54.548     Duplex: no
I: 2018-06-04 15:28:54.548     Timeout: 180s
I: 2018-06-04 15:28:54.548     D-Star: disabled
I: 2018-06-04 15:28:54.549     DMR: enabled
I: 2018-06-04 15:28:54.549     YSF: disabled
I: 2018-06-04 15:28:54.549     P25: disabled
I: 2018-06-04 15:28:54.549     NXDN: disabled
I: 2018-06-04 15:28:54.549 Modem Parameters
I: 2018-06-04 15:28:54.549     Port: /dev/null
I: 2018-06-04 15:28:54.550     RX Invert: no
I: 2018-06-04 15:28:54.550     TX Invert: no
I: 2018-06-04 15:28:54.550     PTT Invert: no
I: 2018-06-04 15:28:54.550     TX Delay: 100ms
I: 2018-06-04 15:28:54.550     RX Offset: 0Hz
I: 2018-06-04 15:28:54.550     TX Offset: 0Hz
I: 2018-06-04 15:28:54.550     RX DC Offset: 0
I: 2018-06-04 15:28:54.551     TX DC Offset: 0
I: 2018-06-04 15:28:54.551     RF Level: 100.0%
I: 2018-06-04 15:28:54.551     DMR Delay: 0 (0.0ms)
I: 2018-06-04 15:28:54.551     RX Level: 50.0%
I: 2018-06-04 15:28:54.551     CW Id TX Level: 50.0%
I: 2018-06-04 15:28:54.551     D-Star TX Level: 50.0%
I: 2018-06-04 15:28:54.551     DMR TX Level: 50.0%
I: 2018-06-04 15:28:54.552     YSF TX Level: 50.0%
I: 2018-06-04 15:28:54.552     P25 TX Level: 50.0%
I: 2018-06-04 15:28:54.552     NXDN TX Level: 50.0%
I: 2018-06-04 15:28:54.552     RX Frequency: 222340000Hz (222340000Hz)
I: 2018-06-04 15:28:54.552     TX Frequency: 224940000Hz (224940000Hz)
M: 2018-06-04 15:28:54.552 Opening the MMDVM
I: 2018-06-04 15:28:54.552 Display Parameters
I: 2018-06-04 15:28:54.553     Type:
I: 2018-06-04 15:28:54.553 DMR Network Parameters
I: 2018-06-04 15:28:54.553     Address: 3108.repeater.net
I: 2018-06-04 15:28:54.553     Port: 62031
I: 2018-06-04 15:28:54.553     Local: 62032
I: 2018-06-04 15:28:54.553     Jitter: 360ms
I: 2018-06-04 15:28:54.553     Slot 1: disabled
I: 2018-06-04 15:28:54.553     Slot 2: enabled
I: 2018-06-04 15:28:54.553     Mode Hang: 3s
I: 2018-06-04 15:28:54.582 Info Parameters
I: 2018-06-04 15:28:54.583     Callsign: N4IRS
I: 2018-06-04 15:28:54.583     RX Frequency: 222340000Hz
I: 2018-06-04 15:28:54.583     TX Frequency: 224940000Hz
I: 2018-06-04 15:28:54.583     Power: 1W
I: 2018-06-04 15:28:54.583     Latitude: 41.733299deg N
I: 2018-06-04 15:28:54.583     Longitude: -50.399899deg E
I: 2018-06-04 15:28:54.583     Height: 0m
I: 2018-06-04 15:28:54.584     Location: "Iceberg, North Atlantic"
I: 2018-06-04 15:28:54.584     Description: "MMDVM_Bridge"
I: 2018-06-04 15:28:54.584     URL: "https://groups.io/g/DVSwitch"
M: 2018-06-04 15:28:54.584 DMR, Opening DMR Network
I: 2018-06-04 15:28:54.584 RSSI
I: 2018-06-04 15:28:54.584     Mapping File: RSSI.dat
W: 2018-06-04 15:28:54.584 Cannot open the RSSI data file - RSSI.dat
I: 2018-06-04 15:28:54.584 DMR Id Lookups
I: 2018-06-04 15:28:54.585     File: /var/lib/mmdvm/DMRIds.dat
I: 2018-06-04 15:28:54.585     Reload: 24 hours
I: 2018-06-04 15:28:54.735 Loaded 100306 Ids to the DMR callsign lookup table
I: 2018-06-04 15:28:54.735 DMR RF Parameters
I: 2018-06-04 15:28:54.735     Id: 311213805
I: 2018-06-04 15:28:54.735     Color Code: 1
I: 2018-06-04 15:28:54.735     Self Only: no
I: 2018-06-04 15:28:54.736     Embedded LC Only: yes
I: 2018-06-04 15:28:54.736     Dump Talker Alias Data: no
I: 2018-06-04 15:28:54.736     Prefixes: 0
I: 2018-06-04 15:28:54.736     Call Hang: 3s
I: 2018-06-04 15:28:54.736     TX Hang: 3s
I: 2018-06-04 15:28:54.736     Mode Hang: 10s
M: 2018-06-04 15:28:54.736 DMR, Opening INI file: DVSwitch.ini
M: 2018-06-04 15:28:54.737 DMR, Setting [DMR] Address -> 127.0.0.1
M: 2018-06-04 15:28:54.737 DMR, Setting [DMR] TXPort -> 31100
M: 2018-06-04 15:28:54.737 DMR, Setting [DMR] RXPort -> 31103
M: 2018-06-04 15:28:54.737 DMR, Setting [DMR] Slot -> 2
M: 2018-06-04 15:28:54.738 DMR, Transmitting on 127.0.0.1:31100 and listening on port 31103.  Result = 1
M: 2018-06-04 15:28:54.738 MMDVM_Bridge-20180423 is running
I: 2018-06-04 15:28:54.738 Started the DMR Id lookup reload thread
D: 2018-06-04 15:29:04.775 DMR, Sending authorisation
D: 2018-06-04 15:29:04.806 DMR, Sending configuration
M: 2018-06-04 15:29:04.842 DMR, Logged into the master successfully


Open another window on the bridge
Gain root privileges
sudo -s

At the # prompt:
cd /opt/Analog_Bridge

Run Analog_Bridge in the foreground
./Analog_Bridge Analog_Bridge.ini


root@repeater:/# cd /opt/Analog_Bridge/
root@repeater:/opt/Analog_Bridge# ./Analog_Bridge Analog_Bridge.ini
I: 2018-06-04 15:36:45.327 Analog Bridge Version 1.1 Wed May 30 09:44:39 EDT 2018
I: 2018-06-04 15:36:45.328 Copyright (C) 2018 DVSwitch, INAD.
I: 2018-06-04 15:36:45.328 Created by Mike N4IRR and Steve N4IRS
I: 2018-06-04 15:36:45.328 Analog Bridge comes with ABSOLUTELY NO WARRANTY
I: 2018-06-04 15:36:45.328
I: 2018-06-04 15:36:45.328 This software is for use on amateur radio networks only,
I: 2018-06-04 15:36:45.328 it is to be used for educational purposes only. Its use on
I: 2018-06-04 15:36:45.328 commercial networks is strictly prohibited.
I: 2018-06-04 15:36:45.329
I: 2018-06-04 15:36:45.329 Analog Bridge is starting
M: 2018-06-04 15:36:45.329 Setting [GENERAL] logLevel -> 2
M: 2018-06-04 15:36:45.329 Setting [GENERAL] subscriberFile -> ./subscriber_ids.csv
M: 2018-06-04 15:36:45.330 Setting [GENERAL] exportMetadata -> true
M: 2018-06-04 15:36:45.330 Setting [GENERAL] decoderFallBack -> true
M: 2018-06-04 15:36:45.330 Setting [GENERAL] useEmulator -> true
M: 2018-06-04 15:36:45.330 Setting [GENERAL] emulatorAddress -> 127.0.0.1:2470
M: 2018-06-04 15:36:45.330 Setting [AMBE_AUDIO] address -> 127.0.0.1
M: 2018-06-04 15:36:45.330 Setting [AMBE_AUDIO] txPort -> 31103
M: 2018-06-04 15:36:45.330 Setting [AMBE_AUDIO] rxPort -> 31100
M: 2018-06-04 15:36:45.331 Setting [AMBE_AUDIO] ambeMode -> DMR
M: 2018-06-04 15:36:45.331 Setting [AMBE_AUDIO] minTxTimeMS -> 2000
M: 2018-06-04 15:36:45.331 Setting [AMBE_AUDIO] gatewayDmrId -> 3112138
M: 2018-06-04 15:36:45.331 Setting [AMBE_AUDIO] repeaterID -> 311213805
M: 2018-06-04 15:36:45.331 Setting [AMBE_AUDIO] txTg -> 9
M: 2018-06-04 15:36:45.332 Setting [AMBE_AUDIO] txTs -> 2
M: 2018-06-04 15:36:45.332 Setting [AMBE_AUDIO] colorCode -> 1
M: 2018-06-04 15:36:45.332 Setting [USRP] address -> 127.0.0.1
M: 2018-06-04 15:36:45.332 Setting [USRP] txPort -> 32001
M: 2018-06-04 15:36:45.332 Setting [USRP] rxPort -> 34001
M: 2018-06-04 15:36:45.332 Setting [USRP] aslAudio -> AUDIO_UNITY
M: 2018-06-04 15:36:45.332 Setting [USRP] agcGain -> -20
M: 2018-06-04 15:36:45.333 Setting [USRP] dmrAudio -> AUDIO_UNITY
M: 2018-06-04 15:36:45.333 Setting [USRP] dmrGain -> 0.35
M: 2018-06-04 15:36:45.333 Setting [DV3000] address -> 127.0.0.1
M: 2018-06-04 15:36:45.333 Setting [DV3000] rxPort -> 2460
W: 2018-06-04 15:36:45.334 ioctl reset error
W: 2018-06-04 15:36:45.334 ioctl speed error
W: 2018-06-04 15:36:45.334 ioctl stereo error
W: 2018-06-04 15:36:45.334 ioctl setfmt error
M: 2018-06-04 15:36:45.335 Audio In/Out Device: /dev/null
I: 2018-06-04 15:36:45.335 Open UDP listener on 127.0.0.1:31100
I: 2018-06-04 15:36:45.335 Open USRP on 127.0.0.1:32001
M: 2018-06-04 15:36:45.335 Connecting to DV3000 hardware......
W: 2018-06-04 15:36:46.343 DV3000 not found at 127.0.0.1:2460
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
I: 2018-06-04 15:36:46.344 Subscriber IDs file not found.
I: 2018-06-04 15:36:46.344 Default extended metadata <3112138>
I: 2018-06-04 15:36:46.345 Connecting to emulator on host 127.0.0.1:2470
W: 2018-06-04 15:36:46.345 Using software MBE decoder version 1.2.3
W: 2018-06-04 15:36:46.345 Using software OP25 IMBE/AMBE vocoder
I: 2018-06-04 15:36:46.345 Starting Analog_Bridge --> USRP thread
I: 2018-06-04 15:36:46.346 Open UDP listener on 127.0.0.1:34001
I: 2018-06-04 15:36:46.346 Starting USRP --> HB_Bridge thread

I will use my DMR radio and HotSpot to transmit on Time Slot 2 Talk Group 311222 to generate traffic
Go over to the MMDVM_Bridge window 
M: 2018-06-04 15:51:24.087 MMDVM_Bridge-20180423 is running
I: 2018-06-04 15:51:24.087 Started the DMR Id lookup reload thread
D: 2018-06-04 15:51:34.153 DMR, Sending authorisation
D: 2018-06-04 15:51:34.210 DMR, Sending configuration
M: 2018-06-04 15:51:34.246 DMR, Logged into the master successfully
M: 2018-06-04 15:52:04.825 DMR Slot 2, received network voice header from N4IRS to TG 311222
M: 2018-06-04 15:52:05.380 DMR Slot 2, received network end of voice transmission, 0.5 seconds, 0% packet loss, BER: 0.0%

In the above output from MMDVM_Bridge, Traffic from N4IRS on Slot 2, Talk Group 311222 has been received. Notice the time stamp: 2018-06-04 15:52:04.825

Go over to the Analog_Bridge window
I: 2018-06-04 15:51:37.781 Starting USRP --> HB_Bridge thread
I: 2018-06-04 15:52:04.825 Begin TX: src=3112138 rpt=0 dst=311222 slot=2 cc=0

In the above output from Analog_Bridge, traffic is received from MMDVM_Bridge Notice the time stamp: 2018-06-04 15:52:04.825. BINGO! We have passed traffic from BrandMeister to Analog_Bridge through MMDVM_Bridge.

Look at the ASL window. You should see:
root@repeater:/opt/Analog_Bridge# cd /etc/asterisk
root@repeater:/etc/asterisk# asterisk -c

AllStarLink Asterisk Version 1.01 2/13/2018 GIT Version 004b9dd
Copyright (C) 1999 - 2018 Digium, Inc. Jim Dixon, AllStarLink Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
[ Booting...
[ Reading Master Configuration ]
[ Initializing Custom Configuration Options ]
[Jun  4 11:26:40] NOTICE[1852]: dnsmgr.c:394 do_reload: Managed DNS entries will be refreshed every 300 seconds.
[Jun  4 11:26:40] NOTICE[1852]: cdr.c:1416 do_reload: CDR simple logging enabled.
[Jun  4 11:26:40] NOTICE[1852]: loader.c:874 load_modules: 56 modules will be loaded.
........................................................ ]
Asterisk Ready.
*CLI> [Jun  4 11:26:40] NOTICE[1858]: app_rpt.c:22184 rpt_master: Normal Repeater Init  1999
[Jun  4 11:26:40] NOTICE[1858]: app_rpt.c:22184 rpt_master: Normal Repeater Init  2100

*CLI>rpt debug level 6
app_rpt Debugging enabled, previous level: 0, new level: 6

*CLI> [Jun  4 11:52:04] NOTICE[2051]: app_rpt.c:20965 rpt: **** rx key
[Jun  4 11:52:04] NOTICE[2051]: app_rpt.c:21076 rpt: **** rx un-key
[Jun  4 11:52:04] NOTICE[2051]: app_rpt.c:20965 rpt: **** rx key
[Jun  4 11:52:04] NOTICE[2051]: app_rpt.c:21076 rpt: **** rx un-key



Traffic is flowing from DMR to ASL! !  Did you get the above results? If you did not, stop. Check your work before continuing. If you did, let’s test in the other direction from ASL to DMR. You could use a radio on the ASL node for this but there is a simply way for your first test to do this without an analog radio.

While still logged in to asterisk at the CLI> prompt
Tell asterisk to send a 1 KHz test tone.
*CLI> rpt cmd 1999 cop 4 1999


AllStarLink Asterisk Version 1.01 2/13/2018 GIT Version 004b9dd
Copyright (C) 1999 - 2018 Digium, Inc. Jim Dixon, AllStarLink Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
[ Booting...
[ Reading Master Configuration ]
[ Initializing Custom Configuration Options ]
[Jun  4 11:26:40] NOTICE[1852]: dnsmgr.c:394 do_reload: Managed DNS entries will be refreshed every 300 seconds.
[Jun  4 11:26:40] NOTICE[1852]: cdr.c:1416 do_reload: CDR simple logging enabled.
[Jun  4 11:26:40] NOTICE[1852]: loader.c:874 load_modules: 56 modules will be loaded.
........................................................ ]
Asterisk Ready.
*CLI> [Jun  4 11:26:40] NOTICE[1858]: app_rpt.c:22184 rpt_master: Normal Repeater Init  1999
[Jun  4 11:26:40] NOTICE[1858]: app_rpt.c:22184 rpt_master: Normal Repeater Init  2100

*CLI>rpt debug level 6
app_rpt Debugging enabled, previous level: 0, new level: 6

*CLI> rpt cmd 1999 cop 4 1999
*CLI> [Jun  5 09:58:06] NOTICE[5225]: app_rpt.c:10740 rpt_telemetry: Tracepoint rpt_telemetry() entered mode=20
[Jun  5 09:58:06] NOTICE[5225]: app_rpt.c:11031 rpt_telemetry: Tracepoint rpt_telemetry() exit

 
Look at the Analog_Bridge windows, you should see something like this:
M: 2018-06-05 14:03:09.787 PTT on

Look at the MMDVM_Bridge windows, you should see something like this:
M: 2018-06-05 14:05:13.971 DMR, TX state = ON
I: 2018-06-05 14:05:13.971 DMR, Begin TX: src=3112138 rpt=311213805 dst=311222 slot=2 cc=1 metadata=3112138

If you still have your DMR radio and HotSpot connected, you should hear the tone coming out of your radio. You do? We have liftoff !

Let’s stop the annoying tone.

While still logged in to asterisk at the CLI> prompt
Tell asterisk to STOP sending the 1 KHz test tone.
*CLI> rpt cmd 1999 cop 4 1999

Yes, the cop 4 command is a toggle, once on and once off. Please remember to turn it off.

Congratulations, You have built your very own ASL <-> DMR bridge. We hope that was not too bad and you learned a few things along the way. Just a few little cleanup tasks to do and you are ready to run.

The debug level in asterisk will quickly fill your log file with mostly unneeded information. Let’s set it back to a sane value.

Make the asterisk messages less verbose
From the CLI> prompt
rpt debug level 0

You probably want your public node to connect to the the DMR node when asterisk starts. We will use the startup macro in rpt.conf to do this for you.

Change to the /etc/asterisk directory
cd /etc/asterisk

Edit rpt.conf
Set the startup macro to connect your public node to your private node by setting
startup_macro = *31999 in the [2100] node stanza.

Edit /etc/asterisk/rpt.conf
In the [2100] node stanza
Change:
startup_macro =
To:
startup_macro = *31999

The line should look like this:
startup_macro = *31999

Now it’s time to make sure everything will start at boot and do what you expect.

We will enable all the services we need just in case.
At the # prompt:
systemctl enable asterisk
systemctl enable analog_bridge
systemctl enable md380-emu
systemctl enable mmdvm_bridge
If the system was silent, that means those services were already enabled. No harm done.

OK, here we go:
At the # prompt:
reboot

Once the system is up:
Open a window on the bridge
Gain root privileges
sudo -s

At the # prompt:
systemctl status asterisk

root@repeater:/lib/systemd/system# systemctl status asterisk
● asterisk.service - Asterisk PBX and telephony daemon
   Loaded: loaded (/lib/systemd/system/asterisk.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-06-06 14:24:18 EDT; 5min ago
     Docs: man:asterisk(8)
 Main PID: 402 (asterisk)
    Tasks: 22 (limit: 4915)
   CGroup: /system.slice/asterisk.service
           └─402 /usr/sbin/asterisk -g -f -C /etc/asterisk/asterisk.conf

Jun 06 14:24:18 repeater systemd[1]: Started Asterisk PBX and telephony daemon.
root@repeater:/lib/systemd/system#

At the # prompt:
systemctl status analog_bridge

root@repeater:/lib/systemd/system# systemctl status analog_bridge
● analog_bridge.service - Analog_Bridge Service
   Loaded: loaded (/lib/systemd/system/analog_bridge.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-06-06 14:24:18 EDT; 7min ago
 Main PID: 426 (Analog_Bridge)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/analog_bridge.service
           └─426 /opt/Analog_Bridge/Analog_Bridge /opt/Analog_Bridge/Analog_Bridge.ini

Jun 06 14:24:18 repeater systemd[1]: Started Analog_Bridge Service.

At the # prompt:
systemctl status md380-emu

root@repeater:/lib/systemd/system# systemctl status md380-emu
● md380-emu.service - MD-380 Emulator Service
   Loaded: loaded (/lib/systemd/system/md380-emu.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-06-06 14:24:18 EDT; 9min ago
 Main PID: 427 (md380-emu)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/md380-emu.service
           └─427 /usr/bin/qemu-arm-static /opt/md380-emu/md380-emu -S 2470

Jun 06 14:24:18 repeater systemd[1]: Started MD-380 Emulator Service.
root@repeater:/lib/systemd/system#

At the # prompt:
systemctl status mmdvm_bridge

root@repeater:/lib/systemd/system# systemctl status mmdvm_bridge
● mmdvm_bridge.service - MMDVM_Bridge Service
   Loaded: loaded (/lib/systemd/system/mmdvm_bridge.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-06-06 14:26:12 EDT; 8min ago
 Main PID: 548 (MMDVM_Bridge)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/mmdvm_bridge.service
           └─548 /opt/MMDVM_Bridge/MMDVM_Bridge /opt/MMDVM_Bridge/MMDVM_Bridge.ini

Jun 06 14:26:12 repeater systemd[1]: Started MMDVM_Bridge Service.
root@repeater:/lib/systemd/system#

OK, you have been a very diligent person, time for a little fun
Connect to the running instance of asterisk
Asterisk -r

At the CLI> prompt
rpt cmd 1999 cop 21 1999

Hmmm, nothing happened? You expected fireworks?
Key your DMR radio and identify.

Did you hear yourself (parrot)? That’s right, ASL has a parrot function and it just proved your bridge is working in both directions. Your DMR audio was actually parroted by ASL. A full round trip. A pretty quick and easy way to verify everything is working as expected.

Before you start getting strange phone calls, we better turn off the parrot.

At the CLI> prompt
rpt cmd 1999 cop 22 1999

Get up, walk around, pat yourself on the back. It works! We will cover some basic info and then you can go play. School is not quite out yet.

Below is some basic information you will need to maintain your bridge:

File locations
Programs
In /opt/program_name
/opt/MMDVM_Bridge/MMDVM_Bridge
Configuration files
            With the program
            /opt/MMDVM_Bridge/MMDVM_Bridge.ini
Datafiles
            In /var/lib/mmdvm or /var/lib/dvswitch
            /var/lib/mmdvm/DMRIds.dat
Logs
            In /var/log/mmdvm, /var/log/dvswitch, /var/log/asterisk
            /var/log/mmdvm/MMDVM_Bridge-2018-05-22.log
For the log files you can watch what one of the programs in real time by “tailing” the log files. For example:
tail -f /var/log/dvswitch/Analog_Bridge.log will show you what is going on with Analog_Bridge. Key your DMR radio and ID. See the traffic?

Scripts
            In /usr/local/sbin
            /usr/local/sbin/DMRIDUpdate.sh
Daily cron tasks to update data files
            /etc/cron.daily/DMRIDUpdate (this is a symbolic link to the script
In /usr/local/sbin Note: If you want to add a link, the link name should not have a extension (.sh)

                        Status, stopping, starting, restarting programs:
                                    AllStarLink
                                                systemctl status asterisk
                                                systemctl stop asterisk
                                                systemctl start asterisk
                                                systemctl restart asterisk
                                               
                                    Analog_Bridge
                                                systemctl status analog_bridge
                                                systemctl stop analog_bridge
                                                systemctl start analog_bridge
                                                systemctl restart analog_bridge

                                    MMDVM_Bridge
                                                systemctl status mmdvm_bridge
                                                systemctl stop mmdvm_bridge
                                                systemctl start mmdvm_bridge
                                                systemctl restart mmdvm_bridge

                                    MD380-Emulator
                                                systemctl status md380-emu
                                                systemctl stop md380-emu
                                                systemctl start md380-emu
                                                systemctl restart md380-emu






 








There are some final adjustments you will probably want to make to your bridge. You can control the audio level from ASL to DMR. You can also control the audio level from DMR to ASL. Both these values are in Analog_Bridge.ini. Let’s take a look.

[USRP]
address = 127.0.0.1
txPort = 32001
rxPort = 34001
aslAudio = AUDIO_UNITY
agcGain = -20                     ; Gain (in db) of the AGC filter
dmrAudio = AUDIO_UNITY
dmrGain = 0.35                          ; Gain factor of audio from ASL (0.0-1.0)

AUDIO_UNITY Means pass the audio as is. No gain or reduction.
AUDIO_USE_AGC Normally not used. 
AUDIO_USE_GAIN The Gain value can be from 0.0 to 10.0 or anything in between. A value less then 1.0 reduces the audio level to a percentage. Example: .75 is 75 percent of full volume or unity. A value of 1.0 to 10.0 increases the by a power of the number. Example: 3.0 is three time the level.

These values a labels will be changing to something more specific to the usage. ( Due to me trying to document usage ) Grin Funny how you find things this way.


 Echolink:

 /etc/asterisk/echolink.conf
[el0]
call = AP2CJ-L                          ; Change this!
pwd = ******                           ; Change this!
name = Shehzad                        ; Change this!
qth = ASL-DMR-TEST                           ; Change this!
email = ap2cj@pakhams.com                         ; Change this!
node = 745256                           ; Change this!
; Data for EchoLink Status Page
lat = 0.0                               ; Latitude in decimal degrees
lon = -0.0                               ; Longitude in decimal degrees
freq = 0.0                              ; not mandatory Frequency in MHz
tone = 0.0                              ; not mandatory CTCSS Tone (0 for none)
power = 0                               ; 0=0W, 1=1W, 2=4W, 3=9W, 4=16W, 5=25W, 6=36W, 7=49W, 8=64W, 9=81W (Power in Watts)
height = 0                              ; 0=10 1=20 2=40 3=80 4=160 5=320 6=640 7=1280 8=2560 9=5120 (AMSL in Feet)
gain = 0                                ; Gain in db (0-9)
dir = 0                                 ; 0=omni 1=45deg 2=90deg 3=135deg 4=180deg 5=225deg 6=270deg 7=315deg 8=360deg (Direction)
maxstns = 20                            ; Max Stations

rtcptimeout = 10
recfile = /tmp/echolink_recorded.gsm    ;
astnode = 48092                          ; Change this!
context = radio-secure                  ; Default in code is echolink-in

; Max 3 servers
server1 = nasouth.echolink.org
server2 = naeast.echolink.org
server3 = server3.echolink.org

message=Welcome to the AP2ARS-L Echolink node on RPi3\nQTH:Rwp, PAKISTAN\nQRG:Link on Rx144.200MHz\nCTCSS:88.5 Hz\nTrx:uv-5R at 5 watts\nAntenna:2m Homebrewed.

; To deny w6xxx you would add the statement: deny = w6xxx
; To prohibit computer-based connections you would write: permit = *-*
; To allow access to only a select group of callsigns: permit = w6abc,w6def,...
; permit                                ; comma delimited list of callsign, type (-r)

; Remote text commands thru netcat:
; o.conip <IPaddress>    (request a connect)
; o.dconip <IPaddress>   (request a disconnect)
; o.rec                  (turn on/off recording)

; ipaddr
; port

 
 






 
 Resources

https://4x5mg.net/wp-content/uploads/ASL%20to%20DMR%20Bridge.pdf
https://www.qsl.net/kb9mwr/projects/dv/multi/Getting%20Started%20with%20Allstar%20-%20Digital%20Bridges.pdf
https://kv4s.com/2018/05/23/hosting-an-allstar-node-and-an-allstardmr-bridge-in-the-cloud/
https://dvswitch.groups.io/g/main/topics
https://docs.google.com/document/d/1eN50Csr29eAprB u7eKA0Bfa2XUcsXw5iktY1Ey-Qjkg/edit?usp=sharing
https://docs.google.com/document/d/1-Ot5pGaibmEGm mFh-l8HUq2LRyZoujiJYulr-VSga9s/edit?usp=sharing


Comments