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 15:19] – [MQTT] rootdocs:svx [2022/11/26 04:08] (current) – [Sample config] root
Line 89: Line 89:
 </file> </file>
 ===== SVXReflector ===== ===== SVXReflector =====
 +==== 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>################################################################### <code ini svxreflector.conf>###################################################################
Line 110: Line 164:
 DefaultPassword="Change this key now." DefaultPassword="Change this key now."
 </code> </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) =====
 +
 +==== 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> <code ini svxlink.conf>
Line 137: Line 234:
 TYPE=Reflector TYPE=Reflector
 HOST=127.0.0.1 HOST=127.0.0.1
-PORT=5310+PORT=5300
 CALLSIGN="RESEAU_xxx" CALLSIGN="RESEAU_xxx"
-AUTH_KEY="Default community password"+AUTH_KEY="Change this key now."
 AUDIO_CODEC=OPUS AUDIO_CODEC=OPUS
 #JITTER_BUFFER_DELAY=0 #JITTER_BUFFER_DELAY=0
Line 161: Line 258:
 TX_DELAY=0 TX_DELAY=0
 PREEMPHASIS=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> </code>
  
 ===== DarkIce ===== ===== DarkIce =====
 +
 +==== Sample config ====
 +
  
 <code ini darkice.conf> <code ini darkice.conf>
Line 206: Line 332:
 public          = yes       # advertise this stream? public          = yes       # advertise this stream?
 </code> </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 =====
docs/svx.1669385944.txt.gz · Last modified: 2022/11/25 15:19 by root

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki