diff --git a/content/posts/2024/mobilinkd-on-my-linux-laptop/index.md b/content/posts/2024/mobilinkd-on-my-linux-laptop/index.md deleted file mode 100644 index 9e4e7ea..0000000 --- a/content/posts/2024/mobilinkd-on-my-linux-laptop/index.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: mobilinkd on my linux laptop -summary: -date: 2024-02-13T22:05:30+01:00 -lastmod: 2024-02-16T17:08:08+0000 -categories: -- amateur-radio -- computerstuff -tags: -- draft_post - -# showBreadcrumbs: true -# showDate: false -# showReadingTime: false -# showWordCount: false -# showPagination: false - -# feed_exclude: true -# site_exclude: true - -# some help -# -# highlighting with highlights -# -# use table, as inline creates a padding around -# and it pushes the text more to the right side (end of screen) -# -# ~~~html {linenos=table,hl_lines="3-6"} -# ~~~html {linenos=inline,hl_lines="1,3-6"} - -draft: true - ---- - -## Mobilinkd - -I use blueman-manager, a graphical tool to manage bluetooth devices. Because I -actually hate bluetooth and its unpredictability... - -right click on to TNC4 Mobilinkd, Connect with: serial port - -that will create /dev/rfcomm0 - -open that port with KISS - -~~~console -$ sudo kissattach /dev/rfcomm0 wl2k -AX.25 port wl2k bound to device ax0 -~~~ - -For now, I haven't enabled auto-connect of the serial port. - -We can now use this in pat http when we select AX.25+linux - -There are a few files that need to be prepared. - -/etc/ax25/axports - -~~~squid -# /etc/ax25/axports -# -# The format of this file is: -# -# name callsign speed paclen window description -# - -#1 OH2BNS-1 1200 255 2 144.675 MHz (1200 bps) -#2 OH2BNS-9 38400 255 7 TNOS/Linux (38400 bps) -wl2k OE7DRT 1200 255 7 Winlink -~~~ - -and the pat config has - -~~~json - "ax25_linux": { - "port": "wl2k" - }, - "serial-tnc": { - "path": "/dev/rfcomm0", - "serial_baud": 9600, - "hbaud": 1200, - "type": "Kenwood", - "rig": "" - }, -~~~ - -## Digirig - -Using AX.25+agwpe in pat - -~~~json - "ax25": { - "engine": "linux", - "rig": "", - "beacon": { - "every": 3600, - "message": "Winlink P2P", - "destination": "IDENT" - } - }, - "agwpe": { - "addr": "127.0.0.1:8000", - "radio_port": 0 - }, -~~~ - -Direwolf - -~~~squid -ADEVICE plughw:1,0 -CHANNEL 0 -MYCALL OE7DRT -MODEM 1200 -PTT /dev/ttyUSB0 RTS DTR -AGWPORT 8000 -KISSPORT 8001 -IGTXLIMIT 6 10 -~~~ - -Some systemd units I use for this - -pat - -~~~systemd -[Unit] -Description="pat winlink" -After=network.target rigctld.service ardopc64.service -Wants=rigctld.service ardopc.service - -[Service] -Type=simple -ExecStart=/home/dominic/bin/pat --listen "ardop,telnet" http -TimeoutSec=10 - -[Install] -WantedBy=default.target -~~~ - -rigctl - -~~~systemd -[Unit] -Description="rigctld for TX-500 using Digirig" -After=network.target -Before=pat.service - -[Service] -Type=simple -ExecStart=/usr/bin/rigctld -m 2050 -r /dev/ttyUSB0 -d /dev/ttyUSB0 -p /dev/ttyUSB0 -P RTS -s 9600 -vvv -TimeoutSec=10 - -[Install] -WantedBy=default.target -~~~ - -ardopc - -~~~systemd -[Unit] -Description="ardopc for TX-500 using Digirig" -After=network.target -Before=pat.service - -[Service] -Type=simple -ExecStart=/home/dominic/bin/ardopc 8515 hw:1,0 hw:1,0 -c /dev/ttyUSB0:9600 -p /dev/ttyUSB0:9600 -TimeoutSec=10 - -[Install] -WantedBy=default.target -~~~ - - diff --git a/content/posts/2024/packetradio-vara-mobilinkd-and-digirig-on-linux/index.md b/content/posts/2024/packetradio-vara-mobilinkd-and-digirig-on-linux/index.md new file mode 100644 index 0000000..c027e72 --- /dev/null +++ b/content/posts/2024/packetradio-vara-mobilinkd-and-digirig-on-linux/index.md @@ -0,0 +1,293 @@ +--- +title: Packet radio, VARA (FM+HF), Mobilinkd and Digirig on Linux +summary: > + +date: 2024-02-13T22:05:30+01:00 +lastmod: 2024-02-17T01:21:44+0000 +categories: +- amateur-radio +- computerstuff +tags: +- draft_post + +# showBreadcrumbs: true +# showDate: false +# showReadingTime: false +# showWordCount: false +# showPagination: false + +# feed_exclude: true +# site_exclude: true + +# some help +# +# highlighting with highlights +# +# use table, as inline creates a padding around +# and it pushes the text more to the right side (end of screen) +# +# ~~~html {linenos=table,hl_lines="3-6"} +# ~~~html {linenos=inline,hl_lines="1,3-6"} + +draft: true + +--- + +Out of curiosity I began another "research-session" because it is really time to get +that Winlink back on my Linux laptop (I used OpenBSD on this machine for some months now +and I haven't got a single chance to get wine onto that). + +## Digirig + +The Digirig gets controlled with `rigctld` -- I use different models for the +HF and the FM rig -- but the rig configuration is the same for both: + +~~~json + "hamlib_rigs": { + "my_rig": { + "address": "127.0.0.1:4532", + "network": "tcp" + } + }, +~~~ + +### Packet radio + +Using AX.25+agwpe within pat in combination with Direwolf -- but +this combination felt a bit slow (which might only be my subjective opinion). + +~~~json + "ax25": { + "engine": "linux", + "rig": "", + "beacon": { + "every": 3600, + "message": "Winlink P2P", + "destination": "IDENT" + } + "agwpe": { + "addr": "127.0.0.1:8000", + "radio_port": 0 + }, +~~~ + +The agwpe section is used by Direwolf: + +~~~console {hl_lines="8"} +% direwolf -c /etc/direwolf/direwolf.conf -p +Dire Wolf version 1.7 +Includes optional support for: gpsd hamlib cm108-ptt dns-sd + +Reading config file /etc/direwolf/direwolf.conf +Audio device for both receive and transmit: plughw:1,0 (channel 0) +Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, A+, 44100 sample rate. +Ready to accept AGW client application 0 on port 8000 ... +Ready to accept KISS TCP client application 0 on port 8001 ... +DNS-SD: Avahi: Failed to create Avahi client: Daemon not running +Virtual KISS TNC is available on /dev/pts/8 +Created symlink /tmp/kisstnc -> /dev/pts/8 +~~~ + +The `direwolf.conf` file looks like this (comments removed): + +~~~squid +ADEVICE plughw:1,0 +CHANNEL 0 +MYCALL OE7DRT +MODEM 1200 +PTT /dev/ttyUSB0 RTS DTR +AGWPORT 8000 +KISSPORT 8001 +IGTXLIMIT 6 10 +~~~ + +Direwolf will warn you if the input audio level is way off; I adjust them +with the program `alsamixer` (F6 to select the USB soundcard, +then F5 to list all devices, disable _Auto Gain Control_ with m +(mute)). + +### VARA FM + +The corresponding configuratoin in the pat config file: + +~~~json + "varafm": { + "addr": "127.0.0.1:8300", + "bandwidth": 0, + "rig": "my_rig", + "ptt_ctrl": true + }, +~~~ + +Start `rigctld`: + +~~~console +$ rigctld -m 1 -p /dev/ttyUSB0 -P RTS -s 9600 -vvvv +~~~ + +I start VARA FM by running a small script called `varafm.sh`: + +~~~sh +#!/usr/bin/sh +# Start VARA via wine + +WINEPREFIX=/home/dominic/.wine-winlink wine "C:\\VARA FM\\VARAFM.exe" +~~~ + +In VARA FM set the USB soundcard, adjust the volume in `alsamixer` and on your +radio, set PTT to VOX -- I tried to use COM1 but +that crashed wine several times (that is why we setup _rigctl_ before). + +If you need to stop rigctl: you can usually do that with +CTRL + C but this might not work. So either stop the running +pat process by hitting CTRL + C in the "pat terminal" or by +killing rigctld with `kill $(pgrep rigctld)`. + +This is not tested yet, because VARA crashed when I was out in the field and I cannot +reach a gateway at home where I researched/tested the final settings. + +### VARA HF + +Back to the TX-500, the pat configuration looks like: + +~~~json + "varahf": { + "addr": "127.0.0.1:8300", + "bandwidth": 2300, + "rig": "my_rig", + "ptt_ctrl": true + }, +~~~ + +I start rigctld like: + +~~~console +$ rigctld -m 2014 -r /dev/ttyUSB0 -d /dev/ttyUSB0 -p /dev/ttyUSB0 \ + -P RTS -s 9600 -vvvv +~~~ + +Untested, untested... + + +## Mobilinkd + +I will use AX.25+linux in pat with the TNC4 paired via Bluetooth. + +First of all, power on the TNC4 and pair it -- I use _blueman-manager_ for this. + +Then we need the serial port -- right click on TNC4 Mobilinkd and select +_Connect with_ Serial port + +That will create a serial port at `/dev/rfcomm0`. + +In order to use it in pat, we need to use `kissattach` on that serial device. + +First we need to setup an AX.25 port called wl2k in `/etc/ax25/axports`: + +~~~squid +# /etc/ax25/axports +# +# The format of this file is: +# +# name callsign speed paclen window description +# + +#1 OH2BNS-1 1200 255 2 144.675 MHz (1200 bps) +#2 OH2BNS-9 38400 255 7 TNOS/Linux (38400 bps) +wl2k OE7DRT 1200 255 7 Winlink +~~~ + +This needs also some configuration work in the pat configuration: + +~~~json + "ax25_linux": { + "port": "wl2k" + }, + "serial-tnc": { + "path": "/dev/rfcomm0", + "serial_baud": 9600, + "hbaud": 1200, + "type": "Kenwood", + "rig": "" + }, +~~~ + +Now we can attach a KISS interface to the serial port: + +~~~console +$ sudo kissattach /dev/rfcomm0 wl2k +AX.25 port wl2k bound to device ax0 +~~~ + +Select your PacketRadio Gateway (CALLSIGN-10 usually) and connect using +AX.25+linux. + +To de-attach the KISS interface we need to kill the process by: + +~~~console +$ sudo kill $(pgrep kissattach) +~~~ + +## Some systemd unit-file examples + +Put them into `$HOME/.config/systemd/user`. + +### pat + +~~~systemd +[Unit] +Description="pat winlink" +After=network.target rigctld.service ardopc.service +Wants=rigctld.service ardopc.service + +[Service] +Type=simple +ExecStart=/home/dominic/bin/pat --listen "ardop,telnet" http +TimeoutSec=10 + +[Install] +WantedBy=default.target +~~~ + +### rigctld + +~~~systemd +[Unit] +Description="rigctld for TX-500 using Digirig" +After=network.target +Before=pat.service ardopc.service + +[Service] +Type=simple +; -m 2005 for Lab500 TX-500 CAT protocol +; ExecStart=/usr/bin/rigctld -m 2050 -r /dev/ttyUSB0 -p /dev/ttyUSB0 -P RTS -s 9600 -vvvv +; -m 2014 for Kenwood TS-2000 CAT protocol +; ExecStart=/usr/bin/rigctld -m 2014 -r /dev/ttyUSB0 -p /dev/ttyUSB0 -P RTS -s 9600 -vvvv +ExecStart=/usr/bin/rigctld -m 2014 -r /dev/ttyUSB0 -d /dev/ttyUSB0 -p /dev/ttyUSB0 -P RTS -s 9600 -vvvv +TimeoutSec=10 + +[Install] +WantedBy=default.target +~~~ + +You can change the used protocol (_Kenwood TS-200_ or _Lab599 TX-500_l for CAT control within +the menu on the TX-500 (last menu setting)). + +### ardopc + +~~~systemd +[Unit] +Description="ardopc for TX-500 using Digirig" +After=network.target +Before=pat.service + +[Service] +Type=simple +; ExecStart=/home/dominic/bin/ardopc 8515 hw:1,0 hw:1,0 -c /dev/ttyUSB0:9600 -p /dev/ttyUSB0:9600 +ExecStart=/home/dominic/bin/ardopc 8515 plughw:1,0 plughw:1,0 +TimeoutSec=10 + +[Install] +WantedBy=default.target +~~~ +