Dixprs in Raspberry Pi – A next generation iGate solution

image

 

This article is the English Edition of my Blog article; hope to share my experience to the ham all over the world.

It describes the next generation iGate – Dixprs install in a Raspberry Pi.

 

APRS4R vs Dixprs

Why Dixprs

I had proceeded testing on Dixprs in RPi since last November. The performance is stable. While compare with APRS4r, the key benefit is the configuration saved on a plain text file. Here is the table shows the different between them:

iGate SolutionAPRS4rDixprs
privilegePiRoot
PlatformDebian/WRTWin/Mac/linux/WRT
LogPlain TextSqlite
Prog. Lang.RubyPython
Statusseems discontinuestill active
SupportGerman ForumGoogle Forum, handled by the developer
Config. FileGerman interface/ yaml fileConfig.txt
pre-request filespacked to the installation fileuser need download & install by themself
Operation modeDaemontext mode
Traffic shapeingnilYes
multi-RF Device?Yes
BlacklistnilYes
Wx supportYesNo
WebNo, unless loginPort 9999
Report Plugin supportNoMunin

According my understanding, the APRS4r is a postgraduate project which will discontinue after the team member graduation.

Dixprs was developed by Ha5di, and the programming language is Python version 2.X . Please be remind that the latest Python version 3.X is NOT compatible with 2.X .

Here is my points to introduce Dixprs as iGate:

It’s log used sqlite which may work with report plug-in munin; to generate graphical report.

It got Blacklist function. It is useful if some iGate’s coverage is duplicated.

It got a webpage to indicate the status of the iGate.

The configuration is a plain text file, as several configuration template provided.

 

Installation step

Please process a system update first

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

step 1: install python-dev

sudo apt-get install python-dev

 

step 2: install database sqlite

sudo apt-get install sqlite

 

step 3: install python serial library

wget https://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz

Untar the file to folder

tar –zxvf pyserial-2.6.tar.gz

Enter the folder to execute install

sudo python setup.py install

 

step 4: import sqlite3 and serial library to Python

Python

>>> import sqlite3

>>> import serial

Press ctl+D to leave afterward

 

step 5: install linux ax.25 library

sudo apt-get install libax25

sudo apt-get install libax25-dev

 

step 6: install python ax25 library, execute

Return to upper folder first

cd..

download python ax25

wget https://sites.google.com/site/dixprs/downloads/pyax25.tar.gz

Please untar to a folder, and compile it

tar –zxvf pyax25.tar.gz

./compile_ax25.py build

sudo ./compile_ax25.py install

 

step 7: import the ax25 library to python

Python

>>> import _ax25

Press ctl+D to leave afterward

 

The pre-request component was complete, Now we will install Dixprs

wget https://sites.google.com/site/dixprs/downloads/dixprs-2.2.2.tar.gz

Create folder /usr/locao/Dixprs first

sudo mkdir /usr/local/Dixprs

untar the file to the folder, please be remind that the –C after filename is capital letter.

sudo tar –xvzf dixprs-2.2.2.tar.gz –C /usr/local/dixprs

All the files should uncompressed to /usr/local/dixprs folder. We can edit the config.txt now.

There are 3 templates for the config file.

  • config-agwpe.txt
  • config-kiss.txt
  • config-ax25.txt

We may know the purpose by the template’s name. agwpe is used with software TNC agwpe. Kiss is used with kiss mode tnc. Ax25 is used for complete ax25 protocol decoding.

As I am using Tnc-X kiss mode modem, so I use the config-kiss.txt as configuration. Please copy it to config.txt . Do NOT overwrite the template file.

cp config-kiss.txt config.txt

Please shutdown the Rpi first

sudo shutdown -h now

Connect the KISS mode TNC and transeceiver. Then power up the Rpi, and go to the Dixprs folder

Edit the config.txt by sudo privilege:

sudo nano config.txt

The content is English plain text format. Please fill in the correspond information, such as callsign,ssid,serial port,co-ordinate and so on.

Save after editing. The installation was complete.

Testing

Dixprs request root privilege to run, which is disable default on Linux system. Please refer the following site to enable it.

http://www.instructables.com/id/Web-Control-of-Raspberry-Pi-GPIO/step2/Enable-Root-Account/

Please login as root afterward, and go to the Dixprs folder

Run the Dixprs by the command:

./dixprs.py

Dixprs runs in text mode, so you can know the running status of it. If there are no error message shown, your iGate should work. Please login to aprs.fi to counter-check. Your iGate should appear.

On the other hand, you may use a computer which on the same subnet with your RPi. Please according the format to enter the RPi address on the computer’s browser URL.

http://RPi_ipaddress:9999

You should see the Dixprs iGate status Webpage.

 

What’s more

Telemetry

Visit aprs.fi, you can view the traffic information from your iGate. This feature on APRS4r are unavailable.

clip_image001

 

munin plugin

As mentioned before, Dixprs use sqlite which support munin to generate graphical report.HG2EBH write munin scripts for the real time packet status report. However, you should modify the scripts to fulfill your local situation.

http://aprs.ham.hu/munin/ham.hu/hg1pny.ham.hu/index.html#Dixprs

clip_image002

