packet:kernel-ax25-pi
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
packet:kernel-ax25-pi [2023/04/15 22:14] – [Startup Scripts] m0lte | packet:kernel-ax25-pi [2023/04/16 23:40] (current) – Updating m0gzp | ||
---|---|---|---|
Line 72: | Line 72: | ||
This file sets up two AX.25 ports, one for VHF and one for HF | This file sets up two AX.25 ports, one for VHF and one for HF | ||
< | < | ||
- | v144 | + | VHF M0GZP-1 |
- | HF M0GZP-2 | + | HF M0GZP-2 |
</ | </ | ||
Line 79: | Line 79: | ||
This file sets up a NET/ROM port aliased as GZPNOD | This file sets up a NET/ROM port aliased as GZPNOD | ||
< | < | ||
- | netrom | + | nrvhf M0GZP-5 GZPVHF |
+ | nrhf M0GZP-6 GZPHF | ||
</ | </ | ||
Line 85: | Line 86: | ||
=== nrbroadcast === | === nrbroadcast === | ||
- | This file configures how our AX.25 ports will broadcast NET/ROM nodes. | + | This file configures how our AX.25 ports will broadcast NET/ROM nodes. |
< | < | ||
- | v144 | + | VHF 5 200 200 1 |
- | HF 5 199 | + | HF 5 220 |
+ | </ | ||
+ | |||
+ | === ax25d.conf === | ||
+ | This file configures the ax25 userspace daemon, which determines what processes are run when other users connect in to the node. In my example, I am calling the program uronode (by N1URO, sadly SK). A separate entry is required for each port. | ||
+ | < | ||
+ | [M0GZP-1 via VHF] | ||
+ | NOCALL | ||
+ | default | ||
+ | |||
+ | [M0GZP-2 via HF] | ||
+ | NOCALL | ||
+ | default | ||
+ | |||
+ | < | ||
+ | NOCALL | ||
+ | default | ||
+ | |||
+ | < | ||
+ | NOCALL | ||
+ | default | ||
</ | </ | ||
Line 101: | Line 122: | ||
* Load the '' | * Load the '' | ||
* Run the netrom userspace daemon which handles the netrom broadcasts | * Run the netrom userspace daemon which handles the netrom broadcasts | ||
+ | * Load previous netrom node tables | ||
+ | * Run the mheard daemon which keeps track of heard stations | ||
+ | * Run the ax25 daemon to support running services | ||
< | < | ||
#!/bin/bash | #!/bin/bash | ||
Line 109: | Line 133: | ||
echo Done | echo Done | ||
echo -n Attaching KISS interfaces for direwolf... | echo -n Attaching KISS interfaces for direwolf... | ||
- | kissattach `ls -l / | + | kissattach |
sleep 1 | sleep 1 | ||
- | kissattach `ls -l / | + | kissattach |
sleep 1 | sleep 1 | ||
echo Done | echo Done | ||
echo -n ' | echo -n ' | ||
modprobe netrom | modprobe netrom | ||
- | nrattach | + | nrattach |
+ | nrattach nrhf | ||
netromd -i -l -d | netromd -i -l -d | ||
echo -n Restoring node tables... | echo -n Restoring node tables... | ||
[ -x / | [ -x / | ||
+ | echo Done | ||
+ | echo -n Starting mheard daemon... | ||
+ | mheardd -l | ||
+ | echo Done | ||
+ | echo -n Starting ax25 daemon... | ||
+ | ax25d -l | ||
echo Done | echo Done | ||
</ | </ | ||
Line 139: | Line 170: | ||
echo Done | echo Done | ||
</ | </ | ||
+ | |||
+ | NB this script appears to run before / | ||
=== / | === / | ||
Line 144: | Line 177: | ||
< | < | ||
#!/bin/bash | #!/bin/bash | ||
- | echo Saving node tables... | + | echo -n Saving node tables... |
/ | / | ||
- | echo Killing | + | echo Done |
- | killall | + | echo -n Killing |
- | echo Killing all socat processes in case they do not end cleanly | + | killall |
+ | sleep 1 | ||
+ | echo Done | ||
+ | echo -n Killing ax25 daemon... | ||
+ | killall ax25d | ||
+ | sleep 1 | ||
+ | echo Done | ||
+ | echo -n Killing all socat processes in case they do not end cleanly... | ||
killall socat | killall socat | ||
- | echo Killing the netromd process | + | sleep 1 |
+ | echo Done | ||
+ | echo -n Killing all kissattach processes... | ||
+ | killall kissattach | ||
+ | sleep 1 | ||
+ | echo Done | ||
+ | echo -n Killing the netromd process... | ||
killall netromd | killall netromd | ||
- | echo Taking down the netrom interface | + | sleep 1 |
+ | echo Done | ||
+ | echo -n Taking down the netrom interface... | ||
ifconfig nr0 down | ifconfig nr0 down | ||
- | echo Removing kernel modules | + | sleep 1 |
- | rmmod netrom | + | echo Done |
- | rmmod mkiss | + | echo -n Removing kernel modules... |
- | rmmod ax25 | + | rmmod netrom |
- | echo Taking down the AX.25 interfaces | + | echo Done |
+ | echo -n Taking down the AX.25 interfaces... | ||
ifconfig ax0 > /dev/null 2>&1 && ifconfig ax0 down | ifconfig ax0 > /dev/null 2>&1 && ifconfig ax0 down | ||
ifconfig ax1 > /dev/null 2>&1 && ifconfig ax1 down | ifconfig ax1 > /dev/null 2>&1 && ifconfig ax1 down | ||
+ | sleep 1 | ||
echo Done | echo Done | ||
</ | </ | ||
Line 197: | Line 247: | ||
[Unit] | [Unit] | ||
Description=Start up radio processes | Description=Start up radio processes | ||
+ | After=direwolf.service | ||
+ | Requires=direwolf.service | ||
[Service] | [Service] | ||
Line 215: | Line 267: | ||
● ax25.service - Start up radio processes | ● ax25.service - Start up radio processes | ||
| | ||
- | | + | |
- | Process: | + | Process: |
- | Main PID: 2476 (code=exited, | + | Main PID: 3036 (code=exited, |
- | Tasks: | + | Tasks: |
- | CPU: 151ms | + | CPU: 156ms |
| | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | └─2519 netromd -i -l -d | + | ├─3089 netromd -i -l -d |
+ | | ||
+ | | ||
- | Apr 12 22:16:25 radio startRadio.sh[2483]: AX.25 port v144 bound to device | + | Apr 17 00:36:38 radio startRadio.sh[3077]: NET/ |
- | Apr 12 22:16:25 radio startRadio.sh[2486]: AX.25 port v144 bound to device | + | Apr 17 00:36:38 radio startRadio.sh[3082]: NET/ |
- | Apr 12 22:16:26 radio startRadio.sh[2499]: AX.25 port HF bound to device ax1 | + | Apr 17 00:36:38 radio netromd[3089]: starting |
- | Apr 12 22:16:26 radio startRadio.sh[2501]: AX.25 port HF bound to device ax1 | + | Apr 17 00:36:38 radio startRadio.sh[3036]: Restoring node tables...Done |
- | Apr 12 22:16:27 radio startRadio.sh[2476]: Done | + | Apr 17 00:36:38 radio mheardd[3099]: starting |
- | Apr 12 22:16:27 radio startRadio.sh[2476]: Bringing up NET/ROM runtime... | + | Apr 17 00:36:38 radio startRadio.sh[3036]: Starting mheard daemon...Done |
- | Apr 12 22:16:27 radio startRadio.sh[2512]: NET/ROM port netrom bound to device nr0 | + | Apr 17 00:36:38 radio startRadio.sh[3036]: Starting ax25 daemon...Done |
- | Apr 12 22:16:27 radio netromd[2519]: starting | + | Apr 17 00:36:38 radio systemd[1]: Finished Start up radio processes. |
- | Apr 12 22:16:27 radio startRadio.sh[2476]: Restoring node tables...Done | + | Apr 17 00:36:38 radio ax25d[3104]: starting |
- | Apr 12 22:16:27 radio systemd[1]: Finished Start up radio processes. | + | Apr 17 00:36:38 radio ax25d[3104]: new config file loaded successfully |
szymon@radio: | szymon@radio: | ||
</ | </ | ||
Line 242: | Line 296: | ||
You will see some new network interfaces on ifconfig (I've removed my normal interfaces): | You will see some new network interfaces on ifconfig (I've removed my normal interfaces): | ||
< | < | ||
- | ax0: flags=67< | + | ax0: flags=67< |
ax25 M0GZP-1 | ax25 M0GZP-1 | ||
RX packets 0 bytes 0 (0.0 B) | RX packets 0 bytes 0 (0.0 B) | ||
RX errors 0 dropped 0 overruns 0 frame 0 | RX errors 0 dropped 0 overruns 0 frame 0 | ||
- | TX packets | + | TX packets |
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
- | ax1: flags=67< | + | ax1: flags=67< |
ax25 M0GZP-2 | ax25 M0GZP-2 | ||
RX packets 0 bytes 0 (0.0 B) | RX packets 0 bytes 0 (0.0 B) | ||
RX errors 0 dropped 0 overruns 0 frame 0 | RX errors 0 dropped 0 overruns 0 frame 0 | ||
- | TX packets | + | TX packets |
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
- | nr0: flags=193< | + | nr0: flags=193< |
- | netrom M0GZP-7 | + | netrom M0GZP-5 txqueuelen 1000 (AMPR NET/ROM) |
+ | RX packets 0 bytes 0 (0.0 B) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 0 bytes 0 (0.0 B) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | nr1: flags=193< | ||
+ | netrom M0GZP-6 | ||
RX packets 0 bytes 0 (0.0 B) | RX packets 0 bytes 0 (0.0 B) | ||
RX errors 0 dropped 0 overruns 0 frame 0 | RX errors 0 dropped 0 overruns 0 frame 0 | ||
Line 265: | Line 326: | ||
You can now use '' | You can now use '' | ||
+ | |||
+ | If it was all successful, enable the service to start at boot: | ||
+ | |||
+ | < | ||
+ | sudo systemctl enable ax25.service | ||
+ | </ |
packet/kernel-ax25-pi.txt · Last modified: 2023/04/16 23:40 by m0gzp