Saturday, December 16, 2017

Svxlink on LucidPuppy 5.2.8 & Baofeng

AP2CJ-puppy-linux

 

I had been running my Echolink node AP2CJ-R for some time on my Server. I wanted to use a small computer to run the node. In continuation with my echolink experiments
& &

 

AP2CJ-L EchoLink Node Number is 745256 & AP2CJ-R EchoLink Node Number is 745259

AP2CJ-R is connected to the PARS 2m repeater netwwork, AP2CJ-L is used for testing

AP2CJIMG-20140623-00294 AP2CJIMG-20140623-00293

all running on a desktop and svxlink, I got hold of an HP T5500 Thin client. The TC specs were CPU 733MHz, RAM 128MB and 32MB Flash, BaoFeng UV-5R home-brewed quaterwave 2m antenna and modified the computer interface for baofeng as I was using a yaesu HT before.

 

AP2CJ1 AP2CJ2

AP2CJ4

Opened it up and removed the 32MB flash as it just didnt solve the space issue. Opted to run it from a 4GB usb stick. tried a lot of small linux flavors but the 128MB ram just want that impressive so changed it to a 512MB kingston ram module.

AP2CJ9 AP2CJ11

Preparing the OS
The choice of operating system is Lucid Puppy 5.2.8 and the following is how to prepare it for a usb stick.

Download the lucidpuppy iso from 
http://distro.ibiblio.org/pub/linux/distributions/puppylinux/puppy-5.2.8/lupu-528.005.iso

Download UNetbootin from 
http://unetbootin.sourceforge.net/

Format the USB stick to FAT32 and using UNetbootin install lucidpuppy on usb stick

 AP2CJ1
 
AP2CJ2
 
AP2CJ3
 
AP2CJ
 
After creating the usb, boot up the T5500 using it and select USB boot in its cmos setup option. the lucidpuppy boot like a charm :D. As soon the first boot is completed and the desktop is on screen, reboot using the menu. It will ask if a save file may be created, select yes and the file system format should be lupusave.3fs as it ensures an auto fscheck and recovery is more easy.
 
Puppy Linux 5.2.8
 
 
AP2CJIMG-20140705-00309
 
 
Installing Svxlink

Now that the OS is installed, lets compile svxlink on lucid puppy 5.2.8, easier said then done which I found out, as it is a live OS, the dev libraries are not installed but where there is a will there is a way. Following is the method of compiling svxlink from source;

Download  lupu_devx_528-4.sfs , tk-8_5_4-i486-1ga.pet, tcl-8_5_4-i486-1ga.pet

#wget http://distro.ibiblio.org/puppylinux/puppy-5.2.8/lupu_devx_528-4.sfs

#wget http://distro.ibiblio.org/puppylinux/pet_packages-4/tk-8_5_4-i486-1ga.pet

#wget http://distro.ibiblio.org/puppylinux/pet_packages-4/tcl-8_5_4-i486-1ga.pet 

Also, I like to use SSH thus download openssh-client-5.1p1.pet ,openssh-server-5.1p1.pet so there are optional.

just clicking on the .pet & .sfs files would install them.

Download Svxlink
#wget http://cznic.dl.sourceforge.net/project/svxlink/svxlink/13.12/svxlink-13.12.tar.gz

Download Svxlink 16K sounds 

#wget http://cznic.dl.sourceforge.net/project/svxlink/sounds/13.12/svxlink-sounds-en_US-heather-16k-13.12.tar.bz2

Now that the dependencies and dev libraries are all installed, lets compile and install svxlink

#mv svxlink-13.12.tar.gz /tmp
#mv svxlink-sounds-en_US-heather-16k-13.12.tar.bz2 /tmp
#cd /tmp
#tar -zxvf vxlink-13.12.tar.gz /tmp
#cd svxlink-13.12

to compile and install svxlink, issue the following command

#make release
#make install

Now the sound files
#cd /tmp
#tar -xvjf svxlink-sounds-en_US-heather-16k-13.12.tar.bz2
#sudo mkdir /usr/share/svxlink/sounds/en_US
#sudo cp -a en_US-heather/* /usr/share/svxlink/sounds/en_US

 

Editing Configuration Files


#vi /etc/svxlink/svxlink.conf

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

[GLOBAL]
MODULE_PATH=/usr/lib/svxlink
LOGICS=SimplexLogic
CFG_DIR=svxlink.d
TIMESTAMP_FORMAT="%c"
CARD_SAMPLE_RATE=48000
LOCATION_INFO=LocationInfo

[SimplexLogic]
TYPE=Simplex
RX=Rx1
TX=Tx1
MODULES=ModuleHelp,ModuleParrot,ModuleEchoLink,ModuleTclVoiceMail
CALLSIGN=(YOUR CALL SIGN)
SHORT_IDENT_INTERVAL=60
LONG_IDENT_INTERVAL=60
#IDENT_ONLY_AFTER_TX=4
#EXEC_CMD_ON_SQL_CLOSE=500
EVENT_HANDLER=/usr/share/svxlink/events.tcl
DEFAULT_LANG=en_US
#RGR_SOUND_DELAY=0
REPORT_CTCSS=100
#TX_CTCSS=ALWAYS
MACROS=Macros
#LINKS=LinkToR4
FX_GAIN_NORMAL=0
FX_GAIN_LOW=-12
#ACTIVATE_MODULE_ON_LONG_CMD=4:EchoLink
#QSO_RECORDER_DIR=/var/spool/svxlink/qso_recorder
#QSO_RECORDER_CMD=8
#SHUTDOWN_CMD=998877

[RepeaterLogic]
TYPE=Repeater
RX=Rx1
TX=Tx1
MODULES=ModuleHelp,ModuleParrot,ModuleEchoLink,ModuleTclVoiceMail
CALLSIGN=ER-CALLSIGN
SHORT_IDENT_INTERVAL=10
LONG_IDENT_INTERVAL=60
#IDENT_ONLY_AFTER_TX=4
#EXEC_CMD_ON_SQL_CLOSE=500
EVENT_HANDLER=/usr/share/svxlink/events.tcl
DEFAULT_LANG=en_US
#RGR_SOUND_DELAY=0
REPORT_CTCSS=100
#TX_CTCSS=SQL_OPEN
MACROS=Macros
#SEL5_MACRO_RANGE=03400,03499
#LINKS=LinkToR4
FX_GAIN_NORMAL=0
FX_GAIN_LOW=-12
#QSO_RECORDER_DIR=/var/spool/svxlink/qso_recorder
#QSO_RECORDER_CMD=8
#NO_REPEAT=1
IDLE_TIMEOUT=900
OPEN_ON_1750=1000
#OPEN_ON_CTCSS=136:2000
#OPEN_ON_DTMF=*
#OPEN_ON_SQL=5000
#OPEN_ON_SEL5=01234
#OPEN_SQL_FLANK=OPEN
#OPEN_ON_SQL_AFTER_RPT_CLOSE=10
IDLE_SOUND_INTERVAL=3000
#SQL_FLAP_SUP_MIN_TIME=1000
#SQL_FLAP_SUP_MAX_COUNT=10
#ACTIVATE_MODULE_ON_LONG_CMD=4:EchoLink
#IDENT_NAG_TIMEOUT=15
#IDENT_NAG_MIN_TIME=2000
#SHUTDOWN_CMD=998877

[LinkToR4]
CONNECT_LOGICS=RepeaterLogic,SimplexLogic
COMMAND=94
NAME=TEST

[Macros]
1=EchoLink:9999#
9=Parrot:0123456789#
03400=EchoLink:9999#

[Voter]
TYPE=Voter
RECEIVERS=Rx1,Rx2,Rx3
VOTING_DELAY=200
BUFFER_LENGTH=0
#REVOTE_INTERVAL=1000
#HYSTERESIS=50
#SQL_CLOSE_REVOTE_DELAY=500
#RX_SWITCH_DELAY=500

[MultiTx]
TYPE=Multi
TRANSMITTERS=Tx1,Tx2,Tx3

[NetRx]
TYPE=Net
HOST=remote.rx.host
TCP_PORT=5210
AUTH_KEY="Change this key now!"
CODEC=S16
#SPEEX_ENC_FRAMES_PER_PACKET=4
#SPEEX_ENC_QUALITY=4
#SPEEX_ENC_BITRATE=15000
#SPEEX_ENC_COMPLEXITY=2
#SPEEX_ENC_VBR=0
#SPEEX_ENC_VBR_QUALITY=4
#SPEEX_ENC_ABR=15000
#SPEEX_DEC_ENHANCER=1

[NetTx]
TYPE=Net
HOST=remote.tx.host
TCP_PORT=5210
AUTH_KEY="Change this key now!"
CODEC=S16
#SPEEX_ENC_FRAMES_PER_PACKET=4
#SPEEX_ENC_QUALITY=4
#SPEEX_ENC_BITRATE=15000
#SPEEX_ENC_COMPLEXITY=2
#SPEEX_ENC_VBR=0
#SPEEX_ENC_VBR_QUALITY=4
#SPEEX_ENC_ABR=15000
#SPEEX_DEC_ENHANCER=1

[Rx1]
TYPE=Local
AUDIO_DEV=alsa:plughw:0
AUDIO_CHANNEL=0
SQL_DET=VOX
SQL_START_DELAY=0
SQL_DELAY=0
SQL_HANGTIME=2000
#SQL_EXTENDED_HANGTIME=1000
#SQL_EXTENDED_HANGTIME_THRESH=15
#SQL_TIMEOUT=600
VOX_FILTER_DEPTH=20
VOX_THRESH=1000
#CTCSS_MODE=2
CTCSS_FQ=100
#CTCSS_SNR_OFFSET=0
#CTCSS_OPEN_THRESH=15
#CTCSS_CLOSE_THRESH=9
#CTCSS_BPF_LOW=60
#CTCSS_BPF_HIGH=270
SERIAL_PORT=/dev/ttyS0
SERIAL_PIN=CTS:SET
#SERIAL_SET_PINS=DTR!RTS
#EVDEV_DEVNAME=/dev/input/by-id/usb-SYNIC_SYNIC_Wireless_Audio-event-if03
#EVDEV_OPEN=1,163,1
#EVDEV_CLOSE=1,163,0
#SIGLEV_DET=TONE
SIGLEV_SLOPE=1
SIGLEV_OFFSET=0
#TONE_SIGLEV_MAP=100,84,60,50,37,32,28,23,19,8
SIGLEV_OPEN_THRESH=30
SIGLEV_CLOSE_THRESH=10
DEEMPHASIS=0
#SQL_TAIL_ELIM=300
#PREAMP=6
PEAK_METER=1
DTMF_DEC_TYPE=INTERNAL
DTMF_MUTING=1
DTMF_HANGTIME=100
DTMF_SERIAL=/dev/ttyS0
#DTMF_MAX_FWD_TWIST=8
#DTMF_MAX_REV_TWIST=4
#1750_MUTING=1
#SEL5_DEC_TYPE=INTERNAL
#SEL5_TYPE=ZVEI1

[Tx1]
TYPE=Local
AUDIO_DEV=alsa:plughw:0
AUDIO_CHANNEL=0
PTT_PORT=/dev/ttyS0
PTT_PIN=RTS
SERIAL_SET_PINS=RTS!DTR
PTT_HANGTIME=1000
TIMEOUT=300
TX_DELAY=500
#CTCSS_FQ=136.5
#CTCSS_LEVEL=9
PREEMPHASIS=0
DTMF_TONE_LENGTH=100
DTMF_TONE_SPACING=50
DTMF_TONE_AMP=-18

[LocationInfo]
APRS_SERVER_LIST=euro.aprs2.net:14580
STATUS_SERVER_LIST=aprs.echolink.org:5199
LON_POSITION=73.01.46E
LAT_POSITION=33.35.49N
CALLSIGN=ER-CALLSIGN
FREQUENCY=145.775
TX_POWER=10
ANTENNA_GAIN=12
ANTENNA_HEIGHT=30m
ANTENNA_DIR=-1
PATH=WIDE1-1
BEACON_INTERVAL=10
TONE=0
COMMENT=SvxLink by CALLSIGN (svxlink.sourceforge.net)
#-------------------------------------------------------------------------------------

Change all in RED save and exit







 ###############################################################################
