2020-10-26 08:39:44 +01:00
|
|
|
# kappanhang
|
|
|
|
|
|
|
|
|
|
kappanhang remotely opens audio channels and a serial port to an Icom RS-BA1
|
|
|
|
|
server. The app is mainly developed for connecting to the Icom IC-705
|
|
|
|
|
transceiver, which has built-in Wi-Fi and RS-BA1 server. All features of the
|
|
|
|
|
protocol are implemented including packet retransmission on packet loss.
|
|
|
|
|
|
2020-11-03 14:57:51 +01:00
|
|
|
<p align="center"><img src="demo.gif?raw=true"/></p>
|
2020-10-27 14:49:14 +01:00
|
|
|
|
2020-10-26 08:39:44 +01:00
|
|
|
kappanhang currently only supports Linux, but support for other platforms can
|
2020-10-30 09:07:20 +01:00
|
|
|
be easily added if anyone is interested and has the skills (volunteers
|
|
|
|
|
needed, as I'm only developing the Linux version).
|
2020-10-26 08:39:44 +01:00
|
|
|
|
2020-10-30 09:50:22 +01:00
|
|
|
You can find pre-built versions for Linux/x64 on the GitHub project page of
|
|
|
|
|
kappanhang.
|
|
|
|
|
|
2020-10-26 08:39:44 +01:00
|
|
|
## Compiling
|
|
|
|
|
|
|
|
|
|
You'll need Go installed on your computer.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
go get https://github.com/nonoo/kappanhang
|
|
|
|
|
go install https://github.com/nonoo/kappanhang
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Required settings on the RS-BA1 server (the transceiver)
|
|
|
|
|
|
2020-10-30 09:07:20 +01:00
|
|
|
- Make sure network settings (on the Icom IC-705 in: `Menu -> Set ->
|
|
|
|
|
WLAN set -> Remote settings`) are the following:
|
|
|
|
|
- **Network control** is turned on.
|
|
|
|
|
- **UDP ports** are on their default values:
|
|
|
|
|
- Control port: `50001`
|
|
|
|
|
- Serial port: `50002`
|
|
|
|
|
- Audio port: `50003`
|
|
|
|
|
- **Internet access line** is on the default `FTTH` value.
|
|
|
|
|
- Make sure the following settings are set:
|
|
|
|
|
- **DATA MOD** is set to `WLAN` (on the Icom IC-705 in: `Menu -> Set ->
|
|
|
|
|
Connectors -> MOD Input -> DATA MOD`)
|
|
|
|
|
- **CI-V Address** is on the default `A4h` value (on the Icom IC-705 in:
|
|
|
|
|
`Menu -> Set -> Connectors -> CI-V`.
|
2020-10-27 09:56:19 +01:00
|
|
|
|
2020-10-26 08:39:44 +01:00
|
|
|
## Running
|
|
|
|
|
|
2020-10-27 13:41:18 +01:00
|
|
|
You can get the available command line parameters with the `-h` command line
|
2020-10-26 08:39:44 +01:00
|
|
|
argument.
|
|
|
|
|
|
|
|
|
|
If no command line arguments are set, then the app will try to connect to the
|
2020-11-05 23:13:46 +01:00
|
|
|
host **ic-705** (ic-705.local or ic-705.localdomain) with the username `beer`
|
|
|
|
|
and password `beerbeer`. You can set the username with the `-u` and the
|
|
|
|
|
password with the `-p` command line arguments.
|
2020-10-26 08:39:44 +01:00
|
|
|
|
|
|
|
|
After it is connected and logged in:
|
|
|
|
|
|
2020-10-27 13:31:47 +01:00
|
|
|
- Creates a virtual PulseAudio **sound card** (48kHz, s16le, mono). This can be
|
2020-11-03 10:42:38 +01:00
|
|
|
used to record/play audio from/to the server (the transceiver). You can also
|
|
|
|
|
set this sound card in [WSJT-X](https://physics.princeton.edu/pulsar/K1JT/wsjtx.html).
|
2020-10-29 09:42:45 +01:00
|
|
|
- Starts a **TCP server** on port `4533` for exposing the **serial port**.
|
2020-11-03 10:42:38 +01:00
|
|
|
- Starts `rigctld` and connects it to kappanhang's TCP serial port server.
|
2020-10-26 08:39:44 +01:00
|
|
|
This can be used for controlling the server (the transceiver) with
|
2020-10-29 20:28:17 +01:00
|
|
|
[Hamlib](https://hamlib.github.io/) (`rigctld`).
|
2020-10-26 08:39:44 +01:00
|
|
|
|
|
|
|
|
To use this with for example [WSJT-X](https://physics.princeton.edu/pulsar/K1JT/wsjtx.html),
|
2020-11-04 10:45:28 +01:00
|
|
|
open WSJT-X settings, go to the *Radio* tab, set the *rig type* to `Hamlib
|
|
|
|
|
NET rigctl`, and the *Network server* to `localhost`. It is recommended to
|
|
|
|
|
set the *poll interval* to 10 seconds.
|
2020-10-26 08:39:44 +01:00
|
|
|
|
2020-11-03 14:51:51 +01:00
|
|
|
### Virtual serial port
|
2020-11-03 10:42:38 +01:00
|
|
|
|
2020-10-26 08:39:44 +01:00
|
|
|
If the `-s` command line argument is specified, then kappanhang will create a
|
2020-10-27 13:41:18 +01:00
|
|
|
**virtual serial port**, so other apps which don't support Hamlib can access
|
|
|
|
|
the transceiver directly. Look at the app log to find out the name of the
|
2020-10-30 09:07:20 +01:00
|
|
|
virtual serial port. It will be something like `/tmp/kappanhang-IC-705.pty`
|
2020-10-30 15:21:19 +01:00
|
|
|
(the server's name appended to the string *kappanhang*). After the virtual
|
|
|
|
|
serial port is created, the command specified with `-o` will be ran, which is
|
|
|
|
|
`socat /tmp/kappanhang-IC-705.pty /tmp/vmware.pty` by default. Running the
|
|
|
|
|
command can be disabled with `-o -`. The command is only executed once, as the
|
|
|
|
|
virtual serial port will stay opened even if the RS-BA1 server disconnects.
|
|
|
|
|
I use this command to link a COM port in a Windows OS running in VMware to
|
|
|
|
|
the virtual serial port, so I can use the original RS-BA1 software remote
|
|
|
|
|
control GUI.
|
2020-10-26 08:39:44 +01:00
|
|
|
|
2020-10-29 09:39:13 +01:00
|
|
|
### Status bar
|
2020-10-28 21:13:50 +01:00
|
|
|
|
2020-10-29 09:39:13 +01:00
|
|
|
kappanhang displays a "realtime" status bar (when the audio/serial connection
|
2020-10-28 21:13:50 +01:00
|
|
|
is up) with the following info:
|
|
|
|
|
|
2020-10-29 09:39:13 +01:00
|
|
|
- First status bar line:
|
2020-11-05 08:42:12 +01:00
|
|
|
- `MON/REC`: current status of the audio monitor (see the *Hotkeys* section
|
|
|
|
|
in this README for more information about this feature)
|
|
|
|
|
- `filter`: active filter (FIL1, FIL2 etc.)
|
|
|
|
|
- `preamp`: PAMP0 means the preamp is off
|
|
|
|
|
- `AGC`: AGC state (F - fast, M - middle, S - slow)
|
2020-11-04 09:41:36 +01:00
|
|
|
- `rfg`: RF gain in percent
|
2020-11-04 09:47:41 +01:00
|
|
|
- `sql`: squelch level in percent
|
2020-11-04 10:01:07 +01:00
|
|
|
- `nr`: noise reduction level in percent
|
2020-11-04 09:06:32 +01:00
|
|
|
|
|
|
|
|
- Second status bar line:
|
2020-11-05 08:42:12 +01:00
|
|
|
- `S meter`: periodically refreshed S meter value, OVF is displayed on
|
|
|
|
|
overflow, displays TX on transmit (or TUNE)
|
2020-11-03 16:56:29 +01:00
|
|
|
- `freq`: operating frequency in MHz
|
2020-11-05 08:42:12 +01:00
|
|
|
- `TS`: tuning step
|
2020-11-03 16:56:29 +01:00
|
|
|
- `mode`: LSB/USB/FM etc.
|
2020-11-04 22:25:19 +01:00
|
|
|
- `voltage`: drain voltage of the final amplifier MOS-FETs, updated when a
|
|
|
|
|
TX/TUNE is over
|
2020-10-30 14:57:33 +01:00
|
|
|
- `txpwr`: current transmit power setting in percent
|
2020-11-05 16:15:06 +01:00
|
|
|
- `swr`: reported SWR (only displayed during TX)
|
2020-10-29 09:39:13 +01:00
|
|
|
|
2020-11-04 09:06:32 +01:00
|
|
|
- Third status bar line:
|
2020-10-29 09:39:13 +01:00
|
|
|
- `up`: how long the audio/serial connection is active
|
|
|
|
|
- `rtt`: roundtrip communication latency with the server
|
|
|
|
|
- `up/down`: currently used upload/download bandwidth (only considering UDP
|
|
|
|
|
payload to/from the server)
|
|
|
|
|
- `retx`: audio/serial retransmit request count to/from the server
|
|
|
|
|
- `lost`: lost audio/serial packet count from the server
|
|
|
|
|
|
2020-11-04 09:06:32 +01:00
|
|
|
Data for the first 2 status bar lines are acquired by monitoring CiV traffic
|
2020-11-04 10:22:50 +01:00
|
|
|
in the serial stream. S value and OVF are queried periodically, but these
|
|
|
|
|
queries/replies are filtered from the serial data stream sent to the TCP
|
|
|
|
|
serial port server and to the virtual serial port.
|
2020-10-28 21:13:50 +01:00
|
|
|
|
|
|
|
|
`retx` and `lost` are displayed in a 1 minute window, which means they will be
|
|
|
|
|
reset to 0 if they don't increase for 1 minute. A `retx` value other than 0
|
|
|
|
|
indicates issues with the connection (probably a poor Wi-Fi connection), but
|
|
|
|
|
if `loss` stays 0 then the issues were fixed using packet retransmission.
|
|
|
|
|
`loss` indicates failed retransmit sequences, so packet loss. This can cause
|
|
|
|
|
audio and serial communication disruptions.
|
|
|
|
|
|
2020-10-29 09:39:13 +01:00
|
|
|
If status bar interval (can be changed with the `-i` command line
|
|
|
|
|
argument) is equal to or above 1 second, then the realtime status bar will be
|
2020-11-04 09:06:32 +01:00
|
|
|
disabled and the contents of the last line of the status bar will be written
|
2020-10-29 09:39:13 +01:00
|
|
|
as new console log lines. This is also the case if a Unix/VT100 terminal is
|
|
|
|
|
not available.
|
2020-10-28 18:07:43 +01:00
|
|
|
|
2020-10-30 15:57:33 +01:00
|
|
|
### Hotkeys
|
|
|
|
|
|
2020-11-01 12:53:21 +01:00
|
|
|
- `q` (quit): closes the app
|
2020-11-03 10:42:38 +01:00
|
|
|
- `l` (listen): toggles audio stream playback to the default sound device.
|
2020-10-30 22:15:23 +01:00
|
|
|
This is useful for quickly listening into the audio stream coming from the
|
|
|
|
|
server (the transceiver).
|
|
|
|
|
- `space`: toggles PTT and audio stream recording from the default sound
|
2020-11-03 10:42:38 +01:00
|
|
|
device. You can transmit your own voice using a mic attached to your
|
|
|
|
|
computer for example.
|
2020-10-31 23:44:45 +01:00
|
|
|
|
|
|
|
|
Some basic CAT control hotkeys are also supported:
|
|
|
|
|
|
2020-10-30 22:58:31 +01:00
|
|
|
- `t`: toggles the tune process
|
2020-11-01 12:53:21 +01:00
|
|
|
- `+`: increases TX power
|
|
|
|
|
- `-`: decreases TX power
|
2020-11-04 10:26:22 +01:00
|
|
|
- `0` to `9`: set TX power in 10% steps
|
2020-11-04 14:03:56 +01:00
|
|
|
- `)`: set TX power to 100%
|
2020-11-04 09:06:32 +01:00
|
|
|
- `[`, `]`: decreases, increases frequency
|
|
|
|
|
- `{`, `}`: decreases, increases tuning step
|
2020-11-04 09:42:04 +01:00
|
|
|
- `;`, `'`: decreases, increases RF gain
|
2020-11-04 10:01:07 +01:00
|
|
|
- `:`, `"`: decreases, increases squelch level
|
|
|
|
|
- `,`, `.`: decreases, increases noise reduction level
|
|
|
|
|
- `/`: toggles noise reduction
|
2020-11-01 12:53:21 +01:00
|
|
|
- `n`, `m`: cycles through operating modes
|
|
|
|
|
- `d`, `f`: cycles through filters
|
|
|
|
|
- `D`: toggles data mode
|
|
|
|
|
- `v`, `b`: cycles through bands
|
2020-11-04 10:01:07 +01:00
|
|
|
- `p`: toggles preamp
|
2020-11-05 08:19:16 +01:00
|
|
|
- `a`: toggles AGC
|
2020-10-30 15:57:33 +01:00
|
|
|
|
2020-11-03 14:51:51 +01:00
|
|
|
## Icom IC-705 Wi-Fi notes
|
|
|
|
|
|
|
|
|
|
Note that the built-in Wi-Fi in the Icom IC-705 has **very limited range**,
|
|
|
|
|
and **sensitive to interference**. If you see a lot of retransmits in the log,
|
|
|
|
|
or packet loss, then:
|
|
|
|
|
|
|
|
|
|
- Place the IC-705 close to your Wi-Fi AP/router, or use a Wi-Fi range
|
|
|
|
|
extender device
|
|
|
|
|
- Make sure the Wi-Fi bandwith is set to max. 20Mhz in the Wi-Fi router (see
|
|
|
|
|
explanation [here](https://superuser.com/questions/542191/does-moving-my-router-from-20mhz-to-40-mhz-increase-my-wireless-speed))
|
|
|
|
|
- Try switching Wi-Fi channel on your Wi-Fi router. Only channels 1, 6 or 11
|
|
|
|
|
should be used (see explanation [here](https://www.metageek.com/training/resources/why-channels-1-6-11.html))
|
|
|
|
|
|
|
|
|
|
Sometimes rebooting the transceiver helps, as the network stack in the IC-705
|
|
|
|
|
is not quite free of bugs. :)
|
|
|
|
|
|
2020-11-06 08:24:30 +01:00
|
|
|
## Contributors
|
2020-10-26 09:15:45 +01:00
|
|
|
|
|
|
|
|
- Norbert Varga HA2NON [nonoo@nonoo.hu](mailto:nonoo@nonoo.hu)
|
|
|
|
|
- Akos Marton ES1AKOS
|
2020-11-06 08:24:30 +01:00
|
|
|
- W6EL (passcode algorithm)
|
2020-10-26 09:15:45 +01:00
|
|
|
|
2020-10-26 08:39:44 +01:00
|
|
|
## Donations
|
|
|
|
|
|
|
|
|
|
If you find this app useful then [buy me a beer](https://paypal.me/ha2non). :)
|