InstallationInstructions

Gunnar edited this page Feb 10, 2018 · 38 revisions

Installation using packages

The support for installing SvxLink from prebuilt packages is unfortunately poor in most distributions. To improve the situation, more active package maintainers are needed. Maybe you are the right person for the job?

Here are some distributions where packages exist in one or another form:

  • Arch — SvxLink is available in the AUR

  • Gentoo — SvxLink is available in the core distribution. Sounds not packaged.

  • Ubuntu — Packages availabe

  • Fedora — Packages in core distribution but are very old. Latest version is 11.11.1 from 27 nov 2011.

  • Debian — Packages available in testing.

  • Raspbian — Packages available in testing (For Raspberry Pi).

So which distribution is the best one for SvxLink? Unfortunately the most up-to-date distributions, Arch and Gentoo, I would not recommend to beginners since they require a fair amount of Linux knowledge. Ubuntu is quite easy to use but the packages are getting old. The Fedora packages are so old that I would not recommend using them at all. I hope the situation will improve.

If you have managed to install SvxLink using one of the instructions above, continue below reading the post install stuff chapter.

Installation from source

If you are not running one of the distributions that there are prebuilt binaries for, you will have to build the whole thing from source. SvxLink have a few dependencies that you have to satisfy before trying to compile. The following are required:

The following are recommended:

  • libasound — For ALSA support

  • speex — Improved audio quality for EchoLink and remote transceivers

  • opus — Improved audio quality for remote transceivers and SvxReflector

The following are optional:

  • rtl-sdr — For native RTL2832U DVB-T USB dongle SDR support

  • Doxygen — To generate developer documentation

  • Groff — To generate manual pages

You can probably find prebuilt binaries for these libs for your distribution. Otherwise you will just have to compile them as well.

To compile Qtel, version 4 or 5 of the Qt widget toolkit and the X window system are needed. There is a good chance that these will already be installed on your system. If Qt is not installed, find a prebuilt package or compile it from source. If the X window system is not installed, you are on your own…​

Now download the latest sources for SvxLink. If you are going to run the svxlink-server, you will also need the sounds-ll_LL-name-ss-YY.MM.tar.gz with the matching date (or latest if no matching) and desired language code (en_US for English). "name" can for example be the name of the speech synthesizer that generated the sound files. "ss" is the sampling rate. 16k is the normal sampling rate to use in SvxLink. Find a good spot to unpack and compile the source and cd into that directory. Your home directory will do fine for example.

You will also need to create a system user called 'svxlink' before installing if it does not already exist. The 'daemon' group is also needed so if that does not exist it must also be created. The following command will work on most distributions.

useradd -r -g daemon svxlink

The install step must be done as user root but the rest should be done as an ordinary user. The example below will install the SvxLink files in /usr, /etc and /var.

tar xvzf svxlink-YY.MM.tar.gz
cd svxlink-YY.MM/src
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc \
      -DLOCAL_STATE_DIR=/var ..
make
make doc
make install
ldconfig

If you are going to run the SvxLink server, unpack the sound files at a good location. The normal location for sound files is /usr/share/svxlink/sounds/. As user root, run the commands below. Adapt the commands to your needs by specifying the correct language code, name and version.

cd /usr/share/svxlink/sounds
tar xvjf /path-to-wherever-you-put-the-tar-file/svxlink-sounds-ll_LL-name-16k-YY.MM.tar.bz2
ln -s ll_LL-name-16k ll_LL

Specific installation instructions for different distributions:

Notes for specific hardware platforms:

Now continue below reading the post install stuff chapter.

Post install stuff

If you only are going to run Qtel, first read the Audio level adjustment chapter and then go directly to the Qtel User Docs.

If you are going to run the svxlink server, read on.

Hardware

To run the SvxLink server, some kind of hardware is needed to connect the computer to the transceiver. At the moment I am using a simple interface consisting of an audio transformer for car stereos to isolate the audio lines and an opto-coupler to isolate the PTT line. For a long time I just used a simple direct, non-isolated, connection between the transceiver and the computer. This also work well in some cases but I have actually fried one sound card this way. Also, there is always a risk to get problems with audio hum if using a non-isolated interface.

There is an interface designed by Aleks, s54s. I used this interface for many years but after switching to new computer hardware, a Cubieboard, I discovered that it dampened the outgoing low frequencies too much, so transmitted CTCSS did not work properly. It worked OK on my old computer so maybe it’s the combination of the Cubieboard and the S54S interface that does not work.

WB0RXX/Tim has constructed an interface circuit that he use with his SvxLink system. The schematic can be found here.

Typical EchoLink hardware may work with SvxLink as well. Have a look at the EchoLink interfaces page. However, I have not tried any of these so there are no guarantees. Please tell me if you get any of the interfaces working or if they are not working.

Audio level adjustment

There are no audio level controls in SvxLink server nor Qtel. The levels must be adjusted with an external tool like aumix, kmix, alsamixer or whatever your favourite mixer is. I usually use the command line alsamixer application. Start one of the mixers and locate the controls to use for adjusting the levels. The output level is usually adjusted using the two sliders Pcm and Vol. The input level is usually adjusted using the Capture (sometimes called IGain) slider, not the Mic or Input (line-in) slider. The latter two are used to adjust the monitoring level of the two inputs. Set these two to zero. Select to use either the microphone or the line-in input. Set the Pcm, Vol and Mic/Input sliders half way up. Adjust the levels according to the instructions below.

To adjust the levels in Qtel, start by connecting to the *ECHOTEST* server. This EchoLink server will echo back everything you send to it. Right after the connection has been established, a greeting message will be played back. Adjust the speaker level to a comfortable level using the Pcm and Vol sliders. Press the PTT and say something and listen how it comes back. Adjust the Capture slider until the level of what comes back is about at the same level as the announcement message.

There is an experimental utility to do audio level calibration for FM based systems called devcal. The devcal (1) manual page describe how to use that utility. The reason to use that utility is that you get repoducible calibrations since the FM deviation for both transmit and receive are actually measured. To use the old way of audio level calibration, read on.

To adjust the levels for the SvxLink server, first set the PEAK_METER configuration variable to 1 in the receiver configuration section. Start the SvxLink server up and press *# on the keyboard. This will make the svxlink server identify itself. The # is only needed for the *-command when entering commands on the keyboard. When doing it from the radio, a * followed by a squelch close will trigger an identification. Do this a couple of times and adjust the Pcm and Vol sliders to the highest volume possible without distortion.

To adjust the audio input level, start by opening the squelch on the receiver so that SvxLink just hear noise. Pull the audio input gain sliders up until you see messages about distortion printed on the console. Then lower the audio gain until no distortion messages are printed. If you cannot make SvxLink print distortion messages, the input level is too low. You should try to fix this on the analogue side but it is possible to use the PREAMP configuration variable in the receiver section to fix it.

Now, activate the parrot module by pressing 1# on the keyboard. Use another transmitter to make a short transmission. Listen to the recorded audio and make sure it sounds good. Ask someone else to listen to both your original transmission and the repeated transmission from SvxLink. Ideally, the listener should hear no difference. Now try to transmit some DTMF digits and see if the digits are detected. If not, try to adjust the input level up or down and try again. Try all 16 digits: 0-9, *, #, A, B ,C, D. Digit A is often the hardest to detect.

As a rule of thumb, try to not pull the sliders over 90%. Some sound cards will distort the signal if the level is set too high. Instead, use the PREAMP configuration variable if received audio is too low.

Note: It is VERY important NOT to distort the input signal. This will significantly lower the performance of the signal processing code in SvxLink. You may experience that DTMF digits are not detected, CTCSS squelch is clipping etc.

SvxLink server configuration

The default configuration file for SvxLink is /etc/svxlink/svxlink.conf. Module configuration files are placed under /etc/svxlink/svxlink.d. Edit the configuration files to your liking.

There is a voice greeting message sent to connecting echolink stations. This message should be replaced with a personal one. I most often use the audacity application to record sound clips if in a graphical environment. If not, a utility like arecord can be used. Any tool capable of recording raw sound files using 16kHz sampling rate and 16 bit signed samples is ok to use. Another alternative is to record the sound files using your favorite tool and then convert them to the correct format using the sox application. A third way is to use a speech synthesizer to generate the sound clip. The default sound clips for SvxLink have been generated using the Acapela Box online speech synthesizer. This is a commercial service though.

Further configuration information can be found in the manual page svxlink.conf. There also are manual pages for the svxlink application and its modules (ModuleHelp, ModuleParrot, ModuleEchoLink, ModuleTclVoiceMail, ModuleDtmfRepeater, ModulePropagationMonitor, ModuleSelCallEnc).

To set up a remote receiver, have a look at the remotetrx and the remotetrx.conf manual pages.

All manual pages are available on a properly installed SvxLink computer. These should match the version of SvxLink that is installed. Display a manual page by using the "man" command at the command prompt (e.g. man svxlink.conf).

After the configuration has been done, start the server by typing svxlink at the command prompt. It is possible to simulate DTMF input by pressing the 0-9, A-D, *, # keys. Have a look at the user documentation to begin testing the server. To get help about command line options, start the svxlink server with the --help switch.

