Re: Analog Reflector will release today Monday March 1 (EST)


Steve N4IRS
 
Edited

Analog Reflector 1.1.14 is ready for install.

Below you will find a DRAFT, let me say that again DRAFT of a basic how-to. I'm looking for comments etc.
This is not intended to replace the documentation.
1: Read the whole post.
2: Does everything make sense?
3: Do you have a system to test on?
4: Please feedback comments.

How to add Analog_Reflector(AR) to an existing DVSwitch Server.

For the purposes of this how-to we are going to make the following assumptions:
1: You have an existing DVSwitch Server installation.
2: You access the Server with DVSwitch Mobile (DVSM) or the Python client(pyUC)
3: You use the server to access digital modes only. Everything is working well.

Things that you need to know:
1: The fully qualified host name of your server if you are going to use that to access the server (example: server.dvswitch.org)
2: The IP address of your server
3: The UDP port you use in DVSM or pyUC to access your server.

Lets get started. Make sure your server is up to date:
1: sudo -s
2: apt update
3: apt upgrade
If any of the above commands produce errors, warnings, failures or bad words, stop and ask
If the upgrade installed or updated any programs, reboot

Log back in to your server
sudo -s

Let's install Analog_Reflector
apt install analog-reflector

If all went well, you now have Analog_Reflector installed on your server. Let's do some quick configuration and testing.
1: cd /opt/Analog_Reflector
2: ls
You should see the following:
Analog_Reflector  Analog_Reflector.json  arRoot  ssl
3: cd ssl
2: ls
You should see the following:
mkcerts.sh
This is the script that will create a certificate for your server so you can run the HTML Client(hUC) with https://your.server
3: ./mkcerts
This should complete without errors.

Let's make sure we are ready to continue:
1: cd /opt/Analog_Reflector
2: ./Analog_Reflector -v
You should see this:
Analog_Reflector Version: 1.1.14
3: ./Analog_Reflector -f Analog_Reflector.json
You will see something like this:
I: 21-03-02 08:01:02 Analog_Reflector:
I: 21-03-02 08:01:02 ==
I: 21-03-02 08:01:02 Version: 1.1.14
I: 21-03-02 08:01:02
M: 21-03-02 08:01:02 Server running in Production mode
I: 21-03-02 08:01:02 SSL Certificate for these addresses: DNS:localhost, DNS:dvswitch-server, IP Address:192.168.190.52, IP Address:127.0.0.1, IP Address:162.256.186.81
I: 21-03-02 08:01:02 SSL Certificate expires: Mar  2 12:53:19 2022 GMT
I: 21-03-02 08:01:02 WebSocket server ready on port 443 ...
I: 21-03-02 08:01:02 USRP client is listening at port : 12346
I: 21-03-02 08:01:02 Server ip :0.0.0.0
I: 21-03-02 08:01:02 Server is IP4/IP6 : IPv4
I: 21-03-02 08:01:02 Using Analog_Bridge at : 127.0.0.1:12345
E: 21-03-02 08:01:02 AMI Error: connect ECONNREFUSED 127.0.0.1:5038
E: 21-03-02 08:01:02 Turning off tune rights for AllStar Node 1999
I: 21-03-02 08:01:02 MQTT broker connected at "mqtt://localhost:1883" with base topic "dvswitch/DVSwitch/Analog_Reflector"

I have edited the above to remove some information we don't really care about and to reduce the length of this document.
If you see any errors, warnings, failures or bad words, stop and ask (other then AMI Error: connect ECONNREFUSED 127.0.0.1:5038 This is because you are not running AllStar)
OK, we are ready to continue.
1: Control C

We will now configure DVSwitch Server (actually Analog_Bridge) to talk to Analog_Reflector.
1: dvs
2: Select 01 Initial Configuration
3: Select Yes to continue
4: Follow the questions, you will be presented with your existing values.
5: When asked for your USRP port WAIT
I told you above you needed to know the UDP port DVSM is using to access your server. Remember this value.
For the purpose of this how-to enter 12345
6: Select your local BM server (if needed)
7: keep the password
8: Select you AMBE Vocoder
9: Yes to continue
10: Select OK to return to menu
11: Select 05 Exit

That is a LOT of steps to edit the USRP port. This will change. I apologize.

