tarpn_logo
 home    builders    Search


Initialize Raspberry PI for TARPN Node

This document is the initialization procedure for a Raspberry PI and TNCs of a couple of types. By following this recipe, even a newcomer to ham radio and to Linux can create a functional TARPN node. The scripts referenced by this document do most of the work. tnc_pi_ribbon_rpi_i6_07188x400
The node will have user access features permitting an operator to converse with other stations on the TARPN. Ports on the node are created by attaching TNCs (Terminal Node Controller) to the Raspberry PI. Supported hardware includes USB/serial adapter connected KISS TNCs (especially the TARPN NinoTNC), and TNC-PI units. Additionally, software running on the Raspberry PI may access the node, and vice versa, permitting network services and tools to be launched.

A linked document walks the operator through setting up the NinoTNC and/or TNC-PI units. NinoTNCs use USB cables with optional USB hubs. TNC-PI connect to the Raspberry PI using Insulation Displacement Ribbon cable connectors between TNC-PIs and the expansion header on the Raspberry PI. Serial-port connected TNCs must be separately initialized and that is not covered by this document.
Note that TARPN support of TNC-PI is being phased out over the next year or two. We will continue hosting the documentation on the web page but participant familiarity with the TNC-PI and the details of keeping them working are fleeing rapidly as TARPN participants migrate to the superior (and cheaper) NinoTNC.

The G8BPQ software configures most operating parameters of the serial port TNCs automatically based on the details expressed during the tarpn config process.. For generic KISS TNCs, MFJ1270B, KPC-3, KAM, etc... the operator must set the baud rate of the TNCs (possibly abaud command?) to a known rate (label the TNC appropriately), and then set them into KISS interface mode as per the instructions from the manufacturer.
Setting KISS mode may use a intfc or interface or kiss command.
This is the last time we'll specifically mention non-TARPN serial port TNCs except with respect to the node.ini file and tarpn config command.


See also
TARPN version of Coastal Chipworks TNC-PI and
TARPN NinoTNC
Unless you are sure you know how to work around some detail in this document, please follow it in-order else things can get very confusing.

The document assumes you have a desktop computer and know how to use command line tools like you might in MSDOS. Linux experience is a plus but I’m trying to make the document clear enough that any other computer user has a chance at going through this. I expect that if you do have Linux experience, you can work around the MSWindows-centric and Mac-centric descriptions.

This document contains information sourced from G8BPQ, from Coastal Chipworks, and from AG6QO, KF4LLF. The scripts were written by KA2DEW with help from many others.


If you are starting without an existing TARPN network, go ahead with this process. You will want to make a second node and link the two together on the bench!

We recommend you work with other hams and arrange to have a network of hams within 2m HT range who could host at least five nodes in their homes (maybe with a 6th at a mid-site?) to fully test and demonstrate the network. You should try to have all five lined up before installing this system else your labors are likely to lead to disappointment and frustration. Five seems to be the magic number where the key app (chat) is interesting enough to lead to grass roots network growth. The proximity required for simplex HT connectivity makes it very easy to get the system installed and working. This is of high value to new network builders. Furthermore, the cost of antennas when stations are local is much less than will be required for longer links.

Until a grass-roots critical mass of hams involved is reached, we recommend you keep the system portable for demonstration purposes.

The TARPN group consists of well over 300 hams who are conspiring to make network construction easier and cheaper while increasing the performance and enhancing the user experience once the system is working. Once you have two Raspberry PIs communicating on your desk, and once you have five hams in full quieting simplex range or in HT range, contact the group via our email reflector and talk about what you want to do and who you want to do it with. The group will figure out what resources could make your job cheaper.

A group project is more fun, and doing things in quantity saves money and time while creating local experts to solve future growth concerns.


Summary of the procedures to configure your PI Linux G8BPQ TARPN node:

NOTE: Raspberry PI will not boot without an microSDcard containing a bootable image.

Note: This was only the summary! Read on below and follow the instructions explicitly to achieve success.

Notes while reading the document

Sometimes I substitute Ø in place of 0 (zero). I did this because in some fonts a O and a 0 look the same. Sometimes I did not make the substitution because the intent to use zero is obvious. One case which is common in these instructions is the device "ttyACM0". This is ACMzero. I will write it as ttyACMØ. If you copy and paste my instructions, you will see that Ø does not mean anything to the Raspberry PI. Please be careful.

Getting Started

BUY a Raspberry PI, TNCs, cables, power supplies

See the Node Shopping List

Prepare the µSDcard

Obtain a laptop or workstation with a µSDcard reader/writer, or get a read/write dongle for your computer.
Obtain a 16GB or 32GB µSDcard for your computer.
Go to Raspberry PI org and get their Raspberry PI Imager SDcard preparation software.
Install the tool on your workstation.
Insert a 16GB or 32GB µSDcard.
Run the Raspberry PI Imager tool and select the Operating system titled Raspberry PI OS(32-bit) with Raspberry PI Desktop.
Click SD card and find your µSDcard on the list. On my computer, the SDcard shows up at the bottom of the list and is called "Generic Mass-Storage Media".
Click "WRITE"
Wait for the OS to be full written.
The Raspberry PI imager ejects/unmounts the card for you.
Unplug the SDcard and install the non-powered Raspberry PI
Raspberry PI Imager

