Skip to content

transport/mercury: Add driver for the Mercury HF modem - #92

Draft
rafael2k wants to merge 1 commit into
la5nta:masterfrom
Rhizomatica:master
Draft

rafael2k wants to merge 1 commit into
la5nta:masterfrom
Rhizomatica:master

Conversation

@rafael2k

@rafael2k rafael2k commented Sep 6, 2026

Copy link
Copy Markdown

Add a transport driver for Rhizomatica's Mercury HF modem, an open-source OFDM modem that exposes a VARA-compatible TCP TNC interface: a CR-terminated ASCII command/status port and a raw binary data port on the following port number.

The driver is adapted from Pat-Vara (MIT licensed, Copyright (c) 2021 Jeremy Bush / N8JJA), with the VARA-only behaviour removed — Mercury never sends CWID or the WINLINK/P2P SESSION distinction, and does not compress. Following the discussion in la5nta/pat#523 and la5nta/pat#546, Mercury and VARA are treated as separate implementations expected to diverge over time, so this lives in its own transport/mercury package rather than extending the vara package. The original N8JJA copyright notice is preserved in every adapted file alongside the Rhizomatica notice, and the package doc credits the origin.

Implements Dialer, ContextDialer, net.Conn, net.Listener, BusyChannelChecker, Flusher, TxBuffer and PTTController injection.

Also marks mercury as a scheme that rejects digipeater paths in transport.ParseURL.

Application-level wiring in Pat (config, listener registration, connect/listen dispatch) is out of scope here and is tracked separately (la5nta/pat#545).

Related: la5nta/pat#523, la5nta/pat#546

🤖 Generated with Claude Code

https://claude.ai/code/session_01UPX7axfwktuMidLrX8x78k

@rafael2k

rafael2k commented Sep 6, 2026

Copy link
Copy Markdown
Author

I'm working on Mercury, and would like to add support to it in wl2k-go.

@martinhpedersen

Copy link
Copy Markdown
Member

Thanks for the PR, and for your work on Mercury.

I’ve taken a look through the implementation and I have a few structural and administrative concerns we should discuss:

  1. Copyright and Attribution: It appears that most of the files are copied from N8JJA's repository. While the original files didn't have individual copyright headers, they are governed by the central LICENSE file in that project. Adding a copyright claim for Rhizomatica at the top of these files, without also including N8JJA's original copyright notice, makes it appear as if your organization is the sole original author. To comply with the MIT license and respect the original authorship, N8JJA's copyright notice must be properly preserved.
  2. Architecture and Divergence: A lot of the complexity in this code stems from VARA-specific workarounds. The command protocol itself isn't overly complex (it's heavily based on the WINMOR and ARDOP host protocols). Because VARA and Mercury will likely diverge as they evolve, I think it would be much better to implement Mercury support as a completely separate, dedicated package rather than combining them.
  3. Existing VARA Maintenance: The current collaboration with N8JJA for maintaining the VARA transport package for Pat has been working great, and I don't want to change that setup without involving those contributors.
  4. Repository Structure: Following up on the points above, would you consider keeping the Mercury package in its own separate repository? That model helps significantly with the burden of maintaining the code over time, assuming you are motivated to maintain it long-term.
  5. AGWPE Host Protocol: Have you considered adding support for the AGWPE host protocol to Mercury? The existing AGWPE implementation in wl2k-go is, in my opinion, more robust and well-thought-out. It uses a revised architecture compared to the early transports that this VARA implementation is based upon. Furthermore, AGWPE is a well-documented, de facto standard for packet-based modems, covers all the requirements for this kind of transport, and is extensible by design.

Let me know your thoughts on how best to proceed.

@martinhpedersen

Copy link
Copy Markdown
Member

Related to la5nta/pat#546 and la5nta/pat#523

@rafael2k

rafael2k commented Sep 7, 2026

Copy link
Copy Markdown
Author

There is already a discussion about it. Nice. I'll read it all, and whatever solution is decided, I can contribute and test (separate or together with Vara's one).

Add a transport driver for Rhizomatica's Mercury HF modem
(https://github.com/Rhizomatica/mercury), an open-source OFDM modem that
exposes a VARA-compatible TCP TNC interface: a CR-terminated ASCII
command/status port and a raw binary data port on the following port
number.

The driver is adapted from Pat-Vara (https://github.com/n8jja/Pat-Vara,
MIT licensed, Copyright (c) 2021 Jeremy Bush / N8JJA), with the VARA-only
behaviour removed: Mercury never sends CWID or the WINLINK/P2P SESSION
distinction and does not compress. Mercury and VARA are separate
implementations expected to diverge over time, so this lives in its own
package rather than extending the vara package. The original N8JJA
copyright notice is preserved in every adapted file alongside the
Rhizomatica notice.

Implements Dialer, ContextDialer, net.Conn, net.Listener,
BusyChannelChecker, Flusher, TxBuffer and PTTController injection.

Also mark "mercury" as a scheme that rejects digipeater paths in
transport.ParseURL.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UPX7axfwktuMidLrX8x78k
@rafael2k rafael2k changed the title transport/vara: Add driver for VARA-compatible modems transport/mercury: Add driver for the Mercury HF modem Sep 7, 2026
@rafael2k

rafael2k commented Sep 7, 2026

Copy link
Copy Markdown
Author

I renamed to mercury-only. But I did not know about the other activities, so I'm fine to abandon this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants