Echolink 2015 – SvxLink 14.08.1 as Echolink Node

 

echo_xkp

 

Although my blog concentrate on the APRS and Digit Radio technologies, but the most popular article is Echolink “Life of Pi” published in 2013 obviously.

In these years, I received many feedback on the article as well as YouTube channel. Most of them are the stability of Svxlink running on Raspberry pi.
And the procedure of the installation.

In this article, I will testing the latest svxlink 14.08.1 in newest Raspberry Pi 2 Model B. The USB sound card dongle, USB to RS232 cord is same as previous.

 

Here is the key points of svxlink 14.08.1

  • It use CMake to build the svxlink, it is different with previous article
  • It should add a user “svxlink” before svxlink installation
  • A sound config file disappear, so can be ignore here
  • The 16k sound clip file as default
  • The default installation path changed

 

OS preparation

Please download the latest Raspbian image (5-May-2015), write the image to a 4G Micro SD Card according the official tutorial.

Insert the card to RPi 2, power up and enter the configuration menu.

Set the locale to your country, keyboard to US.  (Internationalisation options -> change time zone ; change Keyboard layout )

As Svxlink work in text mode, we reduce the GUI RAM from 64M to 16M.
(Advanced Options -> A3 Memory split –> from 64 decrease to 16 )

if your SD card > 4G, please select expand to us full capacity of your card, then finish to reboot. ( Expand File System )

The OS preparation is complete. Please login after reboot. Then shutdown the Rpi by command: sudo shutdown -h now

 

Hardware preparation

Please insert the USB sound card dongle to a USB port of Rpi.

Please insert the RS232 to USB cord to a USB port of RPi, I am using the PL2303 chipset cable which the driver was buildin the Rpi. In another test, I found FT232 driver was absent on Rpi, it needs install by the user.

echo_hw

Insert a USB keyboard. Then power up your RPi.

After login, type command lsusb , you should see the list of USB devices. If some device missing, you may continue to proceed the following software & firmware update, However, all the critical devices (sound card, and USB to RS232 cord) should be identified before svxlink installation.

lsusb

 

Software & Firmware update

Please input command to update the pre-installed software:
sudo apt-get update && sudo apt-get upgrade

Please input command to update the firmware:
sudo rpi-update

Please input command to reboot the system afterward:
sudo reboot

You may found a warning on the boot up screen.

echo_warn

 

It will not affect the whole operation. And we can edit a file to settle the problem:
sudo nano /boot/cmdline.txt

Please add ”cgroup_enable=memory “ before the ” elevator=deadline”

Select Ctrl + X, select yes to save the file.

Reboot the system and the warning should disappear.

For new RPi user, you may consider backup your SD card here.

 

SvxLink installation

Add user “svxlink” by following command, password according your own.
sudo adduser svxlink

Please install the prerequisite packages by the following command:
sudo apt-get install g++ make libsigc++-2.0-dev libgsm1-dev libpopt-dev tcl8.5-dev libgcrypt-dev libspeex-dev libasound2-dev alsa-utils libqt4-dev

Please install CMake by the command:
sudo apt-get install cmake

Download the svxlink latest package 14.08.1 :
sudo wget
https://github.com/sm0svx/svxlink/archive/14.08.1.tar.gz

Please unzip it:
tar xvzf 14.08.1.tar.gz

Please enter the unzipped folder :
cd svxlink-14.08.1

Go to subfolder “src” :
cd src

Make a folder “build” :
sudo mkdir build

Go to the folder “build” :
cd build

Execute the commands step by step, the two dot after a space means use default path:
sudo cmake ..
sudo make
sudo doc
sudo make install

It need around 20 minutes for the installation. Ensure no error message prompt after the installation.

Update the libraries link by the command:
sudo ldconfig

The installation was completed. You may reboot the system, or input cd.. 3 times to return root directory.

 

Sound Clip files installation (US English)

Please download the 16k sound clip file:
wget
https://github.com/sm0svx/svxlink-sounds-en_US-heather/releases/download/14.08/svxlink-sounds-en_US-heather-16k-13.12.tar.bz2

Unzip the file:
sudo tar jvfx svxlink-sounds-en_US-heather-16k-13.12.tar.bz2

Make the folder default to save the sound clip:
sudo mkdir –p /usr/local/share/svxlink/sounds/en_US

Go to the unzipped file folder:
cd en_US-heather-16k

Copy all files to the default location:
sudo cp –r * /usr/local/share/svxlink/sounds/en_US

The sound clip installation completed. Please reboot the system now, we will edit some configuration files afterward.

There are 3 configuration files need to edit, They are:

/etc/modprobe.d/alsa-base.conf

/usr/local/etc/svxlink/svxlink.d/ModuleEchoLink.conf

/usr/local/etc/svxlink/svxlink.conf

There are NO asound.conf anymore.

 

Edit alsa-base.conf :

sudo nano /etc/modprobe.d/alsa-base.conf

Row 17, please change -2 to 0 at the end of the string. So the string is
options snd-usb-audio index=0

Press Ctrl + X, select Yes to save the file. Then Reboot.

After login, input command  alsamixer . Your will see it is USB sound device on the left top side.

alsamixer

Please adjust the speaker and mic volume to around 70 .

Press ESC to leave.

 

Edit  ModuleEchoLink.conf :

sudo nano /usr/local/etc/svxlink/svxlink.d/ModuleEchoLink.conf

On Row 5, remove # at beginning, it make the IP and subnet mark enable.

On Row 14-17, edit to your own information, e.g: Callsign

On Row 28, remove # at beginning to use US English

On Row 34-38, edit the information according your station configuration.

Press Ctrl + X, select Yes to save the file.

 

Edit svxlink.conf :

sudo nano /usr/local/etc/svxlink/svxlink.conf

On Row 13, LOCATION, remove the # at beginning.

On Row 20, MODULES, remove “ModuleParrot,ModuleTclVoiceMail” on this moment. We will add the MetarInfo module later.

On Row 21, 45; change to your callsign.

On Row 22, as I prefer report callsign every 15min, so I change it to 15.

On Row 28, RGR_SOUND_DELAY set to 100. It is more easy to hear the roger beep before end of transmission.

On Row 29, add # on the beginning. As no PL tone used.

On Row 34 & 36, remove # on the beginning. So we can use DTMF command to on/off module when necessary.

On Row 171, change to SERIAL_PORT=/dev/ttyUSB0

On Row 172, add :SET to the end of the string. So complete string is SERIAL_PIN=CTS:SET

On Row 193, add # on the beginning as we did not have DTMF hardware decoding.

On Row 206, Change to PTT_PORT=/dev/ttyUSB0

On Row 221-229, please enter your co-ordination, and station information. They will shown on aprs.fi map.

Press Ctrl + X, select Yes to save the file.

Please reboot the system. All the setup completed.

 

GPIO to PTT

If some Ham would like to try PTT via GPIO, please refer the chapter “Using GPIO has its own challenges” from the official guide.

https://github.com/sm0svx/svxlink/wiki/InstallSrcHwRpi

 

Any new feature ?

Yes, Airport weather report announcement !

Please follow the following steps:

sudo nano /usr/local/etc/svxlink/svxlink.d/ModuleMetarInfo.conf

Row 5-7, remove the # on the beginning.

Row 5, STARTDEFAULT=VHHH

(VHHH is the ICAO code of Hong Kong International Airport. Please replace it by your nearby airport ICAO code.)

For the last Row, you can use DTMF to select which airport your want to knows the weather report. Enter the airport ICAO codes you like. At least 1 airport ICAO code need.

vhhh

 

Note to an Echolink node for long term running

Rpi is a PCBA, please be remind if use it for long term operation:

  1. An enclosure  with appropriate heat dissipation. I did not add any heat sink to the chipset and it seems OK.
  2. A good power supply. I am using an old Samsung smartphone power adaptor (5V, 2A) for the project. Please be remind these kind of switching adaptor cannot withstand on strong RF interference, please put it away from the transmitter.
  3. Audio cords, Power cord please add Ferrite Core.
  4. I use a Cat 6 cable, to replace a flat cat5 cable. Those flat network cable available on the market seems no good for anti RF interference.

 

YouTube Demo

 

Conclusion

The svxlink is not design for Rpi platform, but the version 14.08.1 as echolink node seems operated smoothly, I will conduct a long term operation test, if the results is good I will enable others modules such as voice mailbox in the future.

