BPQ Detailed Build Log

This project was built on a Raspberry Pi 3B with a 7″ TFT HDMI monitor. running

Setting up the Raspberry Pi

Start with a clean install of Raspberry Pi OS. You can get an image here https://www.raspberrypi.org/software/operating-systems/ You can also find instruction on how to make a bootable MicroSD card on the raspberrypi.org site.

Once you have the MicroSD card ready, insert it in the Pi and power it up.

When you first start the Pi it will run you through a setup up wizard with location, password, and network settings. When the settings are done it will ask if you want to run the updates, I suggest running the updates.

Make sure you write down the password. When the updates are done it will ask if you want to restart the Pi. Go ahead and restart it.

There are a couple of changes you will want to make using the RPi Configuration tool.

From the GUI Open up Preferences -> Raspberry Pi Configuration

From the CLI run

sudo raspi-config


  • Change the Hostsname to your callsign.
  • I like to disable the Splash Screen so I can see the boot process.
  • Since I am planning on deploying the Pi with a monitor I keep Boot To Desktop, if you will be deploying it headless select Command Line Interface (CLI)


  • Turn on SSH and VNC so you can access the Pi remotely.
  • If running it headless you can leave VNC off, without an HDMI signal it wont allow connections anyway.

Restart the Pi again.

Now that the Pi is accessable remotely log in through VNC or SSH

During the setup phase I chose not to have the WiFi port turned on. I connect with the hardline ethernet. When I have the node on a mountaintop, unless the only network connection is WiFi I will have the port turned off there too.

This will turn the post off while I work on the Pi but down the road when I set up a maintenance script I will add this to the boot script.

pi@node:~/$ sudo ifconfig wlan0 down

Start prepping for BPQ install

It is good practice to always refresh the update cache before installing any software

pi@node:~/$ sudo apt-get update
pi@node:~/$ sudo apt-get upgrade

User Pi will need to be added to the tty group to use telnet to access the BPQ loacally and you will need to install telnet and libcap2-bin as well.

pi@node:~/$ sudo adduser pi tty
pi@node:~/$ sudo apt install telnet libcap2-bin

Another tool that will be useful for duplicating your node and running backups to a remote host is the Ron R Image Utilities. After cloning the repository locally you will want to read the README.txt The img-xxx scripts will also need to be made executible.

pi@node:~/$ git clone https://github.com/seamusdemora/RonR-RPi-image-utils.git
pi@node:~/$ chmod +x ./RonR-RPi-image-utils/image-*

Setup the Pi for off-site backup

To use the image-* tools to backup your Pi you will want to back them up to another computer. If you already do Linux you will know how to do this. If you want to back up your Pi to a Windows box you will want to make sure you have Samba on your Pi.

pi@node:~/$ sudo apt install samba samba-common-bin smbclient cifs-utils

Next it’s time to make an image directory and mount the Windows shared directory. To create the Windows shared directory right-click it and select share. When the share opens up share to all and make sure you click the advanced button and allow connection without a password. This is intended for your internal network, if you plan on using this over a HamNet you will want to be more secure.

pi@node:~/$ sudo mkdir /mnt/pi-image 
pi@node:~/$ sudo mount.cifs //192.168.1.x/pi-img /mnt/pi-img

Use your Windows box IP address in the mount command.

With the share set up and mounted its time to run the image backup.

pi@node:~/$ sudo /home/pi/RonR-RPi-image-utils/image-backup

Make sure you read the README.text file in the RonR-RPi-image-utils directory. This will give you everything you need to know about using the utilities.

NOTE: Still to resolve on this task: This is not currently set up as an automated task. I plan on setting this up as a maintenance scrip that will run on startup and weekly to do a series of maintenance tasks and updating the image is one of the weekly tasks.

Installing LinBPQ

Now its time to install the LinPBQ software.

pi@node:~/$ wget http://www.cantab.net/users/john.wiseman/Downloads/installLinBPQ 
pi@node:~/$ chmod +x installLinBPQ
pi@node:~/$ ./installLinBPQ

To use some of the IP features of LinBPQ you will need to set some capabilities for linbpq, or run it as root which is not a good idea. a couple of steps back you installed libcap2.bin, here is where you use it.

pi@node:~/$ sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq

Next you will need to set up the LinBPQ configuration file bpq32.cfg


Coming Soon

Setting Up The TNC-Pi devices on the Raspberry Pi

As always, make sure your software is up to date.

sudo apt-get update 
sudo apt-get upgrade

This project assumes you will be settin up more than one RF device and using the TNC-Pi to connect to your radios. This is why you will be enabling the I2C bus.

If you plan on only usin one TNC-Pi you do not need to enable the I2C bus.

Setup for TNC-Pi

