Steve G7TAJ has written a PiBaycom kiss driver, so now you can use your old Baycom modems.
I must find some time to test this. Looks very nice.
https://github.com/TAj-src/piBayCom
Packet-radio A Way Of Life
Steve G7TAJ has written a PiBaycom kiss driver, so now you can use your old Baycom modems.
I must find some time to test this. Looks very nice.
https://github.com/TAj-src/piBayCom
I was reading in the release notes of NOSAprs and found something to play with.
Release 1.15b5 (patch)
======================
This are two ways to write data to the udp port 16161
#!/bin/bash exec 3<>/dev/udp/192.168.1.101/16161 echo -e "writing to udp port 16161 Jnos" >&3 exec 3>&-
Sun Dec 22 20:59:52 2019 – ax0 sent:
KISS: Port 0 Data
AX25: PD9Q-10->APZ200 v WIDE1-1 UI pid=Text
0000 …writing to udp port 16161 Jnos…
#!/bin/bash ver=$(uptime) echo -n “$ver” | nc -4u -w1 192.168.1.101 16161
Sun Dec 22 20:59:56 2019 – ax0 sent:
KISS: Port 0 Data
AX25: PD9Q-10->APZ200 v WIDE1-1 UI pid=Text
0000 … 20:59:56 up 6:03, 2 users, load average: 0.16, 0.17, 0.17…
Nice let`s think about that
I running Jnos2.0m with the Aprs server enabled. This is the configuration that I use.
# NOSAPRS #================== aprs log /home/pd9q/jnos/aprs/master.log aprs interface ax0 # aprs logon call PD9Q-10 # # I want the APRS Internet System to only send me traffic # for stations that are within 300 KM, of my location. In my # case, the city of Winnipeg is roughly 49d54m (Latitude) # and -97d7m (Longitude). # #aprs logon filter r/51.3352/3.4815/50 # # Configure the Position and Status texts that are broadcast # out to the APRS Internet System (APRS IS). # aprs bc stat "Jnos inet/aprs gateway PD9Q-10" aprs bc pos "5133.52N/00348.15E & JNOS https://packet-radio.net" aprs bc timer 720 # # Configure the Position and Status texts that are broadcast out # the default APRS RF port (set by the aprs interface command). # aprs bc rfstat "Jnos inet/aprs gateway PD9Q-10" aprs bc rfpos "5133.52N/00348.15E & JNOS https://packet-radio.net" aprs bc rftimer 10 # # APRS route add ax25 route add apz200 ax0 WIDE1-1 ax25 route add id ax0 WIDE1-1 # # I don't use WX - following for development purposes only # aprs wx call PD9Q-13 aprs wx stat "Weather Station - Kortgene JO11VN" aprs wx pos "5133.52N/00348.15E_METEO packet-radio.nl:14501" aprs wx data "/home/pd9q/jnos/wx/current.wx" aprs bc rftimer 10 # # Heard table # aprs hsize 10 # # Turn on digi # aprs flags +digi +debug # # Stuff for the 14501 status page # aprs contact m "pd9q@packet-radio.net" aprs locator "JO11VN" # # Connection to APRS internet system # aprs server add pa4tw.nl 10152 # # Potential APRS Clients # #aprs client add 44.135.124.62 14825 # # IF you want to gate traffic to RF - BE VERY CAREFULL # with these filters. You don't want to FLOOD your local # frequencies with solid traffic. You've been warned !! # #aprs calls fwdtorf VE4 VA4 VE3JJ VE3HDU #aprs calls postorf VE4 VA4 VE3JJ VE3HDU #aprs calls stattorf VE4 VA4 VE3JJ VE3HDU #aprs calls wxtorf VE4 VA4 S VE3JJ VE3HDU # # This next entry gives specific IP address(s) permission to use the # browser based APRS message center to it's full capacity. By default, # the message center allows READ-ONLY access (ie, you can't send). # aprs calls ip45845 192.168.1.186 # aprs email local # # Activate the core NOSaprs service # aprs listen on # # If you want the NOSaprs status page to be available, # for example, 'http://localhost:14501'. # start aprs 14501 # # If you want the NOSaprs browser based message center # for example, 'http://localhost:14845'. # start aprs 45845
I wanted to broadcast a weather beacon, but since I don’t have a weather station it became a bit more difficult. After some searching on the internet I came across a site where I can download a file with an api with weather data that is no more than 10 minutes old. Great. After downloading the file looks a little messy.
"liveweer": [{"plaats": "Kortgene", "station": "DE BILT AWS", "timestamp": "1577030283", "time": "22-12-2019 16:58:03", "temp": "7.3", "gtemp": "4.6", "samenv": "Van tijd tot tijd lichte regenbuien of regen", "image": "regen", "windrgr": "182.7", "windr": "ZZO", "windms": "4.06", "windbft": "3", "windknp": "7.9", "windkmh": "14.6", "windstootms": "5.19", "windstootbft": "3", "windstootknp": "10.1", "windstootkmh": "18.7", "luchttemp": "7.2", "lv": "99", "luchtd"
I can’t do much with this. Let`s manupilate the file. First add some “enters”/”new lines” in the file.
Add a enter after/new line “, ”
sed -i $’s/”, “/),\\\n(/g’ ~/wx-project/meteo.wx
Now the file looks like this
{ "liveweer": [{"plaats": "Kortgene), (station": "DE BILT AWS), (timestamp": "1577030283), (time": "22-12-2019 16:58:03), (temp": "7.3), (gtemp": "4.6), (samenv": "Van tijd tot tijd lichte regenbuien of regen), (image": "regen), (windrgr": "182.7), (windr": "ZZO), (windms": "4.06), (windbft": "3), (windknp": "7.9), (windkmh": "14.6), (windstootms": "5.19), (windstootbft": "3), (windstootknp": "10.1), (windstootkmh": "18.7), (luchttemp": "7.2), (lv": "99), (luchtd": "_),
That’s better, just clean up the mess. I end up with this.
# Remove the non-letters/numbers except . and : and –
sed -i -e “s/[^ 0-9a-zA-Z.:-]//g” -e ‘s/ \+/ /’ ~/wx-project/meteo.wx
liveweer: plaats: Kortgene station: DE BILT AWS timestamp: 1577030283 time: 22-12-2019 16:58:03 temp: 7.3 gtemp: 4.6 samenv: Van tijd tot tijd lichte regenbuien of regen image: regen windrgr: 182.7 windr: ZZO windms: 4.06 windbft: 3 windknp: 7.9 windkmh: 14.6 windstootms: 5.19 windstootbft: 3 windstootknp: 10.1 windstootkmh: 18.7 luchttemp: 7.2 lv: 99
Now we can read the line and get the value from it. I do this with “awk”
temp=$(awk ‘NR==5{print $2}’ meteo.wx)
echo TEMP=”$temp”°C Temperature degrees Celsius
Read line 5 word number two. And we have…………….
7.3°C Temperature degrees Celsius.
In the Netherlands we work with the mertrice system. Now the weather beacon is displayed in the imperial system. Now some calculation work must take place.
# Do some calulation # From °Celsius to Fahrenheit fah=$(echo "(($temp*1.8)+32)" | bc) fah1=$(echo "$fah" | awk -F'.' '{print $1}') fah2=$(echo $fah1 | sed -e :a -e 's/^.\{1,2\}$/0&/;ta') echo FAH="$fah2"F Temperature degrees Fahrenheit # (Wind speed miles)From kilometer per hour to miles per hour and add leading zero(s) wpm=$(echo "$wpk"/1.609344 | bc) wpm0=$(echo $wpm | sed -e :a -e 's/^.\{1,2\}$/0&/;ta') echo WPM="$wpm0"mph Wind speed in miles per hour # (Wind guts miles) From kilometer per hour to miles per hour and add leading zero(s) wgm=$(echo "$wgk"/1.609344 | bc) wgm0=$(echo $wgm | sed -e :a -e 's/^.\{1,2\}$/0&/;ta') echo WGM="$wgm0"mph Wind guts in miles per hour # (Rain in inches) From mm to inches the last hour. Remove the (DOT) and only the first 3 numbers rni=$(echo "$rn"*0.0039370 | bc) rni0=$(echo $rni | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/') echo RNI="$rni0"inch Rain in the last hour in inches # (Rain (24) in inches) From mm to inches the last 24 hour. Remove the (DOT) and only the first 3 numbers rni24=$(echo "$rn24"*0.0039370 | bc) rni240=$(echo $rni24 | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/') echo RNI="$rni240"inch Rain in the last 24 hour in inches # (Rain (12) in inches) From mm to inches the last 12 hour. Remove the (DOT) and only the first 3 numbers rni12=$(echo "$rn12"*0.0039370 | bc) rni120=$(echo $rni12 | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/') echo RNI="$rni120"inch Rain in the last 12 hour in inches
We can finally put the beacon together.
# Let show what we have and put it on the place it belong. echo !5133.52N/00348.15E_"$grd"/"$wpm0"g"$wgm0"t"$fah2"r"$rni0"p"$rni240"P"$rni120"h"$hum"b"$bar" echo !5133.52N/00348.15E_"$grd"/"$wpm0"g"$wgm0"t"$fah2"r"$rni0"p"$rni240"P"$rni120"h"$hum"b"$bar" > /home/pd9q/jnos/wx/current.wx
Output
!5133.52N/00348.15E_272/010g022t046r005p028P017h92b0987
The compleet output looks like this.
TEMP=8°C Temperature degrees Celsius
WPK=16.8km/h Wind speed in Kilometers per hour
WGK=35.6km/h Wind guts in Kilometers per hour
GRD=272° Wind direction in degrees
RAIN=1.48067mm Rain in the last hour in mm
RAIN24=7.23632mm Rain in the last 24 hour in mm
RAIN12=4.53765mm Rain in the last 12 hour in mm
HUM=92% Humidity in procent
Bar=0987mb Barometric pressure in millibars
FAH=046F Temperature degrees Fahrenheit
WPM=010mph Wind speed in miles per hour
WGM=022mph Wind guts in miles per hour
RNI=005inch Rain in the last hour in inches
RNI=028inch Rain in the last 24 hour in inches
RNI=017inch Rain in the last 12 hour in inches
!5133.52N/00348.15E_272/010g022t046r005p028P017h92b098
The complete script look like this.
I put it in a cronjob, now it’s running every 15 minutes.
crontab -e
*/15 * * * * /home/pd9q/wx-project/get-wx.sh >/dev/null 2>&1
!/bin/bash # Date 22-12-2019... Dammmmm what a job :) # The weather beacon have to look like this.... # @220424z5057.81N/00729.37E_094/002g005t043r000p006P006h89b09783 # !5133.52N/00348.15E_073/013g...t048h85b10040wWXD # # Jun 01 2003 08:07 # 272/000g006t069r010p030P020h61b10150 # *********************************************************** # 272 - wind direction - 272 degrees # 010 - wind speed - 10 mph # g015 - wind gust - 15 mph # t069 - temperature - 69 degrees F # r010 - rain in last hour in hundredths of an inch - 0.1 inches # p030 - rain in last 24 hours in hundredths of an inch - 0.3 inches # P020 - rain since midnight in hundredths of an inch - 0.2 inches # h61 - humidity 61% (00 = 100%) # b10153 - barometric pressure in tenths of a MILLIBAR - 1015.3 MILLIBARS # # Get the wx data from Weerlive/Meteoserver #wget -O - "http://weerlive.nl/api/json-data-10min.php?key=?!?!?!?!?!&locatie=Kortgene" > ~/wx-project/weerlive.wx # wget -O - "https://data.meteoserver.nl/api/liveweer_synop.php?locatie=Kortgene&key=!?!?!?!?!?!?&select=1" > ~/wx-project/meteo.wx # # Some file manipulation on the METEO.WX file # Add a enter after ", " sed -i $'s/", "/),\\\n(/g' ~/wx-project/meteo.wx # Remove the non-letters/numbers except . and : and - sed -i -e "s/[^ 0-9a-zA-Z.:-]//g" -e 's/ \+/ /' ~/wx-project/meteo.wx # # Getting the data sorted.... now=$(date +%d%H%M) # temp=$(awk 'NR==5{print $2}' meteo.wx) echo TEMP="$temp"°C Temperature degrees Celsius # Wind speed (Kilometers) wpk=$(awk 'NR==14{print $2}' meteo.wx) echo WPK="$wpk"km/h Wind speed in Kilometers per hour # Wind gust (Kilometers) wgk=$(awk 'NR==18{print $2}' meteo.wx) echo WGK="$wgk"km/h Wind guts in Kilometers per hour grd=$(awk 'NR==9{print $2}' meteo.wx | awk -F'.' '{print $1}') echo GRD="$grd"° Wind direction in degrees rn=$(awk 'NR==38{print $2}' meteo.wx) echo RAIN="$rn"mm Rain in the last hour in mm rn24=$(awk 'NR==39{print $2}' meteo.wx) echo RAIN24="$rn24"mm Rain in the last 24 hour in mm rn12=$(awk 'NR==37{print $2}' meteo.wx) echo RAIN12="$rn12"mm Rain in the last 12 hour in mm hum=$(awk 'NR==20{print $2}' meteo.wx) echo HUM="$hum"% Humidity in procent bar=$(awk 'NR==21{print $2}' meteo.wx | awk -F: '{ printf "%04i", $1,$2 }') echo Bar="$bar"mb Barometric pressure in millibars # Do some calulation # From °Celsius to Fahrenheit fah=$(echo "(($temp*1.8)+32)" | bc) fah1=$(echo "$fah" | awk -F'.' '{print $1}') fah2=$(echo $fah1 | sed -e :a -e 's/^.\{1,2\}$/0&/;ta') echo FAH="$fah2"F Temperature degrees Fahrenheit # (Wind speed miles)From kilometer per hour to miles per hour and add leading zero(s) wpm=$(echo "$wpk"/1.609344 | bc) wpm0=$(echo $wpm | sed -e :a -e 's/^.\{1,2\}$/0&/;ta') echo WPM="$wpm0"mph Wind speed in miles per hour # (Wind guts miles) From kilometer per hour to miles per hour and add leading zero(s) wgm=$(echo "$wgk"/1.609344 | bc) wgm0=$(echo $wgm | sed -e :a -e 's/^.\{1,2\}$/0&/;ta') echo WGM="$wgm0"mph Wind guts in miles per hour # (Rain in inches) From mm to inches the last hour. Remove the (DOT) and only the first 3 numbers rni=$(echo "$rn"*0.0039370 | bc) rni0=$(echo $rni | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/') echo RNI="$rni0"inch Rain in the last hour in inches # (Rain (24) in inches) From mm to inches the last 24 hour. Remove the (DOT) and only the first 3 numbers rni24=$(echo "$rn24"*0.0039370 | bc) rni240=$(echo $rni24 | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/') echo RNI="$rni240"inch Rain in the last 24 hour in inches # (Rain (12) in inches) From mm to inches the last 12 hour. Remove the (DOT) and only the first 3 numbers rni12=$(echo "$rn12"*0.0039370 | bc) rni120=$(echo $rni12 | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/') echo RNI="$rni120"inch Rain in the last 12 hour in inches #@220424z5057.81N/00729.37E_094/002g005t043r000p006P006h89b09783 # Let show what we have and put it on place it belong. echo !5133.52N/00348.15E_"$grd"/"$wpm0"g"$wgm0"t"$fah2"r"$rni0"p"$rni240"P"$rni120"h"$hum"b"$bar" echo !5133.52N/00348.15E_"$grd"/"$wpm0"g"$wgm0"t"$fah2"r"$rni0"p"$rni240"P"$rni120"h"$hum"b"$bar" > /home/pd9q/jnos/wx/current.wx #
From version 2.0m it is possible to run Jnos as a NON-Root user.
The changelog from the website of Maiko.
a) create a new JNOS user and group jnos:x:1001:1001::/home/jnos:/bin/bash jnos:x:1001: b) change ownership of the entire JNOS runtime area chown -R jnos:jnos /jnos/rte c) as root user, configure a tunN interface, and just leave it there forever. ip tuntap add mode tun dev tun4 ifconfig tun4 192.168.200.200 pointopoint 192.168.200.201 mtu 1500 up WARNING : make sure you pick a number N that does not conflict with any other tun interfaces that might be running - OpenVPN comes to mind for example, some VM subsystems might use tun as well ? d) modify autoexec.nos, add an extra parameter to the 'attach tun' entry, and make sure to comment out the point to point ifconfig. So what was previously run as root, for example, below : attach tun tun0 1500 0 shell ifconfig tun0 192.168.200.200 pointopoint 192.168.200.201 mtu 1500 up will now just become a one line entry, below : attach tun tun0 1500 0 tun4
I have add some of the stuff in my /etc/rc.local file.
# Jnos sysctl -w net.ipv4.ip_forward=1 ip tuntap add mode tun dev tun4 ifconfig tun4 192.168.1.100 pointopoint 192.168.1.101 mtu 1500 up # Put a "Proxy ARP" on the Linux Ethernet so that it can answer any # querries for the JNOS addres /usr/sbin/arp -i eth0 -Ds 192.168.1.101 eth0 pub
This is what i have in the autoexec.nos
attach tun tun0 1500 0 tun4 # ifconfig tun0 ipaddress 192.168.1.101 ifconfig tun0 netmask 0xfffffffc ifconfig tun0 mtu 1500
Now you can run Jnos as a “normal” user.
Very,very sad news…..
Below a mail from Phil Karn.
[44net] Brian Kantor, WB6CYT, SK
Date: Fri, 22 Nov 2019 15:27:49 -0800 (11/22/2019 06:27:49 PM)
I have very sad news. My good friend, Brian Kantor, WB6CYT ,suddenly passed away this week at his home in San Diego, California.
Brian retired only two years ago after 47 years of service on the staff at the University of California San Diego (UCSD). Way back in the mid 1980s, Brian and I founded AMPRnet, the TCP/IP over amateur radio network. He continued to manage it until his passing.
Brian recently created and served as chair and CEO of Amateur Radio Digital Communications (ARDC), a charitable foundation funded by the sale of unused AMPRnet IPv4 addresses. ARDC promotes STEM education and amateur radio digital development through scholarships and by funding the development of open source hardware and software.
Brian will be sorely missed and impossible to replace. Memorial arrangements will be announced when known.
Phil Karn, KA9Q
Ok, first of all I want to apologize for my fantastic bash scripting arts. There must be people laughing there ass off.
I was searching the internet for an update program or script for Linbpq. I could not find these, so I started using my bash scripting skills.
Maybe someone has better ideas.
The problem is that John GM8BPQ does not work with version numbers in his program names. This makes it difficult to quickly see if you need to update. Now I always look at the dates, this gave me an idea.
Why not look at the Last_Modified date with a shell script. Now of course you first have to check on your own system which date you have with your most recent Linbpq program file.
pd9q@packet:~ $ date -d "$( stat /home/pd9q/linbpq/linbpq | awk '/Modify/{gsub( /^[^:]+: +/,"",$0); print}' )" "+%Y-%m-%d" 2019-09-26
Okay now we have to take a look at John’s date on his web server.
pd9q@packet:~ $ date -d "$( curl -sI http://www.cantab.net/users/john.wiseman/Downloads/Beta/pilinbpq | awk '/Last-Modified/{gsub( /^[^:]+: +/,"",$0); print}' )" "+%Y-%m-%d" 2019-10-05
Now you have two dates, lets compare.
local=$(date -d "$( stat /home/pd9q/linbpq/check/linbpq | awk '/Modify/{gsub( /^[^:]+: +/,"",$0); print}' )" "+%Y-%m-%d") remote=$(date -d "$( curl -sI http://www.cantab.net/users/john.wiseman/Downloads/Beta/pilinbpq | awk '/Last-Modified/{gsub( /^[^:]+: +/,"",$0); print}' )" "+%Y-%m-%d") # Compare the Modified date`s if (( ${local//-/} < ${remote//-/} )); then
It should be “if (( ${local//-/} < ${remote//-/} ));”
The local file is from 2019-09-26 and de remote file is from 2019-10-05
Let get the new Linbpq version from 2019-10-05 and downloading it with a timestamp. I want the timestamp to remain the same, otherwise nothing later can be compared.
wget -N http://www.cantab.net/users/john.wiseman/Downloads/Beta/pilinbpq -P /home/pd9q/linbpq
The -N oprions by the wget command stands for –Timestammping
Now I want to name the file linbpq with the date of the download and copy it to the directory /home/pd9q/linbpq. If you use the -p option with cp the timestamp stays the same. And I also have the file in the /home/pd9q/linbpq/check directory. This is because I need it to compare the dates.
now=$(date "+%Y-%m-%d") cp -p /home/pd9q/linbpq/pilinbpq /home/pd9q/linbpq/linbpq-$now yes | cp -rfp /home/pd9q/linbpq/pilinbpq /home/pd9q/linbpq/check/linbpq
Let`s remove pilinbpq, we no longer need him. And chmod the linbpq file so we can execute it.
rm -f /home/pd9q/linbpq/pilinbpq chmod +x /home/pd9q/linbpq/linbpq-$now
I’m using the sed command to alter the linbpq start file.
sed -i "s,sudo -u pd9q ./.*$,sudo -u pd9q ./linbpq-"$now"," /home/pd9q/linbpq/linbpq.start
pd9q@packet:~ $ grep linbpq- /home/pd9q/linbpq/linbpq.start sudo -u pd9q ./linbpq-2019-10-31
That works very well.
Now let’s restart Linbpq with the new version of Linbpq
sudo systemctl restart linbpq
If you now run up2bpq again you will get the following message if the two dates match.
pd9q@packet:~ $ ./up2bpq Your version has the same timestamp so your version is up2date The local linbpq in the /home/pd9q/linbpq/check directory has 2019-10-05 as timestamp. The remote pilinbpq has 2019-10-05 as timestamp.
Here is the entire script.
#!/bin/bash # # Fist make a directory called check in your linbpq directory and made a copy of the linbpq program file to it. # # Lets get the Modify date from linbpq local en pilinbpq remote local=$(date -d "$( stat /home/pd9q/linbpq/check/linbpq | awk '/Modify/{gsub( /^[^:]+: +/,"",$0); print}' )" "+%Y-%m-%d") remote=$(date -d "$( curl -sI http://www.cantab.net/users/john.wiseman/Downloads/Beta/pilinbpq | awk '/Last-Modified/{gsub( /^[^:]+: +/,"",$0); print}' )" "+%Y-%m-%d") # Compare the Modified date`s if (( ${local//-/} < ${remote//-/} )); then # echo The local file is from $local and de remote file is from $remote echo Let get the new Linbpq version from $remote and downloading it with a timestamp. # wget -N http://www.cantab.net/users/john.wiseman/Downloads/Beta/pilinbpq -P /home/pd9q/linbpq # echo Let give the file a date. echo We are going to copy the file with the same Last_Modified as on the webserver of GM8BPQ. echo And we give it the timestamp of downloading. Dont forget to copy it with the -p option. # now=$(date "+%Y-%m-%d") cp -p /home/pd9q/linbpq/pilinbpq /home/pd9q/linbpq/linbpq-$now yes | cp -rfp /home/pd9q/linbpq/pilinbpq /home/pd9q/linbpq/check/linbpq # Remove pilinbpq rm -f /home/pd9q/linbpq/pilinbpq chmod +x /home/pd9q/linbpq/linbpq-$now # We are going to use the sed command to alter the linbpq start file. sed -i "s,sudo -u pd9q ./.*$,sudo -u pd9q ./linbpq-"$now"," /home/pd9q/linbpq/linbpq.start echo Lets check "if" its was okay. # grep linbpq- /home/pd9q/linbpq/linbpq.start # echo Now lets start Linbpq with the new version. # sudo systemctl restart linbpq else echo "Your version has the same timestamp so your version is up2date" echo The local linbpq in the /home/pd9q/linbpq/check directory has $local as timestamp. echo The remote pilinbpq has $remote as timestamp fi
I had some problems starting Linfbb with systemd. The problem turned out to be that Linfbb was running in the background. Systemd was thinking fbb was going offline and kept restarting. Now it is possible to provide start options with fbb.
Command line options of the fbb script :
—————————————-
-f : Software is run in foreground
-h : help information
-q : run silent
-l logfile : log debug info to logfile
Now I put the following in my fbb start file.
pd9q@packet:~/linbpq $ cat fbb.start # Start Linfbb file sudo /usr/local/sbin/fbb -f -l /home/pd9q/linbpq/fbb.log
The unit file for systemd.
pd9q@packet:~/linbpq $ cat /etc/systemd/system/fbb.service [Unit] Description=LinFbb Daemon After=network.target After=linbpq.target After=direwolf.target StartLimitInterval=0 [Service] Type=simple Restart=always RestartSec=5 ExecStartPost=/bin/sh -c "echo $MAINPID > /home/pd9q/linbpq/run/fbb.pid" ExecStart=/bin/sh /home/pd9q/linbpq/fbb.start [Install] WantedBy=multi-user.target Alias=fbb.service
Systemctl status fbb
pd9q@packet:~/linbpq $ sudo systemctl status fbb ● fbb.service - LinFbb Daemon Loaded: loaded (/etc/systemd/system/fbb.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2019-10-27 06:04:57 UTC; 24min ago Process: 536 ExecStartPost=/bin/sh -c echo $MAINPID > /home/pd9q/linbpq/run/fbb.pid (code=exited, status=0/SUCCESS) Main PID: 535 (sh) Tasks: 4 (limit: 4915) CGroup: /system.slice/fbb.service ├─535 /bin/sh /home/pd9q/linbpq/fbb.start ├─541 sudo /usr/local/sbin/fbb -f -l /home/pd9q/linbpq/fbb.log ├─584 /bin/bash /usr/local/sbin/fbb -f -l /home/pd9q/linbpq/fbb.log └─826 /usr/local/sbin/xfbbd -a Oct 27 06:05:02 packet sh[535]: 1 records updated Oct 27 06:05:02 packet sh[535]: Files set-up complete Oct 27 06:05:02 packet sh[535]: FORWARD set-up Oct 27 06:05:02 packet sh[535]: BBS set-up Oct 27 06:05:02 packet sh[535]: Set-up complete Oct 27 06:05:02 packet sh[535]: GMT 06:05 - LOCAL 06:05 Oct 27 06:05:02 packet sh[535]: Starting multitasking ... ok Oct 27 06:05:02 packet sh[535]: FBB options : -a Oct 27 06:05:02 packet sh[535]: Running XFBB in foreground mode ^C to abort Oct 27 06:05:07 packet sh[535]: Starting XFBB (pwd = /usr/local/var/ax25/fbb)...
Now is fbb running just fine.
A few days ago I posted a message about creating a pid file for linbpq. So that it becomes possible to monitor the process with watchdog.
Now I use Monit to display this graphically. Why, because it looks nice. Now you immediately have an overview of running processes and their status.
The configuration file that I use for this.
/etc/monit/monitrc
## Start Monit in the background (run as a daemon): # set daemon 300 # check services at 5-minute intervals set logfile /var/log/monit.log set pidfile /var/run/monit.pid set idfile /var/lib/monit/id set statefile /var/lib/monit/state set httpd port 2812 use address 192.168.1.168 allow 192.168.1.0/255.255.255.0 allow admin:pancake set mailserver localhost # primary mailserver set eventqueue basedir /var/lib/monit/events # set the base directory where events will be stored slots 100 # optionally limit the queue size set alert pd9q@packet-radio.net # receive all alerts check system $HOST if loadavg (1min) > 4 then alert if loadavg (5min) > 2 then alert if cpu usage > 95% for 10 cycles then alert if memory usage > 75% then alert if swap usage > 25% then alert check process Linbpq with pidfile /home/pd9q/linbpq/run/linbpq.pid if changed pid then alert check file bpq32.cfg with path /home/pd9q/linbpq/bpq32.cfg check process Direwolf with pidfile /home/pd9q/linbpq/run/direwolf.pid if changed pid then alert check file direwolf.conf with path /home/pd9q/linbpq/direwolf.conf check host Router with address 192.168.1.1 if failed ping then alert check network Eth0 with interface eth0 if failed link then alert if changed link then alert if saturation > 90% then alert if download > 10 MB/s then alert if total uploaded > 1 GB in last hour then alert check host Packet-radio.net with address packet-radio.net if failed icmp type echo count 5 with timeout 15 seconds then alert if failed port 80 proto http then alert if failed port 443 type TCPSSL proto http then alert alert pd9q@packet-radio.net include /etc/monit/conf.d/* include /etc/monit/conf-enabled/*
I came across the website of R.C. Anderson WH6FQE.
https://www.wh6fqe.com
Here he has a nice configuration example of BPQ32, windows version. I asked him if he thought it was okay that I placed it on my website. This was not a problem.
Sit back and enjoy.
***************************** START OF FILE ***************************************** /* This begins a multi-line comment - UPDATED OCT 20, 2019 CONFIGURATION FILE FOR BPQ32: G8BPQ SWITCH SOFTWARE FOR WH6FQE Port 1: AX/IP/UDP Internet Linking User - BBS / DTN Node Forwarding Port Port 2: BPQ Telnet Server - High-Speed Internet Port Port 3: APRS Port - APRS Digipeater & IGATE Port 4: PACTOR Port - HF Winlink RMS Gateway ;Port 5: WINMOR Port - HF Winlink RMS Gateway ;Port 6: ARDOP Port - HF Winlink RMS Gateway - OFFLINE Port 7: VHF Packet-Radio Port - VHF Winlink RMS,BBS, and BPQ Chat VHF gateway Web Server: wh6fqe.ddns.net:8012/Node/NodeIndex.html BPQ Node Map: WH6FQE-1 WH6FQE.DDNS.NET UDP 10093 B */ This ends a multi-line comment SIMPLE PASSWORD=**************** LOCATOR=BL11AJ66MT NODECALL=WH6FQE-1 NODEALIAS=HIHUB IDMSG: ; UI broadcast text from NODECALL to fixed dest ID WH6FQE - DTN Pacific Region Hub & BPQ Packet Node in Honolulu, HI *** ; Denotes end of IDMSG text BTEXT: ; UI broadcast text from BCALL to destination UNPROTO= WH6FQE - DTN Pacific Region Hub & BPQ Packet Node in Honolulu, HI *** ; Denotes end of BTEXT text INFOMSG: ; The INFO command text follows: Welcome to the WH6FQE DTN Pacific Region Hub & BPQ Packet Node in Honolulu, HI HIBBS:WH6FQE BBS HIHUB:WH6FQE-1 DTN Pacific Region Hub HIAPRS:WH6FQE-3 APRS Digipeater and iGate HICHAT:WH6FQE-5 BPQ Chat Server HISAT:WH6FQE-6 SatGate Satellite APRS Ground Station HIRMS:WH6FQE-10 WinLink RMS Gateway Thanks for visiting. ...Aloha and 73`s RC WH6FQE *** ; Denotes end of INFOMSG text CTEXT: ; The CTEXT text follows: WH6FQE - DTN Pacific Region Hub & BPQ Packet Node in Honolulu, HI HIHUB:WH6FQE-1} RMS BBS CONNECT BYE INFO NODES PORTS ROUTES USERS MHEARD *** ; Denotes end of CTEXT text FULL_CTEXT=0 ; 0=send CTEXT to L2 connects to NODEALIAS only ; 1=send CTEXT to all connectees ;----------------------------------------------- NETWORK SYSTEM PARAMETERS ---------------------------------------- NODESINTERVAL=25 ; Nodes broadcast interval in minutes IDINTERVAL=10 ; 'IDMSG' UI broadcast interval in minutes, 0=OFF BTINTERVAL=60 ; The BTEXT broadcast interval in minutes, 0=OFF MAXLINKS=63 ; Max level 2 links MAXNODES=200 ; Max nodes in nodes table MAXROUTES=64 ; Max adjacent nodes MAXCIRCUITS=128 ; Max L4 circuits MINQUAL=85 ; Minimum quality to add to nodes table ;----------------------------------------------------------- AX / IP/ UDP PORT ---------------------------------------------------- PORT PORTNUM=1 ID=AX/IP/UDP DRIVER=BPQAXIP ; Uses BPQAXIP.DLL QUALITY=200 ; Quality factor applied to node broadcasts heard on ; this port, unless overridden by a locked route ; entry. Setting to 0 stops node broadcasts MINQUAL=0 ; 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=7000 ; 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=WH6FQE-1 ; BTEXT call. unstated defaults to APPL1CALL CONFIG UDP 10093 ;Listens for UDP packets on this UDP port number UDP 10092 MHEARD ON ; AUTOADDMAP BROADCAST NODES BROADCAST ID MAP VK4QC-1 VK4QC.DDNS.NET UDP 10093 B MAP K0ZCO-1 K0ZCO.DDNS.NET UDP 10093 B MAP W5KAV-1 W5KAV.DDNS.NET UDP 10093 B MAP N3HYM-5 N3HYM.DDNS.NET UDP 10092 B MAP N9LCF-4 67.199.254.150 UDP 10093 B MAP W9GM-7 W9GM.DDNS.NET UDP 10093 B MAP KC9VYU-7 kc9vyu.4920north.com UDP 10093 B MAP KK5QT-1 KK5QT.DDNS.NET UDP 10093 B MAP PE1RRR-7 Z.RED-HEAT.COM UDP 10093 B MAP AC9HP AC9HP.SOFTETHER.NET UDP 10093 B MAP KE0GB-7 KE0GB.DDNS.NET UDP 10093 B MAP N9PMO-2 N9PMO.NO-IP.ORG UDP 10093 B MAP N7HPX-2 66.194.76.151 UDP 10093 B MAP ZS6RO-14 WWW.HAM-RADIO.CO.ZA UDP 10093 B MAP DB0NTS-8 DB0NTS.SPDNS.ORG UDP 10093 B MAP W0LVJ-8 69.92.94.54 UDP 10093 B MAP VK6RR-1 VK6RR.DDNS.NET UDP 10093 B MAP LU4ECL-4 LU4ECL.ZAPTO.ORG UDP 10093 B MAP W4WWS-2 W4WWS.DDNS.NET UDP 10093 B ENDPORT ;-------------------------------------------------- BPQ TELNET SERVER PORT -------------------------------------------- PORT PORTNUM=2 ID=Telnet DRIVER=Telnet QUALITY=0 CONFIG CMS=1 CMSCALL=WH6FQE CMSPASS=**************** RELAYAPPL=BBS LOGGING=1 DisconnectOnClose=1 TCPPORT=8010 FBBPORT=8011 HTTPPORT=8012 LOGINPROMPT=user: PASSWORDPROMPT=password: MAXSESSIONS=15 CTEXT=Welcome to WH6FQE's Telnet Server\nEnter ? for list of commands\n\n USER=WH6FQE,52983771RAnderson,WH6FQE,"",sysop ENDPORT /* ;---------------------------------------------------------------- APRS PORT --------------------------------------------------------- APRSDIGI APRSCall WH6FQE-6 StatusMsg= Oahu Hawaii SatGate Symbol=S ; Icon to display for station. Default is House if omitted Symset=\ ;Specify a Dest and Path for each port you want to use for APRS. No dest means receive only port ;Ports without an APRSPath statement will not be used by the Digi APRSPATH 1=ARISS,SGATE,WIDE2-2 APRSPATH 2= ; Receive only port APRSPATH 3=ARISS,SGATE,WIDE2-2 APRSPATH 4=ARISS,SGATE,WIDE2-2 BeaconInterval=4 ; Send Beacon every 4 minute ; Define Crossport Digi. For each port, a list of ports to send a packet to (IS means send to APRS-IS) ; If a Digimap isn`t specified for a port, digi out on the port the packet arrived on, ; and send to APRS-IS (if enabled) ; If you want to digi on same port, but not send to APRS-IS, Specify Digimap n=n ;Digimap 5=5,16, ; Packets from 5 to 16, but not APRS-IS Digimap 3=3,IS ; Packets from 3 to 3 and APRS-IS ;TraceCalls=WIDE,TRACE ; Calls for CALLN-n Processing with Trace TraceCalls=WIDE,IN ; Calls for CALLN-n Processing with Trace FloodCalls=FQE ; Calls for CALLN-n Processing without Trace DigiCalls=WH6FQE ; Calls for Normal (ie no SSID manipulation) Digi ; For a Local "Fillin" Digi, you could include WIDE1-1 and leave out TraceCalls and FloodCalls ReplaceDigiCalls ; Replace DigiCalls with APRSCall. Omit if you want the call to be left as it is received. MaxTraceHops=2 ; Max value of n in CALLN-n processing. If a packet is received with n greater than MaxFloodHops= ; this, the value will be replaced BEFORE it is decremented. ; GPSPort= ; if specified, lat/lon will be taken from a GPS ; GPSSpeed=9600 ; GPSSetsLocator=1 ;IGATE Params. If specified you will gate RF packets and your beacons to APRS-IS ISHost=rotate.aprs.net ; APRS-IS Host Name ISPort=14580 ; Normal port for a filtered feed ISPasscode=17321 ; If you don`t already have a passcode I can issue you one. ; WXFileName=C:\WeatherLink\WH6FQE13\WXNOW.TXT ; WXComment=WH6FQE Weather Station ; WXPortList=1,IS ; comma separated list - include IS to send to APRS-IS ; WXInterval=3 ; minutes LAT=2124.21N ; Must be in standard APRS Format LON=15756.74W ; Must be in standard APRS Format *** PORT ;145.825 SATGATE PORTNUM=3 ID=APRS SATGATE ; Displayed by PORTS command TYPE=ASYNC ; Port is RS232 Com PROTOCOL=KISS ; TNC is used in KISS mode COMPORT=14 ; # = SERIAL COM PORT SPEED=38400 ; RS232 COM PORT SPEED CHANNEL=A ; A for single channel TNC, A or B for multichannel MAXFRAME=2 ; Max outstanding frames (1 thru 7) FRACK=6000 ; Level 2 timout in milliseconds RESPTIME=1000 ; Level 2 delayed ack timer in milliseconds RETRIES=5 ; Level 2 maximum retry value PACLEN=128 ; Default max packet length for this port TXDELAY=350 ; Transmit keyup delay in milliseconds SLOTTIME=100 ; CMSA interval timer in milliseconds PERSIST=230 ; PERSIST=256/(# of transmitters-1) MINQUAL=95 ; Entries in the nodes table with qualities greater or ; equal to MINQUAL will be sent on this port. A value ; of 0 sends everything. FULLDUP=0 ; Only meaningful for KISS devices TXTAIL=0 ; TX key down, in milliseconds, at packet end QUALITY=0 ; Quality factor applied to node broadcasts heard on ; this port, unless overridden by a locked route ; entry. Setting to 0 stops node broadcasts MINQUAL=95 ; Entries in the nodes table with qualities greater or ; equal to MINQUAL will be sent on this port. A value ; of 0 sends everything. UNPROTO=: ; BTEXT broadcast addrs format: DEST[,digi1[,digi2]] BCALL=WH6FQE-6 ; BTEXT call. unstated defaults to APPL1CALL L3ONLY=0 ; 1=No user downlink connects on this port DIGIFLAG=1 ; Digipeat: 0=OFF, 1=ALL, 255=UI Only DIGIPORT=0 ; Port on which to send digi`d frames (0 = same port) USERS=0 ; Maximum number of L2 sessions, 0 = no limit KISSOPTIONS=TRACKER ENDPORT */ ;--------------------------------------------------------------- PACTOR PORT ----------------------------------------------------- PORT PORTNUM=4 ; Optional but sets port number if stated ID=PACTOR ;SCS P4 Dragon 7800 DRIVER=SCSPACTOR COMPORT=11 SPEED=115200 ; COM Port Speed INTERLOCK=4 PORTCALL=WH6FQE CONFIG APPL BBS RIGCONTROL COM10 19200 ICOM IC7300 94h PTT_SETS_INPUT AUX 8,7.1010,USB,F1,D,P1234,APPL=RMS 3,7.1044,USB,F1,D,P1234 3,10.1435,USB,F1,D,P1234,APPL=RMS 8,14.1020,USB,F1,D,P1234,APPL=RMS 3,14.1124,USB,F1,D,P1234 3,21.0915,USB,F1,D,P1234,APPL=RMS 3,28.1485,USB,F1,D,P1234,APPL=RMS **** PSKA 250 ;TX Output level. May need optimising. Default is 140 FSKA 250 # if you are using a Dragon, uncomment the following DRAGON MAXLEVEL=3 # To comply with US regulations, the Dragon will be limited to P3. If your administration permits P4, # also add MAXLEVEL=4 MYCALL WH6FQE-10 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE,BL11AJ,00-23,07102500,P123, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE,BL11AJ,00-23,10145000,P123, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE,BL11AJ,00-23,14103500,P123, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE,BL11AJ,00-23,21093000,P123, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE,BL11AJ,00-23,28148500,P123, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,07102500,WINMOR1600, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,10145000,WINMOR1600, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,14103500,WINMOR1600, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,21093000,WINMOR1600, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,28148500,WINMOR1600, 85,30,0,0 WL2KREPORT PUBLIC, www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,07102500,ARDOP2000, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,10145000,ARDOP2000, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,14103500,ARDOP2000, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,21093000,ARDOP2000, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,28148500,ARDOP2000, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,07102500,VARA, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,14103500,VARA, 85,30,0,0 WL2KREPORT PUBLIC,www.winlink.org,8778,WH6FQE-10,BL11AJ,00-23,145090000,PKT1200,50,30,5,0 ENDPORT ;--------------------------------------------------------------- WINMOR PORT ----------------------------------------------------- PORT PORTNUM=5 ID=WINMOR DRIVER=WINMOR INTERLOCK=4 CONFIG ADDR 127.0.0.1 8500 PTT CI-V PATH C:\RMS Express\WINMOR TNC.exe CAPTURE IC-7300 (USB Audio Codec) PLAYBACK IC-7300 (USB Audio Codec) LISTEN TRUE CWID True DEBUGLOG True BW 1600 DRIVELEVEL 100 MODE Auto ROBUST False SHOW False BUSYLOCK False ENDPORT ;--------------------------------------------------------------- ARDOP PORT ----------------------------------------------------- PORT PORTNUM=6 ID=ARDOP DRIVER=ARDOP INTERLOCK=4 CONFIG ADDR 127.0.0.1 8400 PTT CI-V PATH C:\RMS Express\ARDOP_Win.exe CAPTURE IC-7300 (USB Audio Codec) PLAYBACK IC-7300 (USB Audio Codec) LISTEN TRUE CWID True CMDTRACE True DEBUGLOG True DRIVELEVEL 100 GRIDSQUARE BL11aj MAXCONREQ 12 PROTOCOLMODE ARQ TUNERANGE 200 ARQBW 2000MAX ARQTIMEOUT 60 MONITOR TRUE Squelch 1 SENDID 5 FECREPEATS 3 ENDPORT ;--------------------------------------------------------------- VARA PORT ----------------------------------------------------- PORT PORTNUM=7 ID=HF VARA DRIVER=VARA INTERLOCK=4 CONFIG ADDR 127.0.0.1 8300 PTT CI-V PATH C:\VARA\VARA.exe ENDPORT ;--------------------------------------------------------------- VHF PACKET PORT ----------------------------------------------------- PORT PORTNUM=8 ID=VHF Packet Gateway ;Tracker Access Port TYPE=ASYNC PROTOCOL=KISS COMPORT=14 SPEED=38400 MAXFRAME=2 FRACK=10000 RESPTIME=3000 RETRIES=10 PACLEN=200 TXDELAY=500 SLOTTIME=100 PERSIST=64 KISSOPTIONS=TRACKER ENDPORT ;---------------------------------------------------------- ROUTING INFORMATION ------------------------------------------------ ROUTES: ; Locked routes (31 maximum) /* ; Begin comment block CALLSIGN,QUALITY,PORT[,MAXFRAME,FRACK,PACLEN,INP3Enable] MAXFRAME, Frack and PACLEN if stated override the port defaults. INP3Enable = 1 enables, 0 or null disable. The INP3 (internode protocol) implementation in BPQ32 is experimental. See additional details in bpqaxip.cfg. Example of a route statement using INP3: HISCAL-12,1,1,0,0,0,1 Locked routes tend to be overused and should not be set unless truly needed. */ ; End comment block *** ; Denotes end of locked routes ;------------------------------------------------------------- APPLICATIONS ------------------------------------------------------- ; Applications: APPLICATION n,CMD,New Command,Call,Alias, Quality APPLICATION 1,RMS,C 2 CMS,WH6FQE-10,HIRMS,255 APPLICATION 2,BBS,,WH6FQE,HIBBS,255 APPLICATION 3,CHAT,,WH6FQE-5,HICHAT,255 APPLICATION 32,RC,,WH6FQE-9,0 ************************************* END OF FILE **********************************************************