Boot the PI

Make sure power is removed from the Raspberry PI.
Attach a USB keyboard, USB mouse, monitor with HDMI connector (can be DVI monitor with adapter), WiFi works now, or Ethernet with Internet connectivity and DHCP (if the PI is plugged into a consumer router or cable modem or DSL router, it should just work)
The header connector must be clear. No TNCs attached. No ribbon cable. No shields of any kind.
Install the SD card into the PI.
With all the needed accessories attached, and no others, NOW plug the power supply into the PI. The LEDs near the USB connector should light up. The HDMI monitor should light up.

On the PI

The HDMI monitor will light up with several messages and eventually will stop with a full desktop display.

PI booted -- get IP address

The Raspberry PI will boot and will show you a graphical desktop display. It will begin prompting you for several things.
The most important thing is to NOT let the unit update to the latest system files. We'll do that later.

The menus will ask you what time-zone and country you are in and then it will ask you to set a password.
Keep in mind that this Raspberry PI will never be seen from the Internet so don't get too complicated. I'd suggest using pi followed by your callsign, all in lower case.
It will also give you a chance to connect to WiFi. Go ahead and do this if it is handy.
Finally, the PI will ask to reboot. Let it do that. Now we need to go do some changes in the Raspberry PI's setup menus.

pi_desktop_icons_i6_07242 2017_08_raspberry_pi_pixel_upper_right
In the upper left corner of the display is a set of icons and in the upper right is a set of icons.
We'll be clicking on those momentarily.
We have several missions.

TCP/IP address for Ethernet

We need to know the TCP/IP address the Raspberry PI has taken. Move your mouse over to the up/down blue arrow icon in the upper right. 2017_08_ethernet_address_i6_12890.JPG
As you hover over the icon a grey block will appear. Several lines will probably show up giving the multiple Ethernet or WIFI addresses the Raspberry PI has. One of the lines will say eth0, or if you chose to use WiFi, then look for wlan0 and will be followed by four numbers of range 0 to 255 separated by periods. It will probably be followed by a / character and then a number between 1 and 31. What we're interested in is the four numbers. In my Raspberry PI the number is 192.168.0.20. It is pretty likely that yours will also start with 192.168. The next numbers will be more unique. Write down the four numbers. This is your Raspberry PI's ethernet address.

System Menu

Move the mouse to the far upper left of the Raspberry PI desktop. Click on the Raspberry in the round button. A menu will drop down. Now move the pointer down to Preferences and to the right and then click on Raspberry PI Configuration. 2017_08_raspberry_menu
A new window will appear that looks like this:

Now set the hostname.
Note: Don't put any underscores in your hostname. tadd_packet is not going to work. taddpacket is ok.
We're setting our node sites to our first name or last name, whichever fits and is more likely to be unique and recognized. If you are all alone in a small town, you might use your town name but as soon as you get your neighbor to join up, you have a problem. The hostname and the nodename can both be changed later. The reason to set your hostname to match your nodename is in case you get together with another packeteer and they have both their node and yours on the same Ethernet for configuration purposes. You might have two nodes on your workbench at the same time.
The reason to add "packet" is that now you can find your node in the list of devices attached to your home router. Otherwise you could end up with a laptop and your node with the same hostname.

2017_08_system
Click on the Set Resolution button and tell it 1024 x 768. That way if you remote control your Raspberry PI from a PC the screen will be a reasonable size.

I suggest leaving the Boot to Desktop and the Auto Login to user "pi" selected. This makes servicing your system easy. Unless, that is, you have hoodlems that might hack your system. In that case, uncheck auto login.


Interfaces

Click on the Interfaces tab.
All of the interfaces should be Disabled except SSH, VNC and I2C. Those should be Enabled.
2017_08_interfaces

Reboot

Click on the OK button. I'm pretty sure the Raspberry PI will tell you that it needs to reboot. Tell it OK or Yes or something of that sort.
If the Raspberry PI did not offer to reboot, then click on the Raspberry in the upper left and then go down and click on Shutdown.
Another menu list will show up suggesting Reboot and Shutdown are each available. Click on Reboot.

Connect to your PI from your Workstation

From your MSWindows, get and launch PUTTY, or MacOS computer launch Terminal. (if Linux or other Unix then you probably know better than I how to get a terminal).
Make an SSH connection to pi@ip address
for MAC or Linux, do:
ssh pi@10.0.0.2

