Installing BPQ on the Raspberry Pi and TNC-Pi
Willem A. Schreüder AC0KQ
This describes how to install BPQ on a Raspberry Pi computer with the TNC-Pi
as the TNC. All that is needed is a radio in order to get a complete packet
station, maildrop and WinLink RMS gateway.
Much more detailed about BPQ are provided at
G8BPQ Home Page
This page shows a mostly canned procedure to do this. You can use this as a
starting point and then customize it.
If you want to use BPQ as an RMS gateway to WinLink, you need to obtain authorization from the WinLink folks. See
this link on how to do that.
If you have any corrections or comments about this HOWTO, please
email me.
Hardware
- The Raspberry Pi is available from several sources for about $35-$40.
If you want to use the TNC-Pi as a daugter board, use the Model B or B+.
- The TNC-Pi is available at Coastal Chipworks
either built or as a kit. Get the kit, it is easy to build and lots of fun.
The instructions are almost as good as the old Heathkit manuals.
- For most locations you need some sort of enclosure. I use the Bud
Industries Pi Sandwitch which allows the Raspberry Pi and TNC Pi pair to be
mounted.
- The rPi runs on 5V, so for a 12V system you need a converter to supply 5V
at 1A continuously. The 7805 style regulators generate a lot of heat at that
current so I use the Murata 78SRH-5/2-C instead, which will work for input
voltages from 8-32V DC. I use a right angle Micro USB cable which I cut to
wire for power. If the cable uses standard color codes, white and red are data
which you can ignore, red and black are positive and negative.
- The rPi needs an SD card to store the software. The Model B uses a
standard size SD, the Model B+ uses the Micro SD format. A high speed and
reliable card is critical, so getting a 16GB Class 10 card is recommended. The
bigger card should last longer since the wear is spread over a larger space.
Get a spare since the cards do wear out eventually.
Software
Raspbian switch to systemd starting with jessie (Debian 8). These instructions will work
only with this latest version of Raspbian. For older versions see
these instructions.
- Download Raspbian which is
Debian for the Raspberry Pi. There are several other OS versions, but this one is my
choice as a pretty vanilla Linux distro. Unzip the image from the ZIP file and follow
these instructions to burn the image to the SD card.
- Insert the card into the Pi and boot it. You can either
- Connect a keyboard and monitor and log in directly.
- Connect the pi to a network running DHCP and ssh into it. The hostname willshow up as RASPBERRY in the DHCP leases on your router.
- Log in to the computer using user name pi and password raspberry.
- Run sudo raspi-config
- Expand Filesystem
- Change User Password
- Internationalisation (set time zone)
- Advanced options (hostname)
- Install new packages
- sudo apt-get install vim telnet minicom libpcap0.8
- Add new user with administrative privilidges
- sudo adduser username
- sudo adduser username sudo
- Free up the serial line the TNC-Pi will use. If you use a newer version of raspbian (jesse or newer), the command is
- sudo systemctl mask serial-getty@ttyAMA0.service
For older versions (wheezy or older) the command is
- sudo sed -i 's/^T0/#T0/' /etc/inittab
- Reboot the system to make sure the serial line is released.
Install and configure BPQ
- Log in using the new user created above.
- Create the BPQ sub-directory
- Download getbpq and make it executable
- wget http://www.prinmath.com/ham/getbpq
- chmod a+x getbpq
- Run getbpq to download pilinbpq, the HTML pages and mkbpq
- Configure BPQ file bpq32.cfg using mkbpq
It writes bpq32.cfg based on the answers to the prompts.
When run the first time it will create a few other files
which you will need to run BPQ automatically.
- For jesse or later, move the executables made by mkbpq to /usr/local/bin and describe the bpq service
- sudo mv bterm /usr/local/bin/
- sudo mv bpq.service /lib/systemd/system/
- Move the executables made by mkbpq to /usr/local/bin
- sudo mv restartbpq runbpq bterm /usr/local/bin
- Start BPQ the first time
It should give you some lines of output, but nothing should show up as an error.
- Configure the BBS
- Connect to BPQ using your web browser by typing in
http://X.X.X.X:8080/
on the URL bar, where X.X.X.X is the IP address of your BPQ node
- Click on Mail Server Pages
- When prompted log in using the BPQ user name and password you supplied
- Click on Configuration
- Set BBS APPL No to 1
- Set Streams to 32
- Select Send System Msgs to SYSOP Call
- Select Enable FBB UI System
- Select Don't Request Name if you want.
- Select Don't Request Home BBS if you want.
- Select Forward Messages to BBS Call
- Click Save
- Stop BPQ by hitting Ctrl-C in the window where you ran it
- Start BPQ again. This time it should give only good messages
- If everything works properly, set BPQ to run automatically
- sudo bash -c 'echo "BPQ:2345:respawn:/usr/local/bin/runbpq >/dev/null" >> /etc/inittab'
Using BPQ
- You can connect to BPQ node from any computer on the LAN using
- Log in using your BPQ user name and password