Raspbian Stretch and Svxlink 17.12.1.154

Source: f5vmr.wordpress.com

SVXLink and Raspbian Stretch
Installation from scratch

Needed

  1. 1. Raspberry Pi B+, 2 or 3:1
  2. 16 Gb MicroSD Card:
  3. PC:
  4. USB Sound Card:
  5. Time Allotment: 60 Minutes

Implementation

Tip: You do not need to be an expert in Linux but in following this guide you will understand everything you need to know for this project

Procedure

  1. On the PC install a suitable image writer.
  2. Download from Raspberry.org the latest version of Raspbian Stretch – the Full version.
  3. Save the download and expand the image to a suitable location using 7-zip.
  4. Insert the SD Card and run the ImageWriter program, selection the .img from the previous step.
  5. Write the image and wait for the prompt upon completion.
  6. Before removing the card from the PC, create an empty file named “ssh” without a file type and save it to the boot sector on the MicroSD card, but don’t save it in the /boot folder. Tip: This action permits SSH access on boot up, and you won’t need a screen or keyboard.
  7. Remove the card from the PC

Raspberry Instruction

Tip: Before booting the raspberry with the new SDCard, ensure that it is connected on an adequate power supply and connected to the same network as the PC. You will need the application AngryIP scanner, and SSH app installed on the PC.

  1. Boot the Raspberry
  2. Run AngryIP scanner to determine the IP address of the Raspberry.
  3. Note down the IP address, and close AngryIP.
  4. Open SSH and type in the IP address for the Raspberry
  5. Open the terminal screen and type the user pi and password raspberry
  6. Now you are ready for the next steps in raspbian linux. Be careful of your syntax as all commands are lower case, but if an uppercase is shown it must be used.

Updating the Raspberry

Tip: This step is absolutely necessary. Type the commands at the prompt, and wait for each of the commands to complete. There is no need to expand the operating system in the MicroSD Card, as Stretch does this on first boot.

  1. sudo raspi-config to open the configuration menu then at option 5 enable VNC
  2. At option 7 Advanced options, select A5 for Mode 16
  3. Exit raspi-config, but do not reboot yet.
  4. At the prompt type sudo apt update
  5. At the prompt type sudo apt-get upgrade
  6. When the commands have all finished type sudo reboot. Exit the SSH app.

Entering the Raspberry by RealVNC

  1. On the PC, run VNCViewer and use the IP address to enter the Raspberry Desktop.
  2. Use the username and password from the previous steps. You will see the graphic appear of an open road. In all aspects the desktop is similar to a Windows desktop.
  3. At the top menu bar click on the terminal icon to open a terminal window in the desktop. You are now ready to continue the preparation of the Raspberry for Svxlink.
  4. The next steps may require a reboot, but always return to this position to continue the set up.

Installation of the USB Soundcard

  1. Install the USB Sound Card on the Raspberry then in the terminal screen type the following command at the prompt.
  2. sudo nano /etc/modprobe.d/raspi-blacklist.conf
  3. and type the following line.
  4. blacklist snd_bcm2835
  5. then save the file (cntrl-o) and exit (cntrl-x) then type
  6. sudo nano /lib/modprobe.d/aliases.conf
  7. locate the following line
  8. options snd-usb-audio index=-2 and insert a “#” before it, then save and exit.
  9. reboot.

Sound Card Configuration

  1. Re-open RealVNC viewer to the raspberry pi.
  2. Re-open a terminal screen and type the following command at the prompt.
  3. sudo alsamixer
  4. you should now see that your USB sound card is the default sound card. type cntrl-f5 to view all the sliders.
  5. set the first slider to around 60% the second to zero, the third to a maximum of 12 and in the fourth type M to mute the amplifier.
  6. Type escape then type
  7. sudo alsactl store This will save these settings even after re-booting.
  8. sudo adduser svxlink (This will prepare the card for the installation of SVXLink.)
  9. Make the password svxlink, as you won’t need to use this any further.
  10. Test the installation by sudo aplay -l.

Compiling SVXLink successfully

  1. To insure git is installed, type sudo apt install git, although I have found it installed as standard.
  2. At the prompt in the terminal type sudo git clone http://github.com/sm0svx/svxlink.git
  3. This will give you a download of the the latest master of svxlink.git including svxreflector, svxserver and svxremote into a folder called svxlink in the current user.
  4. When it is safely downloaded, go to the instructions page to add all the necessary additional software. The list is very important and is found on the project page of svxlink.org at install.adoc. Some of the software is standard in Raspbian Stretch so you may find the system reporting this fact. The list of -dev packages is more difficult, but I will show you the following pointers.
  5. To install the top list of software simply type sudo apt install gcc g++ make cmake groff gzip doxygen tar git
  6. For the second half of the list install each of the packs individually.
  7. sudo apt install libsigc++-2.0-dev
  8. sudo apt install libpopt-dev
  9. sudo apt install tcl8.6-dev
  10. sudo apt install libgcrypt20-dev
  11. sudo apt install libasound2-dev
  12. sudo apt install libgsm1-dev
  13. sudo apt install libspeex-dev
  14. sudo apt install librtlsdr-dev
  15. sudo apt install libqt4-dev

If the system responds with a y/n query always go for the y and you will have no issues. The final line sudo apt install alsa-utils may attract the response that the latest tools are already installed.

The Compilation
Now follows the commands below.

  1. cd svxlink/src
  2. sudo mkdir build
  3. cd build

Now we start compiling. Type the following line EXACTLY, including / \. as they are important for the syntax. This command must go one one line. The final two .. after a single space are important too. The command will take several minutes to execute.

  1. sudo cmake -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc \ -DLOCAL_STATE_DIR=/var ..
  2. sudo make – This command will take 30-45 minutes to run dependent on processor used.
  3. sudo make docThis prepares all the documentation and manual files.
  4. sudo make install This compiles all the software into the operating system.
  5. sudo ldconfig

Installation of the Sound Files

The software is now installed, but not yet ready for use. We need the Language files. My preferred method is as follows.

cd /usr/share/svxlink/sounds – We are now in the correct directory. There is a useful command wget that downloads a file from a web source.

sudo wget http://(websource) filename
If you want the french language…

sudo wget http://jackson.lestroisours.pagesperso-orange.fr/upgrades/fr_FR.tar.gz

sudo tar xzvf fr_FR.tar.gzunwraps all the necessary files into their proper folders.

If you want the en_US files they are on svxlink.org.
If you want to make your own then download DSpeech from Dimio and play with that. However the finished .wav files need to be imported into Audacity, trimmed and exported as microsoft .wav files. This changes the twelfth bit from Hex 12 to Hex 10, to enable them to work in svxlink.

Setting up the GPIO ports

We need to setup the GPIO ports. The simplest way is to add the following lines to the file rc.local.

  1. sudo nano /etc/rc.local

################

#GPIO SCRIPT #

#TO BE INSERTED#

#ON START-UP #

################

# GPIO 17 as PTT to TX2

echo 17 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio17/direction

sudo chmod 777 /sys/class/gpio/gpio17/value

# GPIO 18 as Squelch to RX2

echo 18 > /sys/class/gpio/export

echo in > /sys/class/gpio/gpio18/direction

sudo chmod 777 /sys/class/gpio/gpio18/value

#GPIO 24 as PTT to TX1

echo 24 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio24/direction

sudo chmod 777 /sys/class/gpio/gpio24/value

# GPIO 23 as Squelch to RX1

echo 23 > /sys/class/gpio/export

echo in > /sys/class/gpio/gpio23/direction

sudo chmod 777 /sys/class/gpio/gpio23/value

#end of GPIO Section

#Remove # at start of next line for permanent reboot on power loss.

#sudo svxlink –daemon –logfile=/var/log/svxlink.log

These lines go immediately before the final

exit 0

  1. Save and exit the file.

CW.tcl New Paragraph

In the first version I described some changes relating to increasing the CW characters in the available list. Those changes to the CW character table still apply, but the syntax that sends the characters/callsigns to the audio chain has changed as follows:

CW::play $mycall 95 650 -4;

CW::play “-” 95 650 -4;

This command plays the CW character “-” or the assigned call sign at speed 95 with tone 650 Hz at volume -4, which I find quite adequate for most purposes.

Run Time

  1. The final steps are to set the parameters in /etc/svxlink/svxlink.conf and /etc/svxlink/svxlink.d/ModuleEchoLink.conf to enable your installation, paying attention to syntax and whether you are operating simplex or duplex.
  2. I have plenty more tips, but most of the answers are in the documentation on your MicroSD Card.
  3. Don’t forget to remove the # from the run line in /etc/rc.local to make your installation run at boot up.
  4. KISS principle – Do not overcomplicate your system. Ask yourself – Do I really need it? when considering changes. Why do you think that people want to see what’s occurring on the repeater when all they have is a radio and want to talk?