la5nta / wl2k-go

A Winlink framework for Go.
https://getpat.io
MIT License
50 stars 20 forks source link

ARDOP: Enable FSKONLY mode #84

Open mrmabs opened 1 year ago

mrmabs commented 1 year ago

I've gone on a bit of a mission to see if it is possible to use the QRP-Labs QDX with Winlink. As the QDX only supports single carrier modes, I'd like to be able to only enable FSK modes with ardopc.

I asked on the bpq32 mail list, and there is command to enable FSK only in ardopc already, "FSKONLY 1".

In the pactor modem, the ability to send init commands is available in this format:

pat connect "pactor:///HB9AK?init=PTCH%204"

So, going on the above example I would like to be able to run:

pat connect "ardop:///VK2IO?freq=7045&init=FSKONLY%201"

Or even just set a config option.

While I do understand some of the code here, I am by no means a Go programmer, or completely understand the codeflow for pat.

martinhpedersen commented 1 year ago

We could add custom initialization commands as a optional config option. Unless we implement some fancy scripting language, there will be no way of checking success/failure of each cmd, so you'll just have to trust that they are accepted by the modem.

Also, parameters applied to the connect uri should be scoped to the connection. Ideally the modem's state should remain unchanged after a connection has been completed, meaning we would need to be able to revert all changed done by the custom init commands. That's impossible to accomplish without understanding what these commands do.

I think it might be easier implementing support for this specific feature (FSKONLY). Can you explain the benefits of running ARDOP in FSKONLY mode?

mrmabs commented 1 year ago

Hey, thanks for considering. In the specific instance I have in mind is using Winlink with the QRP-Labs QDX transceiver. I don't know of other transceivers with a similar architecture.

The transceiver listens on the built in USB soundcard for tones, then, translates those tones to a clock source. If you have your frequency set to 7055kHz (USB) and it hears a tone at 1500Hz, it will add them, and set the source to 7056.5kHz. This generates a pure FSK signal and means there is no need for linearity in the transmitter, meaning lower power usage for same transmit power, and relatively simple transmit stages. With some changes to internal settings, it can switch fast enough for HF Packet, the issues mentioned appear to be now fixed.

The QDX itself is fairly simple and has: a USB port for CAT control & a sound card, power in and antenna output. It can output up to 5W on 80, 60, 40, 30 and 20m; or 20, 17, 15, 12 & 10m. The whole package weighs around 155g.

This means a HF Winlink station would weigh well under 1kg (phone/tablet, Raspberry Pi, QDX, EFHW, 3S1P lithium battery) and could be deployed very quickly. There is also a 50W amp that can be paired with the QDX, and may still be able to keep weight under 1kg, depending on the power source.

martinhpedersen commented 1 year ago

This sounds like a very interesting project! Thanks for the details 😄

Wouldn't this require the remote station (or RMS) running the same FSKONLY mode?

I'm thinking maybe we should add FSKONLY=1 as an experimental feature controlled by an environment variable. Would that work for you, just to test this some more and see where it goes?

mrmabs commented 1 year ago

Hi, thanks again.

From reading the protocol specs, there is a wide variety of frames (modes) the stations can talk in, 4FSK, 4PSK; 50, 100, 167 baud and so on. Both sides negotiate the best mode both can run, so in theory, FSKONLY=1 should still work with any RMS station running a modem (like ardopc) that is capable of 4FSK. Much like how SSL/TLS is negotiated if you are familiar with that.

Yeah, experimental is probably preferable for now. I can't imagine a lot of scope for it outside of a few edge cases. There are a few things in the protocol that do make me wonder if FSKONLY will work correctly. In the ARDOP (not ardopc) protocol docs CONREQ & CONACK packets appear to be sent in 4PSK, and 4FSK appears to be only short payloads; but ardopc is apparently working with fine BPQ32 to make connections.

martinhpedersen commented 1 year ago

I think I understand, yes 🙂

Ok, I'll include ARDOP_FSKONLY_EXPERIMENT in the next release (v0.15.0) so you can experiment with it. Let's keep this issue open to discuss this further.

If it turns out to be a success, I think we'll add it as a fsk_only boolean parameter inside the ardop object in Pat's config, and then it would be very nice to write a wiki page explaining how to use Winlink with the QDX.

martinhpedersen commented 1 year ago

Released (https://github.com/la5nta/pat/releases/tag/v0.15.0) 😊