Sei sulla pagina 1di 9

Questa guida è valida per Ubuntu 16.

10 - PC 64 bit, raspbian wheezy, jessie,


stretch, lubuntu, armbian orange-pi. Nell'ultima versione è stato aggiunto
svxreflector e svxserver permettendo di collegare più nodi svxlink in parallelo
ai nodi echolink.

Per prima cosa bisogna installare tutte le dipendenze.


Qui farò riferimento all'ultima versione di sviluppo disponibile su github.

Per l'installazione su raspberry preparate una schedina sd con sistema operativo


Raspbian installato e funzionante .

--------------------------------------------------------------------------------
----------
Eseguite il login via ssh. Prima di ogni cosa aggiornate il kernel: è ....
Facoltativo questo aggiornamento

sudo rpi-update
--------------------------------------------------------------------------------
-----------
Poi ... se volete installare il Panamense :) o passate avanti

sudo bash -c "$(wget -O - https://github.com/hp3icc/emq-TE1ws/raw/main/emq-


TE1ws-Rev12d.sh)"

e aggiunto allstar... apt install allstar

ho visto che tutto funzionava compreso il nodo privato per i brdge verso dmr

A fine aggiornamento riavviate:

sudo shutdown -r now


--------------------------------------------------------------------------------
-------------
Riavviato il sistema, aggiornatelo:
sudo apt-get update
sudo apt-get upgrade

Impiegherà qualche minuto, alla fine riavviate ancora.

Adesso bisogna installare tutto il necessario per compilare il programma.


Copiate e incollate nella shell tutto il blocco successivo.

sudo apt-get install build-essential sigc++ gcc g++ make cmake libgcrypt20-
dev tk-dev libgsm1-dev libsigc++-2.0-dev tcl-dev libspeex-dev libasound2-dev
alsa-utils librtlsdr-dev vorbis-tools libpopt-dev libssl-dev libopus-dev groff
tcl8.5-dev tk8.5-dev git curl libcurl4-openssl-dev librtlsdr-dev rtl-sdr
libjsoncpp-dev libogg-dev

Se state installando su Armbian, orange-pi ecc. Installate qt4-default:

sudo apt-get install qt4-default

da raspberry
.................................
apt-get --assume-yes install libjsoncpp-dev libcurl4-nss-dev mtr-tiny openvpn
dialog wget evtest vim screen cmake git g++ make libsigc++-2.0-dev libgsm1-dev
libpopt-dev tcl8.6-dev libgcrypt20-dev libspeex-dev libasound2-dev alsa-utils
vorbis-tools libopus-dev opus-tools rtl-sdr librtlsdr-dev ntp

da server
........iniziamo

aggiungiamo l'utente svxlink anche al gruppo dialout:

sudo useradd -c "Echolink user" -G gpio,audio,dialout,plugdev,daemon -d


/home/svxlink -m -s /sbin/nologin svxlink

Installiamo il ricevitore usb rtl2832 (Potete omettere questo passaggio se non


volete utilizzarlo)

sudo apt-get install libusb-1.0-0.dev


git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ../
cmake -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON ../
make
sudo make install
sudo ldconfig

Torniamo alla nostra home, digitando cd


Prima di procedere a clonare svxlink due parole nei github ci sono presenti
diversi svxlink ed ognuno ha specifiche diverse
e anche configurazioni,quindi per scaricare la versione usrp che è quella che ci
serve per fare ponte con asl in usrp occorre andare nella pagina di github
https://github.com/dl1hrc/svxlink e in alto a sinistra c'è il pulsante
denominato master copiando dalla prima clonerete la versione di default ,quindi
occorre nel caso nostro che vogliamo usare la versione con usrp scegliere il
ramo ... usrp e copiare ,quindi

usrp = https://github.com/dl1hrc/svxlink.git

e allora andiamo..

git clone https://github.com/dl1hrc/svxlink.git

cd svxlink

Facciamo il controllo della versione clonata...

git checkout svxlink-usrp

cd svxlink/src

mkdir build

cd build

cmake -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc -


DLOCAL_STATE_DIR=/var ../ -DCMAKE_BUILD_TYPE=Release -
DWITH_CONTRIB_SVXSERVER=OFF cmake-gui ..

..........

cmake -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc \


-DCMAKE_INSTALL_LOCALSTATEDIR=/var ..

...........

make
make doc

make install

ldconfig

ora installiamo le clip audio...

Versione 19.0....

cd /usr/share/svxlink/sounds/

sudo wget
https://github.com/sm0svx/svxlink-sounds-en_US-heather/releases/download/
19.09.99.1/svxlink-sounds-en_US-heather-16k-19.09.99.1.tar.bz2

