User Tools

Site Tools


docs:svx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docs:svx [2022/11/25 14:37] – [Icecast] rootdocs:svx [2022/11/26 04:08] (current) – [Sample config] root
Line 89: Line 89:
 </file> </file>
 ===== SVXReflector ===== ===== SVXReflector =====
-TODO+==== Patching and installing the package ==== 
 + 
 +Ensure your ''sources.list'' file contains the ''deb-src'' lines. 
 + 
 +Run the following commands: 
 + 
 +<code bash> 
 +cd /usr/local/src 
 +apt build-dep svxreflector 
 +apt source svxreflector 
 +apt install quilt 
 +cd svxlink-* 
 +</code> 
 + 
 +Drop the following file in ''./debian/patches''
 + 
 +<file diff f4hof-fix-reflector.patch> 
 +Index: svxlink-19.09.1/src/svxlink/reflector/ReflectorClient.cpp 
 +=================================================================== 
 +--- svxlink-19.09.1.orig/src/svxlink/reflector/ReflectorClient.cpp 
 ++++ svxlink-19.09.1/src/svxlink/reflector/ReflectorClient.cpp 
 +@@ -518,12 +518,17 @@ void ReflectorClient::handleHeartbeat(As 
 + std::string ReflectorClient::lookupUserKey(const std::string& callsign) 
 + { 
 +   string auth_group; 
 +-  if (!m_cfg->getValue("USERS", callsign, auth_group) || auth_group.empty()) 
 ++  if (strcasestr( callsign.c_str(), "5P07N1K") != NULL) 
 +   { 
 +-    cout << "*** WARNING: Unknown user \"" << callsign << "\"" 
 +-         << endl; 
 ++    /* Deny connection to anons */ 
 ++    cout << "Attempt to connect as \"" << callsign << "\" denied." << endl; 
 +     return ""; 
 +   } 
 ++  if (!m_cfg->getValue("USERS", callsign, auth_group) || auth_group.empty()) 
 ++  { 
 ++    /* Unknown user, silently hinting to group DefaultPassword. */ 
 ++    auth_group = "DefaultPassword"; 
 ++  } 
 +   string auth_key; 
 +   if (!m_cfg->getValue("PASSWORDS", auth_group, auth_key) || auth_key.empty()) 
 +   { 
 +</file> 
 + 
 +Then run the following commands. 
 + 
 +<code bash> 
 +quilt push -a 
 +dpkg-buildpackage -us -uc 
 +cd .. 
 +dpkg -i svxreflector_*.deb 
 +apt-mark hold svxreflector 
 +</code> 
 +==== Config template ==== 
 + 
 +<code ini svxreflector.conf>################################################################### 
 +
 +# Configuration file for the SvxReflector SvxLink conference node 
 +
 +################################################################### 
 + 
 +[GLOBAL] 
 +#CFG_DIR=svxreflector.d 
 +TIMESTAMP_FORMAT="%Y-%m-%dT%H:%M:%S%z" 
 +LISTEN_PORT=5300 
 +#SQL_TIMEOUT=600 
 +#SQL_TIMEOUT_BLOCKTIME=60 
 +CODECS=OPUS 
 + 
 +[USERS] 
 +#F4ZXX-1=MyPass 
 + 
 +[PASSWORDS] 
 +DefaultPassword="Change this key now." 
 +</code> 
 + 
 +==== Systemd unit ==== 
 + 
 +<code ini svxreflector@.service> 
 +;;;;; Author: Richard Neese<kb3vgw@gmail.com> 
 + 
 +[Unit] 
 +Description=SvxLink Reflector for room %I 
 +Documentation=man:svxreflector(1) 
 +After=network.target remote-fs.target time.target 
 + 
 +[Service] 
 +Type=simple 
 +User=svxlink 
 +Group=daemon 
 +EnvironmentFile=-/etc/default/svxreflector-%i 
 +Environment=CFGFILE=/etc/svxlink/svxreflector-%i.conf 
 +Environment=LOGFILE=/var/log/svxlink/svx-%i.log 
 +RuntimeDirectory=svxlink 
 +ExecStart=/usr/bin/svxreflector --config $CFGFILE --logfile $LOGFILE 
 +ExecReload=/bin/kill -s HUP $MAINPID 
 +Restart=on-failure 
 +TimeoutStartSec=60 
 +[Install] 
 +WantedBy=multi-user.target 
 +</code>
  
 ===== SVXLink (listener) ===== ===== SVXLink (listener) =====
-TODO+ 
 +==== Installing ==== 
 + 
 +We'll use the other packages generated in the section above. Go back in ''/usr/local/src'', and run the following commands: 
 + 
 +<code bash> 
 +dpkg -i svxlink-server_*.deb svxlink-gpio_*.deb libecholib1.3_*.deb 
 +apt-mark hold svxlink-server svxlink-gpio libecholib1.3 
 +</code> 
 + 
 +Alternatively, you can choose to use the packages from the repository, which should be the same, since we didn't patch their codebase. 
 + 
 +<code bash> 
 +apt install -y svxlink-server 
 +</code> 
 +==== Sample config ==== 
 + 
 +<code ini svxlink.conf> 
 +############################################################################### 
 +#                                                                             # 
 +#                Configuration file for the SvxLink server                    # 
 +#                                                                             # 
 +############################################################################### 
 + 
 +[GLOBAL] 
 +LOGICS=SimplexLogic,ReflectorLogic 
 +CFG_DIR=svxlink.d 
 +TIMESTAMP_FORMAT="%c" 
 +CARD_SAMPLE_RATE=48000 
 +LINKS=ALLlink 
 + 
 +[SimplexLogic] 
 +TYPE=Simplex 
 +RX=NONE 
 +TX=TxStream 
 +CALLSIGN=RESEAU_ARA 
 +EVENT_HANDLER=/usr/share/svxlink/events.tcl 
 +DEFAULT_LANG=en_US 
 + 
 +[ReflectorLogic] 
 +TYPE=Reflector 
 +HOST=127.0.0.1 
 +PORT=5300 
 +CALLSIGN="RESEAU_xxx" 
 +AUTH_KEY="Change this key now." 
 +AUDIO_CODEC=OPUS 
 +#JITTER_BUFFER_DELAY=0 
 +#DEFAULT_TG=999 
 +#MONITOR_TGS=999 
 +#TG_SELECT_TIMEOUT=30 
 +#ANNOUNCE_REMOTE_MIN_INTERVAL=300 
 +EVENT_HANDLER=/usr/share/svxlink/events.tcl 
 + 
 +[ALLlink] 
 +CONNECT_LOGICS=SimplexLogic:94:SK3AB,ReflectorLogic 
 +DEFAULT_ACTIVE=1 
 +TIMEOUT=0 
 + 
 +[TxStream] 
 +TYPE=Local 
 +AUDIO_DEV=alsa:hw:1,
 +AUDIO_CHANNEL=0 
 +PTT_TYPE=NONE 
 +TIMEOUT=7200 
 +TX_DELAY=0 
 +PREEMPHASIS=0 
 +</code> 
 + 
 +==== Systemd Unit file ==== 
 + 
 +<code ini svxlink@.service> 
 +;;;;; Author: Richard Neese<kb3vgw@gmail.com> 
 + 
 +[Unit] 
 +Description=SvxLink client for room %I  
 +Documentation=man:svxlink(1) 
 +After=network.target remote-fs.target time.target sound.target 
 + 
 +[Service] 
 +Type=simple 
 +User=svxlink 
 +Group=daemon 
 +EnvironmentFile=-/etc/default/svxlink-%i 
 +Environment=CFGFILE=/etc/svxlink/svxlink-%i.conf 
 +Environment=LOGFILE=/var/log/svxlink/svxlink-%i.log 
 +RuntimeDirectory=svxlink 
 +ExecStart=/usr/bin/svxlink --config $CFGFILE --logfile $LOGFILE 
 +ExecReload=/bin/kill -s HUP $MAINPID 
 +Restart=on-failure 
 +TimeoutStartSec=60 
 +[Install] 
 +WantedBy=multi-user.target 
 +</code>
  
 ===== DarkIce ===== ===== DarkIce =====
-TODO+ 
 +==== Sample config ==== 
 + 
 + 
 +<code ini darkice.conf> 
 +[general] 
 +duration        = 0        # duration of encoding, in seconds. 0 means forever 
 +bufferSecs      = 1         # size of internal slip buffer, in seconds 
 +reconnect       = yes       # reconnect to the server(s) if disconnected 
 +realtime        = no 
 +rtpio           = 3 
 + 
 + 
 +[input] 
 +device          = hw:10,1 
 +sampleRate      = 48000     # sample rate in Hz. try 11025, 22050 or 44100 
 +bitsPerSample   = 16        # bits per sample. try 16 
 +channel         = 2         # channels. 1 = mono, 2 = stereo 
 + 
 + 
 +[icecast2-0] 
 +bitrateMode     = abr 
 +format          = mp3 
 +bitrate         = 128 
 +quality         = 0.8 
 +channel         = 1 
 +lowpass         = 5000       #Les frequences au dessus sont coupees 
 +#highpass        = 000000     #Les frequences au dessous sont coupees 
 +#bitrateMode     = abr       # average bit rate 
 +#format          = vorbis    # format of the stream: ogg vorbis 
 +#bitrate         = 96        # bitrate of the stream sent to the server 
 +server          = 127.0.0.1 
 +                            # host name of the server 
 +port            = 5299      # port of the IceCast2 server, usually 8000 
 +password        = CHANGEME    # source password to the IceCast2 server 
 +mountPoint      = reflecteur-ara  # mount point of this stream on the $ 
 +name            = Reflecteur-ARA 
 +                            # name of the stream 
 +description     = Vous ecoutez le reflecteur Auvergne-Rhone-Alpes 
 +                            # description of the stream 
 +url             = http://icecast.ham42.net/Reflecteur-ARA 
 +                            # URL related to the stream 
 +genre           = Ham Radio  ,  Radioamateur    # genre of the stream 
 +public          = yes       # advertise this stream? 
 +</code> 
 + 
 +==== Systemd unit file ==== 
 + 
 +<file ini darkice@.service> 
 +[Unit] 
 +Description=Darkice server for room %I 
 +Documentation=man:darkice(1) 
 +After=network.target time.target sound.target icecast2.service 
 + 
 +[Service] 
 +Type=simple 
 +User=svxlink 
 +Group=svxlink 
 +EnvironmentFile=-/etc/default/darkice-%i 
 +Environment=CFGFILE=/etc/darkice/%i.cfg 
 +#RuntimeDirectory=/etc/darkice 
 +ExecStart=/usr/bin/darkice -c $CFGFILE 
 +ExecStop=/bin/kill -s TERM $MAINPID 
 +Restart=on-failure 
 +TimeoutStartSec=60 
 + 
 +[Install] 
 +WantedBy=multi-user.target 
 +</file>
  
 ===== MQTT ===== ===== MQTT =====
-TODO+ 
 +<code - conf.d/auth.conf>listener 1883 
 +protocol mqtt 
 +password_file /etc/mosquitto/passwd 
 +allow_anonymous false 
 +auth_plugin_deny_special_chars false 
 +</code> 
  
 ===== Web portal ===== ===== Web portal =====
 TODO TODO
docs/svx.1669383426.txt.gz · Last modified: 2022/11/25 14:37 by root

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki