What does an AX.25 kernel networking port buy you? More flexibility: You can attach multiple programs to a single port if you wish, for instance Digi_NED and Xastir can be connected at the same time, while you're doing TCP/IP connections out the port and someone else is connecting in to a converse node or a shell via connected-mode AX.25.
The downside: It's requires a bit more setup than some other methods, plus some daemons and games may attempt to use the port as a standard networking port. From the system standpoint there's little difference between a wireless port, and ethernet port, and an AX.25 kernel networking port.
Check that your Linux kernel has AX.25 configured in:
You should see "trans_net_ax25_table" and "trans_net_ax25_param_table"
You should see "CONFIG_AX25=m" and perhaps "CONFIG_AX25_DAMA_SLAVE=y". The "m" in the first instance tells us that the kernel has been built to use AX.25 protocol from kernel modules.
If your kernel does not have AX.25 support compiled in, you'll have to compile a special kernel for your system. See your OS-specific documentation for instructions plus the AX.25 HOWTO document listed in the links below.
You'll need some packages installed which match your kernel version. For OpenSuSE-11.1 Linux I installed these packages:
For "soundmodem" configuration please skip to the HowTo:SoundModem page instead. It's possible to set up soundmodem as a Serial KISS TNC or an AX.25 kernel networking port, both described on that Wiki page.
Take a look at /etc/ax25/ directory. You should see some example config files there. For our purposes this is the important one:
Here's an example of a working axports file where I've defined two ports, "aprs" and "opentrac". Assign a different Callsign-SSID to each port defined:
# /etc/ax25/axports # # The format of this file is: # name callsign speed paclen window description # aprs KA7BCD 4800 256 7 144.39 APRS (1200 bps) #opentrac KA7BCD-1 4800 256 2 OpenTrac Testing Interface
"aprs" is just a text string we used for our port name. Call it something else if you choose, but it must match up with the commands we'll show later in the page, so remember to change them too.
Check /etc/modprobe.conf.local (included from modprobe.conf). Add the following if not already present. For Debian-based systems only: These get added into /etc/modules/aliases instead, then run /sbin/update-modules.
alias net-pf-3 ax25 alias net-pf-6 netrom alias net-pf-11 rose alias tty-ldisc-1 slip alias tty-ldisc-3 ppp alias tty-ldisc-5 mkiss alias bc0 baycom alias nr0 netrom alias pi0a pi2 alias pt0a pt alias scc0 optoscc (or one of the other scc drivers) alias sm0 soundmodem alias tunl0 newtunnel alias char-major-4 serial alias char-major-5 serial alias char-major-6 lp
Change "ttyUSB0" or "ttyS1" below to match the name of the serial port you're using.
The IP number is needed only for TCP/IP operation. It's normally assigned by your local or regional TCP/IP ham coordinator. It is often acceptable to use a temporary number like we do below for a short time until you get assigned a number, or just as a placeholder in the scripts if you're not going to do TCP/IP over AX.25 protocol:
> su # (become root) > /usr/sbin/kissattach /dev/ttyUSB0 aprs 188.8.131.52 AX.25 port aprs bound to device ax0 > # port txd slottime persistence tail half-duplex > /usr/sbin/kissparms -p aprs -t 500 -s 200 -r 32 -l 100 -f n > /sbin/route add -net 184.108.40.206 netmask 255.0.0.0 dev ax0 > /bin/ping -i 10 220.127.116.11 # (ping packets go out on RF each 10 secs, control-C to stop) > /usr/bin/axcall aprs k7xyz via sea # (Connect packets go out on RF)
For the "call" command above:
If no errors are seen with the above commands, run this command as root to see if packets are being received:
See "man 4 ax25" or "man call" for more info on the "call" command above. "man axlisten" for the "axlisten" command instructions.
To stop the port entirely (remove it from operation), do the following:
Put the commands above (kissattach/kissparms/route) in a script called "ax25.up". It should look about like this:
#!/bin/sh /usr/sbin/kissattach /dev/ttyUSB0 aprs 18.104.22.168 # port txd slottime persistence tail half-duplex /usr/sbin/kissparms -p aprs -t 500 -s 200 -r 32 -l 100 -f n /sbin/route add -net 22.214.171.124 netmask 255.0.0.0 dev ax0
Create another script called "ax25.down" containing:
#!/bin/sh /usr/bin/killall kissattach
Type these commands to set up ownership and permissions:
> su # (become root) > chown root ax25.up ax25.down > chmod 4755 ax25.up ax25.down > exit # (leave root)
To bring up the port(s):
To take them down again:
Create an "/etc/init.d/ax25" script. Create appropriate links in the rc3.d and rc5.d directories for starting/stopping the ports. See other scripts in the init.d directory for examples, particularly the "soundmodem" script if present.
Once you have a good script that can stop/start/restart the AX.25 ports, "/sbin/chkconfig" can install the links for the various runlevels (OpenSuSE Linux). There may be similar commands on other Linux variants. Assuming you named your script "ax25" and wish the port to be active for runlevels 3 and 5:
On Ubuntu (and possibly other Debian-based systems) "chkconfig" does not exist. The command that is related is "update-rc.d" --- see its man page for details of how to use it.
For Xastir to use kernel AX.25 ports, Xastir itself has to be set "SUID root". This means that Xastir can become the root user when it needs to open a port, but it has been written to drop privileges when it doesn't need them:
In Xastir itself:
TBD ROSE, NET/ROM, TCP/IP, UDP/IP, Connected AX.25, Unconnected AX.25, APRS, OpenTrac, etc.
Extra transmissions could be from any network-capable program such as "Samba", "Icecream", or other Linux daemons or games. Many periodically send broadcasts on all networking ports.
Samba has been known to do this: Tweak the Samba config file to specify which ports it can/cannot use. Samba will re-read it's config file within 60 seconds and stop using the port.
Icecream has done this on wireless ports, so I assume it might do the same for an AX.25 port. Either kill it or change it's configs to disallow that port.
CUPS is also responsible for this sort of behavior if you enable the "Share published printers connected to this system" option. This option defaults to "off" but if you turn it on, CUPS rudely broadcasts IPP discovery packets repeatedly to all interfaces, and gives absolutely no option for selecting which interfaces to use. There are bugs in the CUPS bugzilla about this.
Dropbox, an offsite backup/archive service will pump broadcast messages to all interfaces by default also. The key is the "port": 17500, appearing in the output of a '/usr/bin/axlisten -c -a' command. To avoid this problem, right click on the dropbox icon in the system tray (at least in KDE it's there), select Preferences and deselect the 'Enable LAN Sync' check box.
Alternatively one can tweak the firewall rules to disallow those daemons from talking out specific ports.