#                                                                                                          #
#                Configuration file for the SvxLink Echolink Module                   #
#                                                                                                          #
###############################################################################


#vi /etc/svxlink/svxlink.d/ModuleEchoLink.conf

[ModuleEchoLink]
NAME=EchoLink
ID=2
TIMEOUT=60
#ALLOW_IP=192.168.1.0/24
#DROP_INCOMING=^()$
#REJECT_INCOMING=^()$
#ACCEPT_INCOMING=^(.*)$
#REJECT_OUTGOING=^()$
#ACCEPT_OUTGOING=^(.*)$
#CHECK_NR_CONNECTS=2,300,120
SERVERS=servers.echolink.org
CALLSIGN=CALLSIGN (AP2CJ-R)
PASSWORD=PASSWORD
SYSOPNAME=YOUR NAME
LOCATION=[Svx] 145.755, IsbPak
#PROXY_SERVER=the.proxy.server
#PROXY_PORT=8100
#PROXY_PASSWORD=PUBLIC
MAX_QSOS=10
MAX_CONNECTIONS=11
LINK_IDLE_TIMEOUT=0
#AUTOCON_ECHOLINK_ID=9999
#AUTOCON_TIME=1200
#USE_GSM_ONLY=1
#DEFAULT_LANG=en_US
DESCRIPTION="You have connected to a SvxLink node,\n"
#-------------------------------------------------------------------------------------

Change all in RED save and exit



Update: 19/07/14
when receiving streamed audio, I could hear beeps (roger beeps) which are very annoying, to disable them follow the below instructions

# vim /usr/share/svxlink/events.d/EchoLink.tcl

on line 406, comment out the line as shown below

#    playTone 1000 100 100;


save and exit

Testing Svxlink

issue the following command to test svxlink

#/usr/bin/svxlink --logfile=/var/log/svxlink --runasuser=root

The FAQ of the Echolink official site mentioned TCP port 5200, UDP 5198,5199 should be open.
If those ports was closed, the other cannot connect your node via internet. You can add port forwarding/virtual server settings in your router to the internal IP of svxlink.
 
portfwd
 
ctrl+c will kill the svxlink process

 Tuning
IF all goes well in the testing phase, lets set the audio input and out put levels. You can do this by the graphical mode but I found that the Capture (linein/mic) volume always increased to 50% after a reboot. using alsamixer in graphics mode, the input and output can be adjusted but I use the command line to set it on every reboot.

lastly, svxlink needs to startup on every bootup which is achieved by the following

# vi Startup/svxlink-server.sh

Add the following to the file

#!/bin/sh
/usr/bin/amixer set 'Capture' 20%
/usr/bin/svxlink --logfile=/var/log/svxlink --runasuser=root &

save and exit.

#chmod 777 Startup/svxlink-server.sh
 
 
 
AP2CJIMG-20140621-00291
 
AP2CJIMG-20140625-00297
 
AP2CJIMG-20140710-00334
 
AP2CJIMG-20140710-00335
 

The Interface

As baofeng uses Kenwood spk and mic ports
AP2CJBaofeng connection 5


be careful of the +v on the 3.5mm mic jack, secondly the 2.5mm pin ring and sleeve needs to be connected together to the interface ptt directly in place of the mic -ve and the 22K resistor removed

AP2CJ PC Echolink interface

 

reconfigured the interface for it

AP2CJIMG-20140623-00292

AP2CJIMG-20140708-00320

 

Home-brewed quarter wave antenna

I had all my 2m antennas hook up to my other rigs, the one I had (borrowed) from a friend died leaving no antenna for echolink - The HAM home brew kicked in and the final result of 01 hour is a quater wave antenna for echolink mounted on the roof eventually.

 

AP2CJIMG-20140708-00318

 


Conslusion

 The setup runs very well till now with 512RAM and the usb stick though usb sticks are notorious for failing. Will install something like

AP2CJ-thin client

 

I did notice some warming up of the node after few days but cant blame the unit as the heat in Pakistan these days is crossing 44degC.. that said would be installing a cooling fan/unit of some sort soon.

mWtXVC0HWd6HjgJiPjCLWYg

 

Inshort, pup rocks!!!!

AP2CJupup2