Now we will edit the Analog_Reflector configuration file Analog_Reflector.json
1: cd /opt/Analog_Reflector
2: cp Analog_Reflector.json Analog_Reflector.json.save
3: nano Analog_Reflector.json
You will see this:

{
  "nodeName":"DVSwitch",
  "dmrID":"1234567",
  "abAddress": "127.0.0.1",
  "usrpTxPort": "12345",
  "usrpRxPort": "12345",
  "mobilePort": "12346",
  "wsPort": "443",
  "keyDir": "./ssl/",
  "siteroot": "./arRoot",
  "logFileName": "/var/log/dvswitch/Analog_Reflector.log",
  "logLevel": "2",
  "disallowUnknownClients": false,
  "brokerURL": "mqtt://localhost:1883",
  "rightsMask": "4",
  "autoMute": true,
  "clientModes": ["DMR", "STFU", "DSTAR|D-Star", "NXDN", "P25", "YSF", "ASL|AllStar", "Intercom"],
  "bridges": {
    "asl": [
      {"node" : "1999", "address" : "127.0.0.1", "rxPort" : "34001", "txPort" : "32001", "rights" : 3, "amiUserName" : "admin", "amiSecret" : "llcgi"}
    ],
    "ab" : [
      {"name" : "DMR",    "address" : "127.0.0.1", "rxPort" : "51100", "txPort" : "51103", "rights" : 1},
      {"name" : "D-Star", "address" : "127.0.0.1", "rxPort" : "52100", "txPort" : "52103", "rights" : 1},
      {"name" : "NXDN",   "address" : "127.0.0.1", "rxPort" : "53100", "txPort" : "53103", "rights" : 1},
      {"name" : "P25",    "address" : "127.0.0.1", "rxPort" : "54100", "txPort" : "54103", "rights" : 1},
      {"name" : "YSF",    "address" : "127.0.0.1", "rxPort" : "55100", "txPort" : "55103", "rights" : 1}
    ]
  }
}

You want to be careful editing this file. Spaces and punctuation matter.
1: Change the dmrID to your DMR ID
2: Change mobilePort to the number you first saw in DVS. Or leave it at 12346 and change the setting in DVSM.
3: Save your work Control X, y, Enter

Let's check your work
1: ./Analog_Reflector -f Analog_Reflector.json
Any errors? No, continue? Yes, stop and restore the backup cp Analog_Reflector.json.save Analog_Reflector.json
2: Control C

We will now add your account to Analog_Reflector.
1: ./Analog_Reflector user Your_CALLSIGN Your_DMRID Your_DMRID+SSID Your_password 3
Example:
./Analog_Reflector user KC4DEA 3157999 315799901 DoNotTell 3
If all is well you will see: User successfully created.

Let's try to login to ANalog_Reflector with hUC:
1: ./Analog_Reflector -f Analog_Reflector.json

On another computer with a Web Browser:
1: https://address.of.your.server
You should see the hUC screen and be prompted for your callsign and password.
Yes? You are up and running.
2: Control C

We will now start Analog_Reflector in the background (as a service)
1: systemctl start analog_reflector
Any error messages? No, continue
2: systemctl status analog_reflector
You will see:

● analog_reflector.service - Analog Reflector Service
   Loaded: loaded (/lib/systemd/system/analog_reflector.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-03-02 08:50:36 EST; 2s ago
  Process: 20030 ExecStartPre=/bin/sh -c echo "Starting Analog Reflector: [`date +%T.%3N`]" >> /var/log/netcheck (code=exited, status=0/SUCCESS)
 Main PID: 20034 (Analog_Reflecto)
    Tasks: 10 (limit: 2062)
   CGroup: /system.slice/analog_reflector.service
           └─20034 /opt/Analog_Reflector/Analog_Reflector

Mar 02 08:50:36 dvswitch-server systemd[1]: Starting Analog Reflector Service...
Mar 02 08:50:36 dvswitch-server systemd[1]: Started Analog Reflector Service.

The most important line is:
Active: active (running) since Tue 2021-03-02 08:50:36 EST; 2s ago

OK, you are setup and ready to start using hUC with your DVSwitch Server.
Reboot the server and start playing.


Have fun.

For DVSwitch 
Steve N4IRS

Join Analog-Reflector@DVSwitch.groups.io to automatically receive all group messages.