Courtesy of Dixprs official page

You Tube Demo

Dixprs @ Raspberry Pi, demo by VR2XKP

 

Conclusion

There are many iGate solution, some by MCU project, some by PC. However, install a iGate Linux solution on a Raspberry Pi should be best choice: power consumption low, operation costs low, flexibility high.

The Dixprs is the second iGate introduced on my Blog. It’s English interface more easy to setup. It also works on various platforms. And it provides telemetry, web status page which absent on APRS4r.

Besides, the programming of Dixprs is Python, a popular programming language recently. You may found many projects which from amateur to NASA using Python.

Python is a free, easy to learn programming language. You may view the sources code files on the Dixprs folder. If you want a deep knowledge on the APRS operation, it is a very good resource.

Further Reading

My first igate article:

Use Raspberry Pi as I-Gate, a $35 solution

Posted in English Articles | Tagged , , , | 2 Comments

以舊 Android 電話作為 APRS Tracker 方案淺談

image

 

前言

這裡介紹的是在 Android 電話沒有WiFiMobile network情況下,以免費軟件 APRSdroid 和一個附加線路將電話變為一個 aprs tracker

 

Why Android phone

在數碼流動設備獲取方面,香港人是幸福的。最新的型號往往第一站就是登陸這裡。更甚者,telco半買半送,你肯轉會就是了。積下來,個人隨時有起碼兩三部 smartphone

有用還好,沒用,賣買不掉就放在櫃筒底等發霉。雖則,自我安慰這是後備機嘛。但幾時有出動過。

既然如此,倒不如將之recycle,和ham器材協同使用。如自行用零件,MCU編程要達到同樣效果。金錢,時間,心血需消耗不少。時間應用在更重要的地方。

Android phone多已配備GPS,以她的人機介面: 觸控屏和鍵盤,作為一個流動的aprs tracker;這是無線電手、車機暫時做不到的方便。

和一些不玩 aprsham 交流,大部份因原不外是安全和私穩問題。其實解拆也不是沒法子的。

Tracker,傳送與否是你決定的,不是長期發射的,問題不大。

iGatelocationfix 的。這會是一個私穩問題。但其實將位置set到附近地方,只需使用者用 low power 就可 hit 到,問題也不大。

 

線路介紹

原文載於20125QST雜誌。以此線路配上 FT-817HFPSK31。這個線路是以 headsetmic 接端的 bias 供電,免卻外置電源之麻煩。

但不是所有android phone 也兼容(Bias電壓不足)。需確定 Vcc有最少1.8Vwork

image

courtesy of QST, May-2012

 

APRSdroid這個軟件,aprs愛好者一定不會陌生。她將電話經無線電話網絡變成一個tracker

這個方案,玩法是以軟件 APRSdroidandroid 電話的headset插頭內的phonemic輸入輸出AFSK,傳到circuit轉接到發射機(下稱手機),達到以RF path收發訊息之效。全程無需WiFiMobile network

prototype

 

Prototype 所有零件均為 on handtransistor用普通的就ok了。如實戰應用,電容用低電壓的,或全份料以 SMT 零件組裝,size 可壓到相當細。

 

組裝與調較

線路相當簡潔,沒有難度。最麻煩的可算是那個 4 pole headset 插頭焊接。我自問辣雞操控比筷子還好,但那個插頭根本不是供用辣雞焊接用的。如真是搞不掂,乾脆買條山寨headset剪線,或用舊 Nokia 耳筒線也可。兩VR調在中游位置即可。

4 pole

 

測試

測試機則關掉 WiFi,電話和數據網絡。Ensure 無其他路徑可出街。

測試機先進入 APRSdroid,Preferences => connection Protocol,AFSK via Speaker/Mic

connection Preferences, High-Quality Demodulator

 

Screenshot_2013-10-10-23-44-17             Screenshot_2013-10-10-23-44-41

 

另初測發現,沒有經緯度,即沒開 GPS 下,測試機進入APRSdroid 基本是不運作的。解決這個問題,我使用FakeGPSGPS 訊號,咁就可在室內進行測試。

測試機 Android Phone 接上circuit 和手機後,開啟 APRSdroid,選start tracking

另測試機經 HT 送出 APRS 訊息,由 igate 轉送到Internet,再傳到4G電話,約 4sec 就收到。

 

image

Testing result (dummy location)

 

注意事項

  • circuit在手機操作於 VHF 頻段時,可能會被干擾。需採取適當屏閉措施。
  • HT有時會長期PTT,暫不明導致原因。估計和干擾有關。
  • APRS 訊息中,綠色的是發射訊息;藍色的是接收到的訊息
  • APRSdroid 支援藍牙耳機,如使用一些內置支援藍牙的HT,或使用藍牙音頻 dongle接到 HT,這個 solution 就可變為無線了。

 

後記

這是一個小製作,但測試斷斷續續了幾個月。主因這其實想將之化為一個APRS MessengerPeer to Peer 時還好,但經 iGate 轉發訊息,iGate 不能與之協調而導至效果不好。

不過,作為 Tracker 則只需發射即可。一個只十多廿元的circuit,用來一試 APRS 則應是最超值的了。

Posted in APRS | Tagged , , | 6 Comments