sudo raspi-config

Enable the Serial Port

  • Select Interface
  • Select Serial Port
  • Select No for serial log in
  • select Yes for enabling serial port hardware
  • select OK at the confirmation prompt

Enable the I2C bus

  • Select Interface
  • Select I2C
  • Select Yes to enable I2C
  • Select Ok at the confirmation prompt
  • Tab down to the bottom and select Finish
  • Select Yes to reboot the Raspberry Pi

Once the Raspberry Pi is rebooted we need to install the pitnc_getparams and pitnc_setparams utilities to set up the TNC-Pi devices.

The first thing to do is download the files.

pi@node:~/$ mkdir TNC-Pi 
pi@node:~/$ cd TNC-Pi
pi@node:~/$ wget http://www.tnc-x.com/params.zip
pi@node:~/$ unzip params.zip

The next thing to do is make the scripts executable.

pi@node:~/$ chmod +x pitnc_*

Now that we have the utilities in place we can start setting the configurations on the TNC-Pi itself.

First, lets check the configuration on the device

pi@node:~/$ ./pitnc_getparams /dev/serial0 0

You should see something like this

Using Serial port /dev/serial0

   TNC Software Version                    1 
 01 TXDelay - Zero means use ADC           40
 02 Persistance                            63
 03 Slottime (in 10 mS)                    105
 04 TXTail                                 30
 05 Full Duplex - Not used                 0
 06 Our Channel (Hex)                      00
 07 I2C Address (0 = async) Hex            00
    ADC Value                              38
 8 1 28 3f 69 1e 0 0 0 26 4f c0 sum 0

NOTE: If you get multiple lines saying “retrying” CTRL C out and default the TNC.

To default the TNC, shut down the Pi, remove power, and rotate the pot furthest from the 9-pin connector (this is the delay time setting) counter clockwise all the way. When you apply power to the Pi the yellow LED, RX light, should continue flashing about once per second. This indicates that the TNC address has been defaulted back to the serial port. Rotate the pot about 1/8 of a turn clockwise and wait a few second. The flashing should stop.

Assuming all went well, you got the configuration menu above and we can move on to the next section, configuring multiple TNC-Pi interfaces.

To use the I2C bus we need to set the address to each TNC-Pi individually before stacking them using the pitnc_getparams and pitnc_setparams utilities. These addresses can only be set in the serial mode and only one device can occupy the serial port at a time.

To set the port, where serial0 0 is the port, 7 is the field we want to change, and 3 is the new address.

pi@node:~/$ ./pitnc_setparams /dev/serial0 0 7 3

You should get something like this after executing the command.

   PIC Software Version                  1
01 TXDelay - Zero means use ADC          40
02 Persistance                           63
03 Slottime (in 10 mS)                   105
04 TXTail                                30
05 Full Duplex - Not used                0
06 Our Channel (Hex)                     00
07 I2C Address (0 = async) Hex           03
   ADC Value                             38
8 1 28 3f 69 1e 0 0 3 26 4c c0 sum 0

and to save and restart the port, 15 is the command parameter and the value is 2.

pi@node:~/$ ./pitnc_setparams /dev/serial0 0 15 2

This all works best if you shutdown the Pi, remove power, and plug it back in after you have run this command.

Once the Pi is back up and running, test the port with its new setting, where 1 is the bus and 3 is the device address.

pi@node:~/$ .pitnc_getparams 1 3

You should see the printout again, notice that parameter 7’s value has changed from 00 to 03.

     PIC Software Version              1
01 TXDelay - Zero means use ADC        40
02 Persistance                         63
03 Slottime (in 10 mS)                 105
04 TXTail                              30
05 Full Duplex - Not used              0
06 Our Channel (Hex)                   00
07 I2C Address (0 = async) Hex         03
    ADC Value                          38
8 1 28 3f 69 1e 0 0 3 26 4c c0 sum 0

Now you can shut down the Raspberry Pi, remove power, and swap the TNC-Pi with another one and start the process over again.

Make sure you label each devices address on the device, and that you do not duplicate any addresses.+

Repeat the pitnc_getparams / pitnc_setparams on all of the devices you plan on using for the node.

Once all of the TNC-Pi devices are configured you can put the stack together and power it up.

It is a good idea to check the newly configured TNCs before moving forward.

pi@node:~/$ ./pitnc_setparams 1 3
pi@node:~/$ ./pitnc_setparams 1 5
pi@node:~/$ ./pitnc_setparams 1 7

The 1 is the I2C bus and the 3, 5, and 7 are the device addresses I chose to use.

The next step with be to create the RF ports in BPQ. 

Configuring the RF Ports

Coming soon

Amateur Radio, Emergency Communications, Traffic Handling and more