Post

Installing LinBPQ under Ubuntu Linux - Step by Step Guide

Installing LinBPQ under Ubuntu Linux - Step by Step Guide

LinBPQ is the Linux version of the BPQ32 packet radio node and provides node, BBS, and chat server functions for amateur radio operators. It enables a packet radio backend to run on a Linux system – ideally on a small server or Raspberry Pi without a graphical interface (headless mode).

This article shows step-by-step how to install and run LinBPQ on a minimal Linux system. The focus is on the basic installation: download, extract, make executable, and run the software. Configuration of ports or BBS services will follow in a later article.


Requirements

Make sure you have the following:

  • Linux system (headless) – e.g. Debian, Ubuntu Server, or Raspberry Pi OS Lite
  • Internet connection – for downloading LinBPQ
  • User with sudo privileges
  • Basic shell knowledge
  • Amateur radio license and callsign (if used on CB radio, a callsign is sufficient)

Install recommended tools and libraries:

1
2
3
sudo apt update
sudo apt-get install wget unzip libcap2-bin screen
sudo apt install libpcap0.8-dev libasound2-dev libz3-4 zlib1g libminiupnpc17

Step 1: Download LinBPQ

1
2
3
mkdir ~/linbpq
cd ~/linbpq
wget http://www.cantab.net/users/john.wiseman/Downloads/linbpq -O linbpq

Step 2: Make the File Executable

1
chmod +x linbpq

It’s important to set capabilities on the LinBPQ binary if you don’t run the service as root.

1
sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq

Step 3: HTML Pages (Web Interface, optional)

1
2
3
4
5
mkdir HTML
cd HTML
wget http://www.cantab.net/users/john.wiseman/Downloads/HTMLPages.zip
unzip HTMLPages.zip
cd ..

Step 4: Configuration

Create a file bpq32.cfg:

1
vim bpq32.cfg

A working example for a CB radio node is provided below. Before starting LinBPQ, make sure to adjust the callsign and node alias.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
SIMPLE
LOCATOR=JO43US
NODECALL=DNO349
NODEALIAS=KORNOD
AUTOSAVE=1

CTEXT:
-

 _____  _   _  ____ ____  _  _   ___
|  __ \| \ | |/ __ \___ \| || | / _ \
| |  | |  \| | |  | |__) | || || (_) |
| |  | | . ` | |  | |__ <|__   _\__, |
| |__| | |\  | |__| |__) |  | |   / /
|_____/|_| \_|\____/____/   |_|  /_/


Welcome to the DNO349 LinBPQ Node in Koelln-Reisiek (JO43US)

COMMAND> BBS CHAT CONNECT BYE INFO NODES ROUTES PORTS USERS MHEARD

***

FULL_CTEXT=1

IDMSG:
LinBPQ Node (DNO349), CHAT (DNO349-8) and BBS (DXB349)
***

BTEXT:
!5345.38N/00942.78E#DNO349 LinBPQ BBS/CHAT @ CH 24
***

INFOMSG:
-
 _____  _   _  ____ ____  _  _   ___
|  __ \| \ | |/ __ \___ \| || | / _ \
| |  | |  \| | |  | |__) | || || (_) |
| |  | | . ` | |  | |__ <|__   _\__, |
| |__| | |\  | |__| |__) |  | |   / /
|_____/|_| \_|\____/____/   |_|  /_/

CB Node in Koelln-Reisiek
SysOp : DGR349 (Andreas)
Mail  : DGR349@DBX349.#PI.SLH.DEU.EU
Loc   : JO43US

***

MAPCOMMENT="BBS: DBX349 * NODE: DNO349 * CH 24 1200bd"
EnableM0LTEMap=1
NODEMAPSERVER="update.g8bpq.net"

IDINTERVAL=15
BTINTERVAL=15
NODESINTERVAL=25

PACLEN=236
BBS=1
NODE=1
HIDENODES=0

