APRS Digi Project number 2 – The TNC-Pi

I had success creating a Digi/I-Gate with the TNC-X and a old used laptop. I wanted to install a few more, but did not have any more spare machines with low power draw (due to inverters used at repeater sites) so I figured I would try the TNC-Pi to do the same thing. John from Coastal Chipworks has created an excellent product, and has been great to deal with (especially his prompt shipping which was around the time the podcast HamNation was suggesting it’s users to purchase it as well for their Smoke and Solder segment on the show).

There are now 6 of these units burning in on my desk. Here is how I built all 6 of them:

Here are my steps for setting up the Pi once the TNC-Pi is built and mounted to the Pi. At this time it is not imperative that you have the radio interfaced to the TNC-Pi, but it will make it easier to test.

First step, prepping

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vim

To use the serial port to connect the TNC-Pi to the Raspberry Pi, you will need to make a couple of changes to the Pi configuration. Edit the cmdline.txt file in the boot directory and make the following changes:
1. Remove the following: console=ttyAMA0, 115200
2. Remove the following: kgdboc=ttyAMA0, 115200

sudo vim /boot/cmdline.txt

Next, edit the inittab file in the /etc directory and remove the line that says:
T0:23:respawn:/sbin/getty –L ttyAMA0 115200 vt100
You will find it at the very bottom of the config file, or at least I did in my Raspbian installs.

sudo vim /etc/inittab

Next, you can run the easy config script to set up your pi…

sudo raspi-config

The raspi-config is a script used to correct the time zone, remove the auto-desktop start, an update, and a few other small things as you may wish. I recommend changing the hostname (under advanced) in order to make it unique. In my case, I use the callsign used by the modem. Either now, or once complete, change the password for the user “pi” to something other than “raspberry”. Your changes are effective immediately. Exit the tool once you are comfortable with the settings, then reboot your pi, and continue.

sudo reboot now

sudo apt-get install subversion
svn co http://repo.ham.fi/svn/aprx src
cd src/trunk
./configure && make clean all
sudo make install

cd ~

Second step, config…

Move the config file to a new location.

sudo mv /etc/aprx.conf /etc/aprx.conf.orig

You will need to edit the APRX config to your liking. You can see my example config here. I highly suggest that you read up on all the very interesting things you can do. I am hoping to add a temperature sensor to the telemetry portion by creating packets with a perl script. These crafted KISS frames will be read and broadcast by the aprx application if configured correctly.

If you are planning to use this as a digi; When creating your config I plead with you, please use viscous-delay feature. This setting alone will greatly delay the over saturation on the 2 meter APRS frequency we use.  If you are just operating as a fill-in digipeater this setting is most powerful as it will listen for the delay period (say 5s) for any packets being digi’s that match the last one heard. If it hears another station has digi’d the packet, then it is dropped from the buffer and not sent to the radio, instead it is sent only to APRS-IS (if you have it configured to do so).

Read more about the power of APRX at http://wiki.ham.fi/Aprx.en and specifically about viscous delay here.

HELPFUL LINK: The password for the APRS-IS server was gathered here: http://apps.magicbug.co.uk/passcode/

Third step, Starting up on boot.

Create an aprx bash script to start and stop as desired…This will be used during bootup too.

sudo vim /etc/init.d/aprx
#! /bin/sh
# /etc/init.d/aprx

case “$1″ in
start)
echo “Starting aprx”
/sbin/aprx
;;
stop)
echo “Stopping aprx”
killall aprx
;;
*)
echo “Usage: /etc/init.d/aprx {start|stop}”
exit 1
;;
esac

exit 0

I later modified mine with a restart option by separating a stop and a start with a 5sec sleep timer. NOTE: Be careful copying the script above as some browsers render the quotation marks as periods, so make sure that before you save the file you replace the periods with quotation marks as needed.

Then

sudo chmod 755 /etc/init.d/aprx
sudo update-rc.d aprx defaults

Play, reboot, test…

To test APRX, it’s config, and to understand what is happening, I suggest this command

aprx -vvv -ddd -i

Things I learned…If you get this error when running the software, you may need to reboot or ensure that you have followed the two steps that involve cmdline.txt and inittab

1376738047 TTY /dev/ttyAMA0 OPEN – fd=-1 – errno=13 (Permission denied) – FAILED, WAITING 30 SECS

If you have any questions, Issues, or whichever let me know. I can be emailed at <mycallsign>@<mycallsign>.ca and will happily provide any feedback.

The next step is to interface your radio to your TNC-Pi. Good luck!

APRS Digi Project

A while back I installed QSNL39, a fill-in digipeater operating in Quesnel BC in 144.390Mhz. Due to it’s location it fills in the bowl very well, however it is not heard well (unknown why) by the Milburn Mountain machine.

I am now prepping a spare old laptop (using this as it comes with a built in UPS). I am adding the APRX software as it is a nice light weight linux digi that interfaces nicely with KISS TNCs. Currently the TNC-X I am using has a X-Digi Daughter board which is controlling the TNC, and I am unsure if I will continue to use it, or have the APRX software do all the controlling for. At this point, I expect I will be removing the board.

Installing APRX is very simple, here’s how simple:

cd /tmp
sudo wget http://ham.zmailer.org/oh2mqk/aprx/aprx_2.07.539-1_i386.deb
sudo dpkg -i aprx_2.07.539-1_i386.deb
cd /etc
sudo vim aprx.conf

From here, I edited a few lines of config to suit my install

mycall VE7WNK-2
myloc lat 5258.77N lon 12229.61W
server bc.aprs2.net
<interface>
..serial-device /dev/ttyS0 19200 8n1 KISS
..callsign $mycall # callsign defaults to $mycall
..tx-ok true # transmitter enable defaults to false
</interface>
<beacon>
..beacon symbol "I#" $myloc comment "VE7WNK Quesnel Bowl Digi"
</beacon>
<digipeater>
..transmitter $mycall
..<source>
....source $mycall
..</source>
</digipeater>

 

Next, I saved the config and restarted the process as follows:

/etc/init.d/aprx restart

Next, I checked ARPS.fi to ensure that it was there, and sure enough, after about 20 seconds it appeared.




Once I have the unit installed I will be able to publish more information. I am excited to have this running and can not wait to see it in action.