Skip to content

Instantly share code, notes, and snippets.

@todgru todgru/0-ax25.md
Last active May 29, 2019

Embed
What would you like to do?
installing ax25 on debian 9 raspberry pi

ax25

from here: https://github.com/ve7fet/linuxax25

each install had a list of dependencies.

  • ax25apps
  • ax25tools
  • libax25
# as root, install all deps
apt-get install -y autoconf automake autotools-dev debhelper devscripts dh-make dpkg-dev fakeroot gcc libc libncursesw5-dev libtool lintian zlib1g-dev

then download the install script, chown, and run

summarized from: http://bazaudi.com/plu/doku.php?id=plu:install_ax25

wget -O /usr/local/src/ax25/updAX25.sh https://raw.githubusercontent.com/ve7fet/linuxax25/master/updAX25.sh
cd /usr/local/src/ax25/updAX25.sh
chown a+x updAX25.sh
./updAX25.sh
cd /etc/init.d
update-rc.d ax25 defaults 95

wget -O /etc/init.d/ax25 https://gist.githubusercontent.com/todgru/b2e742fea3991c6c242c5ea17b4cfaaf/raw/a8c627e8062139802993ff693c90d6ce0850d9ab/ax25
wget -O /usr/local/etc/ax25/ax25-down https://gist.githubusercontent.com/todgru/b2e742fea3991c6c242c5ea17b4cfaaf/raw/a8c627e8062139802993ff693c90d6ce0850d9ab/ax25-down
wget -O /usr/local/etc/ax25/ax25-up https://gist.githubusercontent.com/todgru/b2e742fea3991c6c242c5ea17b4cfaaf/raw/a8c627e8062139802993ff693c90d6ce0850d9ab/ax25-up
wget -O /etc/ax25/axports https://gist.githubusercontent.com/todgru/b2e742fea3991c6c242c5ea17b4cfaaf/raw/5e6a0470ebfd2aa4d44dc10cfc6c9e4b20fbcd36/axports
wget -O /etc/ax25/Lanparms https://gist.githubusercontent.com/todgru/b2e742fea3991c6c242c5ea17b4cfaaf/raw/5e6a0470ebfd2aa4d44dc10cfc6c9e4b20fbcd36/Lanparms

chmod +x /etc/init.d/ax25
chmod +x /usr/local/etc/ax25/ax25-down
chmod +x /usr/local/etc/ax25/ax25-up
#!/bin/bash
# Provided by Charles S Schuman ( K4GBB ) 04/29/09
# Edited to work with Debian Squeeze Basil Gunn (N7NIX) 02/24/2011
### BEGIN INIT INFO
# Provides: ax25
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Ax.25 initialization
# Description: This script provides the control for the ax.25 packet radio service.
# The fine tuneing is accomplished via /etc/ax25/ax25-up and /etc/ax25/ax25-down.
#
### END INIT INFO
DAEMON=/usr/local/etc/ax25/ax25-up
DAEMONHALT=/usr/local/etc/ax25/ax25-down
DESC=ax25
NAME=ax25
# /etc/init.d/ax25
#
# Kernel-Parameter "ax25=yes|no" ?
# Set in kernel bootargs
StartAx25="yes"
if [ "`grep -e [Aa][Xx]25=[Nn][Oo] /proc/cmdline`" != "" ] ; then
StartAx25="no"
fi
case "$1" in
start)
if [ "$StartAx25" = "no" ]; then
echo -e "ax25: Aborting startup on user request (kernel boot parameter)."
exit 1
fi
echo -n "Starting $DESC: "
$DAEMON
# start-stop-daemon --start --quiet -o --exec $DAEMON 2&>/dev/null
# start-stop-daemon --start -o --exec $DAEMON 2&1
# echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
$DAEMONHALT
# echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
$DAEMONHALT
sleep 1
$DAEMON
;;
status)
if [ ! -d /proc/sys/net/ax25 ] ; then
echo "$NAME is down"
else
echo "$(ls /proc/sys/net/ax25)" > /tmp/ax25-config.tmp
read Select < /tmp/ax25-config.tmp
i=0
while [ "$Select" != "" ]
do
let i=i+1
awk ' NR == '$i' { print $1 }' /tmp/ax25-config.tmp > /tmp/ax25-config-tmp
read Select < /tmp/ax25-config-tmp
if [ "$Select" != "" ]; then
/sbin/ifconfig "$Select"
fi
done
if [ -z "$(uname -r | grep kjd)" ] ;then
netstat --ax25
else
/sbin/ifconfig ipax0
cat /proc/net/ax25
fi
fi
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload|status}"
exit 1
;;
esac
exit 0
#!/bin/bash
# Stop BBS
#killall xfbbd
# Stop FPAC
# /usr/sbin/fpac -stop
# Stop beacon if it is running
if [ -e /var/run/beacon.pid ]; then
killall beacon
rm -f /var/run/beacon.pid
echo Beacon stopped
fi
# Stop netromd if it is running
if [ -e /var/run/netromd.pid ]; then
killall netromd
rm -f /var/run/netromd.pid
echo Netrom Stopped
fi
# Stop mheardd if it is running
if [ -e /var/run/mheard.pid ]; then
killall mheardd
rm -f /var/run/mheard.pid
echo Mheardd Stopped
fi
# Stop ax25d if it is running
if [ -e /var/run/ax25d.pid ]; then
killall ax25d
rm -f /var/run/ax25d.pid
echo AX25d Stopped
fi
# Stop ax25ipd if it is running
# if [ -e /var/run/ax25ipd.pid ]; then
# killall ax25ipd
# rm -f /var/run/ax25ipd.pid
# echo AX25ipd Stopped
# fi
# Stop ax25rtd if it is running
if [ -e /var/run/ax25rtd.pid ]; then
killall ax25rtd
rm -f /var/run/ax25rtd.pid
echo "AX25rtd Stopped"
fi
# Stop Monitor program
if [ -e /var/run/listen.pid ]; then
killall listen
rm -f /var/run/listen.pid
echo "Stop Monitor"
fi
# Detach Ax/Sp Devices
echo "$(ls /proc/sys/net/ax25)" > /tmp/ax25-config.tmp
# awk '/rose/{print $1}' /etc/ax25/rsports >> /tmp/ax25-config.tmp
read Select < /tmp/ax25-config.tmp
i=0
while [ "$Select" != "" ]
do
let i=i+1
awk ' NR == '$i' { print $1 }' /tmp/ax25-config.tmp > /tmp/ax25-config-tmp
read Select < /tmp/ax25-config-tmp
if [ "$Select" != "" ]; then
ifconfig "$Select" down
echo " $Select Stopped"
fi
done
# Stop Kissattach
killall -KILL kissattach > /dev/null
echo "Ax25 Stopped"
# End of ax25-down
#!/bin/bash
#
PORTNAME="vhf2"
SERIALPORT="/dev/ttyUSB0"
CALLSIGN="N7NIX"
# Set Sysctl values
sysctl -w kernel.panic=30
sysctl -w kernel.panic_on_oops=30
echo "Start Port ${PORTNAME} with device ${SERIALPORT}"
# Attach KISS-device /dev/ttyS0 to Port 0
/usr/local/sbin/kissattach -l ${SERIALPORT} ${PORTNAME} 44.128.1.2 >/tmp/ax25-config.tmp
awk '/device/ { print $7 }' /tmp/ax25-config.tmp > /tmp/ax25-config-tmp
read Device < /tmp/ax25-config-tmp
# Install Parameters
/usr/local/sbin/kissparms -p ${PORTNAME} -f no -r 32 -s 320 -t 320
# Check for Device
echo "Checking for Device ${Device}"
if [ -d /proc/sys/net/ax25/$Device ]
then cd /proc/sys/net/ax25/$Device/
/etc/ax25/Lanparms
ifconfig $Device netmask 255.255.255.255
echo " Port ${PORTNAME} attached to $Device "
else echo "** Error setting $Device parms**"
fi
# display active ax25 sockets
sleep 1
/bin/netstat --ax25
# Start Mheard daemon
/usr/local/sbin/mheardd
echo $! > /var/run/mheard.pid
echo "mheardd Started"
# AX25-up (End)
# /etc/ax25/axports
#
# port name....: Any meaningful combination of letters & numbers
# callsign.....: Your call sign (UPPER CASE) with an SSID, none defaults to -0
# speed........: What your TNC's serial line is set for, usually 9600
# paclen.......: One frame length
# window.......: Should be equal to, or less than, what's in your TNC
# description..: The frequency and/or a node name, or more info about the port
#
# The format for this file is:
# ----------------------------------------------------------------------------
# port | callsign | TNC | | |
# name | w/ SSID | speed | paclen | window | description
# ----------------------------------------------------------------------------
#
# NOTE: there can be ONLY one occurrance of a port/callsign-ssid key!
#
vhf2 K7KXI-1 9600 256 2 TNC-X
#!/bin/bash
# Config for AX.25 protocol stack
# These files live in /proc/sys/net/ax25/$DEVICE
# See file /etc/ax25/ax25-up
#
echo 10000 > t1_timeout # (Frack) /1000 = ? Sec
echo 1000 > t2_timeout # (RESPtime) /1000 = ? sec
echo 300000 > t3_timeout # (Check) /6000 = ? Min
echo 900000 > idle_timeout # Idle Timer /6000 = ? min
echo 2 > standard_window_size # Outstanding Frames
echo 6 > maximum_retry_count # Max Retrys
echo 255 > maximum_packet_length # Paclen
echo 0 > ax25_default_mode
echo 0 > ip_default_mode
echo 0 > backoff_type
echo 2 > connect_mode
#echo 180000 > dama_slave_timeout
echo 32 > extended_window_size
echo 0 > protocol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.