For MSWindows, using PUTTY, open a connection to an SSH station at pi@10.0.0.2 (but insert your own Raspberry PI's IP address).

Note that pi is your user name. The password to the pi account on the Raspberry PI is what you set it to up above.

Use the IP address you discovered above, 10.0.0.2 is just an example. See previous subsection.

On PUTTY or Terminal, there may be question asked about connecting to a foreign server. Depending on your operating system you have different messages which will appear and different solutions to it. It's not hard. Don't be scared.
On the Mac, using Terminal, you may have to type
rm ~/.ssh/known_hosts
You can actually copy that text right from the web page, then paste it and hit return.
What that does is remove any previous knowledge the Mac had about any SSH host. For each SSH host you need to connect to, the computer will once ask you if you intended to connect to a new host. You just have to say Yes.

On PUTTY the question asked about connecting to this new host will be more of a pop-up dialog window. You just have to affirmatively tell it that yes you do intend to connect to this new host.

Now you have two ways to do text commands to the PI, using Terminal on the PI, or SSH from your PC. Start one or the other and get a command prompt.

When prompted, enter the password
pika2dew         (substitute the password you created above!)
Note that as you type the password the display may hide the text which looks like you didn't type anything at all. That's a feature!

Hopefully you now have an SSH connection to the Raspberry PI and you can do the Linux commands from your PC or Macintosh. This lets you log your traffic. Make sure you have PUTTY or Terminal set up with a large scroll buffer.

You will see the command prompt for the Raspberry PI’s Linux shell.

pi@taddpacket ~ $ 
The prompt contains some useful information. The username you are logged into the PI with is "pi". The hostname of the device is "taddpacket". On your system, it will be whatever you set the hostname to. The ~ symbol means that the directory/folder you are in is the home directory for the user who logged in, i.e. "pi". (you should always log in as pi on this TARPN Raspberry PI). The $ is gratuitous.

The PUTTY/Terminal session you have just started will be used to run the TARPN install scripts and also later when you are adjusting and configuring your TARPN system.


Running the TARPN install scripts

After the Raspberry PI boots, open a Terminal or PUTTY session again. Copy these six lines from this web page and paste them into your PUTTY or Terminal session. Note, to paste into PUTTY, just do a right-click of the mouse. To paste into Terminal (on a Mac), click into the Terminal window, then use Command-V.
sudo chmod u+s /bin/ping
wget http://tarpn.net/apr2020/tarpn_start1.sh
chmod +x tarpn_start1.sh
./tarpn_start1.sh
ls
The script will run for between 9 minutes and about an hour (depending on your connection speed and which Raspberry PI you have) and may stop for your input.
At the end of a long process, the Raspberry PI will reboot.
Below is the dialog seen at the end of the run.
Note that a couple of error messages are expected along the way.
It would be ideal if you could retain and save the entire text window during this process for later debugging in case the node doesn't come up at the end.
######
######
###### tarpn start 1 Version BUSTER 001
######
######
######
 12:42:23 up 12 min,  3 users,  load average: 0.00, 0.03, 0.03

Linux ok: VERSION="10 (buster)"
Your Raspberry PI is running the expected Linux version




###### Reinstall IPUTILS-PING
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libreoffice-gtk2
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 39.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://raspbian.mirror.constant.com/raspbian buster/main armhf iputils-ping armhf 3:20180629-2 [39.8 kB]
Fetched 39.8 kB in 1s (58.4 kB/s)       
(Reading database ... 132819 files and directories currently installed.)
Preparing to unpack .../iputils-ping_3%3a20180629-2_armhf.deb ...
Unpacking iputils-ping (3:20180629-2) over (3:20180629-2) ...
Setting up iputils-ping (3:20180629-2) ...
Processing triggers for man-db (2.8.5-2) ...
###### Proceeding with installation

###### Download TARPN INSTALL 1dL
##### script 1dL downloaded successfully
##### Transfer control from TARPN START 1 to TARPN START 1dL
###### This is the tarpn_start1dl script
###### version number is:
###### tarpn_start1dl STRETCH 022


#####
#####
##### Verify proper environment for running this script
#####
#####
 12:42:43 up 12 min,  3 users,  load average: 0.36, 0.11, 0.05

This SD card is 1561567363


##### get TARPN install script #2 to use at next reboot
##### script 2 downloaded successfully
##### create bpq folder below /home/pi
##### get RUNBPQ
##### runbpq.sh downloaded successfully
#####
##### get CONFIGURE NODE
##### configure_node_ini.sh downloaded successfully
#####
##### get BOILERPLATE.CFG
##### boilerplate.cfg downloaded successfully
#####
##### get MAKE_LOCAL_CFG.SH
##### make_local_cfg.sh downloaded successfully
#####
##### get CHATCONFIG.CFG
##### chatconfig.cfg downloaded successfully
#####
##### get TARPN script
##### tarpn downloaded successfully
#####

#####
#####
 12:42:50 up 13 min,  3 users,  load average: 0.33, 0.11, 0.05
##### APT-GET UPDATE
#####
#####
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done


 12:42:59 up 13 min,  3 users,  load average: 0.36, 0.12, 0.06
############# Now remove some packages which take time to upgrade. 


 12:43:00 up 13 min,  3 users,  load average: 0.36, 0.12, 0.06
############# Remove Triggerhappy. 

############### Lines deleted for brevity ########################

######
######
######      Raspberry PI will now reboot.  All is going well so far.
######      When we come back up, reconnect and do the command   tarpn
######      as per the TARPN node bringup instructions document
######
######
Connection to 192.168.0.18 closed by remote host.
Connection to 192.168.0.18 closed.
Macintosh:~ tadd$

When the PI has booted, connect to it again with SSH.
Note that most commands you will type to the Raspberry PI will be in lower case.
Type this command:

tarpn‹ENTER›
The tarpn command will tell the PI to finish configuration. NOTE! this part of the install will add a new service to the Linux OS which will look for your installation to be complete. Your installation is NOT complete so that service will generate a logged error message saying that NODE.INI is not found. We'll fix that in a later step.

When you have typed tarpn and return the Raspberry PI will output the text shown below and then will reboot. Continue below.


Macintosh:~ tadd$ ssh pi@10.0.0.2
pi@10.0.0.2's password:
Linux tadd 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Apr  7 03:00:50 2014 from 10.0.0.179
pi@tadd ~ $ tarpn
#### =TARPN vJ010 =
##### TARPN startup incomplete.  I will run TARPN_START2 which will
##### complete the installation.   This will also reboot again.
######
######
###### =TARPN START 2 JESSIE-102
######
######
######
#####
#####
##### Add PI as a user to the i2c group
#####
#####
The user `pi' is already a member of `i2c'.
#####
#####
##### Set up minicom port linkage so minicom can find host port
#####
#####

##### Turn up the volume to max.  You can adjust amixer cset numid=1 -- 100%
numid=1,iface=MIXER,name='PCM Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0
  : values=400
  | dBscale-min=-102.39dB,step=0.01dB,mute=1

######
######
######
######
######  Adding service for tarpn background operations

##### TARPN SERVICE file installed
Created symlink from /etc/systemd/system/multi-user.target.wants/tarpn.service to /etc/systemd/system/tarpn.service.
##### starting TARPN service  pause 10 seconds
● tarpn.service - tarpn background service--see /usr/local/etc/tarpn.log
   Loaded: loaded (/etc/systemd/system/tarpn.service; enabled)
   Active: active (running) since Sun 2015-10-18 11:50:37 EDT; 10s ago
 Main PID: 4936 (tarpn_backgroun)
   CGroup: /system.slice/tarpn.service
           ├─4936 /bin/bash /usr/local/sbin/tarpn_background.sh
           └─4941 sleep 180

Oct 18 11:50:37 wilson-packet systemd[1]: Started tarpn background service--see /usr/local/etc/tarpn.log.
###########################################################

tarpn_background j101 start:Sun 18 Oct 11:50:37 EDT 2015
 11:50:37 up 15 min,  3 users,  load average: 0.08, 0.04, 0.05
source URL is http://tarpn.net/2015oct
ERROR0: NODE INIT file not found.
ERROR0: Aborting in 180 seconds
Sun 18 Oct 11:50:37 EDT 2015
###########################################################
#####
##### Done.  After reboot you will be ready to test and/or
##### configure your TNC boards and to start BPQ node.
#####
#####
######
######
######
######
######      Raspberry PI will now reboot.  All is going well so far.
######      When we come back up, reconnect and try the  tarpn  command
######      as per the
######      Set up Raspberry PI for TARPN Node, make SDcard
######      web page
######
######
Connection to 10.0.0.6 closed by remote host.
When that completes, you are ready to set-up your TNCs.

But what does this do and how does it work?

The G8BPQ node program creates a packet radio switch which has 'ports', each of which are connected to a TNC and thus to a ham radio. There is an additional port 32 which represents the Telnet interface used by local applications to exchange data with the node. Ports 1 through 12 are predefined and may be assigned to TNCs, or may be disabled.

There are many textual commands which can be issued to the node using a command line interface. Several of those commands have to do with ports and routing.

TNC Setup

The TARPN configurations are prepared to deal with two different TNC connection busses and 12 total TNCs at once. Eight must be USB and four must be I2C. USB can be used to connect to a KISS TNC that has a USB socket, or to a USB/serial converter which ties into a serial TNC, like the Kantronics KPC-3.

I2C TNCs

As far as I know there is only one kind of I2C TNC available which is compatible with the Raspberry PI. This device is called the TNC-PI. I2C is a mastered multi-station bus where one station is the bus master (actually there can be more than one but that isn’t important right now) and the rest of the stations have addresses which are 7-bits long. (actually there are rare implementations where a 10-bit address is used) The address range can be from 1 to 127, I think. The G8BPQ code and TNC-PI only support addresses 3 through 119 decimal. I2C addresses are often refered to by their base 16 hexidecimal value which in this case is 03 through 77. See FAQ:Hexadecimal
If properly configured, the Raspberry PI will automatically detect all of the connected I2C devices at boot-up time. If there are address conflicts because more than one device is given the same address, it is possible that the master, the Raspberry PI, will recognize the failure, but whether it does or not, the two devices will not be damaged by this, but they are unlikely to be useable until the situation is corrected. Please be careful to not connect multiple devices to the PI having the same I2C address.

The I2C TNC-PIs are operated by the G8BPQ node software but some of the configuration options must be set by you on the TNC itself using the provided commands.

If you are using TNC-PI TNCs, click here for the TNC-PI Setup and Configuration

Come back here after you have configured your TNC-PIs to have unique, and known, I2C addresses and after you set the TNC-PI details.

USB/serial TNCs (NinoTNC)

6 of the 12 configurable node ports, 5, 6, 7, 8, 9 and 10, will be used for NinoTNC which connect to the Raspberry PI over USB. The configuration allows you to specify the device name for each port. Some configuration decisions, appropriate for NinoTNCs, will be made automatically. You will be prompted only for the device name, Frame Acknowledge Delay, and neighbor callsign.

Ports 11 and 12 will prompt you for the /dev name and will also prompt for serial bit rate, FRACK, TXDELAY, and neighbor connection.

All TNCs connected to the Raspberry PI under the TARPN configurations must be already set to KISS mode before the G8BPQ node program is launched. You can use Minicom or Picocom to test the TNCs in some other mode but you must convert them to KISS mode before starting the G8BPQ node if the ports are enabled in the tarpn configuration. If they are not, then the G8BPQ node software will complain and may be difficult.
NinoTNCs are KISS-only so no setup required.

The way USB is handled in Linux is, at each computer-reset, the computer will enumerate all connected USB devices and assign then unique names, listed in the /dev directory. USB device enumeration is important as the assignment of device name to each USB TNC is performed during device enumeration. Each time the Raspberry PI is restarted or powered on, it starts with amnesia about the previous USB names and enumeration order. The Raspberry will scan for and rediscover those numbers when it is restarted. The name assigned to each USB device, and listed in the /dev directory, has a plan and a pattern.

Every NinoTNC uses either a FTDI USB controller chip (NinoTNCs type A0, A1 and A2) or a Microchip USB controller chip (NinoTNCs type A3 and later). FTDI USB controller chips are enumerated by the Raspberry PI and assigned names beginning with ttyUSB. Microchip USB controller chips are enumeraged and assigned names beginning with ttyACM.

Here is an example directory listing (ls command) of the /dev directory:

The Raspberry PI will assign TNCs to ttyUSB# and ttyACM# in a process which is consistant from one reset cycle to another unless the TNC complement has changed, or the USB socket used has changed. Once you figure out which TNC has been assigned to the ttyUSB# or ttyACM#, you should be able to count on that arrangement through to the future. The important thing is that you do a reset before proving out the arrangement. If a TNC is added to the Raspberry PI (via USB) after reset, it will get a tty assignment at the end of the chain, but the reshuffling at boot time will confuse things. If a TNC is removed after reboot, and then restored to the same USB socket shortly after, the TNC will be restored to the same ttyUSB# or ttyACM#.

The tarpn command includes a feature to inquire about the USB assignment. Type tarpn usb and observe the output. Only the likely TNC devices are shown. Notice that the list of tty ports called out in node.ini shows that I did not assigned the TNCs to ports in the enumeration order.

pi@taddpacket ~ $ tarpn usb 
#### =TARPN vb027 =
#####
##### USB -- Show ttyUSB and ttyACM devices (NinoTNC) found in /dev
#####
#####   --- start
ttyACM0
ttyACM1
ttyACM3
ttyACM4
ttyACM5
ttyUSB0
#####   --- end

#####  List of tty ports called out in node.ini
#####
#####  --- start
portdev05:ttyACM0
portdev06:ttyACM1
portdev07:ttyACM4
portdev08:ttyACM5
portdev09:ttyUSB0
portdev10:ttyACM3
#####   --- end
#####
pi@taddpacket ~ $ 

Here's a subtlety which is hard to see but may cause unrest in my near future! ttyACM2 is not in /dev list and it is not assigned a port in my node config. The next time the Raspberry PI is reset, the enumeration order is going to renumber the TNCs. This will cause the ports to be messed up. That could be tragic.


Running the tarpn command

A more comprehensive document about the tarpn command is here.

The next setup operation you need to do is to tell the G8BPQ node software what your system's configuration is.
There are some details we need to set to know before we go any further. These details are going to be placed in a file called node.ini located in the home/pi directory on the Raspberry PI. I wrote a tool to put them there. This section of the document explains how to use that tool.
Run this TARPN command:
tarpn config
You will be prompted for some of the details specific to your installation. This command may be run over and over to polish your results. If you use Control-C to quickly exit this command, none of your changes will be saved.

Here is a brief on each element you will be prompted for:

Nodecall
Each G8BPQ node is identified by a callsign with ssid extention, and a node name. The callsign must be the person or one of the people legally responsible for the proper operation of the node. The ssid extention is a number which allows there to be more than one node with the same callsign. For instance: KA2DEW-2 is different from KA2DEW-3. The -2 or -3 is the ssid extention. The allowable values are -0 through -15 but -0 and -15 are usually reserved. So set a nodecall as your callsign with an ssid of -1 or up to 14. If you have never used a packet SSID, then chose -2. Callsign should be followed by a dash and a one or two digit number. As of this writing, every node in the North Carolina TARPN uses -2 to identify the node's callsign.

Nodename
Every G8BPQ node has a 6 character or shorter node-name. The North Carolina TARPN is using first or last names as the nodename. Initially we started with town names and then regions of towns but once you have a DURHAM node, what does the 2nd node, just down the street, get named? So we went with first names. People with especially common first names may want to try last names instead.
The nodename should be specified as all lower case. No spaces or punctuation characters.

BBS Callsign
This is a separate callsign, or the same callsign with a different SSID, and is used for the bulletin board service. Leave this (and the BBS NodeName) as not_set until you are ready to initialize the bulletin board BBS service. If you decide to set it, put in legal callsign with or without dash number. Make sure it doesn't conflict with the node callsign.
Beware that -15 and -13 are bad SSIDs to use.

CHAT callsign
This is a separate callsign from the NodeName specified above and is used for the CHAT round-table conversation service.. Set this to your callsign with a   -9    unless this is your second node. In that case, pick another unique ssid not used in the network. -8 maybe? Later on you'll need to go to the 7777 web page and configure your CHAT neighbors.
See Configure Chat Service after your node is up.

Location
You will answer in latitude, and longitude with several digits of precision. This is available from Google. Search for "Google Earth Pro Download". Once you download and install the program, search for your address and then move the cursor over your neighborhood. You don't have to provide your exact house. You should see the latitude and longitude in the bottom right of the screen. Someplace within a few blocks is probably good depending on how crowded the nodes are in your area. This information is used to generate maps for diagnostics and bragging purposes.
Mine is 35.890, -78.681

Infomessage1 thru Infomessage8
This multi-line message is given to the connected user if they type INFO. Because of the limitations of my script, I can’t deal with real multiline messages. Instead, I provide 8 different configuration elements for your INFO message. Use upper or lower case letters, any punctuation except double-quote.
The INFO message should say something like this:

infomessage1: Linda's node at the north end of Spongotown.
infomessage2: Vertical yagi pointing at FRED and quad-band-vertical for the other 4 ports.
infomessage3: port1 Icom IC1271A   1292.1 to FRED
infomessage4: port2 Icom IC228     145.53 to DEXTER
infomessage5: port3 Kenwood TM3530 223.42 to SIMON2
infomessage6: port4 GE Master II   50.120 to BILLM
infomessage7: port5 Icom IC4AT used to go to GERRY -- anybody want to link to me?
infomessage8: Linda is usually on the CHAT network -- feel free to ring at PIUSER as well. 
Any unused infomessage lines can be left with a period or with not_set

Ctext
This text gets sent when the user connects. Say something short here. Make this one line.
NW Butner near National Guard 1000 meter range

Local-op-callsign
This is the callsign of the station who runs the node, or who is at the local console. This is used as the log-in ID for telnet connects, and also for setting up the HOST mode feature which lets node users connect to the local operator. This should be lower case. If there is not to be a local operator, this can be set to none. If this is none the local user commands host and tx will also be disabled. If desired, host mode can be re-enabled at any time by re-running tarpn config, changing the value of this figure, save, then restart the node.

port# enable/disable
There are six port-enables for i2c (TNC-PI units) four port enables for USB/serial connected TNCs and two port enables for special USB TNCs. These last two could be used for USB/serial TNCs as well. They are named port01 through port06 for TNC-PI and port07 through port10 for USB/serial connected TNCs, and ports 11 through 12 for the special USB TNCs. Each port should have either ENABLE or DISABLE. If the port is set to ENABLE, you must specify correct answers for additional details related to that port.
Each port represents a TNC. If you only have one TNC-PI, then set port 1 to ENABLE. If you have three, then set ports 1 through 3 to ENABLE. Set the remainder to DISABLE. The same goes for USB TNCs. Use ports 7 and on for your USB connected TNCs. If you unplug one of the TNCs and restart, you will have to reassociate the ports with TNCs. The port order is created by the Raspberry PI the first time it sees your particular USB situation. Don’t enable ports for which you have no TNCs. These settings can be changed later in this process, or any time you change what your TNC configuration.

port#i2caddress
This figure is critical if you have set this port to ENABLE. The I2C address is a number assigned to each TNC-PI. If you have not yet set the I2C addresses for your TNC-PIs, you will be doing that shortly. In that case, set the first port to address 5 and the following ports (for which you will have TNCs) to 6, 7, etc… Leave the ports for which you do not have TNCs set to 99.

neighbor
Every port has a station it is intended to talk to. Enter the callsign and ssid of the neighbor here. If you don’t have an intended neighbor, set this to something interesting, like W1AW or something.

txdelay
For USB/serial KISS TNCs, this value sets the transmit keyup delay, i.e. how long the TNC sends start-up-sync beeps while waiting for the transmitter to come on-line. This number is in milliseconds. 1000 = 1 second. Usually this number should be between 100 and 350. Start with 350 and then make it shorter until it doesn’t work anymore, then make it 50 or so longer.

baud rate
For USB/serial KISS TNCs, this is the serial baud rate used between the USB/serial adapter and the TNC. This must match what the TNC is configured with. This baud rate is only used in the G8BPQ node software.

FRACK
For USB/serial KISS TNCs, this is Frame Acknowledge Delay. This is how long after beginning of a transmission the G8BPQ node software will wait for the other end of the link to respond to a transmission. If this is too short, the node will immediately retry its transmission without waiting for an answer at all. If this is too long, then we'll wait extra long if the other end never answers. Error on the side of too long because we expect the other end will answer appropriately most of the time. Set for about 4000mS on a 1200 baud link, or 1000mS on a 9600 baud link.

The output during config of a single port TNC-PI node looked like this:

pi@fred-packet ~ $ tarpn config
#### =TARPN vs018 =
####
####
#### =CONFIGURE_NODE.SH v53 =
####
####
You will be prompted with the name of a setting and the current
value of that setting.  Press enter to keep the value, or enter
a new value and then hit enter.

NODE CALLSIGN
The node callsign is probably your callsign dash 2, for instance: w1aw-2
The software limitations are that it can be -0 through -15 but convention
has it that you not use -0 or -15.  -2 is sort of a standard around here.

Node Callsign = n0tset -->k4ipo-2
Node Name, max 6 chars, no spaces or punctuation = notset -->greg


BBS Callsign
Leave set to not_set unless you want to operate a BBS on this Raspberry PI
Set bbscall to be your callsign -1
To switch off the BBS function, set the BBS Callsign to a period .

BBS Callsign = not_set -->k4ipo-1


CHAT callsign
Every G8BPQ node in the network has a CHAT service.  Each nees a unique callsign
which cannot be the same as any BBS or node in the network.
We recommend using the owner operator callsign with a -9.

CHAT callsign = not_set -->k4ipo-9

LOCATION:                                                       
This should be latitude, longitude for your node.                  
Use Google Earth or GPS receiver to obtain this value.           
Lat/Lon format in the US should be something like 33.451, -83.777   
###                                                                
node location, lat, lon = not_set -->35.917, -78.635

This next value is the INFO message text.  This is what the user gets if
they use the I or INFO command.  This text can be several lines long.
Each line is in a separate field.  infomessage1 is the 1st line.
infomessage8 is the last line.  not_set lines are removed from the INFO response.

This is the current output for the INFO text:
--------------------------------------------------------------------------------
not_set
not_set
not_set
not_set
not_set
not_set
not_set
not_set
--------------------------------------------------------------------------------
Now you can change any lines.  I recommend you copy and paste from a text
file as you go through this so you can get the result you want.

Any line that is not to be used should be left as    not_set  or may be set to
have just a period.  Lines with a period in the first character will be replaced
with not_set and not_set lines will not be included in the INFO response.
Note: No double quotes.

INFO line 1 = not_set -->North Raleigh  6-Forks-Road just north of i540
INFO line 2 = not_set -->2 port node                  
INFO line 3 = not_set -->port 1 is 144.33 horizontal yagi to DOUG at 3 miles
INFO line 4 = not_set -->port 2 is 433.3  horizontal yagi to ERECH at 3 miles
INFO line 5 = not_set -->
INFO line 6 = not_set -->
INFO line 7 = not_set -->
INFO line 8 = not_set -->
--------------------------------------------------------------------------------

The Connect-Text is sent to a station that connects to the node.
keep it short and sweet.  Town name, or neighborhood and town.
Note: No double quotes, no single quotes, no colons, and no ampersands.

Connect-Text = not_set -->6-Forks-Rd  north of Raleigh

local op callsign is used by the node when an operator controls the
node locally.  This is used as telnet username, and to set up the
node which will be PIUSER.  Connecting to PI user or using command
HOST gets a visitor to the local operator.

This should either be set to your legal callsign, with no SSID,
or to the word 'none'.
If this is set to none, then telnet and host mode are disabled.

local_op_callsign = none -->K4IPO

SYSOP password is for answering the PASSWORD challenge.
See http://www.cantab.net/users/john.wiseman/Documents/Node%20SYSOP.html
You should probably leave set this to the group password or discuss it
with who-ever is managing the L3 and L4 parameters for your node.
Note: No double quotes, no single quotes and no ampersands.

SYSOP password = not_set -->everything you know is false and the turkey was actually excellent
--------------------------------------------------------------------------------
The next part enables and configures individual enabled ports.
Each TNC-PI has an I2C address.  Use DECIMAL numbers for I2C addresses.
Note that in some places I2C addresses are shown in HEXIDECIMAL.
This is tricky so you have to pay attention.

All ports have neighbors.
The neighbor should be the callsign dash SSID of the node faced by
the port and the radio attached to that port.  Only that callsign
will be accessed by that port and radio.
Note that other parameters, including TxDelay, are set on the TNC
itself using the SETPARAMS command.  See the documentation.

TNC-PI port 01  enable or disable = DISABLE -->enable
Decimal I2C address for port 01 TNC-PI = 98 -->3
Callsign for neighbor node faced by port 01 = not_set -->n3ltv-2
TNC-PI port 02  enable or disable = DISABLE -->enable
Decimal I2C address for port 02 TNC-PI = 98 -->4
Callsign for neighbor node faced by port 02 = not_set -->km4ifu-2
TNC-PI port 03  enable or disable = DISABLE -->
TNC-PI port 04  enable or disable = DISABLE -->

Now configure the NinoTNC USB serial ports.
Different parts sets for the different NinoTNC models can
result in different /dev device names.
You'll need to figure out which dev names reflect your TNC"  
This is a particularly ornory process because the dev names
get re-assigned when the Raspberry PI boots.
So any time you add or delete a USB device, you'll have to
figure out which /dev device goes to which TNC.
 
##### 
##### Show ttyUSB and ttyACM devices (NinoTNC) found in /dev
##### tarpn usb
##### -- start of list.

ttyUSB0

##### -- end of list.
##### 

I recommend plugging in all of your USB TNCs, then reboot.
Now, one at a time, unplug a TNC, temporarily, and then do   tarpn usb
You will see one of the port tty devices disappear.  When you plug
back in, it will come back.  Make sure you plug the TNC back into the same
port it came out of so the ordering stays the same.
                                                                             
Keep note of which TNC got which USB device name.                         
                                                                             
FRACK may be 6000 for 1200 baud NinoTNCs, and 2000 for 9600 baud NinoTNCs.  
This is preliminary.                                                        
We should do some speed-of-link experiments to find out the best values.    

NinoTNC port 05  enable or disable = DISABLE -->ENABLE
device name for port 5 -- default is ttyXXXX = ttyXXXX -->ttyUSB0
Frame Acknowledge Max-time in milliseconds = 9000 -->1000 
Callsign for neighbor node faced by port 05 = not_set -->k1qrm-2

USB TNC port 06  enable or disable = DISABLE -->
USB TNC port 07  enable or disable = DISABLE -->
USB TNC port 08  enable or disable = DISABLE -->
USB TNC port 09  enable or disable = DISABLE -->
USB TNC port 10  enable or disable = DISABLE -->

Now configure the USB-serial ports.
These ports have TxDelay parameters set in the G8BPQ node as read from
the value you are setting for each of these enabled ports.
Serial Baud rate is between the USB adapter and the TNC's CPU.
The over-the-air rate must be set by the TNC itself.

Ports 11 and 12 are USB ports but are highly customizable in support of
non-traditional TNCs.

USB TNC port 11  - user specified /dev port  enable or disable = DISABLE -->
USB TNC port 12  - user specified /dev port  enable or disable = DISABLE -->
-------------------------------------------------------------------
#### Done.  Now to overwrite the node.ini file with the new configuration.

Make sure you use tarpn test to test the node before making it auto.  The new
configuration will be used the next time G8BPQ is loaded. 
You can run tarpn config over and over again and each time it will save your changes and let you continue editing.
If you control C out before you are done, the changes will NOT be saved.

tarpn test

After you have configured the node, use tarpn test to run the G8BPQ node. The output should look like this:
pi@fred-packet ~ $ tarpn test
#### =TARPN vJ008 =
#####
##### TEST --  Starts BPQ node immediately and runs it in the foreground until
#####          a control C is issued in this window, or until a   tarpn stop
#####          command is issued in another window.

##### Starting BPQ Node.
#### =RUNBPQ vJ001 =
piminicom: no process found
#### =MAKE LOCAL v045 =
tncpi-port01 enabled
tncpi-port02 disabled
tncpi-port03 disabled
tncpi-port04 disabled
tncpi-port05 disabled
tncpi-port06 disabled
usb-port07 disabled
usb-port08 disabled
usb-port09 disabled
usb-port10 disabled
usb-port11 disabled
usb-port12 disabled
local-op-callsign is specified.  Enable HOST mode
SUCCESS...
#####
#####  Launching G8BPQ node software.  Note, this script does not end
#####  until the node is STOPPED/control-C etc..
#####
G8BPQ AX25 Packet Switch System Version 6.0.10.16 April 2015
Copyright ? 2001-2015 John Wiseman G8BPQ
Current Directory is /home/pi/bpq

Configuration file Preprocessor.
Using Configuration file /home/pi/bpq/bpq32.cfg
Conversion (probably) successful

PORTS 15eba4 LINKS 1605d4 DESTS 161484 ROUTES 1665c4 L4 166aa4 BUFFERS 16cfe8

Route/Node recovery file BPQNODES.dat not found - Continuing without it
Initialising Port 01     I2C Bus 1 Addr 3 Chan A
Initialising Port 32     Telnet Server
slave device: /dev/pts/2. symlink to /home/pi/minicom/com4 created
TNC Emulator Init Complete

The important thing about this test is that the Node did start and it stabilized. If there were a failure you would see other output. A common failure is turning on a TNC-PI with the wrong I2C address, or having one too many USB TNCs turned on. The first of these would result in a repetitive output of an error message: polling error. In the case of this kind of error, send a control C to stop the node's operation and then compare the node.ini file created with tarpn config against the output printed when the node starts. To see the node.ini file, send this command at the Linux prompt: cat node.ini

Another common failure is making one of the configurations an illegal value.

After the node comes up and runs with no error messages, you should launch bpq-term on your workstation or on the Raspberry PI and connect up to your node. See BPQ Terminal for MSWindows or find the Mac or Android versions on the Builder page. Try out some of the BPQ node commands described in the Packet Node Operators Manual.

At this point the G8BPQ node is up and running, but only in test mode. If you were to shutdown and restart the computer, the node would not automatically start. Now that you know that the node will start up, you can quit the node using control-C and then use the tarpn service start command and set it to automatically start.
Note: To send a control-C to the terminal window, click into the window, then hold down the control key on your keyboard and tap the c key.
See the full suite of tarpn subcommands here.

Control-C is used to cancel many functions including the node if you started it with tarpn test.

© Tadd Torborg, 2014↝2021 -- all rights reserved