Note
To start the svxlink server in the background from the command line, use the --daemon switch. Do not use "&". This will make the server hang when trying to read from standard input.

Depending on how you installed SvxLink, there may be a start script. When everything is configured and working, start the SvxLink server using the startscript, something like /etc/init.d/svxlink start script. A logfile will be put in /var/log/svxlink.

The Event Handling Subsystem

This chapter can be skipped on the first reading. Come back here to read this chapter when you feel like customizing your SvxLink server or adding your own features.

There are a lot of sounds that should be played as a response to an event in the SvxLink system. To make these sounds as configurable as possible there is a programmable event handling subsystem. The programming language chosen for this is TCL (Tool Command Language). For each event in SvxLink there is a corresponding TCL function that is called when the event occurs. In this function the normal action is to play a sound or a couple of sound clips. It is of course also possible to use the full power of TCL to make all sorts of things happen. For example execution of an external application, reading files with information (e.g. DX, weather data etc), time based events (e.g. only do this when the time is…​).

The main TCL script can be found at /usr/share/svxlink/events.tcl. When this script is loaded by the SvxLink server at startup, it looks in a subdirectory called events.d. Any file that ends in ".tcl" in this directory will be read and should contain a TCL script. If you have a look in this directory you will find files like: Logic.tcl (common events for logic cores), RepeaterLogic.tcl (repeater logic events), SimplexLogic.tcl (simplex logic events), Module.tcl (common module events), Help.tcl (help module events), Parrot.tcl (parrot module events), EchoLink.tcl (echolink module events). There is a comment above each function that says what it does so have a look in these files and let your imagination flow.

You should not change these files directly but rather create a subdirectory under the events.d directory called "local". If you for example want to change something in the RepeaterLogic.tcl file, copy the RepeaterLogic.tcl file to the "local" directory. Then edit that file. All functions in this file will override functions in the original file. Remove all functions that you have NOT modified. Then the original version will be used and future updates will be less painful.

There are a couple of functions that can be used within a TCL function to make things happen in the SvxLink core.

playFile 'filename'

Play the file pointed out by filename. The filename may be given with an absolute path or a path relative to the directory where the events.tcl script is at. Supported formats are "raw" (16 bit signed samples 16kHz sampling rate), "wav" (16 bit signed samples 16kHz sampling rate) or "gsm".

playTone 'fq amplitude length'

Play a tone with the specified frequency (Hz), amplitude (0-1000) and length (milliseconds).

playSilence 'length'

Play the specified number of milliseconds of silence. This can be used to trim the spacing between audio clips.

recordStart 'filename'

Start recording of received audio to a file. Only one recording at a time can be active.

recordStop

Stop a previously started recording.

There are also a couple of convenience functions implemented in TCL:

playMsg 'context name'

This function also play a file. It actually use the playFile function to play the file. The path to the file to play is formed as follows: event.tcl directory/sounds/language/context/name.\{raw,wav,gsm}. If no matching sound clip is found in the directory specified by "context", the Default directory will be searched.

playSubcommands 'context basename header'

Play a range of subcommand description files. The file names must be on the format <basename><command number>[ABCD*#]. The last characters are optional. Each matching sound clip will be played in sub command number order, prefixed with the command number. context - The context to look for the sound files in (e.g Default, Parrot etc). basename - The common basename for the sound clips to find. header - A header sound clip to play first.

spellWord 'word'

Spell the specified word using a phonetic alphabet.

playTwoDigitNumber 'number'

Say the specified two digit number (00 - 99).

playThreeDigitNumber 'number'

Say the specified three digit number (000 - 999).

spellNumber 'number'

Spell the specified number digit for digit.

playNumber 'number'

Say a number as intelligent as posible.

playTime 'hour minute'

Play the specified time. For example "playTime 13 35" will produce "One Thirtyfive PM", when using an English language pack and "tretton trettiofem" with a Swedish language pack.

SvxReflector Configuration

The SvxReflector server doesn’t have much to configure but you need to add at least one user to be able to connect. The default configuration file is called '/etc/svxlink/svxreflector.conf' You need a user under the [USERS] section and that should point to a corresponding variable under the [PASSWORDS] section. Many users may share the same password if desired. There must be a unique user (e.g. callsign) for each connecting node.

The default LISTEN_PORT is 5300. Don’t change that unless you have a good reason. Make sure that your firewall will let through incoming connection on 5300/tcp. No other ports should have to be opened.

On the SvxLink server side a ReflectorLogic need to be configured.

For more details, have a look at the svxreflector and svxreflector.conf manual pages.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.