PORT
   PORTNUM=1
   ID=CH 24 1200 bps
   TYPE=ASYNC
   COMPORT=/dev/tnccb
   SPEED=9600
   FULLDUP=0
   COMPORT=/dev/tnccb
   PROTOCOL=KISS
   CHANNEL=A                ; A single channel TNC, A or B for multichannel
   QUALITY=203              ; Quality factor applied to node broadcasts
   MINQUAL=201              ; Entries in the nodes table with qualities
                            ; greater or equal to MINQUAL will be sent on
                            ; this port. A value of 0 sends everything.
   RESPTIME=1000            ; Level 2 delayed ack timer in milliseconds
   RETRIES=10               ; Level 2 maximum retry value
   PACLEN=236               ; Default max packet length for this port
   L3ONLY=0                 ; 1=No user downlink connects on this port
   DIGIFLAG=0               ; Digipeat: 0=OFF, 1=ALL, 255=UI Only
   USERS=0                  ; Maximum number of L2 sessions, 0 = no limit

   TXDELAY=400              ; Transmit keyup delay in milliseconds
   TXTAIL=100                ; TX key down, in milliseconds, at packet end
   M0LTEMapInfo=RF,27.235,FSK,1200,1200,Mixed
ENDPORT

PORT
   PORTNUM=2
   ID=Telnet (SysOP Only)
   DRIVER=Telnet
   QUALITY=0
   M0LTEMapInfo=PrivateNet,,Telnet,,,Other
   CONFIG
      SECURETELNET=1
      LOGGING=0
      DisconnectOnClose=0
      LOGINPROMPT=user:
      PASSWORDPROMPT=password:
      MAXSESSIONS=15
      USER=myusername,mypassword,DGR349,"",sysop
ENDPORT

PORT
   PORTNUM=3
   ID=AXIP Link
   DRIVER=BPQAXIP
   QUALITY=192           ; Quality factor applied to node broadcasts heard on
                         ; this port, unless overridden by a locked route
                         ; entry. Setting to 0 stops node broadcasts
   MINQUAL=50             ; Entries in the nodes table with qualities greater or
                         ; equal to MINQUAL will be sent on this port. A value
                         ; of 0 sends everything.
   MAXFRAME=7            ; Max outstanding frames (1 thru 7)
   FRACK=5000            ; Level 2 timout in milliseconds
   RESPTIME=1000         ; Level 2 delayed ack timer in milliseconds
   RETRIES=10            ; Level 2 maximum retry value
   UNPROTO=ID            ; BTEXT broadcast addrs format: DEST[,digi1[,digi2]]
   BCALL=DNO349          ; BTEXT call. unstated defaults to APPL1CALL
   PACLEN=236
   M0LTEMapInfo=Internet,,AXIP,,,Backbone
   CONFIG
      MHEARD on
      UDP 10094
      BROADCAST NODES
      BROADCAST ID
      MAP DBX349    127.0.0.1 UDP 4866 B          ; my own BBS
ENDPORT

APPLICATION 1,BBS,C 3 DBX349,DBX349,KORBBS,255
APPLICATION 2,CHAT,,DNO349-8,KORCHT,255
LINCHAT

Step 5: Start LinBPQ

To verify everything is set up correctly, run LinBPQ manually:

1
./linbpq

To stop: Ctrl+C


Step 6: Run LinBPQ with systemd

To run LinBPQ in the background, use this systemd service file as a template:

1
sudo vim /etc/systemd/system/linbpq.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[Unit]
Description=bpq service
After=network.target syslog.target

[Service]
Type=simple
User=username
Group=usergroup
WorkingDirectory=/home/username/linbpq
ExecStart=/home/username/linbpq/linbpq
ExecStop=/bin/kill -HUP $MAINPID
SyslogIdentifier=BPQ_HAM
Restart=no
RestartSec=90
StartLimitInterval=400

[Install]
WantedBy=multi-user.target

Step 7: Start

1
2
3
sudo systemctl daemon-reload
sudo systemctl enable bpq
sudo systemctl start bpq

Outlook

LinBPQ is now installed and ready. Next steps:

  • Configure ports (KISS, Telnet, UDP)
  • Enable BBS or chat
  • Set up the web interface
This post is licensed under CC BY 4.0 by the author.