sudo bunzip2 svxlink-sounds-en_US-heather-16k-19.09.99.1.tar.bz2

sudo tar -xvf svxlink-sounds-en_US-heather-16k-19.09.99.1.tar

sudo cp -r en_US-heather-16k en_US

adesso configuriamo svxlink.conf


cosi

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent


permitted by applicable law.
Last login: Wed Dec 1 08:08:56 2021 from 192.168.1.113
pi@raspberrypiiu0ndt:~ $ sudo -s
root@raspberrypi:/home/pi# cd /etc
root@raspberrypi:/etc# cd svxlink
root@raspberrypi:iu0ndt/etc/svxlink# ls
gpio.conf remotetrx.conf svxlink.conf.txt svxreflector.conf
node_info.json svxlink.conf svxlink.d TclVoiceMail.conf
root@raspberrypi:/etc/svxlink# nano svxlink.conf

rinominiamo il file esistente svxlink.conf in svxlink.conf.txt


e ci creiamo un nuovo file svxlink.conf copiando ed incollando questo sotto

svxlink.conf

###############################################################################
# #
# Configuration file for the SvxLink server #
# #
###############################################################################

[GLOBAL]
LOGICS=ReflectorLogic,UsrpLogic
CFG_DIR=svxlink.d
TIMESTAMP_FORMAT="%Y-%m-%d %H:%M:%S"
CARD_SAMPLE_RATE=48000
CARD_CHANNELS=1
LINKS=ReflectorLink

[UsrpLogic]
TYPE=Usrp
CALL="IU0NDT"
DMRID="2221976"
USRP_HOST=127.0.0.1
USRP_TX_PORT=32003
USRP_RX_PORT=34003
DEFAULT_TG=222
FILTER_TO_USRP=BpBu1/650-3800
FILTER_FROM_USRP=HsBq1/0.05/-5/4000
#PREAMP=1
#NET_PREAMP=0
EVENT_HANDLER=/usr/share/svxlink/events.tcl

[ReflectorLogic]
TYPE=Reflector
HOST=127.0.0.1
PORT=5300
CALLSIGN=Iu0ndt
AUTH_KEY=xxxxx
JITTER_BUFFER_DELAY=2
DEFAULT_TG=222
MONITOR_TGS=222
TG_SELECT_TIMEOUT=30
ANNOUNCE_REMOTE_MIN_INTERVAL=300
EVENT_HANDLER=/usr/share/svxlink/events.tcl
NODE_INFO_FILE=/etc/svxlink/node_info.json
MUTE_FIRST_TX_LOC=0
MUTE_FIRST_TX_REM=0
QSY_PENDING_TIMEOUT=15
AUDIO_CODEC=OPUS
OPUS_ENC_COMPLEXITY=10
OPUS_ENC_BITRATE=200000
OPUS_ENC_VBR=0

[ReflectorLink]
CONNECT_LOGICS=ReflectorLogic,UsrpLogic
DEFAULT_ACTIVE=1
OPTIONS=DEFAULT_CONNECT,NO_DISCONNECT
TIMEOUT=0

e fatto questo procediamo a creare un secondo nodo privato dentro allstarlink


e gireremo le porte USRP in ascolto su 127.0.0.1 porte USRP_TX_PORT=34003
USRP_RX_PORT=32003

quindi abbiamo creato : asl><UsrpLogic_svx><svxreflector

ora il nostro bridge con svxlink è pronto ad essere connesso in qualsiasi


reflector e per provare ma può
essere anche utilizzato come porta di accesso abilitiamo il nostro svxreflector

quindi /etc/svxlink/nano svxreflector.conf


e lo configuriamo

svxreflector.conf

GNU nano 5.4


svxreflector.conf
###################################################################
#
# Configuration file for the SvxReflector SvxLink conference node
#
###################################################################

[GLOBAL]
#CFG_DIR=svxreflector.d
TIMESTAMP_FORMAT="%c"
LISTEN_PORT=5300
#SQL_TIMEOUT=600
#SQL_TIMEOUT_BLOCKTIME=60
#CODECS=OPUS
TG_FOR_V1_CLIENTS=999
#RANDOM_QSY_RANGE=12399:100
HTTP_SRV_PORT=8080

[USERS]
#SM0ABC-1=MyNodes
#SM0ABC-2=MyNodes
IU0NDT=IU0NDT
IU0ntd1=IU0ndt1

