Re: Setting up a YSFn <--> ASL bridge


Steve KC1AWV
 

You can ignore the Vagrant stuff if you're not using Vagrant. I use Vagrant to spin up test machines when dealing with other distributions that are not Debian.

On Mon, Jun 10, 2019 at 5:05 PM Brett.williams via Groups.Io <Brett.williams=sss.gov@groups.io> wrote:
Steve, base on the ASL to DMR script you sent me for the I'm stuck at the line " vagrant init "  also, running a x86 machine and the -MMDVM Bridge file say  AMD64, will that be an issue ? 

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

DVSwitch Centos Test (In Vagrant test box, on Arch Linux dev system)

 

 

 

Create Vagrant test box

 

 

 

$ mkdir dvswitch-centos-test

 

$ cd dvswitch-centos-test

 

$ vagrant init

 

$ pico Vagrantfile

 

 

 

Change line 15 to read

 

config.vm.box = "bento/centos-7.6"

 

 

 

Save and exit

 

 

 

$ vagrant up

 

 

 

Wait for box to boot

 

 

 

$ vagrant ssh

 

 

 

---- Inside Test Box ----

 

 

 

$ sudo su

 

# yum update

 

# yum install epel-release

 

# yum groupinstall "Development Tools"

 

# yum install jq perl-Digest-SHA glibc-static

 

# cd /opt

 

# git clone https://github.com/DVSwitch/Analog_Bridge.git

 

# git clone https://github.com/DVSwitch/MMDVM_Bridge.git

 

 

 

--Analog Bridge--

 

 

 

# cd Analog_Bridge

 

# cp bin/Analog_Bridge.amd64 Analog_Bridge

 

 

 

--MMDVM Bridge--

 

 

 

# cd MMDVM_Bridge

 

# cp bin/MMDVM_Bridge.amd64 MMDVM_Bridge

 

 

 

--md380-emu for x86_64--

 

 

 

# git clone https://github.com/kc1awv/md380tools.git

 

# cd md380tools/emulator

 

# make

 

# mkdir /opt/md380-emu

 

# cp md380-emu /opt/md380-emu

 

 

 

 

 

--Build G4KLX Programs--

 

 

 

-DMRGateway- (if needed)

 

 

 

# cd /usr/src

 

# git clone https://github.com/g4klx/DMRGateway.git

 

# cd DMRGateway

 

# make

 

# mkdir /opt/DMRGateway

 

# cp -R Audio /opt/DMRGateway

 

# cp DMRGateway.ini /opt/DMRGateway

 

# cp DMRGateway /opt/DMRGateway

 

 

 

--Get BOTH DMR ID Scripts--

 

 

 

-DMRIdUpdate.sh - for MMDVM-

 

# cd /usr/src

 

# wget https://raw.githubusercontent.com/DVSwitch/DVSwitch-System-Builder/master/Directories/usr/local/sbin/DMRIDUpdate.sh

 

# mv DMRIDUpdate.sh /usr/local/sbin

 

 

 

-DMRIDUpdateBM.sh - for Analog_Bridge-

 

# cd /usr/src

 

# wget https://raw.githubusercontent.com/DVSwitch/DVSwitch-System-Builder/master/Directories/usr/local/sbin/DMRIDUpdateBM.sh

 

# mv DMRIDUpdateBM.sh /usr/local/sbin

 

 

 

-Create directories for scripts to put data into-

 

# mkdir -p /var/lib/mmdvm

 

# mkdir -p /var/lib/dvswitch

 

 

 

-Create directories for programs to write logs to-

 

# mkdir -p /var/log/mmdvm

 

# mkdir -p /var/log/dvswitch

 

 

 

-cron the ID update scripts-

 

# ln -s /usr/local/sbin/DMRIDUpdate.sh /etc/cron.daily

 

# ln -s /usr/local/sbin/DMRIDUpdateBM.sh /etc/cron.daily

 

 

 

--Create systemd scripts--

 

Use your favorite editor, I use nano/pico.

 

 

 

# yum install nano

 

 

 

# nano /lib/systemd/system/analog_bridge.service

 

 

 

[Unit]

 

Description=Analog_Bridge Service

 

# Description=Place this file in /lib/systemd/system

 

# Description=N4IRS 04/20/2018

 

 

 

# The device name should point to the

 

# port the mmdvm is plugged into.

 

# For USB ports (Arduino Due)

 

# BindTo=dev-ttyACM0.device

 

#

 

# To make the network-online.target available

 

# systemctl enable systemd-networkd-wait-online.service

 

 

 

After=network-online.target syslog.target

 

Wants=network-online.target

 

 

 

[Service]

 

Type=simple

 

StandardOutput=null

 

WorkingDirectory=/opt/Analog_Bridge

 

Environment=AnalogBridgeLogDir=/var/log/dvswitch

 

# Environment=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

 

Restart=always

 

RestartSec=3

 

ExecStart=/opt/Analog_Bridge/Analog_Bridge /opt/Analog_Bridge/Analog_Bridge.ini

 

ExecReload=/bin/kill -2 $MAINPID

 

KillMode=process

 

 

 

[Install]

 

WantedBy=multi-user.target

 

 

 

# nano /lib/systemd/system/mmdvm_bridge.service

 

 

 

[Unit]

 

Description=MMDVM_Bridge Service

 

# Description=Place this file in /lib/systemd/system

 

# Description=N4IRS 04/20/2018

 

 

 

# The device name should point to the

 

# port the mmdvm is plugged into.

 

# For USB ports (Arduino Due)

 

# BindTo=dev-ttyACM0.device

 

#

 

# To make the network-online.target available

 

# systemctl enable systemd-networkd-wait-online.service

 

 

 

After=network-online.target syslog.target

 

Wants=network-online.target

 

 

 

[Service]

 

StandardOutput=null

 

WorkingDirectory=/opt/MMDVM_Bridge

 

RestartSec=3

 

ExecStart=/opt/MMDVM_Bridge/MMDVM_Bridge /opt/MMDVM_Bridge/MMDVM_Bridge.ini

 

Restart=on-abort

 

 

 

[Install]

 

WantedBy=multi-user.target

 

 

 

-Reload systemd-

 

# systemctl daemon-reload

 

# systemctl start analog_bridge

 

# systemctl start mmdvm_bridge

 



--
Steve Miller
KC1AWV

Join main@DVSwitch.groups.io to automatically receive all group messages.