From charlesreid1

TNC Pi Manual: File:TNCPi.pdf

Basic Idea

The whole idea behind the TNC Pi is turning a Raspberry Pi into a TNC modem.

Implementation Details

TNC Modem-RPi Connection

To connect the Pi to the TNC modem:

  • Use a D-wire 9-pin D-sub plug to mate with the 9-pin port on the TNC Pi; or,
  • Use the four holes in the center of the board marked "Radio"

If you use a 9-pin, the wiring is as follows:

  • Pin 1 - square pad - tx audio
  • Pin 3 - PTT
  • Pin 5 - RX audio
  • Pin 6 - Ground

If you are using the "Radio" pins:

  • Pin 1 - square pad - RX audio
  • Pin 2 - ground
  • Pin 3 - TX audio
  • Pin 4 - PTT

The R7 potentiometer adjusts the transmit volume.

RPi Software

Update yer stuff:

apt-get update
apt-get upgrade

Enable uart (see manual).

Restart.

Install AX25 tools.

Set AX25 config and connect to device.

Listen/make calls.

"The TNC-Pi can be used with applications that use the Linux ax.25 stack, or applications that expect to see a KISS TNC on a serial port."

Xastir

Xastir is an APRS program: Xastir

Main page link: http://xastir.org/index.php/Main_Page

Details about getting it to interface with a TNC modem are covered in the TNCPi modem document (link at top of page).

RPi RX Only igate

Steps Outlined

Steps to create an APRS receive-only igate using the Raspberry Pi and TNC-Pi:

by Paul Fischer, KC9RGZ

Equipment needed

a) Raspberry Pi model B

b) TNC-Pi (from Coastal ChipWorks at http://tnc-x.com)

c) Power Supply

d) Blank SD card (4 GB?)

e) Windows PC to format and load the SD card

f) Ethernet cable and router/switch with access to the Internet

g) USB Keyboard

h) Monitor (I use an old analog TV with RCA jack input)

i) USB Mouse – only if you want to run the graphics environment on the Pi. Not required for text only setup.

j) 2M radio or scanner set to 144.39MHz (at least that’s the frequency here in the USA!)

Detailed Instructions

Here's how you make it:

1. Download the boot image for Raspbian “wheezy” (2013-05-25-wheezy- raspbian.zip) from http://www.raspberrypi.org/downloads and extract the image (.img) file.

2. On a Windows PC, format the SD card using SDFormatter4exe.zip – also available from http://www.raspberrypi.org/downloads. Use the options Format Type “QUICK” and Format Size Adjustment “ON”.

3. On a Windows PC, use Win32DiskImager to write the image on an SD card (also downloadable from above site). Click the folder icon to the right of the Image file box to select the image file from step #1. Use the pull down tab to select the SD card and hit the “Write” button. This process takes a few minutes.

4. Put the SD card in the Rpi; connect the network cable, monitor and keyboard. Then the power supply and it should boot into the raspi-config application. This application can be run again once logged in by running “sudo raspi-config”).

5. In the raspi-config program set these things:

a. Internationalisation Options; Change_locale – choose “en_US. UTF-8 UTF-8”

b. Internationalisation Options; Change_timezone – America; Central

c. Internationalisation Options; Configure_keyboard – set to “Generic 105-key (Intl) PC; Other; English (US) – English (US,alternative international)”

d. Overscan (Advanced Settings) – set to enable

e. Hit right arrow key and select the “Finish” key

f. Reboot: “sudo shutdown –r now”

6. Login with login “pi” and password “raspberry”

7. Upgrade to root privileges “sudo su”

8. If the monitor doesn’t display well (mine didn’t), edit the file /boot/config.txt and uncomment the line:

 overscan_left=16

with login “pi” and password “raspberry”And then re-boot. The above line will move the display to the left 16 pixels. You can play with the other settings as well until you are happy with the display.

9. Verify the software is up to date (this could take a while) apt-get update apt-get upgrade

10. Edit the file /boot/cmdline.txt and remove the following parts of the line:

 console=ttyAMA0,115200 kgdboc=ttyAMA0, 115200

11. Edit the file /etc/inittab and remove the line that says:

 T0:23:respawn:/sbin/getty –L ttyAMA0 115200 vt100

12. Reboot the device using the command:

 shutdown –r now

Then log back in using userid and password listed above and upgrade to root privileges again.

13. Get the aprx digi/igate software:

 cd /usr/src
 wget http://ham.zmailer.org/oh2mqk/aprx/aprx-2.05.svn485.tar.gz

Note: This version of aprx was current at the time these instructions were originally written. There is almost certainly a more recent version available now. To find out what the number of the current version is, go to: ham.zmailer.org/oh2mqk/aprx and look for a file that is similar to the one above with a more recent version number and svn number. Then issue the wget command for that file instead of the one referenced above.

 tar xvf aprx-2.05.svn485.tar.gz cd aprx-2.05.svn485/ ./configure
 make
 make install
 mkdir /var/log/aprx

14. Save a copy of the original aprx configuration file

 cp /etc/aprx.conf /etc/aprx.conf.orig

15. Edit the file /etc/aprx.conf and make sure the following lines are included (please use your own call sign and latitude/longitude). Many of these lines are already included, others just need to be uncommented. Just make sure all of these are included:

mycall KC9RGZ-11 <aprsis>
server noam.aprs2.net </aprsis>
<logging>
pidfile /var/run/aprx.pid
rflog /var/log/aprx/aprx-rf.log
aprxlog /var/log/aprx/aprx.log
</logging>
<interface>
serial-device /dev/ttyAMA0 19200 8n1 KISS
</interface>
<beacon>
beaconmode aprsis
cycle-size 10m
beacon symbol "/&" lat "4124.57N" lon "09041.26W" comment "RasPi Rx-only iGate"
</beacon>

16. Verify the serial port is available:

 chmod 666 /dev/ttyAMA0

17. Add the following lines to the end of the /etc/rc.local file to start the aprx program:

 printf “Start the igate daemon... \n” aprx

18. Reboot

 shutdown –r now

19. Log back in and verify the processes are running ps aux|grep aprx

20. Connect the radio and ensure you are gating data to the aprs network (check the files in /var/log/aprx)

21. Enjoy!


Notes:

1. Before the final move to “production”, you should change the password of the “pi” userid!

2. To backup the SD card (after you have it all working, so you don’t have to run the above instructions again!) – On a Windows PC, run the program HDDRAWCopy1.02Portable.exe (available from http://hddguru.com/software/HDD-Raw-Copy-Tool/). Select the SD card as the SOURCE and hit Continue. Double Click the “File” line to specify the name and location of the backup file (ex. 2013-07-03- wheezy-raspbian-backup). Use a file type of “Raw image (dd image) (*.img)”. Hit Continue, then Start.

3. Restore is done by reversing the source and destination (use the file as the source and the SD card as the destination).

Flags