Have fun.

Posted in English Articles | Tagged , , | 103 Comments

EchoLink 2015 – 以 SvxLink 14.08.1 作為 Echolink Node

 

echo_xkp

 

前言

管這個網誌主要講 APRS 和一點數碼化通訊的東西,但無可否認,最受歡迎的是 Echolink 一文。英文版的瀏覽量遠高於其他文章的總和。有點無心插柳柳成蔭的感覺。

究其原因,是 Rpi 剛推出,而明顯 Ham 界十分渴求一種比 MCU 強,省電又普及易得的電腦系統。以之作為 Ham 系統的操作平台介紹,一般也較受歡迎。

而發文後的這兩年,期間也不斷收到各式查詢。主要是安裝問題和軟件升級後的穩定性查詢。我也承諾了今年首季再試。一 delay 就到秋季,業餘時間有限,俗務太多就是如此。

本文主要講述以最新的 svxink 14.08.1 作為 Echolink node 的安裝步驟, RF 干擾預防和周邊配件選擇。

其他 Echolink 的用法,帳號申請和設置, router 的相應設定等等,請參看舊文。

 

測試平台

硬件為最新的 RPi 2 Model BRam 多一倍,ARM 處理器也升級,價錢由最初的不變加到現在的港幣 $330 …,人工有這樣的升幅就不錯。

其他 USB 周邊設備不變,仍是兩年前的配件。

 

svxink 14.08.1 的安裝重點

  • 新版本以 Cmake 為處理安裝程序,這和舊文不同
  • 安裝前必需以 adduser 加入 svxlink,這和舊文不同
  • 音效處理簡單了,舊文一些相關步驟也因而減省了
  • 16k soundclip 變為預設,也証實可用於 RPi 2
  • 預設的安裝途徑改了,跟舊文不同

 

OK,咁點解要睇你

和兩年前不同,其界各地同好也有類似安裝秘笈放上網供參考。當然我也有我的生存之道。只將人家的東西反譯過來,我也懶得投放時間強出頭;addlink,讀者用 google translate 加點想像力即成。

我的要點:

  • 以中文編寫,圖文並茂的 Echolink 安裝步驟未見普及。
  • 可能外國 Linux 較普及,不少用英文編寫的 guideline 起用了一大堆複雜的參數。我但求穩定,可用;步驟較簡單。
  • 類似第二點,一些 guideline 當一般 Linux 軟件安裝,步驟,config 講完就算。我也懷疑根未無 production 試用過。
  • 音效檔 sound clip 未見詳細。有不少跟著做應係唔 work (production 報時是無聲,找不到音效檔)。
  • svxlink 功能強大,有些 guideline 不是用來做 echolink 的,參考價值較低。

 

安裝步驟

OS 準備
下載最新版的 RASPBIAN,當下的是今年五月五日的版本。

按官網 tutorial,爆到一張不少於 4Gmicro SD card,然後插到 RPi。留意太大(>8G),高速的新咭未必兼容。

插入 micro SD cardRPi 上電,會進入 configuration 版面,地理位置設為 Hong Kong。鍵盤 to US .  (Internationalisation options -> change time zone ; change Keyboard layout )

由於 svxlink 不需在 X windows 下運行,我們將 GUI ram64M 降到 16M。(Advanced Options -> A3 Memory split –>64 降到 16 )

如閣下的 sd card 大過 4G,可用 expand 以用盡容量。後選 reboot。( Expand File System )

初始 OS config 完成。Reboot

Reboot 後,登入;用 sudo shutdown -h now 關機。

 

硬件準備

USB sound card dongle 插到一個 USB port。由於體積較大,用 USB 延長線駁上。

echo_hw

 

USB to RS232 cord 插到另一個 USB port。留意芯片為 PL2303 即可。據本人其他實驗所知,貴價的 FT232 芯片的 USB to RS232 cable 反而沒有預置 driver,需用家自行安裝,更為不便。

有同好曾查詢以 RPiGPIO 作為 PTT,省回這條 cable 的做法。我沒鑽研,原因簡單: RPiMic 輸入,你必需接上 USB sound card dongle。既然如此,插多條 USB to RS232 cable 不會阻多點位。再者 RPi 2 有四個 USB port,要好好利用。

