TNC-Pi step-by-step setup with Raspberry Pi Rev B

This article explain how to configure your Raspberry Pi Rev B to work with the TNC Modem TNC-Pi. This modem can be ordered here : http://www.tnc-x.com

apt-get update
apt-get upgrade
apt-get install build-essential libax25-dev libx11-dev zlib1g-dev libncurses5-dev ax25-tools
apt-get install i2c-tools
vi /etc/modprobe.d/raspi-blacklist.conf

* Comment the line : #blacklist i2c-bcm2708
vi /etc/modules
* Add the lines:
i2c-dev
i2c-bcm2708
wget http://www.tnc-x.com/params.zip
unzip params.zip
mv pitnc_* /usr/local/sbin/
chmod +x /usr/local/sbin/pitnc_*
wget http://www.tnc-x.com/I2ckiss.zip
unzip I2ckiss.zip
mv i2ckiss /usr/local/sbin/
chmod +x /usr/local/sbin/i2ckiss
vi /etc/ax25/axports

* Create a line : 1 YOURCALL-10 19200 255 2 TNCX
pitnc_getparams 0 0
* It should display something like this :
01 TXDelay – Zero means use ADC 40
02 Persistance 64
03 Slottime (in 10 mS) 10
04 TXTail 0
05 Full Duplex – Not used 0
06 Our Channel (Hex) 00
07 I2C Address (0 = async) Hex 00
ADC Value 30
8 0 28 40 a 0 0 0 0 1e 74 c0 sum 0
pitnc_setparams 0 0 7 16
* This command line set the i2c device address to 16 (decimal) – 0x10 Hex
*** Power off & power on your raspberry – reboot is not enough !! ***

pitnc_getparams 1 16
*It should display :
<...>
07 I2C Address (0 = async) Hex 10
<..>
i2cdetect -y 1
* It should display :
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: — — — — — — — — — — — — —
10: 10 — — — — — — — — — — — — — — —
20: — — — — — — — — — — — — — — — —
30: — — — — — — — — — — — — — — — —
40: — — — — — — — — — — — — — — — —
50: — — — — — — — — — — — — — — — —
60: — — — — — — — — — — — — — — — —
70: — — — — — — — —
i2ckiss 1 16 1 10.1.1.1
* This creates ax0 network interface with ip address 10.1.1.1

You are now ready to use you prefered aprs application for aprs !

If you want to install a second TNC-Pi, you just have to change the i2c device address (replace 16 by something else & use another ip address) in the following commands :
* pitnc_setparams 0 0 7 XX
* i2ckiss 1 16 1 10.1.1.YY
Don’t forget to power off & power on the raspberry after the first command or the changes will not take effet !!!

This entry was posted in Electronique, Non classé, Radio, Raspberry Pi and tagged , , , , , , , , . Bookmark the permalink.

3 Responses to TNC-Pi step-by-step setup with Raspberry Pi Rev B

  1. Brad Davy says:

    I just purchased a Raspberry Pi 3. I have been using a TNC-X for a couple years with windows, but am trying to set up an APRS I-gate with the Raspberry. I tried going through these instruction, but when I get to the pitnc portions, it just keeps telling me “retrying”. The TNC shows up in the dev/serial/ location as usb-Coastal_Chipworks_TNC-X_by_W2FS_FTWWY120-if00-port0
    I’m using the APRX software, and the program runs, but I’m not getting any data back from the TNC-X.
    I’m a complete newbie to the Raspberry Pi. Any advice?

  2. Rob Mack says:

    Brad Davy, did you ever figure it out? I’m having the same problem!

  3. Francois ROL - F6FKQ says:

    I am using an old Pi0 with two tnc-x for years in a digipeater running under Raspbian and Digined.
    The two TNC-X are connected in I2C (ax0 and ax1). Every TNC-X must be configured alone for its I2C address (07) and Channel (06). If not there is a conflict during the configuration process.
    Then an internal port called xastir (ax2) is created with kissattach /dev/ptmx xastir for the application XASTIR
    At last digined is opened for the thtee ports
    A second internal port called igate might be created (ax3) for an I-Gate application purpose.
    To be noted that XASTIR has an internal I-Gate function working well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.