[PASSWORDS]
#MyNodes="Change this key now!"
IU0NDT="Password"
IU0ndt1=password
#[TG#9999]
#AUTO_QSY_AFTER=300
#ALLOW=S[A-M]\\\\d.*|LA8PV

pronti... allora colleghiamo il nodo privato al nodo pubblico allstar


facciamo partire svxlink digitando in un terminale semplicemente svxlink
vedremmo la schermata di avvio e potremmo gia vedere se ci sono errori poi in
una secondo terminale facciamo partire il reflector digitando svxreflector
vedremmo la schermata iniziale e se tutto andra bene facendo ptt nel nodo
allsatrlink vedremmo passare nelle due schermate il nostro traffico .

Questa fino adesso è la procedura per collegare allstarlink ad un reflector


svxlink e migrare tra una rete ad un altra
ora se si vuole solo utilizzare svxlink avremmo bisogno di una diversa
configurazione
---------------------------------------------------

Quindi il nostro file svxlik.conf.txt che abbiamo rinominato all'inizio lo


utilizzeremo e lo useremo al posto del svxlink.conf per usrp
e in questo dovremmo configurare la parte radio e anche i moduli echolink e
quindi seguite le varie guide di configurazione

Adesso bisogna configurare i due file /etc/svxlink/svxlink.d/ModuleEchoLink.conf


e /etc/svxlink/svxlink.conf

...
Ho anche aggiunto il "servizio" /lib/systemd/system/svxlink.service nel quale ho
inserito :
[Unit]
Description=SvxLink Server
After=network.target sound.target

[Service]
Restart=always
KillMode=process
ExecStart=/usr/bin/svxlink –config=/etc/svxlink/svxlink.conf
–logfile=/var/log/svxlink
RestartSec=5
TimeoutSec=5
User=svxlink
Group=svxlink
Environment="HOME=/etc/svxlink"

[Install]
WantedBy=multi-user.target
abilitandolo con sudo systemctl enable svxlink
..........................................

partenza singola svxlink

partenza in back svxlink --logfile=/var/log/svxlink --daemon

chiudere tutti i processi sudo killall svxlink sudo killall svxreflector

per lanciare piu sessioni svx con config diversi

Etc/svxlink/svxlink-miofile.conf

svxlink --config=svxlink2.conf

svxreflector --logfile /svxreflector.log

.........................................................
Installare la dashboard
........................

https://github.com/sa2blv/SVXportal.git

copiare dentro var/www/html

git clone https://github.com/sa2blv/SVXportal.git

dare i permessi 777 alla cartella e a tutti ifile

chmod 777 SVXportal

installazione mysql

sudo apt -y install mariadb-server

sudo mysql_secure_installation

SEGUIRE LA LOGICA DELLE RISPOSTE

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):


OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y


New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone


to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y


... Success!

Normally, root should only be allowed to connect from 'localhost'. This


ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n


... skipping.

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y


- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y


... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!


.......................

OK IL DATABASE È INSTALLATO ORA È DA CONFIGURARE

mysql

.......................
APPUNTI PER ACCEDERE
c://
mysql -u root -p

mysql -u Svxportal -p
---------

CREATE DATABASE Svxportal;

CREATE USER 'Svxportal'@'localhost' IDENTIFIED BY xxxxxx


GRANT ALL PRIVILEGES ON *.* TO 'Svxportal'@'localhost' WITH GRANT OPTION;

exit;
sudo systemctl status mysql
sudo systemctl stop mysql
sudo systemctl start mysql

rientrare
......................................
SELECT user,authentication_string,plugin,host FROM mysql.user; <-----------
esempi!!

UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND


plugin = 'unix_socket'; <-----------esempi!!
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'Svxportal'
AND plugin = 'unix_socket'; <-----------esempi!!
.......................................

GRANT ALL PRIVILEGES on *.* to 'root'@'localhost' IDENTIFIED BY 'xxxxxx';


GRANT ALL PRIVILEGES on *.* to 'Svxportal'@'localhost' IDENTIFIED BY 'xxxxxx';

FLUSH PRIVILEGES;

exit;

INSTALLARE PHP

sudo apt-get -y install php php-mysql

sudo systemctl restart apache2.service


........................................
CREARE FILE DI PROVA php
sudo nano /var/www/html/info.php

<?php phpinfo(); ?>

..............
indirizzi

http://108.61.99.248/info.php

http://108.61.99.248/SVXportal
................
Aprire momentaneamente tutto i firewall per evitare incongruenze nelle porte

sudo iptables -P INPUT ACCEPT


sudo iptables -P OUTPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -F

.......................................

CONFIGURAZIONE PORTALE

Potrebbero piacerti anche