而最重要的是,一條引線由 GPIO 接到 PTT, 較容易 pick up noise。而 RPIGPIO 講明是沒輸入保護的。解決方法不外也是另加 4N25 等隔離。

不複雜但有點揾自己麻煩,費時失時。這是我的睇法。這個project 是軟件應用,硬件盡量用現成的。

另接入一個 USB 鍵盤 和 Network cord,供指令輸入和上網之用。

接電 boot 機,用預設帳號 pi 登入即可。

用指令 lsusb,應可看到 USB device 列表。見到 USB To RS232usb sound card dongleok。見不到,也可跟以下步驟做更新,更新後再試一下可否見到。但如仍見不到,需換掉直至認到為止。

lsusb

 

軟件,firmware 更新

輸入以下指令更新所有預裝軟件。需約 30 分鐘:

sudo apt-get update && sudo apt-get upgrade

之後輸入以下指令更新 firmware

sudo rpi-update

完成以上程序,需入指令 sudo reboot 重啟系統。

留意 boot 機訊息,有一 warning。Kernel lacks cgroups or memory controller not available, not starting cgroups ….(warning).

echo_warn

 

這個 warning 不礙事,但我也不想見到,輸入以下指令編輯 cmdline.txt

sudo nano /boot/cmdline.txt

在句末 elevator=deadline 前加進”cgroup_enable=memory

ctrl+X ,選 Yes 存檔。重啟系統即可。

預備功夫初步完成。新手建議先將 SD card 備份。

 

Svxlink 系統安裝

先加入 “svxlink” userpassword 隨意自訂。指令:

sudo adduser svxlink

下載和安裝 prerequisite files :

sudo apt-get install g++ make libsigc++-2.0-dev libgsm1-dev libpopt-dev tcl8.5-dev libgcrypt-dev libspeex-dev libasound2-dev alsa-utils libqt4-dev

下載和安裝 cmake:

sudo apt-get install cmake

下載 svxlink 最新版本 14.08.1:

sudo wget https://github.com/sm0svx/svxlink/archive/14.08.1.tar.gz

將之解壓:

tar xvzf 14.08.1.tar.gz

進入解壓後的 folder:

cd svxlink-14.08.1

進入 subfolder src:

cd src

建立 folder build:

sudo mkdir build

進入 build folder:

cd build

執行 cmake,空格後兩點即用 default 路徑:

sudo cmake ..

編譯各檔案,需時約 20min:

sudo make

sudo make doc

sudo make install

 

更新各 libray link 連結:

sudo ldconfig

svxlink 系統安裝完成,較以前簡潔。可 reboot 一次,或 cd.. 三下回根目錄。

 

音效檔 soundclip 安裝

下載 16k 美式英語 en_US 音效檔:

wget
https://github.com/sm0svx/svxlink-sounds-en_US-heather/releases/download/14.08/svxlink-sounds-en_US-heather-16k-13.12.tar.bz2

解壓:

sudo tar jvfx svxlink-sounds-en_US-heather-16k-13.12.tar.bz2

新增 svxlink 所需音效檔目的位置:

sudo mkdir –p /usr/local/share/svxlink/sounds/en_US

進入解壓後的 folder:

cd en_US-heather-16k

將所有東西抄到新增的目的位置:

sudo cp –r * /usr/local/share/svxlink/sounds/en_US

音效檔安裝完成。

reboot 一下系統。準備編輯 config 檔。

 

config 檔編輯

三個 config 檔需編輯,留意預設路徑。沒有了 asound.conf

/etc/modprobe.d/alsa-base.conf

/usr/local/etc/svxlink/svxlink.d/ModuleEchoLink.conf

/usr/local/etc/svxlink/svxlink.conf

編輯 alsa-base.conf,指令:

sudo nano /etc/modprobe.d/alsa-base.conf

在第 17 行末端的 -2 改為 0 :

options snd-usb-audio index=0

ctrl + X,選 Yes 存檔。重啟系統。

登入後,輸入指令 alsamixer。理應見到左上角標示 USBsound cardspeakermic 音量設為約 70。按 ESC  離開。

alsamixer

 

 

編輯 ModuleEchoLink.conf,指令:

sudo nano /usr/local/etc/svxlink/svxlink.d/ModuleEchoLink.conf

