This article introduces APRS Tracker – Dantracker installation procedure and configuration.
It also demo using it with hardware TNC as well as software TNC “Direwolf” respectively.
Dantracker is a famous APRS Tracker solution on several years ago. Its GUI is quite professional and better than others tracker solution which use Dot Matrix LCD Display.
But it is not popular in the APRS activities. I think this is because the installation information is not enough, and procedure is quite complex.
I had success to compile and run it in a Raspberry Pi 2 recently, so let’s share my experience for this great project.
Why Dantracker
- It shows the latest receive APRS station information
- And the recent 8 APRS stations brief information
- It also shows self GPS information, and Wx station if received
- It transmits APRS beacon periodically
Two version of Dantracker
Dantracker is design by KK7DS.
N7NIX based on the original and developed his version. His version supports APRS texting, and add shutdown feature.
N7NIX screen, Courtesy of http://www.trinityos.com
I like the GUI of the original, so I tried the KK7DS one.
Hardware preparation
I using a Rpi 2. Please consider solder a pin header to the reset pin first.
Moreover, an external TNC is need. I am using a self-made TNC-X. In the last section I will demo to use Software TNC.
A USB to RS-232 cable used to connect to the TNC.
And a USB GPS.
Software preparation
As I found the latest Rpi OS Jessie prompts error during compiling, I use the previous OS wheezy. Last version date 5-May-2015. You may download it from official site .
Reference
Except some YouTube demo, there are 3 articles for reference, here are the links:
http://www.pa0esh.nl/wordpress/?wpfb_dl=6
http://www.trinityos.com/HAM/CentosDigitalModes/RPi/n7nix-dantracker-install.txt
Installation Procedure
Before software installation, please connect the USB to RS232 cord, USB GPS to Rpi respectively.
You should have basic knowledge to setup the Rpi, please enable it to boot in CLI (text mode).
In text mode, type the commands to show the connected USB devices.
[shell]
lsusb
[/shell]
To avoid the OS upgrade to Jessie, we update the repositories list only.
[shell]sudo apt-get update[/shell]
In order to free space of the SD card, remove a big software “Wolfram” we no need.
[shell]sudo apt-get purge wolfram-engine[/shell]
Install the requested library, type the commands in one sentence carefully.
[shell]
sudo apt-get install screen git python-serial libgtk2.0-dev gtk+-2.0 build-essential gcc pkg-config imagemagick automake autoconf libtool cvs curl libncurses-dev libssl-dev libax25-dev
[/shell]
It needs approx. 1 hour for download and installation.
Afterward, we download the KK7DS’s Dantracker from github.
[shell]git clone https://github.com/kk7ds/dantracker[/shell]
Go to the dantracker folder after download. We need download and install the library “libfap”.
To avoid compiler error, please use ver 1.3, not the latest ver 1.5.
[shell]
cd dantracker
wget http://pakettiradio.net/downloads/libfap/1.3/libfap-1.3.tar.gz
[/shell]
Decompress, install and config it by following commands:
[shell]
tar xvzf libfap-1.3.tar.gz
sudo cp libfap-1.3/src/fap.h /usr/local/include/
cd libfap-1.3
sudo cp src/fap.h /usr/local/include/
./configure make
sudo make install
sudo ldconfig
[/shell]
return to the dantracker folder
[shell]
cd ..
[/shell]
Then we install the library “iniparser” by similar method
[shell]
sudo wget http://ndevilla.free.fr/iniparser/iniparser-3.1.tar.gz
tar xvzf iniparser-3.1.tar.gz
cd iniparser
sudo cp src/iniparser.h /usr/local/include
sudo cp src/dictionary.h /usr/local/include
make
sudo cp libiniparser.* /usr/local/lib
sudo ldconfig
[/shell]
Then return to the dantracker folder by cd..
We need edit some parameter before compile the program. We use nano the edit the file aprs-is.c
[shell]
nano aprs-is.c
[/shell]
Please change the Callsign, APRS server, static coordinate to your own information.
Save & leave after done.
We also need to edit the Makefile to avoid warning message during compiling.
[shell]
nano Makefile
[/shell]
We add -lm on the last of the first sentence. Save & leave afterward.
We compile the program by the following commands:
[shell]
touch .revision
make
[/shell]
Then go to the images folder to execute make command:
[shell]
cd images
make
[/shell]
The installation procedure was complete. Please backup your SD card before next step.
Reboot your Rpi and go to the dantracker folder. Type the command to show the TNC and GPS port number.
[shell]
sudo ./detect_gps.py
[/shell]
Go to the sub-folder “examples”, copy the aprstest.ini to parent folder, and rename it to aprs.ini .
[shell]
cd examples
cp aprstest.ini /home/pi/dantracker/aprs.ini
[/shell]
This aprstest.ini is a TESTING configuration file. The data packet was come from the Rpi network port.
It works like a APRS traffic monitor for your cover area, no radio need.
Use nano command to edit this aprs.ini file, change the callsign with SSID, and static coordinate to your own information.
Save & leave the editor afterward.
To run the Dantracker in test mode, we enter these 2 commands:
[shell]
screen -dmS aprs ./aprs -m /home/pi/dantracker/aprs.ini
screen -dmS ui xinit /home/pi/dantracker/ui
[/shell]
YouTube demo
It demos the Dantracker works in Test mode.
Add Shutdown function
You may found Dantracker did not have any option to quit the program. What we can do is reboot the device by short the reset pin.
To solve it, we add a turn off button to turn the Rpi off. We use Pin 39 (Gnd), Pin 40 (GPIO21)
Please refer the following link, It is a python program. Ensure change the GPIO to 21.
https://www.element14.com/community/docs/DOC-78055/l/adding-a-shutdown-button-to-the-raspberry-pi-b
The Rpi2 re-allocate to a portable platform
Practical test in outdoor
If the above test is OK, it is time for outdoor test.
Now we copy the aprs.ini file from the examples folder to parent folder dantracker.
We use nano to edit this file. Here is my content for reference:
[plain]
[gps]
port = /dev/ttyUSB1
rate = 4800
type = nmea
[tnc]
port = /dev/ttyUSB0
rate = 9600
type = KISS
init_kiss_cmd =,
[telemetry]
#port = /dev/ttyAMA0
rate = 9600
type = vr2xkp
[station]
mycall = VR2XKP-9
icon = /j
beacon_types = weather,phg
power = 4
height = 0
gain = 4
directivity = 0
digi_path = WIDE1-1,WIDE2-1
[beaconing]
atrest_rate = 1800
#atrest_rate = 120
min_speed = 10
min_rate = 300
max_speed = 60
max_rate = 60
course_change = 30
[comments]
enabled = 1,2,3,4
1=Using a home-built tracker
2=http://danplanet.com
3=Software $ver$
4=Set path to TEMP1-1,WIDE2-1 to digi
[/plain]
Some notes of this config file:
- Add # in the first line of telemetry section
- GPS / TNC port please change to your own port number. it shows by sudo ./detect_gps.py
- Please change to your callsign
- The unit of the beaconing interval is in sec.
I also found some useful information:
Type ./aprs –help will shows options.
After enter the Dantracker, press C will shows a blank screen.
When outdoor test, problems found:
1/ The screen will blank after 10min, unless you move the mouse or press keys in keyboard in the mean time.
It is screen power saver feature (or bug if you dislike it) of RPi.
I check and follow guidelines from web but still cannot disable it, so sad…
2/ If you refer the KK7Ds demo on YouTube, you will found on the bottom it shows voltage and temperature in F.
It may be the function of telemetry in the aprs.ini config file, I study the source code and try to talk with it, but still fail.
Anyone knows how to solve the 2 problems, please share your idea.
Run in real mode
Type the following 2 commands to run the dantracker, ensure connected the GPS, Hardware TNC and Radio beforehand.
[shell]
screen -dmS aprs ./aprs -t /dev/ttyUSB0 -m -c /home/pi/dantracker/aprs.ini
screen -dmS ui xinit /home/pi/dantracker/ui
[/shell]
The initial time of the program is approx. 5 sec, and then it should shows the GPS info, and valid packet data received.
One more problem was found during outdoor test. The clock in the GPS section was incorrect. It may be caused by the Rpi did not have any RTC, and my Rpi did not have any Internet connection at outdoor, so the Rpi fake clock shows incorrect time.
If GPS data is invalid, the distance data also incorrect
YouTube demo
It is outdoor test demo.
Work with software TNC – Direwolf
Not all ham equipped a TNC, and I tested the dantracker can work with software TNC Direwolf in the same Rpi.
To replace an external TNC, we use a USB sound dongle and a DIY sound modem.
Here is the sound modem circuit.
Courtesy of VE3ELB website
In fact it is almost same as the one used in the Echolink article.
We add an extra Green LED in series with a 1k resistance & 1N4148 to the RS232 DCD. It will light up when receive valid data packet.
The PTT circuit connected to Rpi via a RS232 to USB cord.
It is the 2 audio isolated transformers I used. Although the impedance is 600Ω: 600Ω. But the DC resistance of the primary and secondary is different. The primary resistance is ~51ohm, and the secondary resistance is ~70 ohm.
The sound modem circuit is connected to the USB sound dongle’s Mic and speaker respectively.
It use stereo jack, but sleeve and tip only. Sleeve for the signal ground, and Tip for the signal.
Software Preparation
Firstly, please backup your SD card before installation of the Direwolf.
And now we install the software TNC “Direwolf” in the same Rpi.
The procedure refer to it’s official pdf files. I strongly recommend read it before installation.
Official site of the software TNC Direwolf is here:
https://github.com/wb2osz/direwolf
Three important document files in pdf:
- Raspberry-Pi-APRS.pdf
- Raspberry-Pi-SDR-IGate.pdf
- User-Guide.pdf
First of ALL, check the GCC to ensure it support floating point. You should see “–with-fpu=vfp –with-float-hard“ in the return value.
[shell]
gcc –v
[/shell]
We delete the bundled pulse audio by the commands:
[shell]
sudo apt-get remove –purge pulseaudio
sudo apt-get autoremove
rm -rf /home/pi/.pulse
[/shell]
Please reboot your Rpi afterward, then we install request sound library:
[shell]
sudo apt-get install libasound2-dev
[/shell]
We download the Direwolf from Github.
[shell]
cd ~
git clone https://www.github.com/wb2osz/direwolf
cd direwolf
[/shell]
Then we compile Direwolf by the following commands:
[shell]
cd ~/direwolf
make
sudo make install
make install-rpi
make install-conf
[/shell]
After installation of Direwolf, we run alsamixer to check the USB sound dongle default level. Please refer page 34 of the User-Guide.pdf for detail.
Press F6 to select USB Audio Device
Ensure mic, speaker did not mute or disabled. You may refer my signal level.
Now we use nano to edit direwolf.conf in the root directory.
Remove # from the line ADEVICE plughw:1,0
We set the PTT to /dev/ttyUSB0 RTS. It light up the Red LED during transmit.
We set the DCD to /dev/ttyUSB0 DTR. It will light up the Green LED when receive valid data packet as mentioned.
The preparation of the Direwolf side was compared.
Please save & exit.
Setting on the Dantracker side
Direwolf will setup a virtual KISS TNC, Dantracker’s TNC setting need to talk with it.
We change the TNC Port to /tmp/kisstnc.
You may consider change the beacon Tx internal from 30min to 5 min for a faster test.
Dantracker + Direwolf Integrated test
To test Direwolf work with Dantracker, run the Direwolf in the daemon firstly. It needs about 5 sec to initialized.
[shell]
screen direwolf –p
[/shell]
Wait several seconds to ensure the direwolf is operate normally.
Then press Ctrl +A, and C to return the main program. We enter the Dantracker folder, enter the following 2 commands to execute the dantracker
[shell]
screen -dmS ui xinit /home/pi/dantracker/ui
screen -dmS aprs ./aprs -t /tmp/kisstnc -m -c /home/pi/dantracker/aprs.ini
[/shell]
YouTube Demo
It is a demo to shows Dantracker work with Direwolf.
What’s more – Morse Beacon
I also tested the morse beacon feature of Direwolf.
Edit the Direwolf conf file and enable it.
The first Morse beacon will be transmit after 3min from Direwolf start. Then the interval is 10min periodly.
However, I found the Beacon always chopped, whatever the WPM (speed) set. It may be caused by it run with Dantracker in the same Rpi.
What’s Next
As the Dantracker and Direwolf request compile, and Rpi 2 equipped 4 core, we may try to use “make -JT4”during compiling to let it works with all 4 core.
For the time incorrect issue, We may setup the RPi clock work with GPS’s.
Nice write up. I use direwolf with an SDR dongle as an iGate and was put off using Dantracker as a display because of the complexity in setting it up. Maybe its time to give it another go.