第五行刪掉開頭的 #,讓IPsubnet mask 生效。

14-17 行,輸入自己的資料。再提一下,Echolink 僅供持有業餘無線電牌照人仕設立和使用。考牌資料可參考上欄問題雜綿。

28 行,刪掉開頭的 #,以使用美式英語。

34-38 行,按自身器材輸入相關參數。

ctrl+X,選 Yes 存檔。

編輯 svxlink.conf,指令:

sudo nano /usr/local/etc/svxlink/svxlink.conf

13LOCATION,刪掉開頭的 #

20MODULESModuleParrot,ModuleTclVoiceMail 用不著,刪掉之。下文提到機場天氣報告 module 也是加到這裡。

21,45 行,改為自己的 callsign

22 行,我 prefer15 分鐘自動報一次 callsign,所以 set15

28 行,RGR_SOUND_DELAY 設為 100 。較易聽到發射完前的 roger beep

29 行,REPORT_CTCSS 前加 # 號。因不用 PL tone,所以自動報時也無需加上 PL Tone 訊息。

34,36 行,刪掉開頭的 # 。有需要時可用 DTMF 指令開關模組。

171 行,改為 SERIAL_PORT=/dev/ttyUSB0 ,即最後幾個字改為 USB0

172 行,改為 SERIAL_PIN=CTS:SET,即加進 :SET

193 行,開頭加 # 因沒有 DTMF 硬解。

206 行,改為 PTT_PORT=/dev/ttyUSB0,即最後幾個字改為 USB0

221-229 行,按自身坐標,設備種類輸入相關資料。這些資料會顯示在 aprs.fi 地圖上。

設置完成。ctrl+X,選 Yes 存檔。Reboot 系統一次。

 

GPIO to PTT  的迷思

如有同好想試 GPIO 控發射 PTT,可參考官網文章末段  Using GPIO has its own challenges

https://github.com/sm0svx/svxlink/wiki/InstallSrcHwRpi

 

有無新花臣?

有,機場天氣訊息放送 !

如想試玩埋機場氣象訊息發放,請按下步驟進行,指令:

sudo nano /usr/local/etc/svxlink/svxlink.d/ModuleMetarInfo.conf

5-7 行。開頭的 # 號刪去。

5 行, STARTDEFAULT=VHHH 

VHHH 是香港國際機場的 ICAO 號,其他地方同好按所在地填上你附近的機場 ICAO

最後一行如想通過 DTMF 選擇鄰近其他機楊,請按心儀次序輸入。我對其他鄰近機場無興趣,填回 VHHHok

AIRPORTS=VHHH

Ctrl+x save

請記著,上面提到的 svxlink.conf 需載入這個 Module,即第 20 行:

MODULES=ModuleEchoLink,ModuleMetarInfo,ModuleHelp

 

vhhh

 

實際運行

Rpi 只是一塊 PCBA (機肉),沒有任何保護裝置。長期運行,需注意以下各點:

  1. 外殼保護,散熱方面,我沒有加上任何散熱器到處理器上,也未致於熱死。
  2. 優質,穩定的電源火牛。不要用雜嘜牛,吹到有 3-4A ;但怎量度也不足。我用舊電話的充電牛連原裝線,效果良好。但留意,這些電子牛往往不敵 RF 的干擾,不要放近發射機旁。
  3. 音頻線,電源線加磁環除去雜波
  4. 一如很多人一樣,家中用上扁平 network cordRPi2rj45 新用上有led 燈號的插座,發現經常閃得古怪。換上一條有牌子的 Cat6 線。閃爍回復正常。一條質優的 Cat6 也可 withstand 鄰近的 RF 干擾。起碼願望是如此。 Cat6 線也不要破費到電腦店,華輝等貴價購入,在新高登,大角咀的夜冷店時有工程完成剩下的 Cat6 線,名牌兼原裝膠袋沒開封,長短均備。我用的也是廿蚊三條的貨仔。

 

YouTube 示範

 

後記

以最新版的 svxlink 作為 echolink node 運作了約一個月,情況大致良好。前文提到的死機問題暫未發生。而 svxlink 功能強大,待穩定性運行滿意後,會嘗試開啟其他功能,一於玩盡佢。

Posted in EchoLink | Tagged , , | 4 Comments