Preface: How to Read This Manual
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
1 Who this book is for
You hold an amateur license, you have a transceiver on any band, and you want to move messages and mail between stations, with the internet or without it. mLink runs on HF (high frequency, shortwave) single sideband with its own layout of the passband, on FM through FmLink (Chapter 34), and across several frequencies or bands at once when stations join into a cluster (Chapter 33). You do not need to be a programmer. If you have made an FT8 contact, run a packet node or sat through an evening net, you have the background this book assumes.
It is also written for the amateur who wants to know why: why a lost frame costs only that frame, why the station sometimes waits before keying when the channel sounds clear. The reasoning is in plain speech, with the numbers taken from the software itself. It is not a programming reference: it names frames and bytes, because those travel between stations, but never a source file.
2 Two ways through the book
The operator route is Parts I and II. Part I is the big picture: Chapter 1, then Chapter 2, which follows one piece of mail from one operator to another and is the best short tour of the whole system, then the radio background in Chapter 3. Part II is the operator's manual: installing, every window of the client, what the outbox is telling you, and accounts.
The deep dive is everything after that, in the order a reader needs it. Part III is the signal: the passband, the error-correcting codes, the three modems and the receiver. Part IV is the protocol, everything that happens on the air between stations. Part V covers the services built on it, such as emergency calls and mail. Part VI is the station software, Part VII is FmLink, and Part VIII explains how mLink is tested.
Coming from Winlink? Start with Appendix F: what stays the same, what your habits become, what you gain and what you give up, with links into the rest of the book.
Each idea is explained once, in one chapter, and every other chapter links to it: when a sentence ends in a link, the full story is at the other end. Reading only the box at the top of each chapter is a fair way to get the shape of the parts you skip. For a number in a hurry, go to Appendix A; for the bytes of a frame, Appendix B.
3 Conventions
3.1 Message, chat and mail
Three words carry most of this book, and each has one meaning.
- Chat is short live lines typed to a station or to a net, as on IRC.
- Mail is just mail. It has a subject and recipients, and it can carry anything: attachments, forms, map objects, internet data, long text.
- Message is the umbrella word: anything an operator has put information into and sent out, whether a chat message, a mail, a bulletin to a net or a distress call. The book never uses “message” to mean only chat or only mail; when it means one, it says chat or mail.
The client's window called “Mail” is the mail program; chat has its own window, “Chat” (Section 7.5.1). What mLink promises each kind of message, and who holds and carries it until it is delivered, is laid out in Section 18.10.
3.2 Region
The audio an SSB (single sideband) radio carries, about 0 to 3 kHz, is called the passband. mLink divides it into three parts, and each part belongs to one function and one modem. This book calls such a part a region, and always that, never a band or a strip (a band is an amateur frequency range such as 40 meters).
- The emergency region, 300 to 350 Hz, carries distress calls.
- The announce region, 350 to 1,500 Hz, carries the short frames that say who is on the air and what is coming.
- The bulk region, 1,500 to 2,900 Hz, carries the large transfers.
Chapter 10 draws the whole layout.
3.3 One yardstick for signal strength
Every signal-to-noise figure in this book is on one scale, SNR@3k: the signal against the noise in a 3 kHz SSB (single sideband) bandwidth, defined in Section 3.4.3.
3.4 Frame chains in brackets
One transmission from an mLink station is usually several frames back to back. We write it as frame names in square brackets, in the order they go out:
[presence]
That reads: a PRESENCE frame (who is talking), an opener (what is coming and for whom), then three bulk data frames. "Protocol" in this book always means what happens on the air, never the conversation between your station and the program you look at.
3.5 The boxes
3.6 Glossary terms and cross-references
A term with a dotted underline, like region, is a glossary entry. Hover over it for a one-line definition, or follow it to the glossary at the back. A term is linked the first time it appears in a chapter. References to chapters, sections, figures and tables are live links, numbered automatically. Acronyms are spelled out the first time a chapter uses them, and where the wider industry has a name for something mLink built, we give that name too.
Part I: The Big Picture
What mLink Is
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
1.1 The problem it solves
Amateurs have always moved traffic without anyone else's infrastructure. The radiogram, the traffic net, packet radio and the modern digital modes all answer the same question: when the phones and the internet are not an option, how do words get from here to there?
mLink answers it for today's shack: a computer and a sound card between the operator and the radio, and mail that looks like the mail people already write, with subjects, recipients, replies and attachments. It is built for the conditions where the easy assumptions fail:
- The path is poor and it changes. On HF (high frequency, the shortwave bands), a station you copied solidly ten minutes ago may be down in the noise now and back in another ten (Chapter 3 explains why). On VHF and UHF FM, a hill or a building decides who hears whom.
- Everyone shares one frequency. No central controller hands out turns. Each station decides for itself when to transmit, and two that decide at the same moment ruin each other's signals.
- Stations come and go. Some run all day from a fixed shack, some for an hour on battery. Some have internet access; in a real emergency most will not.
- Air time is precious. A weak-signal channel carries tens or hundreds of bytes per second, not millions. Every byte repeated needlessly is air time taken from someone else.
1.2 What mLink does
- Nets with accountability. A virtual net with a net control, a roster and roll calls that take seconds, bulletins that come back with a record of who received them, and standing orders every member keeps. See Chapter 24.
- Mail to anywhere in the world. A subject, recipients, copies, replies tied to the mail they answer, and attachments. Mail travels by radio between stations, and through any station with internet access to a central mailserver. That lets a station on one frequency send mail to a station on a different frequency or band, in another region or another country, or to an ordinary email address. It never spends air time it does not have to, and it is never thrown away for taking too long. See Chapter 26.
- Chat. Short typed lines to one station or to everyone listening, with several exchanges on the frequency at once (Section 3.1).
- Delivery without the internet. Stations exchange chat and mail by radio alone, and a station that hears both ends relays for one that does not. See Chapter 21.
- Distress calls. On HF, a call for help has its own slice of the passband and its own very slow, very robust signal, which every station listens for at all times. Nothing is allowed to make a distress call harder to send or harder to hear. See Chapter 25.
- Strong compression. Every message is compressed with Zstandard at its highest setting, with a dictionary trained on radio traffic so that short messages shrink too. See Chapter 23.
- Any band, any mode. On HF single sideband, mLink has its own layout of the passband (Chapter 10); on an FM voice channel it runs as FmLink (Chapter 34).
- One station, several radios, several operators. Computers on different frequencies or bands join into one station, so a message reaches a station that only one of its radios hears, and operators sign in with their own accounts and roles. See Chapter 33 and Chapter 9.
- Position and maps. Stations report where they are, and operators share map sketches and search patterns. See Chapter 30.
- Internet data shared over the air. A station with internet access can fetch something such as a weather forecast for stations without it. See Chapter 29.
Underneath all of them is one job: getting a string of bytes from one station to another, completely and correctly. Chapter 2 follows that job from end to end.
1.3 The three programs
mLink is three programs that cooperate. Only one of them ever touches a radio.
1.3.1 The station daemon
The station daemon is the program that runs your station. (A daemon, in computing, is a program that runs in the background with no window of its own.) It owns the sound card and therefore the radio. It holds the modems, the error-correcting codes, the receiver that listens to the whole passband all the time, and every rule about when to transmit and what to say. It keeps a database of everything that must last: stations heard, mail and chat messages, the outbox, the settings. Every decision about the air is made here, from what this station has measured.
The daemon runs whether or not anyone is looking at it: a station can sit unattended, listening, answering and carrying traffic for others. See Chapter 31.
1.3.2 The client
The client is what you look at: one window laid out like a small desktop, with a Start menu of applets for mail, the stations heard, a map, a spectrum display and more. The same client also runs in a web browser.
The client is deliberately thin. It keeps no messages of its own; it sends commands to the daemon and shows the updates the daemon sends back. So you can close it and the station keeps working, you can connect from another computer, and several operators can work one station at once. Chapter 7 walks through the client; Chapter 32 describes the connection.
1.3.3 The mailserver
The mailserver is a separate program that runs on an internet host and has no radio at all. It keeps a mailbox for each base callsign (every SSID of it shares one), passes mail to and from ordinary internet email, and runs mailing lists. A station with internet access talks to it directly, and by doing so becomes a gateway for the stations around it that have none: it says on the air that it can reach the mailserver, and carries mail between the air and the mailbox. See Chapter 27.
The mailserver is central to getting mail delivered. It is the one place that holds a mail, for as long as it takes, for a recipient who is off the air, out of range or on another band, and the one place every gateway can reach. Most mail between stations that are not in range of each other ends up passing through it.
That the radio side also works without it is a feature, not the normal case. Two stations with no internet still exchange mail directly or through other stations, and a frequency cut off from the internet keeps working as a net. The mail is held and carried meanwhile: the sending station keeps it, every station that hears it keeps a copy, and when a gateway comes back into range the mail goes on to the mailbox.
1.4 Four habits: a net that runs itself
If you have sat in on a well-run traffic net, you have the right picture. Stations check in, everyone listens to everything, and when one station cannot reach another, somebody in the middle offers to relay. mLink works the same way with one difference: nobody has to be net control. Every station follows the same rules and decides for itself from what it has heard. Four habits make that work.
1.4.1 Stations announce themselves
A station opens its transmissions with a short frame called PRESENCE, carrying its callsign and grid square, which also serves as its station identification. With nothing else to say it still sends one alone from time to time, a beacon, so the stations around it know it is there. See Chapter 16.
1.4.2 Stations learn who hears whom
Every frame a station decodes tells it that the sender exists and how strong the sender was on arrival. Each station builds a table of the stations it hears and how well, and stations share short summaries of their tables on the air, so each one learns not only "whom do I hear?" but "whom do my neighbors hear?" See Chapter 20.
1.4.3 Stations choose how to send from what they measured
There is no speed setting and no mode switch. A station with something to send looks up how well the path has been working and picks for itself: short messages and weak paths go on a slow, robust signal, large messages over good paths on a fast one (Chapter 17). When part of a long transfer is lost, the receiving station says exactly which part, and only that part is sent again (Chapter 18).
1.4.4 Stations relay for each other
There are no routes to configure and no digipeater paths to type in. Stations keep a copy of traffic they overhear, even when it was not for them. When a sender finds it cannot reach the destination, it asks the stations around it at that moment, and one that has heard the destination recently offers to carry the message. The destination records it as coming from the original sender, not from the helper. See Chapter 21.
1.5 One system, top to bottom
Many operators know Winlink, the long-established radio email system. Winlink got the product right: mail is the right unit for emergency traffic, and a central mail store reached through internet gateways is the right shape for a network. mLink keeps both, and aims to be a more efficient and homogenized alternative to the Winlink system and the modems that support it.
What it changes is how the pieces fit. A Winlink station is assembled from separate programs written at different times by different people: a mail client, a modem program, gateway software, and the central servers, joined by interfaces that each know little about the others. mLink is one system designed as a whole. The modem knows what kind of traffic it is carrying, the part that shares the channel knows what the modem can do at the present signal level, the mail layer knows which stations have been heard and which of them can reach the internet, and the mailserver knows what a station on the air can and cannot afford to send. Each layer has what it needs from the others, so nothing has to be configured to match, and no air time is spent on negotiation between them.
| Job | Winlink | mLink |
|---|---|---|
| Writing and reading mail | Winlink Express or another client program | The client |
| The signal on the air | A separate modem you must also have: VARA, ARDOP, packet, or a Pactor hardware modem costing well over a thousand dollars | The station daemon's own three modems; a sound interface is the only hardware |
| Deciding when to transmit, and to whom | The operator picks a gateway and starts a session | The station daemon, from what it has heard |
| Carrying mail between radio and internet | Gateway software (RMS) at stations set up as gateways | Any station with internet access; it needs no extra program |
| Carrying mail between stations with no internet | A separate radio-only network of chosen stations | Every station: relay and carrying mail are built in |
| Holding mail until it is collected | The central mail servers (CMS) | The mailserver |
| Distress calls, position, nets, several bands | Other programs, or not covered | Built in |
Winlink works with several modems, and a station can only use the ones it has. mLink has one signal design, built into the daemon, and every mLink station can talk to every other.
mLink is built for what counts for an organization: mail that arrives, and a frequency that carries the traffic of everyone on it. Pactor, VARA, ARDOP and packet each connect one station to one gateway. The operator keeps a list of gateways, picks one, and hopes it is listening and in range on that band at that hour; if it is not, the mail does not move. An mLink network works together:
- Every station is always decoding and always helping. There is no particular gateway to reach and no gateway list to keep. Any station that hears you can carry your mail, relay your message or tell you that the mailserver holds mail for you (Chapter 21, Chapter 26).
- The frequency is never held by one pair. Several exchanges run side by side in different parts of the passband (Chapter 19).
- No session to set up. No connect, no negotiation of speed, no disconnect. A short message's transmission starts with the data; a long one to one station first asks, in one frame, whether the addressee can take it now (Section 19.3).
- Only what was lost is sent again, and a frame is the same length whatever the signal level, so nothing is re-timed or re-negotiated when the path changes (Chapter 18).
- It reaches weaker stations. Short messages get through at −9 dB and a distress call at about −19 dB (Chapter 11).
- Less is sent in the first place. Every message is compressed hard before it goes on the air (Chapter 23). For ordinary text traffic that alone can put mLink ahead of even the fastest of those modems in the time a message takes.
Raw speed between two stations on one strong path is the single measure where the fastest hardware modems are ahead, and compression narrows even that for ordinary text. On every other measure above, mLink is designed to lead. Simulation bears this out: a twelve-station net running for hours delivered every mail and every chat message, with stations helping one another and not one transmission lost to overlap (Chapter 35). A side-by-side trial on the air is still to come; hardware modems are expensive to borrow. Appendix F sets mLink's figures beside the published ones for those modems, counted in air time per delivered mail, and shows where Winlink's overhead goes.
The largest difference an operator meets is in the radio half. A Winlink station exchanges mail by connecting to one particular gateway for a session, and only those two stations may use the frequency meanwhile. mLink has no connection step: every station on the frequency hears every transmission, any station can hold and carry mail for another, and a gateway that hears your station offers you the mail in your mailbox without being asked.
1.6 Where mLink stands
mLink is in active development and approaching its final phase. The signal side (the modems, the codes and the receiver) is settled, and the core of the protocol is complete: stations find each other, choose how to send, share the channel, repair losses, recruit relays, and move mail and distress calls end to end. All of it is exercised continuously by a test suite that runs many stations against a simulated shared radio channel (Chapter 35). Proving the system on real HF paths is part of the phase now under way. FmLink, the same design on an FM voice channel, works on real FM radios: two handhelds keyed by VOX, and a mobile keyed by a line on the bench. It ships in the pre-release, fast signal included, proven radio to radio on the bench and on the simulated air; field tests come next (Chapter 34).
1.7 What to remember
- mLink moves chat and mail between amateur stations on any band and mode, and distress calls on HF, over a shared, changing channel, with or without the internet.
- It is three programs: the station daemon (owns the radio and makes every decision), the client (a window onto the station, desktop or browser) and the mailserver (internet mailboxes, no radio).
- It is one system designed as a whole, intended to replace the Winlink network and its separate programs. The mailserver is central to delivery; working without it is a feature for when the internet is gone.
- Four habits make the net: stations announce themselves, learn who hears whom, pick how to send from what they measured, and relay for each other.
Mail in mLink
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
2.1 The example
Three stations are on one 40 m frequency. None has internet access.
- A (KX0AAA) has a mail for B.
- B (KX0BBB) is the recipient, a few hundred kilometers away.
- C (KX0CCC) is unattended. It listens and helps.
The mail is a text report. Compressed and wrapped it is 2,000 bytes. B has reported hearing A at +10 dB (SNR@3k), and A uses that figure.
2.2 Scenario 1: B hears A
- Compose. The operator at A writes the mail in the client and presses Send. The client hands it to the station daemon in one command; the station makes every decision from here (Section 7.5.2, Chapter 32).
- Outbox. The station saves the mail in its outbox as pending, then queues it (Chapter 8).
- Check and wrap. The station computes a 16-bit integrity check over A's callsign, B's callsign and the mail. That value also names the mail on the air. It then tags the content as mail, compresses it if that makes it smaller, and adds one byte saying how it was packed: 2,000 bytes (Section 18.2, Chapter 23).
- Choose how to send. The station picks from the size and its link estimate for B. A small message or a weak path goes as a shortburst or longburst. 2,000 bytes over a path better than +3 dB go as a bulk transfer. With the 2-byte check in front that is 2,002 bytes in three frames: frame 0 at rate 1/2 holds 603, frame 1 at rate 3/4 holds 907, frame 2 at rate 5/6 holds the last 492 (Chapter 17).
- Wait for a free moment. The station keys only when it is not in another exchange, no other station has reserved the part of the passband it needs (a defer), and its receiver hears nothing. If the frequency has just gone quiet it first waits a random time, from a fraction of a second to several seconds. The outbox row becomes airing (Chapter 19).
- Ask. A mail of three bulk frames to one station asks first. A sends an RTS (request to send), [rts], one 0.66-second frame on the bulk-control channel that says, in effect, "may I send KX0BBB three bulk frames?" B is free and hears A well, so it answers at once with a CTS (clear to send), [cts], granting the three frames. C hears both frames and keeps off the bulk region until the transfer and B's reply are over (Section 19.3).
- Transmit. Within a second of the CTS, one
transmission
carries the mail: [presence]
[opener] . PRESENCE gives A's callsign and grid. The opener says three bulk frames follow for KX0BBB, rates up to 5/6, and gives the check value. Both are 0.66-second frames on the bulk-control channel (Section 10.5.1). After 150 ms come the three 5.98-second bulk frames, sent by OFDM (Chapter 14) and protected by an LDPC code (Chapter 11). Total: 19.4 seconds (Chapter 16).[bulk 0] [bulk 1] [bulk 2] - Receive. B decodes the PRESENCE and opener, works out when frame 0 starts, and finds each later frame one frame-length further on. In this example a fade destroys frame 1. Frame 2 still decodes, because its position was fixed by frame 0. B keeps frames 0 and 2 and has a 907-byte gap (Section 15.9).
- Reply. About two thirds of a second after A's
transmission ends, B sends [cts]
[dnak] on the same control channel, 1.3 seconds. The dNAK is a map with one bit per bulk frame; only frame 1's bit is set (Chapter 18). - Repair. A sends only frame 1's 907 bytes, and one rate
more robust than they were lost at: two rate-1/2 frames of 603 and 304
bytes, in [presence]
[retx-opener] , 13.5 seconds. B writes them into the gap. mLink calls this selective repair dARQ (Section 18.5).[bulk 0] [bulk 1] - Verify. B unwraps the mail and computes the same 16-bit check. It matches. A mail that fails the check is neither delivered nor acknowledged.
- Acknowledge. B sends [ack], one frame that names B. The ACK names the mail by its check value. B's client shows new mail from A. A's outbox row becomes sent.
From the RTS to the end of the ACK: about 40 seconds, of which 36.2 are transmission (0.66, 0.66, 19.4, 1.3, 13.5 and 0.66).
2.3 Scenario 2: B cannot hear A, but C hears both
A's estimate for B is a few minutes old and still looks good, so steps 1 to 5 happen as before, and A sends its ask. B does not hear it.
- Silence. A waits five seconds for B's CTS. None comes. After a random wait it asks once more; silence again. Nothing of the mail has been on the air (Section 18.6.1).
- Ask for a relay. A sends a REQUEST naming KX0BBB and
the mail's check value. It does not carry the mail, and since nobody can hold
a copy, it invites stations that hear B without one. C hears B, so after a
random wait it sends an OFFER saying how well it hears B and "send it to me
first". A waits two seconds for better offers, then names C in a SELECT:
[presence]
[relay/request] , [presence][relay/offer] , [presence][relay/select] . - Hand-over. A sends the mail to C as an ordinary transfer,
asked for first like any long message, with a HANDOFF frame naming B in
front: [presence]
[relay/handoff] . C acknowledges it and keeps the mail for B (Section 21.7.2).[opener] [bulk 0]... - The relay delivers. C asks B and sends it the mail
as a transfer of its own:
[presence]
[relay/for] . The RELAY/FOR frame names A as the author and gives the original check value. B replies to C exactly as in Scenario 1, repairs included, and files the mail as coming from A.[opener] [bulk 0] [bulk 1] [bulk 2] - Result. C sends A a RELAY/RESULT frame. A's outbox row becomes sent. If C cannot reach A at once, it holds the result and sends it when it next hears A (Chapter 21).
2.4 Scenario 3: nobody can reach B
B is off the air and C cannot hear it either.
- The ask, its repeat and the REQUEST happen as in Scenario 2. Nobody offers.
- Deferred. A sends nothing more for this mail into the silence (Section 18.6.6) and marks the row deferred: no relay has volunteered yet; it will ask again after a growing wait.
- Try again later. When A next hears any station, and at least one minute has passed since the last try (doubling after each failed try, up to 32 minutes), it tries again: directly if the station it hears is B, otherwise by asking for a relay. A holds the mail all the while, sends the oldest first, and never discards a mail for taking long (Chapter 22).
If a gateway is on the frequency there is one more path. When A asks again, its REQUEST also invites stations connected to the mailserver. A gateway offers, is handed the mail, puts it in B's mailbox on the mailserver and says so; A's row becomes deposited (Section 21.7). Any gateway that later hears B offers B that mail (Chapter 26).
2.5 What to remember
- B hears A: an ask and its answer, one transmission, a reply naming any lost frames, a repair of only those frames, an ACK. Here 2,000 bytes took about 40 seconds.
- B does not answer the ask: one more ask, then a relay chosen on the spot from the stations that hear B, and A hands the chosen one the mail.
- Nobody can help: the mail is deferred and retried when a station is heard again. Mail does not expire.
The Radio You Need to Know
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
3.1 Your transceiver is an audio pipe
An SSB (single sideband) transceiver is usually thought of as a voice radio. For data work, think of it as a pipe for audio. Whatever audio you feed into its data input comes out of the far station's data output, much the same as it went in. To your radio, every mLink signal is just sound. Where along the way it does not come out the same is Chapter 4.
3.1.1 Upper sideband: audio pitch becomes radio frequency
In upper sideband (USB) mode, the radio takes each audio tone and moves it up so that it sits that many hertz above the dial frequency. A 1,000 Hz tone fed into a radio set to a dial frequency f goes out on the air at f + 1,000 Hz. At the receiving end the process runs backwards, and a receiver set to f turns that signal back into a 1,000 Hz tone. Tones stay tones, their spacing stays the same and their timing is preserved. mLink runs on upper sideband, with its audio going in and out through the radio's rear or USB connector: either in the radio's data mode (often labeled DATA-U, PKT-U or USB-D) or in plain USB with that input selected, whichever passes more of the audio range (Section 6.2).
That is why this book describes mLink's signals in audio terms. When a later chapter says a signal is centered on 2,200 Hz, it means the audio fed to the radio, and therefore 2,200 Hz above the dial on the air.
3.1.2 The pipe is about 3 kHz wide
The passband is the range of audio frequencies the radio lets through. SSB radios are built around voice, and a typical one passes something like 3 kHz of audio. mLink is designed to fit inside that, and it uses nearly all of it, from very low audio right up to the top. Both ends matter. Many radios narrow their filter for data modes, or roll off the low audio to keep voice crisp, and a radio that does either cuts off part of mLink.
3.2 Sound cards and samples
Between the radio and the computer sits a sound card, often built into a small interface box. On receive it measures the audio voltage many thousands of times a second and hands the computer a stream of numbers. Each number is a sample, and how many are taken each second is the sample rate. On transmit it does the reverse.
A sampled signal can only represent frequencies up to half the sample rate. mLink does all of its signal processing at 12,000 samples per second, so it can represent audio up to 6,000 Hz, twice what the passband needs. Many sound cards prefer to run at 48,000 samples per second; the station then converts between the card's rate and its own.
Because the rate is fixed, time and samples are interchangeable throughout mLink. One second is 12,000 samples. A bulk frame is 71,808 samples, which is exactly 5.984 seconds. Timing that matters is counted in samples, and that is how a receiving station can predict, to the sample, where the next frame of a transfer will begin.
3.3 Tones, phase and the I/Q picture
Every mLink signal is built from tones. A pure tone has three properties: its frequency (how many cycles per second), its amplitude (how loud) and its phase (where in its cycle it is at a given instant). A modem carries data by changing one or more of these from one short stretch of time to the next. Each stretch is a symbol, and the number of symbols per second is the baud rate.
mLink changes tones in three ways. Its emergency modem changes the frequency, picking one of eight tones for each symbol (Chapter 12). Its announce modem changes the phase of a single tone (Chapter 13). Its bulk modem changes the phase of many tones at once, side by side (Chapter 14).
3.3.1 Phase as an arrow
Picture phase as an arrow spinning around a circle. The arrow's length is the tone's amplitude; its angle at any instant is the phase. Now watch it from a viewpoint that spins at exactly the tone's own frequency: the arrow stands still. If the transmitter jumps the phase by a quarter turn, the arrow jumps by a quarter turn and stays there.
Describe the arrow's tip by two coordinates, how far across and how far up, and you have what radio engineers call I and Q: the in-phase and quadrature parts of the signal. The receiver works with both numbers for every sample. The pair records not just how strong the signal is but where it is in its cycle, which is exactly what a modem that shifts phase needs to read. Plot where the arrow lands for each received symbol and you get the constellation display that digital-mode software shows: tight clusters for a clean signal, fuzzy clouds for a noisy one.
3.4 Noise, decibels and SNR
Every receiver hears noise: the hiss of the atmosphere, distant lightning, the power line next door and the receiver's own electronics. The most important number about any received signal is how strong it is compared with that noise, the signal-to-noise ratio, or SNR.
3.4.1 Decibels without tears
Radio people write ratios like this in decibels (dB), because the ratios involved span a huge range. A decibel figure is shorthand for a multiplication. The few values worth memorizing:
| dB | Power ratio | In words |
|---|---|---|
| +3 | ×2 | twice the power |
| +10 | ×10 | ten times |
| +20 | ×100 | a hundred times |
| 0 | ×1 | equal |
| −3 | ×½ | half the power |
| −10 | ×1/10 | a tenth |
| −20 | ×1/100 | a hundredth |
Decibels add where ratios multiply: +13 dB is +10 dB and +3 dB, so twenty times. An SNR of 0 dB means the signal and the noise have equal power. A negative SNR means the signal is weaker than the noise: at −10 dB the noise has ten times the signal's power. For voice that is hopeless, but data modes copy signals like that every day.
3.4.2 Why an SNR needs a bandwidth
Noise is spread across all frequencies more or less evenly. A receiver listening through a wide filter lets in more of it; a narrow filter lets in less. Halve the bandwidth and you halve the noise power, which is −3 dB. So an SNR figure means nothing until you say what bandwidth the noise was measured in. The same signal can honestly be described as −15 dB in a 3 kHz bandwidth and about +3 dB in a 50 Hz one, because the 50 Hz slice holds sixty times less noise (about 17.8 dB less).
This is also half of the answer to "how can anything copy a signal below the noise?" A narrow signal only has to beat the noise inside its own narrow slice. The other half is time and coding: long symbols let the receiver average the noise down, and error-correcting codes repair the symbols that still come out wrong (Chapter 11).
3.4.3 The SNR@3k yardstick
mLink quotes every SNR against one fixed reference: the noise that a 3,000 Hz-wide SSB receiver lets through. We write this SNR@3k. It is the natural yardstick for an SSB station, because 3 kHz is roughly what the radio passes anyway. It means the same thing whether the signal being measured is mLink's narrowest or its widest, so any two figures can be compared directly. And it is one number everywhere: the strength your station reports for each station it hears, every figure in this book, and the thresholds the station uses to make its decisions are all SNR@3k.
If you use FT8 or JS8, you already know this kind of number. Those programs report against a 2.5 kHz reference instead of 3 kHz, so the same signal reads about 0.8 dB lower on mLink's scale. That is close enough to compare directly: a station that gives you −12 on FT8 is very close to −12 dB SNR@3k.
How far down each of mLink's three signals can be copied is listed in Section A.9. The short version: the slow ones work well below 0 dB, and the fast one needs to be a few decibels above it. mLink chooses between them from the measured path (Chapter 17).
3.5 Half duplex: you are deaf while you transmit
An amateur transceiver cannot transmit and receive at the same time on the same frequency. Its own signal is millions of times stronger at its antenna than anything it could hope to hear. This is half duplex, and it shapes a great deal of mLink's behavior.
A station switches between receive and transmit with the PTT (push-to-talk) line, the same thing your microphone button does. mLink keys an HF radio by a CAT (computer aided transceiver) command or by a control line on a serial port. It does not use VOX (voice operated switch, where the radio keys itself when audio arrives) on HF: VOX is slow to react and loses the start of every transmission (Section 5.3.12).
Half duplex has three consequences you will meet again and again:
- A station hears nothing while it transmits. If another station transmits at the same moment, neither hears the other, and anyone listening hears both on top of each other. That is why stations listen first and wait for a free moment (Chapter 19).
- Answers must wait until the sender has stopped. A reply that starts while the sender's transmitter is still on, or before its receiver is listening again, is lost (Chapter 18).
- Silence is ambiguous. A station that hears no answer cannot tell whether the other station never heard it, heard it but could not reply, or replied while something else was in the way.
3.6 The HF channel
A VHF path is usually line of sight and stays much the same from minute to minute. HF (high frequency, 3 to 30 MHz) is different, and the difference is why mLink's signals look the way they do.
3.6.1 The ionosphere and skip
Above about 60 km, sunlight ionizes the thin upper atmosphere into layers, together called the ionosphere. An HF signal heading upward is bent back toward the ground and can come down hundreds or thousands of kilometers away: skip. It may bounce off the ground and go up again for a second hop. Which frequencies are bent back, and where they land, depends on the time of day, the season and the sunspot cycle. A path that works on 40 m in the evening may not work at noon.
Signals sent nearly straight up on the lower HF bands come back down all around the transmitter. This near-vertical incidence skywave (NVIS) is the workhorse of regional emergency communications, and it has the same character as any other skywave path: echoes, fading and drift.
3.6.2 Echoes: multipath
A signal rarely arrives by one path alone. One copy may come by a single hop and another by two; the ionosphere may split the signal into two copies traveling slightly different routes. Each copy covers a different distance, so they arrive at slightly different times. The receiver hears the sum: the signal plus delayed echoes of itself. This is multipath. On skywave paths the echoes typically trail the first arrival by half a millisecond to a few milliseconds, and in bad conditions by as much as 10 milliseconds.
3.6.3 Fading
The ionosphere is never still, so the lengths of the paths change all the time. When two copies of a tone arrive in step they add up; when they arrive half a cycle apart they cancel. As the paths shift, a signal fades in and out, sometimes over a fraction of a second, sometimes over minutes. Because the adding and canceling depends on frequency, a fade can take out one part of the passband while leaving another untouched: on a waterfall display you can see dark notches wander slowly across a signal. A long transmission on HF should expect some part of it to meet a fade.
3.6.4 Drift and Doppler
The moving ionosphere also shifts each signal's frequency slightly, by a fraction of a hertz to a few hertz, and smears it: a pure tone arrives a little blurred. This is the Doppler effect, the same thing that changes the pitch of a passing siren. Separately, no two radios agree perfectly on what frequency their dials are set to. A few hertz or tens of hertz of difference is normal, and on upper sideband that error shifts every received tone by the same amount. Chapter 15 explains how mLink copes; an accurately calibrated radio still helps.
The standard channel models engineers use to test HF modems describe "good" through "poor" conditions as echoes of 0.5 to 2 milliseconds with Doppler smearing of 0.1 to 1 Hz. mLink's own tests run its stations through simulated fading, echoes and noise of this kind (Chapter 35), and Table A.17 lists the signal level each modem needs on each of these models.
3.7 Why slow symbols
Put all of that together and the trouble with sending data quickly over HF becomes clear. The obvious way to go fast is to send short symbols very quickly on a single carrier. At 2,400 symbols per second, a symbol lasts about 0.4 milliseconds. A 2-millisecond echo then overlaps the next five symbols, and the receiver hears each symbol mixed with the ghosts of the ones before it. A filter that learns the echo pattern can subtract it, but the pattern keeps changing as the path fades and drifts, so the filter is always chasing it, and a deep fade can leave it lost.
The other way is to make every symbol long compared with the echoes, so that an echo smears only the edge of a symbol and not the whole of the next one. All three of mLink's signals do this. The emergency modem's symbols last 160 milliseconds, which an echo of a few milliseconds barely touches. The announce modem's last 5 milliseconds, still longer than a typical echo. The bulk modem gets its speed back without shortening anything: it sends many slow tones side by side, each symbol about 27 milliseconds long, and starts each symbol with a guard interval that soaks up the echoes (Chapter 14).
Why three different signals and not one clever one is a question about jobs, not about echoes: one must be heard by everybody, one must move a lot of data, and one must get a distress call through almost anything. Chapter 10 takes it up.
3.8 What to remember
- On upper sideband the radio is an audio pipe about 3 kHz wide: audio pitch maps straight onto frequency above the dial. mLink uses nearly all of it, so keep the data filter wide at both ends.
- mLink processes audio at 12,000 samples per second, and counts time in samples.
- A tone seen as an arrow has two coordinates, I and Q; together they give its strength and its phase.
- Every SNR in mLink is SNR@3k: signal against the noise in a 3 kHz SSB bandwidth, within 1 dB of an FT8-style report.
- Radios are half duplex. A transmitting station hears nothing, so stations listen before they talk, answer only once the sender has stopped, and cannot be sure what silence means.
- HF brings echoes of up to several milliseconds, fading and small frequency shifts. That is why mLink sends slow symbols.
The Audio Path, and Where It Bends the Signal
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
4.1 The whole path
A linear stage, a gain or a filter, turns each tone up or down by a fixed amount at any level, and mLink's receivers undo that. A stage that is not linear flattens peaks or moves its gain while a frame passes, and makes tones that were never sent. The radio is an audio pipe (Section 3.1) only while those stages stay out of the way.
4.2 On the sending side
mLink's limiter shaves the rare tall peaks off each announce and bulk frame and filters it back into its region, so every frame leaves at the same peak (Section 10.8.1). Nothing after it should squeeze the signal again.
The sound card clips beyond full scale. At "TX level" 0 dB mLink's largest sample is exactly full scale, so a clip comes from a level added later, in a mixer or the interface. Playback that runs dry for a few tens of milliseconds can lose an announce frame; on Linux's ALSA sound system mLink queues a lead of audio before playback starts and keeps the key down until the last sample has played.
The speech processor and the transmit equalizer reshape the envelope and tilt the tones for voice. Both belong off (Section 6.2).
The ALC turns the drive down whenever the output would pass its limit. On the bench FT-991A at 5 W, driven on the Tune tone, an announce frame came out 0.9 dB under the tone where its shape puts it 3.1 under, and a bulk frame 4.1 under where its shape puts it 6.0: each about 2 dB hotter than mLink made it, which the bench record reads as the ALC squeezing the peaks. What it squeezes off spreads into the neighboring regions: on that radio, what a bulk burst put into the announce region was 30 dB down. Driven harder, it spreads more.
The transmit filter is linear, but its slope costs signal only the sender can put back: the far station's noise does not slope with it. On the FT-991A in plain USB the top bulk carrier leaves about 4 dB down (read from its power meter), which in simulation costs a bulk transfer 1.4 to 1.7 dB at the far end. Past the filter's edge nothing goes out at all (Section 6.3).
The power amplifier compresses near full power. The Tune tone sits at the peak of every frame, so a drive set on it keeps every frame's peaks at the power you chose.
4.3 On the receiving side
The receive filter's slope costs almost nothing: band noise enters ahead of it, so signal and noise are turned down together. It does change the noise level from region to region: through the bench FT-991A the bulk region's noise came in 3.5 dB below the announce region's, where flat noise reads 1 dB above. So each detector measures the noise in its own band.
The AGC is a plain gain while it holds still. A slow one leaves the noise low for a long moment after a strong signal while the detectors' bar is still set for the louder noise, and a weak frame right behind is missed. The station spots a repeated dip of 6 dB or more lasting 400 ms or longer and advises a fast AGC, or none with the RF gain set by hand (Section 7.8.20).
Noise reduction turns down whatever sounds like hiss, and a bulk burst of 28 carriers does. Its effect on mLink has not been measured; it was off on the bench.
The sound card's input clips at full scale, which nothing after it can undo; the "CLIP" lamp says so.
4.4 What you set
The drive, with "Tune" and the radio's input, so the ALC barely moves, and the receive level, with no "CLIP" (Section 5.3.7); the radio's mode, filters, processor and noise reduction, some of which mLink sets itself (Section 6.5); and the radio self test, which says whether the transmit filter passes the band (Section 5.3.11).
4.5 What the receiving software allows for
Each modem finds and removes up to about 24 Hz between the two radios, and a station that is itself off moves its dial or says how far (Section 15.11). Each detector measures its own noise, per announce channel and per region (Section 15.4). The emergency receiver compares its eight tones with each other in every symbol, so a level change that moves them together changes nothing; the bulk receiver reads each carrier's level and phase from the pilots in every frame (Section 14.8.3). How fast an AGC may pump before frames are lost has not been measured.
4.6 Still open
- Boosting the top bulk carriers to even out a sloped transmit filter gains at most about 0.3 dB on the FT-991A (simulated), and only with the drive raised; the drive itself is worth 1.3 to 1.5 dB, about 1 dB of it already won by setting it on the Tune tone. The boost waits for a radio with a steeper slope.
- Radios that stop at 2,400 to 2,700 Hz (Section 6.4) never send the top bulk carriers; the error correction has to carry them (Section 14.8.4), at a cost not yet measured. Nor is how sharply an Icom cuts at 2,900 Hz, 67 Hz above the top carrier.
- A radio without a temperature-compensated oscillator can drift past 24 Hz as it warms; how far has not been measured here. The station can still correct itself up to about 80 Hz (Section 15.11.2).
- Every radio figure above is from one radio, the bench FT-991A.
4.7 What to remember
- Gains and filters are linear and mLink undoes them; clipping, the speech processor, the ALC, a power amplifier near full power, the AGC and noise reduction bend the signal with its level.
- Set the drive on the Tune tone so the ALC barely moves; turn the processor and noise reduction off.
- A transmit filter's slope costs signal at the far end; a receive filter's slope mostly does not.
Part II: Operating a Station
Installing and First Run
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
5.1 What you need
5.1.1 At the radio
- A transceiver. Any SSB transceiver you would use for a sound-card data mode such as FT8 or JS8. Its filters must pass audio from about 290 to 2,900 Hz, on transmit and on receive: on many radios wider than the data mode goes. Chapter 6 says how to set the radio. FM radios work too, through FmLink (Chapter 34).
- A sound interface between the radio's audio and the computer, with its own way of keying the radio. Three kinds are common: an interface of the SignaLink or Digirig type, which gives the computer a line that keys the radio's PTT (push-to-talk); a radio with a sound card built in, where one USB cable carries the audio and the radio's control commands. An interface that can key the radio only by VOX cannot carry mLink on HF (Section 5.3.12).
- A way to key the transmitter. mLink keys an HF radio in one of two ways: a serial control line (RTS or DTR) wired to the PTT, or a CAT command (computer-aided transceiver, the radio's own control protocol). VOX, where the audio itself keys the radio, is not supported on HF: with nothing but VOX to key the radio the station sends no messages, beacons or replies, only a distress call (Section 5.3.12).
5.1.2 The computer
Three programs make up mLink, and they need different things from the computer. The station daemon is the one wired to the radio: it needs the sound interface and the keying line, so it runs on the computer at the radio. The client is the window you operate with; it reaches the daemon over the network, so it can run on the same computer or on any other one in the house. The mailserver is a separate program that somebody runs for a whole group (Chapter 27); your station needs only its address.
The station daemon is small. It takes the memory it needs when it starts and does not grow with traffic: a station busy with text and mail traffic holds about 27 MB, of which about 6.5 MB is the program itself, and a station that has just started holds 7 to 12 MB. Any computer that can run the client can run the daemon beside it.
The client comes in two forms. The desktop client is a program for the computer you sit at; it needs graphics that support OpenGL 3.3, as almost every graphics card and modern built-in graphics chip does. The web client is the same client in a web browser, served by the station itself; it needs nothing installed and works from any computer, tablet or phone with a current browser.
The computer should keep accurate UTC time, because every time the station records is UTC.
5.1.3 Which computers mLink runs on
| System | Processor | Desktop client | Station daemon | Mailserver |
|---|---|---|---|---|
| Linux | 64-bit PC | Yes | Yes | Yes |
| Linux | 64-bit ARM (Raspberry Pi 4 and 5, ARM servers) | Yes | Yes | Yes |
| Linux | 32-bit ARM (Raspberry Pi 2 and 3, older boards) | Yes | Yes | Yes |
| Linux | 32-bit PC | Yes | Yes | Yes |
| Linux | RISC-V, POWER, PowerPC, IBM Z, MIPS, LoongArch | Yes | Yes | Yes |
| Windows 7, 8, 10, 11 | 64-bit PC, 32-bit PC | Yes | Yes | Yes |
| Windows 10, 11 | 64-bit ARM | Yes | Yes | Yes |
| macOS 10.13 or later | Intel | Untested | Untested | Untested |
| macOS 11 or later | Apple silicon | Untested | Untested | Untested |
| FreeBSD 14 | 64-bit PC, 64-bit ARM, 32-bit ARM | Yes | Yes | Yes |
| FreeBSD 14 | RISC-V, 64-bit POWER | Web client | Yes | Yes |
| NetBSD 10 | 64-bit PC, 64-bit ARM, 32-bit ARM | Yes | Yes | Yes |
| NetBSD 10 | PowerPC Mac | Web client | Yes | Yes |
| OpenBSD 7.9 | 64-bit PC, 64-bit ARM | Yes | Yes | Yes |
"Web client" means the desktop client is not available on that system: operate the station from a browser on any other computer instead. "Untested" means it is built but has never been started there. Not every system in this table has a download yet (Section 5.2.1).
5.2 Getting mLink
mLink is out as a pre-release: a test version for stations willing to
try it on the air and report what they find. It comes as one file for each
kind of computer, all on the download page,
https://mlinkproject.org/download/. Download the one for your
computer, check it, and start it; the rest of this chapter then sets the
station up.
5.2.1 Downloads
The download page, https://mlinkproject.org/download/, has
one row per kind of computer: the file, its size and the day this build stops
working, under the version and the day it was released. Every file is at
https://mlinkproject.org/releases/prerelease/latest/ followed by
its name. Those addresses always fetch the newest release, so an address
saved today still gets the current files later.
| Computer | File | Tested |
|---|---|---|
| Linux, 64-bit PC | mLink-linux-x86_64.tar.xz, or
the AppImage mLink-x86_64.AppImage | Yes |
| Linux, 64-bit ARM (Raspberry Pi 3, 4, 5 and Zero 2 W with the 64-bit system) | mLink-linux-arm64.tar.xz | Yes |
| Windows, 64-bit PC | mLink-windows-x64.zip | Yes |
| Android phone, 64-bit ARM | mLink-android-arm64.apk
(Section 5.2.7) | Yes |
| macOS 11 or later, Apple silicon | mLink-macos-arm64.zip | Untested |
| macOS 10.13 or later, Intel | mLink-macos-x86_64.zip | Untested |
| FreeBSD 14, 64-bit PC or ARM | mLink-freebsd-amd64.tar.xz,
mLink-freebsd-arm64.tar.xz | Untested |
| NetBSD 10, 64-bit PC or ARM | mLink-netbsd-amd64.tar.xz,
mLink-netbsd-arm64.tar.xz | Untested |
| OpenBSD 7.9, 64-bit PC or ARM | mLink-openbsd-amd64.tar.gz,
mLink-openbsd-arm64.tar.gz | Untested |
"Untested" means the desktop client and the radio sound have not yet been run on a real computer of that kind, only in virtual machines or not at all. The programs are built from the same source as the tested ones; a report of what works and what does not is the most useful thing such a station can send.
Every file holds the same things: the desktop client, the station
daemon, the small web bridge
that lets browsers connect, the web client, the rig files and this manual.
No file holds the mailserver: it is not distributed. Each starts as
the desktop client; given --daemon-only as the first option,
the client runs only the station daemon, for a computer with no screen.
Each version also stays in a folder of its own,
https://mlinkproject.org/releases/prerelease/<version>/. A
version is named for the day it was built and the first eight characters of
the source code's git hash (the fingerprint of that exact version of the
source). The station itself does not use the download page: it reads the
project's signed record of the current release,
manifest.json (Section 5.2.6).
Nothing else is packaged in this release: not Linux on a 32-bit PC, on 32-bit ARM or on other processors, 32-bit Windows, Windows on ARM, or the BSDs on other processors, although mLink runs on them (Section 5.1.3).
5.2.2 Checking the download
Beside the files is SHA256SUMS, a list of each file's
SHA-256 sum
(https://mlinkproject.org/releases/prerelease/latest/SHA256SUMS).
Download it into the same folder as your file.
On Linux and the BSDs:
sha256sum -c --ignore-missing SHA256SUMS
which answers, for example, mLink-x86_64.AppImage: OK
(FreeBSD's own tool is sha256 -c, macOS's is
shasum -a 256 -c). On Windows, in PowerShell,
Get-FileHash mLink-windows-x64.zip prints the sum; it must match
the zip's line in SHA256SUMS (letter case does not matter).
That proves the file arrived whole. It cannot prove who made it, since the list comes from the same server. Updates are different: the station checks every update against the project's signing key, built into mLink, before it takes it (Section 5.2.6).
5.2.3 The AppImage
An AppImage is a whole program in one file that runs without installing anything. It runs on Linux distributions from about 2020 onward, on any 64-bit x86 processor from about 2009 onward. It is the one file that can replace itself in place when you press "Update now". It plays sound through ALSA (on a PipeWire computer, ALSA's PipeWire plugin carries it).
Keep it in a folder of your own, such as your home folder: when you update it replaces this file where it stands, so the folder must be one you can write to.
chmod +x mLink-x86_64.AppImage
./mLink-x86_64.AppImage
That opens the client. To run only the daemon, put
--daemon-only first; everything after it goes to the
daemon:
./mLink-x86_64.AppImage --daemon-only --callsign W1AW --grid FN31pr --audio auto
./mLink-x86_64.AppImage --daemon-only --version prints which
version you have, for example
mlinkd <version> prerelease (linux-x86_64) master <hash>.
5.2.4 The archives: Linux, the BSDs and macOS
Every other file is an archive of one folder, mLink. In it
are the client mlink-client, the daemon mlinkd,
the web bridge mlinkd-ws-bridge, and the folders resources (the
client's files and this manual), rigs and web.
There is no installer. Unpack it into a folder of your own, such as your
home folder, and start the client from the mLink folder:
tar -xJf mLink-linux-x86_64.tar.xz
mLink/mlink-client
On OpenBSD the archive is a .tar.gz (tar -xzf),
since OpenBSD's tar cannot read the other kind. To run only the
daemon, run mLink/mlinkd with its options, or
mLink/mlink-client --daemon-only followed by them.
The Linux archive for 64-bit PCs runs on Linux distributions from about 2020 onward and plays sound through ALSA (on a PipeWire computer, ALSA's PipeWire plugin carries it). The 64-bit ARM archive runs on Raspberry Pi OS 12 (bookworm) and later, on the processor of the Raspberry Pi 3 and every newer one. The desktop client needs the computer's X11 and OpenGL libraries, which every desktop installation has; on a BSD install the X window system first.
On a Mac, the zip opens to the same
mLink folder. The programs are not signed with an Apple
developer certificate, so macOS refuses to open a downloaded copy at first:
in the Terminal, xattr -dr com.apple.quarantine mLink in the
folder that holds it lifts that, after which mLink/mlink-client
starts it.
5.2.5 The Windows zip
Unzip mLink-windows-x64.zip into a folder of your own,
such as Documents, rather than Program Files: an update replaces the programs
in that folder. The zip holds one folder,
mLink, with the client mlink-client.exe, the
daemon mlinkd.exe, the web bridge
mlinkd-ws-bridge.exe, and the client's resources, the rig
files and the web client beside them. There is no installer.
Double-click mlink-client.exe to start. The programs are not
signed with a Windows publisher certificate, so Windows may say it protected
your PC from an unknown app; choose "More info", then "Run anyway". To run
only the daemon, open a Command Prompt in the mLink folder:
mlink-client.exe --daemon-only --callsign W1AW --grid FN31pr --audio auto
5.2.6 Updates
A pre-release never updates by itself: it tells you, and you press a button. When the daemon starts, and every six hours after, it fetches the project's record of the current release, from its mailserver if the station uses one and otherwise from mlinkproject.org. That small fetch cannot be turned off, because the notice and the 14-day rule below depend on it. The record is signed by the project; the daemon checks the signature against the key built into mLink and refuses a record that does not match. When the record names a release other than the one running, the row above the taskbar and a notice in "About this build" say so, with the date the station stops transmitting, and offer "Update now". Nothing is downloaded until you press it.
"Update now" does the whole job in one press: the daemon downloads that
release's file for this computer, checks its size and SHA-256 sum against the
record, and installs it; the new version runs from the next start of mLink. No
copy of the old version is kept. "This computer's file" means the same kind of
file the station came in: an AppImage fetches the AppImage, a Linux archive the
Linux archive, even though the two hold the same daemon. A copy that cannot
install itself (the archives, except on a Raspberry Pi installed with
mlink-pi.sh, and the Android app) downloads nothing: the button
opens the download page instead. How the new files are put in place:
- The AppImage: the new file replaces the AppImage at the same path, in one step.
- The Windows zip: once the daemon has exited, a small
helper replaces the programs in the
mLinkfolder with those of the new release, and puts the old ones back if copying fails. - A Raspberry Pi installed with
mlink-pi.sh: the station runs without the rights to replace its own programs, so it only asks. A helper that runs as root then fetches the record itself, checks its signature and refuses a record older than the build it would replace, downloads the archive and checks its size and SHA-256 sum, and installs it the way running the installer again by hand does, with no questions: the parts the Pi already has are updated, and the hotspot passphrase is kept. The station then restarts on the new release, usually within a few minutes. If the new release does not start, the helper puts the programs it replaced back and starts them again. If the helper stops, the station says why; its log is in/var/lib/mlink-update/. A Pi installed from a release without this helper is updated by hand once, and then by the button. - The archives for Linux, the BSDs and macOS: the button
opens the download page. Download the file for this computer, stop mLink,
unpack it over the
mLinkfolder, then start mLink again. The same goes for any copy of the programs that did not come from a download.
When an update fails. If the station cannot finish the
update you started (the record does not verify, the download does not arrive
or does not match the record, it cannot be saved, the installed copy cannot
be replaced, or the new version has still not started after two starts), the
row above the taskbar (Section 7.3.5)
and "About this build" say what failed and "Download the new version from
https://mlinkproject.org/download/" with the name of this computer's file.
Download it and put it in place by hand: unpack an archive over the
mLink folder, or put the new AppImage where the old one was.
A station that has not reached the project for a day says
"Go online, or download". The station also sends one report of
each failure to mlinkproject.org with its telemetry: it waits until the
pre-release notice is accepted, and with telemetry off nothing is sent. The warning goes when the new version starts; until
then the 14-day rule below keeps counting, and "About this build" gives the date.
5.2.7 The Android app
The Android file is installed by hand: download it to the phone, open it, and allow installs from the program that opened it (the browser or the file manager) when Android asks. It holds the station and the client together, and it is signed with the project's key, so a newer file installs over the old one and keeps your settings. It never updates itself: when the station finds a newer release, or the build nears its end date, it shows a notice that opens the download page. The 14-day rule above applies to it like any other copy.
On first start Android asks for notifications and the microphone, and offers to exempt mLink from battery saving, so the station keeps running with the screen off. While it runs there is one notification, "mLink station running". Its "Stop mLink" button, visible without pulling the notification open, ends a transmission in progress, stops the station and closes the app; swiping the notification away does not stop the station, and it comes back. Location is asked for only when you turn on "Use this phone's GPS" in Settings (Section 30.1.2). A radio on a USB cable is found when it is plugged in: Android asks whether mLink may use it. When you tap a text field, the phone's own keyboard comes up with an entry box of mLink's above it, labeled with the field's name; Done, Back or the keyboard's Enter key keeps what you typed and Cancel leaves the field as it was.
5.2.8 Installing on a Raspberry Pi
The release for a Raspberry Pi is the 64-bit ARM archive
(Section 5.2.4), and it carries an installer for
Raspberry Pi OS 64-bit (Debian 12 "bookworm" or newer). Unpack the archive on the Pi and, in the
unpacked folder, run sudo ./mlink-pi.sh --pi-install. Before it changes anything the
installer prints its whole plan: every file it writes, every package it installs, every service it
switches on or off. Then it asks. --dry-run prints the plan and stops.
The station runs as a real station: the daemon with the system's sound device (choose the radio's card as in Section 5.3.5), serial ports allowed for CAT and keying, and the browser client on port 8489. The installer asks three main things: whether to set up the WiFi hotspot and its setup page; whether to install the packages that put the desktop client on the Pi's own screen (large, and unnecessary on a Pi without a screen); and a last go-ahead.
After the reboot the page at http://10.42.0.1/ shows the Pi's addresses and what is
running, has a form to join another WiFi network (the Pi goes back to its own network if it cannot),
and links to the web client at http://10.42.0.1:8489/. That setup page has no password. By
default it answers only on the hotspot and on the Pi itself; the installer asks before it also answers on
the wired network. --yes answers every question for an unattended install, except the ones
that give something away: it keeps the station's data, keeps a saved WiFi network and does not open the
setup page on the wired network. The WiFi part is skipped with --no-wifi, the screen
packages with --no-display, and --hotspot-pass supplies the passphrase.
"Update now" in a client updates the Pi in one press (Section 5.2.6).
By hand, run the installer of the newer archive again: a file you edited is left as it is and the new one is written beside
it with the ending .mlink-new, and the station's data is kept. sudo ./mlink-pi.sh
--pi-uninstall removes only what the installer recorded, puts back what it replaced and switches the
WiFi part off for the next reboot. Packages it installed, the saved WiFi network and the station's data
(mail, settings, logs: the only copy) are each asked about separately and kept unless you say
otherwise.
5.3 First run
5.3.1 Starting the station
From the client. Start the client. With nothing running
yet, the "Connect to a station" window opens
(Section 7.2). Leave the host at
127.0.0.1, the port at 8488 and the password at
its default, mLink; type a name and press "Start local
daemon". The client starts the daemon and signs you in.
By hand. Run the daemon in a terminal, then point any client at it:
mlinkd --callsign W1AW --grid FN31pr --audio auto
It runs until you press Ctrl+C. What you give on the command line is saved, so
later runs need no options. mlinkd --help lists them all, and
Chapter 31 explains them.
Both ways start the same station: the daemon keeps one database in one per-user data folder, however it was started, and a second daemon on the same database refuses to run. Where that file is, and why to back it up, is in Chapter 31.
A newly started station does not transmit yet. Every launch begins inhibited (listen only) until you say the radio is ready, so connect the radio, set the audio and keying below, and only then switch the taskbar's Inhibit switch from the yellow "stop" hand ("Listen only") to the green thumbs up ("Transmit on") (Section 7.3.4).
While the station is inhibited, the client opens the "Set up the station" window each time it connects, in the middle of the screen and in front of the other windows. It lists the steps of this section in order, each with a tick when it is done, a question mark while the station has not answered yet, and a button that opens the page for it: "Callsign and grid", "Rig control and keying", "Lift the transmit inhibit" (its button works the Inhibit switch), "Test the keying (no audio)", "Sound device", "Transmit level, with Tune", "Radio self test" and, last, "Reports to the project (telemetry)", whose button opens the pre-release notice to "Accept" or "Turn telemetry off". While mLink waits for your answer on the radio settings it would change, the rig row says "Radio settings waiting for your review" and its button opens that list. The key test, Tune and the self test transmit, and an inhibited station refuses them, so they come after the inhibit; Settings' "Radio" page has the same order. "Later" (it reads "Done" once every step is done) or the window's close button puts it away; "Set up the station" at the top of Help, or a right-click on the Inhibit switch, brings it back. It is an ordinary window: "Emergency" stays one click away, and an Emergency window that is already open stays in front of it.
5.3.2 Where the station's log is
The daemon writes a log file, mlinkd.log, in the same folder as
its database, however it was started: by "Start local daemon" in the client
or by hand in a terminal.
| Computer | File |
|---|---|
| Windows | %APPDATA%\mlink\mlinkd.log, usually
C:\Users\you\AppData\Roaming\mlink\mlinkd.log |
| Linux: the archives, the AppImage and the Raspberry Pi archive | ~/.local/share/mlink/mlinkd.log |
| macOS | ~/Library/Application Support/mlink/mlinkd.log |
| Raspberry Pi test image | /var/lib/mlink/mlinkd.log; the
daemon also writes to the system journal
(journalctl -u mlinkd) |
"About this build" shows the path on your own station. The desktop client
writes no log file of its own. When you report a problem, send
mlinkd.log and say when it happened; the file, how it is kept
down to a limited size, and the options that move it or turn it off are in
Section 31.10.1. A short summary of it in
plain words is one command away (Section 5.3.3).
5.3.3 Reading the log in plain words
A day of the daemon's log is thousands of lines. mlink-logsum
reads it for you and writes a short summary: the biggest problem first, in a
sentence, then what it found about the radio, the sound device, the receiver,
the messages and the internet. It changes nothing, sends nothing anywhere and needs no
network; it is a small program that ships beside the daemon in every package.
| Computer | How |
|---|---|
| Windows | Open the mLink folder, click its address bar,
type cmd and press Enter, then type mlink-logsum |
| Linux archive, the BSDs, macOS | In a terminal, in the mLink
folder: ./mlink-logsum |
| Linux AppImage | ./mLink-x86_64.AppImage --logsum |
| Raspberry Pi test image | /opt/mlink/bin/mlink-logsum /var/lib/mlink/mlinkd.log |
With no file named it reads the log from the place in the table above, and
the older mlinkd.log.1 beside it first, so a summary spans the
point where the file was started afresh. To read another copy, put its name
after the command: mlink-logsum C:\Users\you\Desktop\mlinkd.log,
or the name of the folder that holds it.
The summary opens with a verdict. When a problem is found, the first lines say what went wrong and in what order, for example that the radio's serial port stopped answering while the radio was keyed, that the port was lost a second later and that the sound device followed. When nothing is wrong it says so. Below that come:
- the runs in the file: when each started, how long it ran, which rig file, serial port and speed it used, and whether it ended with a normal shutdown (and why it stopped) or just stopped;
- the set-up the log shows: the rig file, the serial port and its speed, how the radio is keyed, the sound devices;
- keying: how often the radio was keyed, how often that failed, and the longest time it stayed keyed;
- the serial port's errors, each kind counted with the first and last time, and a list of what mLink sent to your radio, so you can see everything it did to it;
- the sound device: when it was lost or reopened, and the daemon's own conclusions about the audio;
- the receiver: how many signals looked like the start of a transmission, how many of those decoded nothing (false starts, a rate per minute for each channel), and whether a channel was swamped by noise;
- the protocol: how many messages were sent and acknowledged, each ask for a turn to send a long message and whether the station started in time when the other said go, why messages waited to be sent and for how long, the cancels, and how well each station was heard, both ways;
- mail, relay and the internet, the update check, and, while mLink is a pre-release, the date this build stops transmitting;
- a timeline of the notable events, with repeats folded into one line, and the line numbers in the log where the first problems begin.
If the log was recorded with Settings, "Debugging", "Record radio control traffic in the log" on, the summary adds one line, for example "radio control traffic recorded: 412 exchanges, 3 invalid, 1 timeouts, 0 bytes unsolicited; see --cat", and says in words when input that looks like terminal text came from the radio unasked.
--cat adds the radio control timeline: one line for each question
the station asked the radio (what it sent, what came back, and the verdict:
valid, INVALID, timeout or echo, with the time the exchange took), the input the
radio sent unasked marked >>> DROPPED with its bytes
(and a sentence saying so when it looks like a menu screen), the serial port's
lines, the key and unkey commands and the ten-second health verdicts, all in
time order. --json carries the same lines. Two further options narrow it down. --since 600 looks only at the last
600 seconds of the newest run, and --since run 2 only at run 2 and
after it. --events prints every event name in the log with how
many times it occurred, and --json writes the same facts in a form
another program can read.
Name two logs, one from each station of a contact, and the summary reads
them together: mlink-logsum home.log portable.log. Two computers'
clocks rarely agree to the second, and one with no internet can be further out,
so it lines them up from the air instead. When one station transmits, the other
decodes the first frame a fixed time later; measured both ways, over many
transmissions, that gives the difference between the clocks and the time a
frame takes to cross, with how far apart single transmissions were. It then
prints each station's verdict, one timeline of what each station sent and
whether the other decoded it and how strongly, the steps of each exchange and
why a message waited, and a table of the link each way over the run.
5.3.4 Callsign and grid
Until the station has a real callsign it will not transmit, and the
row above the taskbar says "No callsign" and "cannot transmit" (the station's
code is callsign_missing)
(Section 16.2.2 has the rule and its
one exception). Open Settings; it opens on its first page, "Station":
- "Callsign": type it. Up to nine
characters, including a suffix such as
VE3XYZ/PorKX0AAA-7; the whole callsign goes on the air. - "Grid square": your
Maidenhead grid square,
such as
FN31orFN31pr. It puts you on other stations' maps. Every transmission carries it to six characters, which places you within about 5 by 7 km. To give away less, type only four characters, or keep six for your own maps and have the daemon send four with the commandset_presence_grid_chars(the client has no control for it yet). Until you type one, the station has the placeholderAA00aa, which puts it at the South Pole. If you do not know your grid square, open the World Map and hold the cursor over where you are: the grid square there is shown beside the cursor. Right-click there and choose "Set my position here" to make that point this station's position and grid square. - "Position and GPS": optional. Type a precise position into "Latitude", "Longitude" and "Altitude (m)", or tick "Use gpsd" if a GPS receiver is feeding gpsd on this computer (on an Android phone, "Use this phone's GPS" instead; Android asks for location when it is first ticked) (Section 30.1.2).
Then press "Apply" in the bar at the bottom of the page: it sends every field you changed on the page, and "Discard" puts the station's values back. Until then a changed field says "Changed, not applied yet" and the list on the left marks its page with a star; leaving the page or closing Settings first asks whether to apply, discard or stay.
5.3.5 Sound device
Open Settings, "Radio", "Sound devices". First choose the sound system, the
audio backend:
on Linux alsa (the released programs offer no other; on a
PipeWire computer, ALSA's PipeWire plugin carries it); on Windows
wasapi; on macOS coreaudio; on FreeBSD and
NetBSD oss; on OpenBSD sndio. (null
means no sound hardware, for testing.) Then pick the devices: "Capture (RX)" carries the
radio's receive audio, "Playback (TX)" feeds the radio. "(System default)"
uses the system's choice. The lists show the hardware a radio plugs into,
one row for each device of each sound card. The computer's HDMI,
DisplayPort and S/PDIF outputs, loopback and monitor devices, and the sound
system's own aliases and plug-ins wait under "Show all interfaces", and the
line at the bottom says how many are hidden. The device in use and the one
you picked are always listed. Press "Apply".
Until you have pressed "Apply" here once, the station listens to the computer's default input, which may be a microphone and not the radio. It says so on the "Audio and radio" tab of "Diagnostics" (Section 7.8.20), and until then it draws no conclusions about the radio from what it hears.
The switch happens live and is saved. The daemon will not change devices in the middle of a transmission, and if the new device will not open it goes back to the one it had. An interface plugged in after the daemon started is listed within a few seconds while the page is open.
5.3.6 Which channel of a stereo radio
Some radios send their receive audio over a stereo USB sound device, one receiver on each side. The Yaesu FTX-1 puts its main receiver on the left channel and, with dual receive on, its sub receiver on the right. A program that asks the sound system for a single channel gets the two added together, so the sub receiver's audio (a repeater's voice, say) lands on top of mLink's signals and the data on the main receiver stops decoding. A rig file can say which channel carries the radio's receive audio (the FTX-1 files say the left). mLink then opens the sound card in stereo and listens to that channel alone, at full level.
Below "Capture (RX)" the row "Receive channel" shows what the radio's file says and lets you override it:
"Follow the radio's file" (with the file's choice in brackets), "Left", "Right", or "Both, mixed", which is
what a program gets when nothing is stated. It takes effect at once: the audio is opened again, never
while the station transmits. Your choice is kept, and it always wins over the file. The row is there for
every sound system except null. On Linux, on Android and in the Windows, macOS and BSD builds
the choice reaches the sound card; the Windows, macOS and BSD paths have not yet been tried against real
sound cards. Where the system will not give a stereo capture, mLink keeps the single channel it got and the
row says so.
5.3.7 Audio levels
Open Settings, "Radio", "Levels and Tune", or click the two small level bars on the taskbar (Section 7.3.3). The page names the devices it is setting and has two halves, "Receive" and "Transmit", each with a slider and a meter. Drag a slider, or step it with the small "-" and "+" buttons at its ends or, after clicking it, the arrow keys. The meters read in dBFS: 0 dBFS is the largest sample the sound card can carry. "average" reads a steady full-scale tone as 0 dBFS; "peak" is the largest sample. Each sound card keeps its own levels, saved with it, so moving between interfaces brings each one's settings back. "TX level" is also kept for each radio on each sound card, because the right level depends on the radio's own drive control: choose a radio again and its level comes back. The line under the slider says whether the level is kept for the radio chosen and whether it was set during Tune. A radio with no level of its own yet starts at the sound card's last level. Anyone signed in can watch the meters; in an organization only a technician or an administrator can move the sliders or start a tune, and anyone signed in can stop one (Chapter 9).
Receive. Set the radio's audio output and the sound card's input in the computer's mixer so the band noise on a quiet frequency reads somewhere around −30 to −20 dBFS average, and the "CLIP" lamp beside the meter never lights. "CLIP" lights for two seconds whenever the sound card's input reached full scale: the card itself is overloaded, and the cure is less audio from the radio or the mixer. The line under the meter says whether the level is right as you turn the knob: "Too quiet", "Good" or "Too loud", with which way to turn, or "Clipping" for three seconds after the input reached full scale. It judges the quieter part of the last three seconds, the band noise between signals (on FM, the hiss with the squelch at 0 and no signal), at the sound card's own level before "RX gain"; mLink never changes a level by itself. The "RX gain" slider (−20 to +20 dB) scales what the station hears after the sound card, so it cannot undo an overloaded input; the receiver measures its own noise floor, so the slider moves the meter and the waterfall, not what decodes. The "Waterfall" is a second check: band noise should show as a steady speckle, black means too little audio and bright all over means too much. While the station transmits the receive meter holds its last reading.
Transmit. "TX level" runs from −60 to 0 dB; 0 dB is mLink's full level and the setting applies from the next transmission. mLink scales every frame it sends so that its largest sample is exactly the largest the sound card can carry, whatever the sound system's mixer. (An Android phone is the exception, below.) "TX level" can only turn that down, so at 0 dB nothing is clipped, and "OVER" lights for two seconds only if samples ever reach the sound card beyond full scale. While the station transmits, the meter shows the transmission's average and peak; afterwards the line under it gives the last transmission's level.
On an Android phone mLink plays its transmission as media, so the phone's media volume scales the audio that reaches a USB sound card, and the side volume keys change it. A phone turned down sends the radio less than "TX level" says; the signs are a radio self test that reads "too low" and a Tune that barely moves the radio's ALC. The page then shows the volume and says so, for example "The phone's media volume is at 40%; mLink's transmit level assumes full volume." The radio self test and its result say the same. The button "Set phone volume to full" sets it for you when you press it; mLink never changes the volume on its own. Ticking "Keep the phone's media volume at full while the station runs" (off until you tick it) sets it back to full whenever it finds it lower. A phone with a fixed volume, or one that is refusing changes (Do Not Disturb, a work policy), cannot be changed by mLink, and the page says so; use the volume keys.
Other sound on an Android phone. The first time the app starts it shows a welcome page that says, in short, that every phone and every Android version is a little different, that other things on the phone can get in the way of the station beyond mLink's control, that the station is most reliable on a device of its own, and that the phone can still be used as normal while it stays connected, with some problems to expect and to report. Help reopens it. To Android the radio's sound device is one more sound device, so a phone call, a ringtone or another app's music may be sent to it. That puts the sound on the radio's input and, while the station transmits, on the air. A call can also take the radio's received audio away, and mLink then hears silence. Android does not let an app prevent this, and mLink never holds a transmission back for it, an emergency one least of all. It tells you when it sees it, in words, on this page and in the audio notices, and the notice says whether the radio was transmitting. What mLink does keep fixed is the sound device you chose: it is used by name and never swapped for the phone's speaker or a Bluetooth earbud, and if Android moves the audio away from it mLink stops using it, ends a transmission in progress and waits for the chosen device to come back. Choose the radio's own sound device, not "default". The same page also names phone settings that act on the audio (an off-center balance, Do Not Disturb on total silence, battery saver, spatial audio). If you need to take calls on the phone, give the station a phone of its own.
The frames of different kinds then differ in average power at the same peak: the steady emergency tones the most, bulk the least, with announce between (Section 10.8.1 says why, and how mLink shaves the peaks of announce and bulk frames). The average power this gives from a 100 W radio is in Table A.14; all of it is from simulation and has not yet been measured on the air.
Tune. Under the transmit meter is a "Tune" button.
Press it and the station first sends its identification, the same PRESENCE
frame that opens every transmission, so a tune is never an unidentified
carrier. Then it sends one steady tone at 2200 Hz, the middle of the bulk
region, at exactly the peak every mLink frame is driven to, for 20 seconds,
and stops by itself. The button reads "Stop tune" while a tune is waiting or on
the air: press it again to end the tune at once. The line beside the button
counts down the seconds left, and afterwards says how the last tune ended.
(The daemon's tune command takes a length of up to
30 seconds; the button always asks for 20.) The tune is a transmission
like any other: "TX level" applies to it (and, unlike every other
transmission, the tone follows the slider while it plays; see below), it waits for a clear channel, it
never goes ahead of an answer this station owes another station, and an
emergency declared while it is on the air ends it at once.
"Tune" is refused, and the line beside the button says why, while an emergency is open (this station's own, or one it heard that nobody has acknowledged or called all clear), while the station is inhibited (Section 7.3.4) or set to listen only, while this build is out of date and only listens (Section 7.8.18), and while the station is in a net that is running. A station is in a net that is running when it is that net's net control, or a member with a number and the net is alive: a roll call is going on, or it has heard the net's heartbeat within the three and a half cycles after which members count net control gone (Section 24.9.1). Ten seconds of steady carrier would cover the check-ins and the heartbeats the other members are listening for.
Pressed while the station is sending messages, "Tune" does not start. It asks instead, under the title "Messages are going out", how many are waiting and whether one is on the air, and offers two buttons. "Don't tune now" changes nothing: mLink finishes sending, and you press "Tune" again later. "Hold my outgoing messages and tune" stops any new message from starting, lets the one on the air finish (with any answer it is owed), and then tunes. When the tone starts, the station goes into Transmit Inhibit and stays there after the tune, so you can tune again as often as you like; the line beside the button says the messages are held. Turn Inhibit off when you are done and the held messages go out. Inhibit also holds your own distress call and its repeats, and mLink asks before lifting it (Section 7.3.4).
Then set the radio. Press "Tune" and raise the radio's data or USB audio input, or the computer's playback level, until the radio gives the power you want with its ALC (automatic level control) just not acting, with the radio's speech processor or compressor off (mLink already limits its own peaks, and a second limiter adds distortion). On a single-sideband radio the steady tone puts out a constant power equal to the peak of every mLink transmission, so a drive set on the tone is right for every kind of frame; a real transmission then reads lower on the power meter, by the amount its average sits below its peak. ALC squeezes the peaks, and a squeezed mLink signal spills outside its own region of the passband (Section 10.8). Use "TX level" to come down from there rather than the radio's power knob, which on many radios works through the same ALC. A test message (Section 5.4) is the check afterwards.
You do not have to stop the tune to change "TX level". Move the slider while the tone is playing and the tone follows within a fraction of a second, gliding to the new level over about 20 milliseconds so that nothing clicks or spills onto the neighboring frequencies. Only the tone does this; the identification that opens the tune, and every message mLink sends, keeps the level it had when the radio was keyed, so a level never changes inside a frame. If the rig file for your radio says where to read its ALC and power-output meters, and does not ask mLink to stay silent toward the radio while it transmits, the line under the Tune line shows the radio's own readings while the tone is on the air, for example "Radio ALC 12 %, power 48 %", about three times a second; lower "TX level" until the ALC reads near zero. These are readings only: mLink asks the radio, it never sets anything. For a radio whose rig file asks for no conversation while it transmits, the page says so and shows no figures; watch the radio's own meters.
5.3.8 The sound card's own levels
"RX gain" and "TX level" are mLink's own levels, applied to the audio inside the program. A USB sound card also has levels of its own, set in the computer's mixer: how loud it plays to the radio and how sensitive its input is. A small interface such as a Digirig has no knob for either. Settings, "Radio", "Sound card levels" shows them for the devices mLink has open, as sliders in the card's own steps with the decibel figure beside them where the system gives one, and an on/off box for the mute or capture switch. A card with an automatic gain control shows it as a box of its own.
A change on this page goes to the card at once, and mLink keeps no note of it: the value lasts as long as the card keeps it, which is until the card is unplugged or reset (a USB card comes back with its own levels when it is plugged in again). The one level mLink sets by itself is the one an interface file asks for (below), and it says so each time. The output level will not move while a transmission is on the air, because it would step inside a frame, so a change waits for the end of the transmission; during a Tune it can be moved. In an organization only a technician or an administrator can move these ().
Where the system gives mLink no way to reach the card, the page says so and says where to set the level instead. This is the case when the device is the system's default (a sound server stands between mLink and the card: choose the card itself under "Sound devices" to set it here), for an Android phone's own speaker and microphone (only the phone's media volume is reachable, above), and on OpenBSD (the sound server owns the levels; the page gives the command). On OpenBSD, and on a phone that uses its own speaker and microphone, no card can be reached at all, so the page is one sentence that says where to set the levels instead. On Linux the card's mixer is read and set directly, on an Android phone a USB sound card's own levels (below), on Windows the volume and mute that the Sound settings page shows, on macOS the device's volume and mute, on FreeBSD and NetBSD the card's mixer. The Windows, macOS and BSD paths have not yet been tried against real sound cards.
A radio interface that is used with many radios, such as the Digirig, is described once, in an
interface file, not in each radio's file. The
file names the interface's sound chip by its USB numbers (the Digirig's hub and serial chip say nothing
about it) and the level the chip needs. The Digirig's chip comes up at step 20 of 35 after every
plug-in, and from about step 11 it sends only digital zeros; its file asks for step 8. When that card
opens, mLink sets the step and says so in one line, for example "USB Audio Device levels set from the
Digirig Mobile interface file: Mic 8". It does this each time it opens the card: when the station starts, when
the card is plugged in again, and when you choose it under "Sound devices" (on an Android phone, once per
plug-in), so a value you set on the page for that control lasts until then. To have your own values every
time, press "Save as my default" on the page: mLink writes the levels the page shows, as
sound_level= lines, into your own copy of the card's interface file in the
rigs/interfaces folder of the station's data folder (~/.local/share/mlink/rigs/interfaces/
on Linux, the app's own folder on a phone; the data folder is described under ), and the page says what it wrote and where. mLink reads that folder
before the files it came with, so your copy replaces the shipped one, and from then on your levels are the ones
set each time the card opens. With no copy yet, the copy starts as the shipped file; a card no interface file
names gets a new file that names it by its USB numbers. "Use the shipped levels" takes your levels out again:
a copy that holds nothing else is removed, and one you also changed by hand keeps your changes and gets the
shipped levels back. Only a login that may change the levels sees the two buttons. You can also edit the copy
yourself. A control no interface file names is never set by mLink. A radio whose own file says it is normally used through that interface also tells mLink which
sound card to expect: when you have not picked the sound devices yourself, mLink picks that card as the
radio's audio the moment it is plugged in, if exactly one such card is there.
On an Android phone the app has no mixer, and the system's own audio driver owns a USB sound card, so the app reaches the card's levels by taking the card away from the system, reading or setting them, and giving it back. The audio stops while the card is away and comes back by itself once the phone lists the card again: mLink opens it as soon as it is given back, and tries again every half second for about ten seconds if the phone is slower. While no sound device is open the station does not key the radio: your messages wait, and go once the card is back and the station has listened for a moment. "Sound card levels" shows the card's controls with their steps and dB; on the Digirig's chip they have the names and step numbers Linux gives them, and one step of "Mic" is 1 dB. The card is read when the page is first opened after it is plugged in by a login that may change the levels; any other login sees what was read last, or that nothing has been read yet. After that the page shows what was read, and each change you make costs one such pause, so a slider sends its value once it has stopped moving for a moment. Nothing is changed while the station is transmitting or tuning. Once per plug-in, mLink sets the level an interface file asks for, only on a card that has one; any other card is not touched, and no USB permission is asked for it. Android asks permission to use the USB sound device after each plug-in: allow it. For the Digirig's chip it also offers to open mLink whenever the device is plugged in; choose that if you want the question not to return.
5.3.9 The speaker for alert sounds
The client beeps for an emergency, a drill, and chat or mail from friends who asked for it. Those sounds must go to a speaker or headphones, never to the radio. A station's computer usually has two sound devices, its own speaker and the radio interface, and a beep sent to the interface goes into the radio's audio input: with VOX keying it puts the transmitter on the air with a signal that carries no callsign. So the client never picks a device by itself. Until you choose one it plays nothing, says once why, and an emergency still shows on every screen.
Open Settings, "Alerts", select your speaker in "Speaker for alerts" and press "Use this speaker"; then press "Test emergency" to hear it (Section 7.8.4). The daemon tells the client which device it transmits on, and the client refuses that device, any other output of the same sound card, and, when the radio uses the computer's default output, the default output too. It says why in one sentence. "[suggested]" marks the computer's default output only when none of that applies. If the station's transmit device later moves onto the speaker you chose, the client goes silent and says so. When the daemon runs on another computer, any speaker on this one is safe.
In the web client the browser plays the sounds on the computer you are using, after one click to allow them.
5.3.10 Keying the transmitter
Open Settings, "Radio", "Rig control". Its first line shows the current
state, for example Rig: FTX-1, by CAT; keyed by CAT, and, when mLink
talks to the radio, a second line with the dial frequency, the mode and the
speed it found. Under them the page asks three things in order, and "Refresh
lists" at the top looks again after you plug something in:
- "1. Select your radio". Type part of the model into
"Search:", such as
7300orFT-991, and pick it from "Radio:". Every word you type must appear in the radio's name or its file name. The list starts with two choices that need no rig file: "No rig control (VOX or manual keying)" and "Keying line only, no CAT (RTS / DTR)". After them come the radios mLink has files for, each marked "sets the data mode" or "set the mode on the radio" (what that means is below), with "(yours)" after a file of your own. A radio with no computer-control port (CAT) is marked "no CAT, keyed by a line": mLink keys it with a line of the serial port you pick next, and sends nothing on that port. A radio mLink cannot use is marked "not supported", and you can choose it anyway: the page says in plain words why it will not work, what would make it work when that is known, and changes nothing on your station. Under the list the page also says how far that radio's file has been tested (on the bench, in the field, ported from Hamlib, or a community rig file others have run), and "Set-up for this radio" lists what to set on the radio itself, each item with where to find it, why, and how sure the file is. A line under the list counts the files and says whether this one sets the radio's mode. - "2. Select your serial port". "CAT port:" lists the
serial ports plugged into this computer by what they are, for example
CP2105 Dual USB to UART Bridge Controller, Enhanced Com Port (ttyUSB0), with the port's full name under it. A port you chose earlier that is not plugged in now stays in the list, marked "(not found now)". For "Keying line only" the box is called "Port:". - "3. Keying (PTT)". "Keying:" offers what this radio and port can do: "CAT command (from the rig file)", the default when the radio's file can key the radio; "RTS line on the CAT port" or "DTR line on the CAT port"; or "RTS line on another port" or "DTR line on another port", which adds a "Keying port:" list. The last two are for a separate keying interface, or for a radio with two USB serial ports, such as the FT-991A, whose second port's RTS line can key it. Under "Keying:" a row "Serial lines:" has two boxes, DTR and RTS, each "Auto", "Low" or "High": Auto does what the radio's file says, and the other two override it for a radio nobody has tested (it never changes the line that keys the radio; Section 6.8 says what the lines do).
"Apply" swaps the station's rig control at once and saves the choice for the next start; the speed of the CAT port is found by itself. If something is missing, a notice says what, for example "Select your serial port". Until you press "Apply" the page keeps what you picked, and "Discard" puts back what the station has.
Then "Test the keying", under the rig form, keys the radio for one second with no audio, on your press, so you can see mLink switch it to transmit before any sound is set up; while it is keyed the page says whether the radio reports transmitting. It writes no setting and is refused, as "Tune" is, while the station is inhibited.
"[+] Manual configuration", folded away under the page, sets every part
by hand: "Backend:" ("None (VOX or by hand)", "Keying line", "CAT by
a rig file", or "Test rig (no radio)"), "Device:", "Rig
file:" (a file name, which the station looks up in its rig folders, or a
full path), "Baud:" (0 finds it), "PTT line:" ("None (VOX /
CAT)", "RTS" or "DTR", with "Invert" for an interface that keys on the
opposite level) and "PTT port:" (empty when the line is on "Device:"),
then "Apply".
When a keying line is set, the station keys with the line and never with
the CAT command; with no line it keys by the radio file's CAT command if
the file has one, and otherwise not at all, which is VOX: on HF that station
sends only a distress call (Section 5.3.12), and
the page says so in red under its first line. The first line of
the page names the result: line,
cat-writeonly (the radio does not answer the transmit
command), cat-validated (it answers) or vox. The second line warns of "CAT
SILENT" (the radio stopped answering), "DEVICE LOST" (the serial port
vanished) or "PTT STUCK" (the radio reports it is still transmitting when it
should not be). A radio that reads as transmitting while mLink has not keyed it
(you at the radio, or another program on the same port) is reported once, as
"The radio reads transmit; mLink did not key it", and mLink sends it nothing;
only a transmission mLink itself started and could not end is unkeyed by
mLink.
The description files use the format written for OmniRig, the
rig-control library by VE3NEA, so mLink needs no code of its own for each
radio. The source tree carries eighty in its rigs folder,
for Baofeng, Elecraft, FlexRadio, Icom, Kenwood, Lab599, QRP Labs, (tr)uSDX,
Xiegu and Yaesu radios: nineteen from the OmniRig library, and the rest
written for mLink from the makers' own CAT references and the command formats
in the source of Hamlib, another rig-control library; where the two differ,
the maker's reference wins, and a few were written from a radio on the bench. A list in that folder names every radio and
what was checked for it. Where a radio has a separate data mode (DATA-U on a
Yaesu, USB-D on an Icom) there are two files: the one whose name ends in
-DATA, listed with "(DATA)" after the radio's name, puts the
radio in that data mode, and the plain one leaves the mode to you. On many
radios the data mode is the narrower path, and which one to choose is in
Section 6.2. Every package (the AppImage,
the Windows zip, the Pi image and make install) carries the
rigs folder beside the daemon, with a CREDITS file
naming where they come from (the OmniRig library, and Hamlib's sources, from
which no code was copied), and the daemon also reads a rigs
folder in the station's data folder, where your own files go.
Each time it connects, mLink reads the radio's mode and, when the radio
is in another, proposes its data mode on the upper sideband, but only when
the radio's file says that its data-mode command selects the mode for
sound-card digital work. The mode is one line of the radio's settings, and
mLink changes it only when you say so
(Section 6.5); until then, or if you
chose "Never for this radio", the radio stays in the mode you set. The file says so in
the comment line ;mlink: DIG_U=audio-data, which OmniRig
ignores; the list marks such a file "sets the data mode". Every
-DATA file in the folder carries it, and so do
the files for the radios that have only one file and were checked, which
the list in the folder names. A file without the line leaves the mode
alone, and the station's log says so and names the -DATA file
next to it if there is one: in a file from the OmniRig library the
data-mode command usually selects RTTY or FSK, which keys from a separate
line and not from the sound card, so the station could not transmit. Where
the file can read the mode back, mLink reads it once soon after
connecting, before the first transmission; a transmission never waits for
that read. Add the line to a file of your own only if its data-mode command
selects the radio's sound-card data mode on the upper sideband.
Under the rig form, "Radio settings" lists what mLink would change on the radio, the setup it needs for CAT first, with the radio's value now in the radio's own words, and writes nothing until you choose "Apply now and at every connect", "Apply once" or "Never"; then what you set by hand, with where to find each one on the radio, and the button that puts your values back (Section 6.5).
| Interface | "Radio:" | "Keying:" |
|---|---|---|
| Digirig type (serial PTT) | Keying line only, or the radio's file for frequency control too | RTS line (on the CAT port) |
| Radio with built-in USB audio and CAT | The radio's file | CAT command, or the line the radio documents (often on its second port) |
| SignaLink type (VOX only) | No rig control | (none): on HF only a distress call goes out |
5.3.11 The radio self test
Under "Levels and Tune" is "Radio self test": the result of the last test, what it still needs (the keying, letting the station transmit, the sound device), and a button that opens the test: the "Radio self test" tab of Diagnostics (Start, Tools), where it runs (on an Android phone it also warns when the phone's media volume is below full). The test answers one question: does the radio transmit the whole audio band mLink uses? A radio set up for other data work often passes only part of it, and nothing on the receiving side can tell you so.
"Start the test" transmits, at the radio's lowest power, for about ten seconds; use a dummy load, or an antenna on a clear frequency. The station waits for a clear channel as "Tune" does, and refuses for the same reasons (an open emergency, transmit inhibit, a running net, no callsign, messages going out), and also while anything of its own is waiting to be sent. Set the radio to its lowest power first. Where the radio's file says how, mLink reads the power setting and does not transmit unless it reads the lowest; it changes nothing on the radio. Tick "mLink may lower the power for the test and put it back" and mLink turns the power to the lowest itself, reads it back, and puts the old setting back afterwards. Where the file does not say how, mLink cannot read the power: set it yourself. Then the station identifies and, in the same transmission, plays nine tones at the level "Tune" uses: 300, 500, 1000, 1500, 2000, 2250, 2500, 2800 and 3000 Hz, one second each, reading the radio's power meter (and its ALC meter) four times a tone. The tab shows each tone's reading as it arrives.
The verdict compares each tone with the 1000 Hz tone. A meter is a raw scale that differs from radio to radio, so the rule is a fraction, not decibels: a tone whose middle reading is less than half of the 1000 Hz tone's is too attenuated. When every tone from 300 to 2700 Hz passes, the tab says "This radio will support mLink" and gives the usable range it measured. Otherwise it names the frequencies that failed, for example "Frequencies of 2,000 Hz and above show too much attenuation: check the radio's transmit bandwidth and data mode settings, or this radio may not be suitable". The power meter is judged whenever it moves on the 1000 Hz tone, because it reads what actually goes out: on an FT-991A in its narrow data mode the power meter read 3 % at 2,250 Hz while the ALC meter still read about half its scale. Where the radio's file has no power meter, or it does not move, the ALC meter is judged, and when neither moves the test says it cannot judge.
The radio files say how to read the meters and set the power with
comment lines that start ;mlink: power_ and
;mlink: meter_; the list in the rigs folder names
the files that carry them (most of the Icom files, many of the Yaesu files and some of the Kenwood files). With
a file that cannot read the meter, or with "I will read the meter myself"
ticked, the test is manual: each tone plays for 1.5 seconds with a
1.5 second pause after it, about thirty seconds in all, while you
watch the radio's ALC or power meter; then type the reading you saw for
each tone (an empty box skips it) and press "Judge". The rule is the
same.
"Cancel" stops the tone at once and the radio is put back to its power. The test also gives way: if the station has something of its own to send, or an emergency is declared or heard, the power goes back before anything else is keyed and the test ends; test again when the channel is quiet. The station keeps the last result, shows it under "Radio self test", and includes it in its field reports.
5.3.12 VOX is not for HF
mLink does not key an HF radio by VOX. When the station runs on HF with a
sound card and its keying comes out as vox (no keying line and
no CAT command), it sends nothing routine. A message you send fails with
"VOX keying is not supported on HF: set up CAT control or a keying line in
Settings > Radio"; the same words stand on the "Rig control" page and in a
notice; the station's beacons and replies stay off the air; and "Tune" is
refused. Set up a keying line or a CAT command and the notice goes away.
The exception is an interface that keys the radio from the transmit audio and says so in its interface file, a SignaLink USB for one (Section D.11.5). With it mLink sends HF and treats its keying as the interface's own: it sends a tone before each transmission so the interface has keyed the radio before the first frame, and counts the interface's hang time after the last audio as time the radio is still keyed. The lead-in and the hang are numbers in the interface file, which you can edit; the shipped ones are a guess from the maker's manual and ham reports, and have not been tried on a radio. Set the interface's own delay knob to its minimum. A SignaLink is found by its sound card, or you can name it in the station setting for the keying interface.
A distress call is the exception, because nothing may stop one. It goes out as it can: a VOX-keyed radio loses the start of every transmission while its VOX opens, and the sweep at the start of every emergency frame lasts 0.96 seconds, longer than the 550 to 750 ms a VOX-keyed radio and the far squelch were measured to lose.
Why not support VOX on HF? Because what the radio loses at the start has to be paid for on every transmission, by putting a lead-in of most of a second in front of it, out of the time of a channel everybody shares; and the delay before a radio's VOX keys is long and different on every radio. A keying line or a CAT command keys the radio before the first sample.
The setting Settings, "Radio", "VOX keying (FM only)" and its "VOX leader (ms):" box apply only to the FM profile (Section 34.2.2), where a VOX-keyed station sends a plain tone, the VOX leader, ahead of each transmission.
5.3.13 Connecting to a mailserver
Mail for stations that are not on the air right now passes through a mailserver. In Settings, page "Mail", type the server's address next to "Server URL" and press "Apply". Then, in "Mail", select the "Mailbox (net)" folder (Section 7.5.3) and register, once: press "Register (internet)", or, with no internet here, type the callsign of a gateway you can hear next to "Gateway:" and press "Ask this gateway". What registering does is in Chapter 27; how mail then travels is in Chapter 26.
5.3.14 Operating from a browser
The daemon starts the web bridge by itself, and the bridge serves the web
client on port 8489. The AppImage needs nothing more; a source build must be told
where the web client's files are, with
--web-root client/bin/web. Open
http://127.0.0.1:8489 in a browser on the station computer. To
let other computers on your network in, start the daemon with
--web-lan; it prints the address to use. Chapter 32
explains the connection.
5.4 A first test
Before you depend on a station, prove each link of the chain in turn.
- Is audio arriving? Open "Waterfall". Band noise should scroll. "Waiting for spectrum frames..." means the daemon has no audio.
- Is the station happy? The tray should show a green light by your callsign, and the row above the taskbar should not say "cannot transmit". If it does, click it.
- Is anyone heard? Tune to your group's frequency and wait. Stations appear in "Stations", "Heard" as they are decoded, each with an SNR on the SNR@3k scale. A newly started station listens for a while before it announces itself (Section 20.2).
- Does the transmitter key? Send a short line in "Chat"
to
0CQCQCQ. Watch the radio key, send, and unkey. - Does a mail arrive? Select a heard station, press "Mail", write a short mail and send. In "Mail" it shows in "Waiting to send" as pending, then airing, and then in "Sent" as sent, and "Message acknowledged" appears in "Notifications". If the row shows anything else, Chapter 8 says what it means.
5.5 What to remember
- The station daemon runs on the computer next to the radio. The client can be on the same computer, on another one, or in a browser.
- The pre-release is one file per kind of computer, listed at
mlinkproject.org/download/, each holding everything: an archive of one
mLinkfolder, and for 64-bit Linux PCs also an AppImage. The AppImage, the Windows zip and a Raspberry Pi installed withmlink-pi.shinstall an update when you press "Update now"; the other archives are unpacked over the old folder by hand when the station says an update is ready. A pre-release that falls 14 days behind stops transmitting until it is updated. However the daemon is started, it is the same station. - The station stays off the air until it has a real callsign.
- Alert sounds play only on the speaker you choose in Settings, "Alerts", never on the radio's sound device; until you choose, the client is silent and says why.
- Key an HF radio by a control line or CAT. With nothing but VOX the station sends only a distress call.
- Test the chain in order: audio in, "cannot transmit" gone, stations heard, transmitter keys, message acknowledged.
Setting Up the Radio
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
A rig file is the text file that describes one radio to mLink; how to write one is in Appendix D. The project website keeps a list of every radio mLink has a rig file for, saying whether it carries mLink, how to set it up and how sure we are, at mlinkproject.org/supported-radios: of its 67 radios, 10 have been tested with mLink, 31 should work, 24 might work, and 2 cannot carry mLink.
6.1 What the radio must pass
mLink's signals take up 290 to 2,900 Hz of audio, and everything that carries information lies between 300 Hz, the bottom of the emergency region, and the top carrier of the bulk region at 2,833 Hz with its skirt (Chapter 10; Table A.1). The plan was placed there so that it fits inside what nearly every radio passes: above the low cuts radios ship with, and under the 2,900 Hz transmit edge of the most common radios.
Both directions count. The radio's transmit filter decides what reaches the air, and its receive filter decides what reaches mLink. Each end of the range costs something different when it is cut:
- A low cut above about 290 Hz eats into the emergency region, the slow, narrow signal that is decoded far below the noise. A transmit-bandwidth menu left at 300 to 2,700 Hz, a common factory setting, puts the radio's edge right at the bottom of it; set the low edge to 100 or 200 Hz where the radio offers it.
- A high cut below about 2,900 Hz weakens the top carriers of the bulk region, which carries mail and long messages.
6.1.1 What a high cut costs bulk
The bulk region's 28 carriers sit 46.875 Hz apart, the top four at 2,692, 2,739, 2,786 and 2,833 Hz. A transmit filter that only slopes down over them costs little: with every one of the top four turned down 6 dB, a frame needs at most 1 dB more signal at the far station. A filter that removes carriers outright costs more, and the faster the code rate, the more (Section 11.4).
Using a radio with a narrower passband? The penalty for each number of lost carriers, at each code rate, is in Table A.15.
A transmit filter that stops at 2,700 Hz, a common factory width, takes out the top two or three carriers: about 2 dB at the faster rates with two gone, and more with three; the robust rate 1/2 pays least. Radios whose transmit audio reaches 2,800 Hz or beyond, and then falls away only gently, cost half a decibel or less once their drive is set to full power.
6.2 Plain USB, not always the data mode
mLink is an upper-sideband signal fed into the radio's rear or USB audio input (Section 3.1.1). Most modern radios offer two ways to do that: a data mode (DATA-U, USB-D, PKT, USB-DATA and other names) and plain USB with the audio input switched from the microphone to the rear or USB connector. It is natural to assume the data mode is the one for data, and on some radios it is. On many it is the narrower path.
So the rule is: on a radio whose data mode can be set as wide as the radio's widest setting, use it; on a radio whose data mode cannot, use plain USB with the rear or USB input, and choose the radio's plain rig file in Settings, "Radio", "Rig control" (the one without "(DATA)" in its name). A plain file leaves the mode alone, so the radio stays in USB; a "(DATA)" file proposes the radio's data mode each time mLink connects, and mLink changes the mode only when you say so (Section 6.5). In plain USB, turn the speech processor (compressor) and the transmit tone or equalizer settings off; on an Icom the data mode turns them off by itself, and plain USB does not. On receive, turn noise reduction, the noise blanker and any notch off. The exception is pulse noise: where the "Audio and radio" tab of "Diagnostics" reports impulsive noise (a running engine, an electric fence), turn the blanker back on.
Key the radio by a keying line or a CAT command, and turn the radio's own VOX off: mLink does not key an HF radio by VOX, and a station with nothing else to key its radio sends only a distress call, unless an interface that keys the radio from the audio (a SignaLink) is in use (Section 5.3.12).
6.3 A worked example: the Yaesu FT-991A
The FT-991A is the one radio measured on the bench so far (22 October 2026): a steady tone at each of several audio frequencies, fed through the radio's USB sound card into a dummy load, with the radio's power meter read by CAT, and a tone sent into its receiver at each frequency for the receive side.
Its data mode cannot pass the plan. In DATA-USB the FT-991A transmits only through its receive filter. As it was found, nothing above about 1,975 Hz left the radio, so a tone in the bulk region gave no power at all. The widest filter the radio accepts in DATA-USB is 2,700 Hz; with that filter moved up 650 Hz by the OTHER SHIFT menu (065), 2,800 Hz came out 15 dB down and 3,000 Hz not at all. Its receive side in that mode stopped at about 2,000 Hz, and the shift does not move it.
Plain USB passes it. Set like this, the whole range went out, with 150 and 3,000 Hz a few decibels down, and the receiver was flat within 3 dB from 300 to 3,000 Hz:
| Setting | Value |
|---|---|
| Mode | USB |
| Menu 106, SSB MIC SELECT | REAR |
| Menu 108, SSB PTT SELECT | RTS |
| Menu 109, SSB PORT SELECT | USB |
| Menu 110, SSB TX BPF | 50-3000 (on the original FT-991 the same item is menu 112 and its widest choice is printed 100-3000) |
| Menus 102 and 104, SSB LCUT and SSB HCUT | OFF |
| Receive filter width | 3200 |
| DNR, NB, notch, contour, APF, speech processor | off |
In USB the drive level comes from MIC GAIN, not DT GAIN, and the receive audio level from menu 107, SSB OUT LEVEL, not the DATA OUT LEVEL menu. In mLink choose the plain "Yaesu FT-991/991A" rig file, which leaves the radio in USB; there is no "(DATA)" file for this radio, because its data mode cannot pass the plan. The plain file proposes menus 106, 109, 110, 102 and 104 and the receive processing, and sets them when you say so, keeping your own values to put back (Section 6.5); you set the mode, the filter width, menu 108, MIC GAIN and the speech processor.
6.4 What other radios reach
For the other radios mLink has rig files for, what follows comes from their makers' manuals, not from measurement. A menu edge such as "100 to 2,900 Hz" is a filter setting, not a measured flat response; on the FT-991A, 3,000 Hz came out a few decibels down with the menu set to 3,000.
- Icom. No Icom transmit-bandwidth setting goes above 2,900 Hz, on any model. The top bulk carrier, at 2,833 Hz, sits 67 Hz under that edge; how sharply an Icom cuts there has not been measured. On the IC-705, IC-7300, IC-7300MK2, IC-7610, IC-7760, IC-7850/7851 and IC-9700, use the data mode (USB-D, or USB-D1 on the larger radios) with its data modulation input set to USB, and set its own transmit bandwidth, SSB-D TBW, to 100 to 2,900 Hz: the factory setting, 300 to 2,700, puts its edge at the bottom of the emergency region and cuts the top of the bulk region. On the IC-7100, IC-7410, IC-7600 and IC-9100 the data mode is fixed at 300 to 2,700 Hz: use plain USB with DATA OFF MOD set to USB and the wide transmit bandwidth (TBW WIDE, 100 to 2,900 Hz), with the plain rig file; these radios have no "(DATA)" file.
- Yaesu FTDX10, FTDX101 and FT-710. The data mode has its own transmit filter, DATA TX BPF, which reaches 50 to 3,050 Hz (the FTDX10 and FTDX101 leave the factory at 300 to 2,700; the FT-710 at 50 to 3,050). Widen the receive filter in the data mode too: its factory setting is 500 or 600 Hz.
- Yaesu FTDX3000, FTDX5000, FTDX1200, FT-2000 and FT-950. The data mode's receive filter stops at 2,400 Hz. Use plain USB with the rear input and the widest SSB transmit filter (3000WB; the FT-950's widest is 100 to 3000), with the plain rig file; these radios have no "(DATA)" file.
- Kenwood TS-590SG, TS-890S and TS-990S. The data mode (USB-DATA) has its own transmit filter settings, reaching 3,000 Hz on the TS-590SG and 4,000 Hz on the other two. The TS-590SG leaves the factory at 300 to 2,700 Hz and the TS-890S with its high cut at 2,900.
- Radios that stop at 2,400 to 2,700 Hz on transmit. The Kenwood TS-480 and TS-570 at 2,700; the Yaesu FT-817, FT-818, FT-857 and FT-897 at about 2,600; the Yaesu FT-450 at 2,400. The (tr)uSDX is reported at about 2,400. None of them has a setting that goes wider, so the top of the bulk region does not go out from them.
- FlexRadio is reported to pass at least 3,000 Hz in its DIGU mode.
- QRP Labs. The QDX and QCX send a single tone and cannot carry mLink. The QMX's manual says the same of its Digi mode and names its SSB mode, with its transmit filter at 3,200 Hz, for signals made of many tones. mLink's file for the QMX selects SSB, upper sideband, with the USB sound card as its input, so the QMX carries mLink inside that filter. Selecting the mode by CAT needs QMX firmware 1_04_001 or newer (SSB itself came with 1_02_000); on older firmware set USB on the radio yourself. Firmware 1_04_014 or newer is the better choice: its release note lists a fix for SSB not being keyed properly by the CAT transmit and receive commands, which is how mLink keys this radio (1_04_014 was a beta in September 2026; the newest stable release then, 1_04_010, lacks the fix). When mLink keys the QMX by CAT, leave SSB, USB Audio, "PTT from DTR" at None: with a USB setting there the QMX transmits whenever the port's DTR line is high. (mLink holds that line low as well.) The QMX can instead be keyed by the DTR line of its USB serial port: on the radio set SSB, USB Audio, "PTT from DTR" to USB 1 (USB 2 or USB 3 first need System config, GPS & Ser. Ports, "USB serial ports" set to 2 or 3), and in Settings, "Radio", Keying choose the DTR line on the CAT port (for USB 1) or on another port (for USB 2 or 3). The QMX has no RTS keying. mLink reads the QMX's mode, output power and SWR from its status answers, and asks once at connect where the QMX takes its transmit audio from (the CAT command SS). A QMX in USB on its microphone input is offered the change to the USB sound card as a proposal, written only if you say yes; these readings come from the QMX manuals and have not been checked on a QMX.
For the Elecraft K3, KX2, KX3 and K4, the Lab599 TX-500, the Yaesu FT-950 and the Icom IC-7200, no transmit figure was found. Check them with a tone.
6.5 What mLink sets on the radio, and what you set
Settings, "Radio", "Rig control" opens with a short summary in three blocks. "What mLink does by itself" says how it talks to the radio, how it keys it and what it watches. "What mLink does only with your yes" lists everything that writes to the radio or moves its dial, and says whether you have agreed to it. "What you set by hand on the radio" lists the settings only you can make, each with where to find it on that radio under "More". "More" holds the details: the radio list, the port, the keying, the polling interval, the radio's own settings with your answers, and the manual fields. It starts open when no radio is chosen yet or something needs your attention (the port is gone, the radio does not answer, or changes wait for your answer), and stays open while that lasts; otherwise it stays as you left it.
mLink shows what it wants to change on your radio and writes nothing until you say so. It reads the radio freely; it changes a setting, a menu or the mode only after you have seen the change listed for that radio and chosen to allow it. Under "More", the rig form is followed by "Radio settings" for the radio's file, in up to four parts:
- "Needed so mLink can talk to this radio by CAT." What the radio must have set before mLink can read it reliably: Auto Information off on Yaesu and Kenwood radios (otherwise the radio sends its own reports in the middle of mLink's questions), and on Icom radios CI-V Transceive off and, on several, CI-V USB Echo Back on. Some radios answer nothing mLink can read until this is set; the row then says "could not read", and the line above the table says why, for example "The radio is not echoing CI-V; mLink needs Echo Back on to read it." It has its own answers, the same three as below, asked first. Its "Never (mLink will not use CAT control on this radio)" means just that: mLink then writes nothing to the radio at all, no setting, no mode, no dial correction and no power change. It still reads the radio, and keys it as you set in Keying, so a transmission, an emergency above all, still goes out.
- The radio's settings. A table of what mLink would set
over CAT: "Setting", "Radio now" (the radio's value when mLink connected, in
the radio's own words, such as "3,200 Hz" or "REAR") and "mLink wants".
A "(DATA)" file adds a first row, "Mode", when the radio is not in the data
mode. A row that already has mLink's value says "already set" and is not
written. The heading over the table says what is true now: before you
answer, "mLink proposes these settings for this radio. Nothing is written
until you choose below."; after the first button below, "mLink sets these at
every connect, as you chose. Restore puts your own values back."; after the
third, "mLink will not change this radio's settings."; after the second,
"Applied once, as you chose." Three buttons answer for the rows that differ:
- "Apply now and at every connect": mLink makes the changes now, and again whenever it connects to this radio and finds them undone.
- "Apply once": mLink makes the changes now and asks again next time.
- "Never for this radio": mLink changes nothing on this radio and works with it as you set it; set it by hand from the list.
- "We require you to set the radio to these settings manually." Settings CAT cannot reach, such as the mode where the file sets none, a gain, or the firmware. Each one says the setting, the value to set and where to find it on the radio, for example "Press the FUNC knob, touch RADIO SETTING, MODE DATA, RPTT SELECT". The paths come from each radio's operating manual; where a path could not be checked in the manual for that model, the rig file says so.
- "Your previous non-mLink radio settings can be restored by pressing this button." "Restore my settings" puts back the values the radio had before mLink set its own.
mLink reads the radio each time it connects to it: when the station starts, when you choose the radio, and when the radio comes back after its cable was out. With no answer remembered, it lists the changes, writes nothing, and the client shows a notice, "mLink wants to change N settings on your radio: review", that opens the page. The answers are remembered for that radio, meaning its rig file and the port it is on, in the station's settings, so they survive a restart. mLink asks again when the list changes: a new rig file adds a setting or changes mLink's value, or, after "Apply now and at every connect", a setting on the radio reads a value that is neither the radio's own nor mLink's, because someone set it by hand.
Before it writes a setting, mLink keeps the radio's own value, in a file in the station's data folder; only once all of them are written to that file does it set its own, and it reads each one back. A value it has kept is never replaced, so your own value survives any number of reconnects and restarts. A setting the radio does not answer is left alone and shown as "could not read": set it by hand. The one exception is the CAT setup above: with your answer, mLink writes an item it could not read, because the radio may answer only once it is set; it cannot keep that item's own value, so Restore cannot put it back. When the radio answered at no line speed, mLink writes the setup at each speed in turn until the radio answers. Nothing is read or set while the radio transmits; a transmission, an emergency above all, always goes first and waits at most for one exchange with the radio. None of this ever holds back keying the radio.
"Restore my settings" writes the kept values back, the settings first and the CAT setup last, reads each back, and forgets the ones that are back on the radio. A remembered "Apply now and at every connect" turns back into asking, so mLink does not set its own again until you choose "Apply once" or "Apply now and at every connect"; until then the radio is set your way, so mLink may not transmit as it should. Restore before you use the radio for other modes, and keep the same rig file chosen while you do: the kept values belong to that file. A "(DATA)" file and the radio's plain file share the settings both read the same way, so switching between the two keeps your original values.
Under the restore, "Let mLink correct the dial by a few hertz when other stations agree we are off" is off unless you tick it. Off, mLink never moves the dial: when the stations it hears agree your radio is off, it tells you how far to turn the dial, and that you can let it do it. On, it moves the dial itself between transmissions and tells you each time (Section 15.11.1 explains how the stations agree).
A rig file can also say which frequencies its frequency command is able to carry (the line
;mlink: freq_range=, one or more ranges). The dial correction is the one thing that
sets the frequency, and it never asks for a frequency outside those ranges: nothing is sent to
the radio, and the notice that says how far to turn the dial adds "mLink could not retune the
radio: this rig file covers only" and the ranges. The Icom IC-905 files use this: their frequency
command covers the bands below 5.85 GHz (144, 430/440 MHz, 1.2, 2.3/2.4 and
5.7 GHz), and the 10 GHz band is not covered yet.
The radios whose rig files carry settings mLink can read and set itself are these; the groups after them say what every other supported radio has:
- Yaesu FT-991/991A. The plain file proposes 106 (SSB MIC SELECT) REAR, 109 (SSB PORT SELECT) USB, 110 (SSB TX BPF) 50 to 3,000 Hz and the SSB low and high cuts off, and turns DNR, NB, both notches, contour and APF off. The PTT SELECT menus (071 and 108) stay on your list: they must name the line mLink keys by, so a wrong value would stop every transmission.
- Yaesu FTX-1. MOD SOURCE to USB, TX BPF SEL to 50 to 3,050 Hz and the low and high cuts off, for SSB in the plain file and for DATA in the "(DATA)" file, which also proposes DATA-U and a receive width of 3,200 Hz; both turn DNR, NB, the auto notch, the manual notch and contour off.
- Icom IC-7300. DATA MOD to USB, SSB-D TBW to 100 to 2,900 Hz (firmware 1.30 or newer), NB, NR and both notches off, and in the "(DATA)" file the filter in use to 3,600 Hz.
- Icom IC-705, IC-7300MK2, IC-7610, IC-7760, IC-905 and IC-9700. DATA MOD (DATA1 MOD on the IC-7610 and IC-7760) to USB and SSB-D TBW to 100 to 2,900 Hz, in both files; the IC-705's "(DATA)" file also sets the filter in use to 3,600 Hz.
- Icom IC-7850/7851. DATA1 MOD to USB and SSB-D TBW to 100 to 2,900 Hz (firmware 1.30 or newer), in both files.
- Icom IC-7700. DATA1 MOD to ACC and SSB-D TBW to 100 to 2,900 Hz (firmware 2.20 or newer), in both files.
- Icom IC-7100, IC-7410, IC-7600 and IC-9100. The modulation input to USB, DATA OFF MOD, in the plain file, the only file these radios have (their data mode is fixed at 300 to 2,700 Hz). IC-7200. The one item it has, the modulation input with DATA on, in both its files, and the filter in use to 3,600 Hz in the "(DATA)" file.
- Kenwood TS-590SG. Menus 33 and 34, the SSB-DATA transmit filter, to 100 and 3,000 Hz, menu 69, the DATA modulation line, to USB, and menu 76, DATA VOX, off. One file covers the TS-590S and the SG, whose menus are numbered differently, so mLink asks the radio which it is and sets nothing on a TS-590S: its menus 27 and 28 are on the list to set by hand.
- Kenwood TS-890S. In the "(DATA)" file only: the SSB-DATA transmit filter (menus 6-08 and 6-09) to 100 and 3,000 Hz, filter control in SSB-DATA (6-12) to High & Low Cut, and DATA VOX off.
- Kenwood TS-990S. In the "(DATA)" file only: filter control in SSB-DATA (menu 6-08) to High & Low Cut and DATA VOX off.
Every supported radio's rig file falls in one of four groups:
- A list mLink reads and sets, a CAT setup item and a list to set by hand. The 19 radios above. The CAT setup item is the one that stops the radio sending CAT reports unasked (its auto-information item, or the Icom CI-V echo and transceive items); mLink asks about it first, with the rest of the list.
- A CAT setup item and a list to set by hand. Elecraft K3/K3S, K4, KX2 and KX3; FlexRadio 6000/8000 (SmartSDR CAT); Icom IC-7000; Kenwood TS-480, TS-570, TS-870 and TS-2000; QRP Labs QMX; Yaesu FT-450, FT-710, FT-891, FT-950, FT-2000, FTDX10, FTDX101D, FTDX1200, FTDX3000 and FTDX5000; the (tr)uSDX.
- Only a list to set by hand. Kenwood TM-D700A/E (2 m and 70 cm FM); Lab599 TX-500; Xiegu G90 and X6100; Yaesu FT-817, FT-818, FT-857 and FT-897. mLink changes nothing on these over CAT.
- CAT control only, no list. Xiegu X6200: mLink tunes, keys and reads them, and shows no settings list because their rig files carry none yet.
6.6 How often the station asks the radio
While CAT control is on, the station asks the radio a short question every so often: is it transmitting? That one question is the station's proof that the radio is still there, and it is how the station notices a radio that is stuck transmitting. In turn with it the station reads the dial, the mode and the power setting when it is receiving, and the SWR while it transmits. Normally it asks about 6 times a second, 175 ms apart: often enough to notice a lost radio or a high SWR within about half a second, and spaced enough that the radios measured so far answer every question (asked every 100 ms, one radio left about one question in a hundred unanswered). Some radios want more room still. A small radio that makes its sideband signal in its own processor can lose its USB link when it is asked that often; a radio's rig file can therefore name a slower rate, and you can set your own.
Settings, "Radio", has a box "Radio polling interval (ms)". Type a number
from 50 to 5,000 and press the page's Apply. Left empty, the station uses
what the rig file says (its poll= line), and 175 ms when the
file says nothing; the box shows that number as its hint. What you type
always wins. The line under the box says what is in force and whose it is:
yours, the rig file's, or the default. The QMX rig file asks for 500 ms,
twice a second.
Slower polling asks the radio less often, and the price is time. A radio that has gone (its USB cable pulled, its power lost) is declared lost after three questions in a row go unanswered, so after three times the interval: about 0.3 s at the default, 1.5 s at 500 ms. At the fastest settings the station still waits at least 0.3 s after the last good answer before it says so. A high SWR, and a key the radio will not let go of, are noticed at the next question, up to one interval late. The slower interval never delays anything you ask for: the key-up and unkey commands, the check right after them that the radio did as told, the dial and mode changes, the radio settings and the CAT profile all go at once. Around each key-up and unkey the station keeps quiet: from the moment it knows one is coming it asks the radio nothing until one interval after the command and its check, then asks as usual, transmitting or not, so a radio lost at that moment is noticed up to one interval later.
6.7 How the station checks that the radio keyed
Right after the key-up command the station normally asks the radio whether
it is transmitting, every 20 ms, until the radio says yes. It gives a radio
60 ms to switch; one that still says no after that has refused, and the
transmission is canceled. The same question follows the unkey. Programs that
send only the key-up and unkey commands send no question after them, and a small
radio that is busy starting its sideband can be upset by a question at that
moment. A rig file can therefore say how the check is done, with the line
cat_ptt_transmit_validation_ms.
auto_poll, which is what every file without the line means, is
the check just described. A whole number from 0 to 255 changes it. The station
then asks the radio nothing after the key-up command, and nothing at all
while it transmits: no regular question, no dial, mode, power or SWR read, no CAT
profile and no radio setting step. The number is how many milliseconds of silence
the station sends after the key-up command before the first sound of the
signal (60 for every other radio). The sound still starts at the same
moment whatever the number is: the station moves the key-up command instead,
earlier for a number above 60 and later for one below 60. The one exception is
a transmission that goes at once (a reply owed to someone, an emergency, a
plain send): the command cannot be sent before now, so with a number above 60
its sound starts that much later than with 60. When the transmission is over the station
sends the unkey command, which is always sent, and asks its first question one
polling interval later: the answer "receiving" is the end of it, and the
answer "transmitting" sets off the same handling as a key that did not let go.
An emergency is never delayed or refused by any of this.
The price is what the station cannot see while it transmits. With a number, the station cannot see a lost connection, a radio that stopped transmitting or a high SWR until the transmission ends, and it neither confirms nor refuses the key-up. The log still names the setting on every key command. The QMX rig file uses 60: its USB link locked up in a field test, and it runs clean under programs that send nothing after the key commands.
6.8 The serial port's DTR and RTS lines
A radio's serial port has two extra wires, DTR and RTS (the "RTS line" here is the serial port's, not the on-air RTS frame). Some interfaces and radios use them to key the transmitter, and a radio that is set to key on one of them transmits whenever that wire is high. A serial port wakes up with both wires high on Linux and macOS and low on Windows, which is how a radio could start to transmit just because mLink opened its port, or because the wrong port was chosen.
mLink therefore opens every serial port with both wires low, on every system, and puts them back low after every change of speed. The wire that keys the radio is low until a transmission and high during it (the other way round if you tick Invert); the other wire never moves while the radio is keyed. A radio that needs something else says so in its rig file, the way Hamlib's description of the radio does: the Yaesu FT-450, FT-891, FT-950, FT-991A, FT-2000 and FTDX series and the Kenwood TS-570, TS-590, TS-990 and TS-2000 use the RTS wire as hardware flow control (the radio's CAT answers only while RTS is high; on the FT-991A that is measured), so mLink turns flow control on for them. Because RTS then belongs to the flow control, that wire cannot also key the radio on the same port: mLink refuses the combination and says so. Key such a radio by CAT, by DTR, or by RTS on the radio's other serial port (the FT-991A has two).
Some radios show two serial ports on their built-in USB cable. The FT-991A shows two: its "Enhanced Com Port" carries the CAT, and its "Standard Com Port" is the one the radio's menus can set to key the transmitter on RTS. Choosing the wrong one is easy, and the wire that keys is exactly what a wrong port would raise. So a radio's rig file can name the one that carries its CAT. When it does, and the system reports that the port you chose is another of that radio's ports, mLink refuses it before it opens the port, so no wire is raised and flow control is not turned on, and it tells you which port to choose. Settings, "Radio", marks the radio's CAT port and its other ports in the list of ports. This does not apply to the port that only keys: the radio's Standard Com Port is a good choice there.
For a radio whose file does not name its CAT port, or a port the system cannot describe, mLink cannot tell. If such a radio does not answer CAT at any speed, the port may be the wrong one. mLink then lowers every wire it raised and turns flow control off before it moves on, but only after it has tried every speed, which takes several seconds, and a radio set to key on a raised wire can transmit for that time.
6.9 When the radio's USB adapter is unplugged
A radio keyed by a serial line alone, with no CAT, has nothing to read back, so the station looks at the port itself, twice a second, without writing to it. If the adapter has gone (a Digirig pulled out or browned out), the station tells you "Rig control lost mid-session", ends with "plug the radio interface back in or choose it again", and does not transmit until the radio is back. A Digirig takes its power from the USB cable, so its RTS line falls with the unplug and the radio stops transmitting by itself; the station also drops the line from its own side. If it could not do that while it was keying, the warning says instead that the radio may still be transmitting and tells you to switch it off.
The station then tries to reopen the port every 5 seconds. It finds the adapter again by
the USB identity it noted when the radio was chosen (on Linux the adapter's
/dev/serial/by-id name), so it still finds it when the system gives it a different
port name, such as ttyUSB1 instead of ttyUSB0. When it is back you read "Rig control is back: the
radio re-enumerated and was re-bound." The port is reopened with both wires low, so the
reconnect never keys the radio. Two adapters of the same make without a serial number cannot be
told apart; for those the station can only reopen the port name it had.
6.10 Which firmware the radio runs
Where a radio can say which firmware it runs over CAT, the station asks it once, when it finds the radio: at start-up, when you choose a rig, and again if the radio's port is lost and found. It is one question that changes nothing on the radio. It is never asked while the radio is transmitting or a key-up is about to happen. A radio that does not answer is asked no second time, and nothing else about it changes. The answer is shown in Settings, "Radio", as "Radio firmware", is written to the log, and is kept in the radio self test's result beside the name of the rig file.
Only radios whose maker documents a way to ask have it in their rig file: the QRP Labs QMX, the Elecraft K3, KX2 and KX3, the Kenwood TS-590, TS-890 and TS-990, and the Yaesu FT-710, FTX-1 and FT-891. For the others the maker's documents give no such question, or were not available, and Settings shows no firmware line; read it from the radio's own menu.
6.11 How accurate must my radio be
mLink pulls in a radio that is off frequency, but only so far: a radio can be corrected up to about 80 Hz off on a clear signal (0 dB and better), and the limit is a fixed number of hertz, so in parts per million (ppm) it gets tighter on the higher bands (Section 15.11.2, measured in simulation). A radio that stays within about 1.5 ppm in all, including what it drifts while it warms up, is inside that limit on every HF band and needs no help:
| Dial | 1.5 ppm is | Most mLink can correct |
|---|---|---|
| 3.5 MHz | 5 Hz | 22.9 ppm |
| 7 MHz | 10 Hz | 11.4 ppm |
| 14 MHz | 21 Hz | 5.7 ppm |
| 21 MHz | 31 Hz | 3.8 ppm |
| 28 MHz | 42 Hz | 2.9 ppm |
The margin is thinner on weak signals: at −6 dB and below the limit is 24 Hz, and 1.5 ppm is more than that above 16 MHz. USB mLink works on the HF bands, 160 to 10 m; 6 m and up use FM, where a frequency error does not move the audio (Chapter 34). A radio without a temperature-compensated oscillator can miss 1.5 ppm. In the field test of 2026-11-19 an FT-857D was 41 Hz off at 28.085 MHz, which is 1.46 ppm, and decoded nothing until its dial was moved: at that dial frequency 1.5 ppm is 42 Hz, about half of the 80 Hz the station can correct on a clear signal.
6.12 Checking your radio with a tone
Whatever the menus say, a tone settles it. The transmit side is the one to check first, because nothing on your own station tells you what did not go out.
- Connect a dummy load, or tune to a clear frequency at low power.
- Switch Inhibit off (Section 7.3.4) and press "Tune" in Settings, "Radio", "Levels and Tune" (Section 5.3.7). The station sends its identification and then a steady tone at 2,200 Hz, the middle of the bulk region, for ten seconds.
- Watch the radio's power meter. A steady tone on a single-sideband radio gives a steady power. Little or no power means the radio's transmit filter is cutting the tone: that is how the FT-991A's DATA-USB showed itself. The ALC meter tells you whether the drive is too high (Section 5.3.7); in USB on the FT-991A it stayed low, so read the power meter.
- To check the edges as well, stop the station daemon so that nothing else uses the sound card, and play steady tones into the radio's audio input from any tone-generator program: about 300, 550, 1,250 and 2,850 Hz. Key the radio by hand for each and note the power. A tone that gives much less than the others is outside the radio's transmit filter as it is set.
The receive side checks itself. Once you have chosen the radio's sound device, the station reads the edges of the radio's receive filter from the shape of the band noise and says so when a filter cuts off part of the range, on the "Audio and radio" tab of "Diagnostics" (Section 7.8.20). A radio whose filter is narrower than mLink's signal and has no wider one to select (the FT-857D's SSB filter is 2.2 kHz wide) is known to its rig file, so the station shows that as information, not as a warning; a filter narrower than the rig file says still warns.
6.13 Profiling a new radio
When a radio's CAT control does not work as it should (the dial is not read, the station cannot key it, a setting reads wrong), the CAT profile shows where. It is the "CAT profile" tab of Diagnostics (Start, Tools); in Settings, "Radio", under the radio self test, "Profile radio CAT control" opens it. Before you press "Start the profile" the tab lists what it will do. It reads every function the radio's rig file declares, one exchange at a time between transmissions: the radio's identity and the line speed CAT answers at, every status read (the dial of both VFOs, the mode, whether the radio is transmitting), the power setting, the ALC, power and SWR meters, every item of the CAT setup and every radio setting with the radio's value in its own words, and whether the radio sends anything without being asked. It changes nothing on the radio: the rig file's commands that would set the mode, the power or a setting are listed in the report and not sent. It is also how a new or corrected rig file is checked (Section D.15).
One box keys the radio: "Key the radio for 1 s with no audio, twice, to time the transmit flag". It is off until you tick it. Ticked, the station runs its key test twice (Section 5.3.10), waiting for a clear frequency as the key test does, and measures how long after the key command the radio reports that it is transmitting. The station gives a radio 60 ms for that before it drops the transmission (Chapter 31). The tab says "The radio reported transmitting… after the key command: in time" when the station's own check saw the flag within that time, and says the station would call the radio's key-ups refused when it did not, so a slower radio shows here. Use a dummy load or an antenna on a clear frequency: with no audio a sideband radio sends nothing, but an FM radio sends its carrier.
At the end the tab counts the verdicts (ok, mismatch, timeout, refused by the radio, not supported by the rig file, not readable by CAT, not sent) and gives one line for each problem. The report is a text file in the station's data folder, named for the rig file and the date, with the same report as JSON beside it: the radio, the rig file, the port and the speed first, then a table by group, then every step with the bytes sent, the answer the rig file expects and the bytes received, in hex and as text. "Open the report" opens it. There are two ways to send it. "Send to the project" opens the report window with the report ticked (Section 7.8.19): it goes to mlinkproject.org, or, when the station cannot reach it, as an ordinary mLink mail to the project's mailbox, SYSRIG1, by the station's usual mail path; a report longer than one mail carries is cut, with a closing line that says so and names the file. If that does not suit you, "Open in your email program" opens your own mail program addressed to the project, tyler@dinsmoor.us, with the subject filled in; attach the file yourself, because a mail link cannot. The report names no station but yours, and leaves out the serial number of the radio's USB port unless you tick "Put the port's USB serial number in the report".
6.14 What to remember
- The radio must pass about 290 to 2,900 Hz of audio on transmit and on receive; keep the low cut at 100 or 200 Hz, below the emergency region.
- On many radios the data mode is the narrow path. Where it is, use plain USB with the rear or USB input, and the radio's plain rig file.
- Every Icom stops at 2,900 Hz on transmit, and several older or smaller radios at 2,400 to 2,700 Hz.
- Aim for a radio within about 1.5 ppm, warm-up included; mLink corrects what is left up to about 80 Hz on a clear signal.
- Check the transmit side with a tone and the power meter; the station checks the receive side itself.
- When CAT control misbehaves, the CAT profile (Diagnostics) reads everything the rig file declares, changes nothing (it keys only with its box ticked), and writes a report to send the project.
- mLink shows what it wants to change and writes nothing until you say so, the setup it needs for CAT first, then the settings: "Apply now and at every connect", "Apply once" or "Never". It keeps the radio's own value of every setting it changes, before it changes it; "Restore my settings" puts them back. It moves the dial only if you tick the dial correction.
- The station asks the radio how it is every 100 ms unless the rig file or you say otherwise (50 to 5,000 ms); a slower interval is easier on a radio's USB link and makes a lost radio or a high SWR show up later.
The Operator's Guide to the Client
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
7.1 Before you start
The client does not run the radio. The station daemon does, and the client is a view onto it and a set of buttons that send it commands (Section 1.3). Close the client and the station keeps working. Open it again, on the same computer or another one, and everything is where you left it, because your QSO log, friends, canned chat messages, map objects and window arrangement are all kept by the station.
On-screen labels are quoted here exactly as the client shows them. Every
time the client prints is in the zone chosen in Settings > Display, Z
(UTC) by default, and ends with the zone's name, for example 04:04:12 Z,
or 22:04:12 MDT in a named zone. The clock in the bottom right corner
shows both, UTC above local time (Section 7.3.3).
Times from the air and from the station are UTC; only how they are shown
changes.
7.2 Connecting and signing in
When the client is not connected to a daemon, a window titled "Connect to Daemon" opens by itself in the middle of the screen. It closes by itself the moment you are signed in. It has five fields:
- "Host:" and "Port:": where the daemon
is listening. For a station on the same computer that is
127.0.0.1and port8488. In the web client, which the station itself serves, the Host box shows the address of the page you opened (unless you typed another), because that is where the connection goes. - "Password:", with a "show" box to reveal what you typed.
- "Name:": who is sitting at this seat.
- "Position:": optional, a tactical position such as
OPS CHIEForSHELTER-3. It travels with your name on the mail you send.
The sign-in rule is printed under the Name field: "If your name has an account on the station, the password is your account password; otherwise the station password signs you in." Chapter 9 explains accounts, roles and walk-up guests.
Two tick boxes let the client remember what you typed: "Remember host/port" and "Save password (plaintext)", which writes the password to a file on this computer unscrambled.
Two buttons sit at the bottom. "Connect" attaches to a daemon that is already running. "Start local daemon" appears only when the host is this computer: it starts a daemon if none is answering on that port and signs you in as soon as it is ready (Chapter 5). Once you are connected, the same window, reopened from the Start menu, offers "Disconnect" instead.
The status line under the tick boxes says what happened. "Status: timed-out (no daemon answering at ...)" means nothing answered. "Status: sign-in refused" is followed by a short code in brackets and the station's own sentence of explanation:
accounts_required: this station admits account holders only, so the station password alone gets nobody in. What that means for distress traffic is in Section 25.1.1.account_auth_failed: that name is an account, and the password did not work.auth_throttled: too many attempts from your address; wait and try again.
A station that already has as many clients signed in as it allows, 32, says so instead: "Status: sign-in refused: the station has as many clients signed in as it allows". On a station running on Linux, a client program that was closed or crashed without signing out does not keep its place: when the station is full, it gives that place to the one signing in (Section 32.6).
A link that drops for a moment (Wi-Fi that dozes to save power or moves to another access point, which also makes a browser close its connection) does not end your session. The client keeps the session and everything you asked for, makes the link again at once and then at gaps growing to about four seconds, and carries on where it was: your windows, drafts and selections stay as they are, nothing asks you anything again, and what you did meanwhile goes out once when the link is back. A request that changes something (a send, a switch) and was on its way when the link dropped is never sent a second time by itself: the client tells you it may not have reached the station, so you can check before doing it again. The connection light in the taskbar stays green for the first three seconds of a drop and then turns amber ("reconnecting..." when you hover over it).
If the station stops answering for a minute, or comes back without your session (it was restarted, stopped and started again, upgraded, or it crashed), the client does not send you back to this window. It shows a red "Lost the connection to the station" notice and tries to sign in again by itself, first after one second, then at gaps growing to five seconds, for as long as the client is open. It uses the host, port, name and password you signed in with; it keeps the password in memory for that, and writes it to disk only if you ticked "Save password". When the station answers, the client signs in, subscribes and loads its state again, keeping your windows where they are, and one green notice says "Connected to the station again." This window opens only if the station refuses that sign-in (the password changed, the account was removed or its role changed): the status line then gives the station's own reason, as above. If you press "Disconnect", or connect to another station yourself, the client does not try again by itself. A browser client behaves the same way through the bridge.
If the station ends a session you already had on purpose (the account was disabled or removed, or the walk-up lane was closed under a guest), the window comes back with "Status: signed out by the station" and the code, and a red pop-up tells you to sign in again.
7.3 The desktop
The screen is a desktop with a taskbar along the bottom. Each tool opens in its own window, and the client calls these tools applets. Drag a title bar to move a window; drag an edge or corner to resize it. Each title bar carries four small buttons. From left to right they are "?", which opens the Help window at the page for this applet, then minimize, maximize and close. A new station's desktop opens with three windows side by side, none behind another: "Mail" on the left half, "Stations" top right and "Chat" bottom right; after that the client puts back the windows as you left them.
To snap a window, drag it until the pointer itself reaches an edge of the screen and push on: hold it there for a moment, or push a little past the edge. The area the window will take is then outlined, and letting go snaps it: the top edge fills the screen, the left or right edge takes that half. Moving a window close to an edge without pushing into it does not snap it, and pulling back out of the edge before you let go cancels the snap. A snapped or maximized window follows the client's own window as it shrinks and grows, and stays snapped the next time the client starts. Every other window is kept where its title bar can be grabbed: below the emergency strip and banner when they show, above the taskbar, and partly on screen sideways.
A tooltip shows only for the window the pointer could click: a window underneath another, or anything behind an open menu or dialog box, shows none.
Boxes that take a particular kind of value only accept the characters it can contain: a callsign box takes letters, digits and "/" and turns lower case into capitals, a port box takes digits, a latitude box a signed number, and the distress call's text only the characters it can carry. A key the box cannot take does nothing, and a small note above the box says what it accepts. Pasted text is filtered the same way; a paste into a number box that is not a number is refused whole.
The first time you connect to a new station, the client opens a starter set side by side: "Mail", "Stations" and "Chat". After that it restores the arrangement you left, which the station keeps, so it follows the station and not the computer you happen to sit at.
7.3.1 The Start menu
Click "mLink" at the bottom left to open the Start menu. At its top is a search box; below it "Emergency", in red, opens at once, then a row for each group of applets, most used first: Communicate, Heard & Map, Radio, This station and Tools, and Help apart at the end. A group row has an arrow: rest the mouse on it, or click it, and its applets open in a menu beside it, where a group can hold a further menu of its own (Tools, then Games, holds Checkers). On a touch screen a tap opens a group. A number on a group row counts what is waiting in its applets. Clicking an applet opens it, or brings it to the front if it is already open; there is only ever one window of each.
The groups follow what you are doing, and inside each the applets you open most come first. Communicate holds "Mail", "Chat", "Virtual Nets", "Standard Forms" and "Beacons" (canned chat messages); Heard & Map holds "Stations", "World Map", "Map objects" and "Internet data"; Radio holds "Waterfall", "Rig control" and "MeshCore Manager"; This station holds "Station", "Notifications", "Settings", "Updates" and "Organization"; Tools holds the games, "Notepad", "Diagnostics", "Applets" and "Toolbox"; Help holds "Help", "About this build" and "Send a report to the project". An applet you install is listed where it asks to be.
To find an applet without knowing its group, just type: what you type goes into the search box, and the menu shows every applet whose name contains your words, with its group beside it; Enter opens the first. The Windows key opens and closes the menu. The arrow keys move through it too: up and down, the items under the separator included, right to open a group, left to close it, Enter to open. On a client window too short for the whole menu, the rows scroll between small up and down arrows (the mouse wheel and a finger scroll it too). Drag an applet off the menu onto the desktop and it leaves an icon there (Section 7.3.2).
Below the separator are three more items. "Connect..." reopens the "Connect to a station" window. "Stop daemon" stops a daemon that this client started; it is grayed out otherwise. "Quit client" leaves, after up to two questions. If your station is net control, a "Net control" box offers "Sign off & quit", "Leave silently" or "Cancel" (Section 24.9.10). If this client started the daemon, a "Quit mLink" box offers "Stop & quit", "Leave running" (the station stays on the air) or "Cancel".
The applets "Mail", "Stations", "Station" and "Diagnostics" are each a hub: several related views under tabs in one window. When some other window has a "Mail", "Chat" or "Go to" button, it takes you to the right tab of the right hub.
| You want to... | Open |
|---|---|
| Read, write or file mail | |
| See what you sent and whether it went | Mail, "Sent"; Station, "Send queue" |
| Type a quick chat message to someone | Chat |
| Run or join a virtual net, call a roll call | Nets |
| Fill in an ICS-213 or other standard form | Standard Forms |
| Send a distress call, or answer one heard | Emergency |
| See who is on the air | Stations, "Heard"; World Map |
| Log a contact | Stations, "Logbook" |
| Keep a list of regulars | Stations, "Friends" |
| Mark places and lay out a search plan | World Map; Map objects |
| Watch the band | Waterfall (with the spectrum above it) |
| Send a prepared chat message with one click | Beacons |
| Set callsign, grid, audio, rig, keying | Settings |
| Manage accounts or a station cluster | Organization |
| See every event the station flagged | Notifications |
| Follow weather or other internet data | Internet data, "Tracked" |
| Check the connection, role and station state | Station, "Status" |
| See what the station found wrong with its audio or radio control | Diagnostics, "Audio and radio" |
| Read the station's log lines | Diagnostics, "Log" |
| Read the station's counters | Diagnostics, "Counters" |
| See the relay candidates and learned routes | Diagnostics, "Relay" |
| See the version, the update state and how long until listen-only | About this build |
| Tell the project what worked and what did not | Send a report to the project |
7.3.2 Icons on the desktop
The desktop behind the windows carries a column of icons for six applets: "Mail", "Chat", "Stations", "World Map", "Nets" and "Emergency". Click an icon to select it and double-click it, or press Enter, to open the applet. Drag an icon to move it; it settles in the nearest free place on the desktop's grid. Right-click an icon for "Open", "Rename" and "Delete" (F2 renames the selected icon, Delete removes it), and right-click the bare desktop for "Line up icons" and "Restore launcher icons", which brings back any of the six you deleted. A finger holds still on an icon for the same menu.
Two kinds of shortcut can be added. An item dragged from the Start menu onto the desktop leaves an icon for that applet. A mail dragged out of the Mail inbox onto the desktop leaves a shortcut, marked with a small arrow, that opens Mail at that mail. If the mail has since been deleted, the shortcut opens a box, "Problem with Shortcut", that offers to delete it. While you drag, the item follows the pointer and grays out where it cannot be dropped.
The icons are saved with the station's window arrangement, so they follow the station, like the windows. On a client window too small for an icon's place, the icon shows in the nearest free place instead. The desktop never covers a window or the Start menu. The phone layout has no desktop icons; its Home list does the same job.
A launcher can carry a badge, a small round mark on its icon, that says something is waiting there: a number for "Mail" (unread mail in the inbox) and "Chat" (unread chat messages), the unread rows for "Notifications", and a red dot for "Emergency" while a call is open that nobody has acknowledged or cleared, or while this station's own distress call is armed. The same badge shows on the desktop icon, on the Start menu row, on the window's taskbar slot and, in the phone layout, on the Home row. A number above 99 reads "99+". The badge goes when what it counts is read.
7.3.3 The taskbar and the tray
Every open window has a slot on the taskbar. Click a slot to bring its window to the front; click the slot of the window already in front to minimize it.
The right end of the taskbar is the tray. It tells you, without opening anything, whether the station can transmit, whether this client is connected to it, whether it is receiving or sending, what is waiting for you and whether anyone is in trouble. Every cell says its state in a word, so a color is never the only sign, and a cell with nothing to say is not shown.
The cells, left to right:
- Abort, only while a transmission is queued or on the air. It calls off the current transmission and puts the message back in your Drafts (Section 18.9).
- The notifications bell, with a red count of the notifications you have not read. Click it for the list (below).
- Unread mail ("3 mail") and unread chat ("2 chat"), only while there is some. Click to open "Mail" or "Chat". "Chat off" means the Chat applet is not running; click to start it. A chat thread's messages count as read only while you can see them: the "Chat" window is in front or at least half uncovered, not minimized, and mLink is the program you are looking at.
- An open emergency, only while this station's own distress call is on the air or a call it heard is still open (neither acknowledged nor called all clear), taking the most serious kind: "EMERGENCY" and the count on red for a real one, "UNCONFIRMED" on purple for one the station cannot confirm as real or drill, "DRILL" on yellow for a drill. Click it to open "Emergency" at the call. A client started after a call was heard shows it the same as one that was running.
- The update gate of a pre-release build, only when it matters, in amber: "Update due" or "Update: listen only in 9 d" when a newer build is out or this build is running out ("Build expiring" without a date), "Update check overdue" or "Check: listen only in 9 d" when the station has not checked in time; in red, "Update needed" when the station is listen-only because it is out of date. Click it to open "About this build" (Section 7.8.15).
- The level meter: the receive level (RX) above, the transmit level (TX) below, on the same scales as the meters in Settings, "Radio", "Levels and Tune" (Section 5.3.7). The RX label lights while the station is receiving a transmission, the TX label while it transmits; a bar turns red while its "CLIP" or "OVER" lamp is lit, and "no audio" stands across the bars while the station reports no levels (the sound card is not open, or the client is not connected). Click to open that page.
- The transmit switch, where it is: "Transmit on" (green thumbs-up), "Listen only" (yellow stop hand, which waves every few seconds so it is noticed), "Finishing" (the stop hand taking turns with a clock: the station finishes an exchange first) or "Not known" (until the client is connected and the station has sent its settings; a click then does nothing). Click it to switch between transmitting and listen only; a click while it says "Finishing" stops at once (Section 7.3.4). A small no-entry sign at its right means Settings, "Radio", "Relay policy" is listen only, which a click on the switch does not change. Why the station cannot transmit, if it cannot, is in the row above the taskbar; that it is on the air is the meter's lit TX.
- The callsign with the link to the station as a light at its left: green while connected, amber with "reconnecting" while the client gets back by itself, red with "not connected". Click it to open "Station".
- The clock (below).
Hover over any cell for a sentence on what it shows and what a click does. On a narrow window the tray gives up cells to keep room for at least one window button, in this order: the update words (the row above the taskbar says it too), the transmit switch's words (its picture and color stay), unread chat, unread mail, the level meter, the bell, Abort, and on a window narrower still the clock and then the callsign. An open emergency and the transmit switch always stay.
There is one list of notifications: every
pop-up notice (Section 7.3.6) is a row of
it, kept after the pop-up fades, and so is every event the station reports.
Click the bell for the newest five unread rows. A row with a >
leads somewhere: click it and it opens what it is about and counts as read.
A row without one is only read, with "Read" or by clicking it. "Mark all read"
clears the count; "Show all" opens the "Notifications" window, which holds the
whole list (Section 7.8.8). Reading a
row in any one place, the bell, the window or the pop-up itself, reads it in all
of them. How long the pop-ups stay is set in Settings, "Display",
"Pop-up time", and for a single kind of notice in Settings, "Notifications".
On a phone the bell is the rightmost item of the top bar and
opens the same list.
The clock at the right end shows two lines: UTC, marked Z, above your local
time with its zone's short name, such as MST (its offset, such as -07 or +0530, when the
computer gives none). Local is the zone chosen in Settings, "Display", "Time
zone", or this computer's own zone while that choice is UTC. Click the clock to
show UTC with today's date in UTC under it; click again for local time with the
local date, and again for both times. Near midnight the two dates differ, which
is why each date sits under its own time. The client keeps your choice on this
computer.
The identity cell next to the clock says which callsign this station
transmits as. At a station run by one person that is all it shows, for
example KD7XYZ. At a station with operator accounts it also
says who is signed in and with what authority, as in
KD7XYZ ยท alice ยท operator; a walk-up guest shows as
guest: and the name typed at sign-in, and the authority is
shortened to admin, tech or operator.
Hover over the cell for one sentence on what this seat may do
(Section 9.1).
The taskbar has no Emergency button. Open "Emergency" from the Start menu, where it is the first group and red, or from the Declare Emergency icon on the desktop (Section 7.5.12).
The row above the taskbar says how the station stands, in words, and each part is a link to the window where you act on it. It names, left to right as they apply: that there is no callsign (the callsign itself is in the identity cell, not here); whether the station can transmit and, if not, why (a notice that does not stop transmission, such as an update being available, appears as its own short warning and the row still says "can transmit"); what the radio reports over CAT, which is where it is tuned and its mode, its output power and SWR while it transmits, and "HI-SWR" in red when the radio says the SWR is high; how many stations are heard; what is waiting to send; your standing in a Virtual Net; and your unread mail. The radio's part appears only when the radio answers over CAT. Its right end is the operator-presence button, "Operator at the radio" or "Station unattended": what your transmissions say about whether a person will answer, changed with a click (the same setting as Settings, "Station", "Operator presence").
A radio that reports high SWR also raises one notice and sounds the error tone once per episode, not on every reading: a reading that flickers while you tune is still one episode. Stop sending and check the antenna, its feed line and the tuner.
7.3.4 The Inhibit switch
Every time mLink starts, it starts inhibited: it receives everything and transmits nothing, whatever relay policy was saved. This is a safety rule. A station started by itself at boot, or one whose equipment has been moved, never keys the radio before the operator says the radio is ready.
The Inhibit switch sits in the taskbar. While the station is inhibited it shows a yellow "stop" hand and "Listen only"; click it and it turns into a green thumbs up and "Transmit on", which means transmitting is allowed and the station operates automatically at the relay policy saved for it. Click it again to inhibit the station again, for example to join a voice net, change band or retune an amplifier. Inhibit means one thing: the radio is yours, and mLink does not key it. That holds for everything, a distress call included, and it does not change the relay policy (Section 21.9), which applies again as soon as you lift the inhibit.
If you click while the station is transmitting, or while it owes an answer in an exchange that is under way, the switch first shows "Finishing", and the stop hand takes turns with a clock: mLink finishes that exchange, starts nothing new, and then stops transmitting, and the switch settles on "Listen only". It takes as long as that exchange: a few seconds for a short message or an answer the station owes, and as long as the whole transfer for a long message whose transfer another station has already made room for. If you need the radio at once, click again while it says "Finishing": the transmission stops at the end of the frame on the air (well under a second for an announce frame; a bulk transmission stops at once), and the exchange starts again after you lift the inhibit.
While the station is inhibited, nothing is lost and nothing fails because of it. What happens to each kind of transmission:
- Your own traffic waits. Messages you send, a retry that was under way, a relay search for one of your messages, mail you asked to fetch, a beacon or position report you asked for, and a net control's own roll call wait in "Waiting to send" or their own queue and go out when you lift the inhibit; none of them fails for it, and no wait counts as one of their tries. A message the station already agreed to carry for another station is kept the same way, however long the hold: after the release it waits for the station to listen first, then goes on as any carry does. A chat line keeps its usual lifetime: one that waits longer than that ends as expired, as it would waiting for any other reason. Mail never expires.
- Answers other stations wait for now are not sent. An acknowledgment, a clear-to-send, a roll-call check-in, a roster or presence answer, a request to repeat a missing part: each belongs to a moment another station chose, and sent minutes later it would only add to whatever is on the air then. The other station asks again, or carries on without it; a message sent to you while you are inhibited is still received and kept. A distress call from another station that this station would pass on is kept through the hold: after the release it goes on only if the station is still where it heard the call (the same frequency, or a station heard there before is heard again), because a call heard on a band you have left does not belong on the new one.
- Offers to help are not made. The station does not offer to relay, does not pick up mail as a courier and does not announce that it took custody of mail, so the station that asked finds another helper at once. A message another station of your cluster hands to this radio is handed back at once, for the same reason.
- Periodic transmissions are skipped. Beacons and a net's heartbeat are not sent while inhibited, so a long hold does not release a pile of stale copies afterwards. A net whose net control is inhibited carries on as it does whenever its net control falls silent (Section 24.9.1).
An exchange that the inhibit interrupted does not pick up where it stopped, because the other station has long given up on it by then. It starts again from its next step: if any of your message had already gone out, the first thing mLink sends is the short "did you get it?" question, never the whole message again. A message sent to everyone has nobody to answer that question, so one the inhibit cut short is sent again whole after the inhibit is lifted. When you lift the inhibit the station listens for a moment before it transmits anything, since the radio may now be on another band, and each waiting item then goes in its own turn rather than all at once. If the station beacons, it sends one ordinary presence beacon so that stations holding traffic for you learn you are back; anything else it sends first carries the same presence, and then the beacon is not needed. That beacon follows only an Inhibit you switched on yourself: not the short hold of a Tune, and not the first release after mLink starts.
Your own emergency transmissions are held too, but never silently: when you send a distress call, the client asks "Station is inhibited from transmitting. Check radio. Disable inhibit and transmit?". Answer yes and the inhibit is lifted and the call goes out at once; answer no and nothing is sent, and the client says so. The same question comes before an all-clear and before an acknowledgment. If a distress call of yours is already repeating, switching Inhibit on asks first: "A distress call is repeating. Inhibit stops it from going out. Inhibit anyway?". On yes the call stays armed but none of its passes goes out, and the Emergency window shows it as held; when the inhibit is lifted the passes go on. Switching Inhibit on while your all-clear is still being sent, or while your acknowledgment of someone's call is armed, asks the same way. A call that was armed before a restart comes back held (every start is inhibited), and the client asks about it when it connects (Section 25.2).
When the client connects to an inhibited station it opens the "Set up the station" window, the checklist of the first run (Section 5.3.1). Its fourth step is this switch. A right-click on the switch (a long press by finger) opens the window at any time.
The switch sends the command set_tx_inhibit with the
parameter inhibit (true or false), which needs the operator
role, and the station reports its state as tx_inhibited. A
daemon started with --transmit-at-start begins un-inhibited;
that is for test setups and for unattended stations whose owner accepts that
they key as soon as they start.
7.3.5 When the station cannot transmit
Some problems stop a station from transmitting: no callsign set, the sound device vanished, the radio would not key. When the daemon reports one of these, the row above the taskbar says "cannot transmit" in red, at its left. Hover over it for the station's own words; click it and the client takes you to the place to fix it: the matching Settings entry for the callsign, the sound devices, the rig or a keying or FM-mode mismatch, the pre-release notice for a telemetry notice, "About this build" for an update or listen-only condition (Section 7.8.15) and the "Log" tab of "Diagnostics" for anything else. A new problem of this kind also puts one row in "Notifications" and sounds the error tone. The transmit switch in the tray only says where the switch is ("Transmit on" or "Listen only"); the row says why the station still cannot transmit.
A station that has never had a radio set up (no rig, no keying line, no FM profile, no sound device chosen: what the station keeps in its own settings) has no radio problems to report. Instead of notices about keying and sound, the client shows one green notice when it starts, "mLink running, connect and set up a radio when ready."; clicking it opens "Set up the station". The row above the taskbar still says why the station cannot transmit. Once a radio is set up, every notice behaves as above, and a problem that is still standing then gets its row.
A few notices from the station do not stop it from transmitting: a newer release is out, the check for a newer release failed, the pre-release notice is waiting for your answer, or the stations heard say the station's clock is off. They never turn the status row to "cannot transmit". The row keeps saying "can transmit" and shows a short warning of its own beside it, in the warning color ("update available", "update check failed", "notice waiting", "clock looks off"); clicking it goes to the same place.
7.3.6 Pop-up notices
Short notices pop up at the bottom right, just above the taskbar, and
fade after a few seconds: a green edge for success, amber for a warning, red
for an error, blue for plain information. These are called
pop-up notices, or notices for
short. A short one stays about
three seconds; a long one stays up to eight, so you have time to read it.
Click any notice to dismiss it; on a touch screen, drag it sideways to swipe it away. It follows your
finger and goes once you have pulled it a short distance, and slides back if you let go sooner. A notice that ends in a small ยป
is also a link: clicking it opens the applet it is about.
Every warning and critical event the station reports gets a notice as well as a row in "Notifications", except the problems that stop transmission (one row each, no pop-up: the status row says them) and the station's findings about its own audio. Those share one notice, "mLink has detected possible audio system setup problems (N). Click this notification for more information.", whose count follows the findings while it is on screen; clicking it opens "Diagnostics" on its "Audio and radio" tab (Section 7.8.20). A finding it has not shown before brings it back, but not sooner than half an hour after it last appeared.
7.3.7 The keyboard and the lists
The Escape key peels away one layer per press, the most transient first. It cancels a quit box if one is showing; otherwise, in the Start menu, it clears what you typed in the search box, then closes the innermost open group, then the menu; otherwise it takes the text cursor out of the field you were typing in. An open dropdown list closes first. A dialog box closes as its own close button (X) closes it, which is its "Cancel" or its "no", and the window behind it stays; with two dialog boxes up, each press closes the one on top. On a phone, Back does the same. The one exception is net control's "Signing off" box: while it keys the sign-off, Escape and Back do nothing. Only when nothing else is in the way does Escape close the window in front.
| Key | Effect |
|---|---|
| Esc | Dismiss one layer, as described above |
| Tab, Shift+Tab | Move between text fields in the window |
| Ctrl+Tab, Ctrl+Shift+Tab; or Alt+Down, Alt+Up | Switch windows without the mouse (desktop layout). Alt+Down and Alt+Up do the same as Ctrl+Tab and Ctrl+Shift+Tab and work in a web browser too, which keeps Ctrl+Tab for its own tabs. Hold Ctrl and press Tab: a list of the open windows appears, most recently used first, and each further Tab (with Shift, the other way) moves down it; releasing Ctrl (or Alt) brings the chosen window to the front, and a minimized one is restored. One quick Ctrl+Tab is the window you used before this one, and pressing it again comes back. Escape cancels. It works in a text field too, where it does not move between fields. |
| Ctrl+A, Ctrl+C, Ctrl+X, Ctrl+V | Select all, copy, cut and paste in a text field. Password fields refuse copy and cut. |
| Up, Down (number field) | Step the number by one unit of its last digit, ten with Shift; a wide number field also has small "-" and "+" buttons at its right end. A text longer than its field scrolls sideways to keep the cursor in sight. |
| Enter | Send the message in "Chat"; finish a line or area on the map |
| Backspace (map) | Remove the last point of a shape in progress |
| Mouse wheel | Zoom the map around the pointer; scroll a list |
| + and - (map) | With the pointer over the map, zoom in and out about its center; the same as the + and - buttons on the map |
| PgUp, PgDn | Scroll the panel under the pointer a page; in a text box, move the cursor a box at a time. A press on a scroll bar above or below its thumb also moves a page, and keeps moving while held. |
| Shift+click (map) | Measure: first click sets A, second sets B |
To copy text you may want to paste elsewhere, right-click it (press and hold on a touch screen) for a small menu: "Copy", or "Share", which opens New mail with the same text as its body. This works in a mail you read, "Chat", each Help topic, the "Station" window's "Status" tab, "About this build" and the pre-release notice; Ctrl+C copies too. Each tab of "Diagnostics" has its own "Copy" and "Share" buttons (Section 7.8.11). In a mail and in Chat you can drag across the text to copy only that part (right-click it in Chat). In "Notepad" and in a mail you are reading the menu also offers "Select all". A text longer than a mail body holds goes as an attached file instead, and nothing is sent until you press Send in the mail.
Most lists in the client share one design. Click a column heading to sort by it, click again to reverse. A row of small filter boxes above the headings narrows the list to rows containing what you type.
7.4 On a phone-sized screen
The client has a second layout for a hand-held screen: the same applets and controls, arranged for a finger. It picks a layout when it starts, before it signs in, from the choice saved on this device or from what the device reports about itself. When neither settles it, it asks, full screen: "Are you on a phone or a desktop?", with two large buttons, "Phone" and "Desktop". The answer is saved. To change it later, open Settings, "Display", "Size and layout" and press "Use phone layout" or "Use desktop layout"; the change takes effect the next time the client starts.
What differs in the phone layout:
- One applet at a time. There is no taskbar and there are no windows to move. The applet you opened fills the screen under a top bar. The bar's left button goes back, and names where it goes: the applet underneath, or "Home". Escape does the same.
- Home is the Start menu as a list of tall rows under the same headings, with a red "EMERGENCY" button fixed at the top that opens "Emergency" in one touch. A row carries its badge when something waits there (see above).
- The tray moves to the top bar: the notifications bell (it opens the same list as the desktop's), four status icons (the link to the station, unread mail, emergency, which opens "Emergency" lit or not, and unread chat), the transmit switch, and "Abort" while something is queued or on the air. Notices drop down from under the bar.
- Lists become stacked rows. A table turns into rows two lines tall with no column headings, side-by-side panes sit one above the other, and a dropdown opens as a sheet at the bottom of the screen.
- Four applets get screens of their own. "Mail" shows its folders as a strip with "Compose" and "Get Mail" at the bottom, and opens a mail on its own screen. "Stations" lists the heard stations, most recent first; touch one for its details, with "Mail this station", "Chat with this station" and "Show on map". "Settings" and "Help" show the tree first and the chosen page next. Back steps out of these inner screens before it leaves the applet. The other applets keep their desktop arrangement; one that is wider than the screen slides sideways under your finger.
- Nothing is arranged, so nothing is saved. The phone layout starts at Home every time and leaves your desktop arrangement alone.
A finger works like this. Touch and lift to press something. Slide to scroll a list. Hold still on a spot for the menu a right-click would open. On the map, slide to move it and use two fingers to zoom.
7.5 Communicate
7.5.1 Mail
"Mail" is your mail program, laid out like a desktop email client. It holds mail only; chat messages have their own window, Section 7.5.5. Folders are on the left, the selected folder's contents on the right, and a toolbar with "Compose" and "Get Mail" across the top. The folder tree is headed by your callsign and holds:
- "Inbox", with the unread count in brackets. It lists the mail that is for this station: addressed to your callsign or any SSID of it, a mail to everyone, a mail that names you in To or Cc, or mail from your own mailserver box (mailing lists arrive there). Mail the station only carries for other stations, a mail sent to several other stations at once among it, is in "Carried for others". Above the list, "Sort by" orders it by Date (the default, replies grouped under the mail they answer), Station (the sender's callsign A to Z, newest first within one sender) or Tag (favorites first), and "Favorites only" lists just the mail you marked with "Favorite" in the reader (a star in the first column; "Unfavorite" takes it off). Your choices and your favorites are kept on this computer. The reader's header also has "Write to", a new mail to the sender, and "Chat", which opens Chat on the sender's station. The columns are a star, FROM, SUBJECT, RX (how long ago it arrived) and AT (how many attachments). Unread mail is shown in bold, replies are indented under the mail they answer, a mail you have answered says "(answered)" after its subject while your answer is among the recent rows of Sent, and a pencil in front of the sender marks a mail that another operator at your station is answering right now. Click a row to read it in the pane below; opening it marks it read. The text reads on a white field in a fixed-width font, so columns and signatures line up, with the mail's own line breaks kept.
- Folders you file into. "Archive" on an open mail moves
it into a folder named
archive, which appears in the tree once it holds something. In any folder other than the Inbox the same button reads "To Inbox". - "Carried for others", with a count: mail this station heard on the air or holds for other stations. It reads like the Inbox but is not yours: you can read, copy, share, forward, mark as a favorite or delete it, not reply to it or file it.
- "Waiting to send", with a count: what you have sent that is still waiting its turn for the transmitter, on the air, or waiting to try again (for instance until a relay offers to carry it), oldest first, with the same columns as "Sent". It is the same list as the Station window's "Send queue"; a message moves to "Sent" when the station is done with it.
- "Sent": your own mail and chat that has left Drafts and is no longer waiting, one row per message, with its STATE, TO, WHAT (the subject of a mail, the first words of a chat message), TYPE, SENT (the clock time; the pointer on it shows when it last changed), TRIES (how many times it has gone to the air), WHY and BYTES. "Show carried and control traffic" adds the rest: mail carried for other stations, net notices, map objects and mail control. The states, and the notes that appear beside them, are explained in Chapter 8.
- "Drafts": saved drafts, with a count. The last column says why each one is there, for example "Saved by you" or "Cut by your emergency broadcast". Double-click a draft to open it for editing. "Save Draft" in the composer stores the draft and brings you back to this list. Double-clicking a row in "Sent" or "Waiting to send" opens it for reading.
- "Mailbox (net)": your station's link to the mailserver, described below.
- "Emergencies": a link, with a count of the calls still needing someone, as in "Emergencies (1!)". Every distress call the station holds is listed once, in the Emergency window; picking this folder opens that window on its "Heard" tab, and "Open the Emergency window" opens it again (Section 7.5.12). Under the explanation, every call still open is a line ("KX0DDD heard 3 min ago: open it") that opens the Emergency window on that call. While a heard call is open the folder is tinted red and pulses. On a phone the tab is "Emergency".
Reading a mail shows "From:", a "Received" line with the clock time and date it arrived, a "You answered it:" line with the state of your answer when there is one, an "Operator:" line with the sender's name and position if they gave one, "To:" and "Cc:", "Subject:", and a "Via:" line naming the mode the mail arrived in, with the dial frequency when your rig reports one. The buttons under the header are "Reply", "Reply All", "Forward", "Archive", "Delete" (which asks "Delete this mail?" first: a deleted mail cannot be brought back) and "Copy"; drag across the text to select part of it, and "Copy" (or Ctrl+C) copies that part, or the whole mail when nothing is selected. Attachments are listed with a "Save" button each, which writes the file to your home directory. Small text files show their first lines, and pictures show as a thumbnail. A map attachment shows a one-line summary of its objects and an "Import to map" button that adds them to your World Map under the sender's callsign (Section 30.3.4).
If another operator at the same station is already replying to a mail, pressing "Reply" opens a box titled "Already being answered" that names them and asks "Reply as well?", with "Reply anyway" and "Cancel" (Chapter 9).
In Sent, select a row to "View" it as it was sent, under the list ("Edit as new mail" there opens a copy in the composer and leaves the row as it is), "Delete" it (a message on the air cannot be deleted: "Abort" it), or "Abort" it in "Waiting to send" while it is still queued or on the air. Each press says on screen what it did. In Drafts, "Send" transmits the draft exactly as saved, attachments included, "Edit" reopens it and "Delete" removes it.
At a station that is part of a cluster (Chapter 33), a "Mailbox:" choice at the right of the toolbar lets you look at another member's mailbox, read-only; "Local" brings your own back.
7.5.2 Writing mail
"Compose" in the toolbar, or any "Mail" button anywhere in the client, opens the composer inside the Mail window. Its heading says what you are doing: "New mail", "Reply", "Reply all", "Forward" or "Editing draft". A "New" button at the top right starts a new mail; one you were writing is saved in Drafts first. The fields are:
- "To:", with a "Cc+" button that shows a "Cc:" line. As
you type a callsign, suggestions from your friends and the stations you hear
appear as small buttons to click, each with when your station last heard it
("W1AW · 4 min ago"). Under "To:" one line says what will happen if you
send now: "W1AW heard 4 min ago at +10 dB: goes direct, about 45 s.",
"W1AW not heard for 26 h: your station will ask for a relay or wait for a
gateway. Mail never expires.", that your station leaves it at the mailserver
when it has internet and the station was not heard in the last two minutes, or
that the mail is too big for the path to that station now. Besides callsigns, "To:" takes
0CQCQCQfor everyone, or0followed by a net name (for example0MARITIME) for a virtual net (Section 24.7.1). A mail with nothing in "To:" would go to everyone, which is more often a forgotten addressee than a choice, so "Send" asks first: "Send this to everyone (CQ)?", with "Send to everyone" and "Back to the mail" (Escape or Back is the same as "Back to the mail"). - "Subject:" and "Body:", the text of the mail. Long lines of the body wrap at the edge of the box as you type, without a line break being added to the mail, and a click puts the cursor where you click.
- Attachments. "Attach..." picks a file. "From map..." opens a short menu, "All my objects" or one "Group", and attaches those map objects as a file. Each attachment is listed under the buttons with a small "x" to remove it.
- "Broadcast area (CQ)..." replaces the recipients with a circle on the map, an area CQ. The World Map comes forward and asks you to click the center. Back in the composer a line reads "Area CQ:" with the center, the radius (50 km to start, changed in 10 km steps with "-" and "+") and a "Clear" button; the "Send" button becomes "Broadcast" and the area button becomes "Re-pick area...". Every station that hears the message keeps it; the circle decides who is alerted (Section 30.4).
- "Via:" at the bottom left chooses "Radio" or "Internet (CMS)", which hands the mail straight to the mailserver when this station has internet (Chapter 26). CMS is the client's label for the mailserver.
The figures at the right of the attachment row are worth learning to read. They show two sizes in kilobytes: the message after compression, and the most one transfer can carry. When the station has measured the link to the recipient, the second figure becomes what that link can carry, and the line adds the rate it expects to use, the link's signal-to-noise ratio (on the SNR@3k yardstick) and an estimate of the time on the air. Green fits this link now, amber would fit a better link or a relay, red never fits in one message and must be trimmed. Hover over the line for the reason in words (Section 17.5).
The body box holds up to 1 MB (1,048,575 bytes). Content that is put into it for you, a forward, a chat message, shared text, a form or a draft, goes in whole; if it does not all fit, the part that fits goes in and a notice in the composer says so, so nothing is cut without a word. A mail whose compressed and wrapped size is more than one transmission can carry (64,004 bytes to a single station) is refused at "Send" with the numbers in words, and the mail reader shows a received mail whole.
"Save Draft" keeps the message without sending, and so does closing the Mail window while you write: it is saved in Drafts. Only "Discard" throws it away, after asking "Discard this mail?". "Send" hands it to the station; once the station accepts it, the editor clears, "Waiting to send" opens and a notice says the mail is queued. A mail the station refuses, or one that is too large, stays in the editor with the reason in a red notice.
If this station is not registered with a mailserver, the composer says so next to "Via:" in red: "not registered - relays won't carry this" on "Radio", or "needs Mailbox registration" on "Internet (CMS)". Registration is one button in the "Mailbox (net)" folder.
7.5.3 Mailbox (net) and Get Mail
The "Mailbox (net)" folder is where you connect this station to a mailserver (Chapter 27). A line at the top says which server is set and whether the station is registered. Below it:
- "Check via internet" and "Check via radio". After a radio check the button grays out as "Asked" with a countdown in seconds, because each radio check is a transmission.
- "Held at the CMS": after a radio check that finds mail, one line per mail with sender, subject and size, each with a "Fetch" button. Nothing is sent to you until you pick it.
- "Mailing lists..." lists the mailserver's lists with their subscriber counts, each with "Subscribe" or "Unsubscribe".
- The mailserver's settings are in Settings, page "Mail":
"Server URL" (a station with none set gets the project's,
https://mail.mlinkproject.org, filled in, waiting for "Apply"), and three tick boxes. This station's own mail uses the server whenever an address is set and the station is registered. "Deposit mail we overhear" takes mail this station hears on the air for others to the mail server. "Offer to check and serve mail to stations we overhear" tells the stations it hears that it reaches the mail server, checks their mailboxes for them, offers and delivers their mail, takes mail they hand it and registers a station over the air. "Relay my mail check when nobody answers (opt-in)" is the third. A station with either of the first two on is a gateway (Chapter 26), and shows the internet flag on the air: a station that only deposits is a courier, and net control hands it held mail. The Mailbox folder keeps the actions and has "Open Settings > Mail". - "Station key:", the fingerprint of the key pair this station made for its mail, and whether the mail server has accepted it; or a note that the station makes one the first time you register.
- "Register (internet)" (it reads "Re-register (internet)" once done) or, with no internet here, "Ask a gateway to register this station": no callsign to type. While the station waits for a gateway to hear, the line says so, with "Stop waiting". Under it, always shown, a "Gateway:" box and "Ask this gateway" register through one you choose. An unregistered station sees a short notice here saying what it is missing. Above "Register (internet)" an unregistered station also has a "Code:" box: when the callsign's mailbox already has a station, type there a code from that station or from the mail portal, then register (Section 27.3.4). Leave it empty otherwise.
- "Open the portal", on a registered station with internet: the browser opens the mail portal, and "Sign in" there signs you in to this station's mailbox. "Sign in to the web portal", beside it, is for another device: a one-time code, the mailbox it is for and the portal's address, with "Copy code" and "Open the sign-in page". The code works once, for 24 hours (Section 27.3.5). "Add another station" makes a code for a new installation of this callsign (a field laptop, a new computer): type it in "Code:" at the new station before "Register (internet)". It works once, for about 15 minutes, and is never sent over the air.
- "Sign-in codes:", on a registered station: "Write these down: each works once to sign in at" the portal's address, the five codes the mail server gave at registration, "Copy codes" and "Refresh codes", which asks for five new ones over the internet; the old five then stop working. With a code you can sign in to the portal without the client, and there set a password for later.
The line under the buttons says what last happened. When something did not work it says why in the station's words, for example "No mail server answered at https://... (HTTP 404)".
The "Get Mail" button on the toolbar does the same check by the best route available: over the internet when the station is registered, otherwise over the air.
7.5.4 The mail portal
The mail portal is the mail server's web page for your mailbox, for reading and writing mail from any browser (Section 27.3.5). The page says at the top who you are signed in as, with "Sign out", and has three tabs.
- "Mail": one folder at a time, newest first, with the folders and their counts above, a "Sender or subject" search and "New mail". Each line says who it is from, which of your callsigns it was addressed to, and its delivery: "Waiting" (your station will get it), "Picked up", or "Not offered". Tick mail and choose "Move" (to a folder, or a new one you name), "Do not deliver" or "Delete"; the last two ask first. Opening a mail shows its text and attachments (each only downloaded) with "Reply", "Reply to all" and "Forward". Reading here changes nothing: your station still gets the mail. "Do not deliver" keeps the mail on the server but your station is never offered it again, and that cannot be undone; "Delete" removes it for good. A mail you write here must fit one transmission, about 62 KB once compressed, and a copy goes to your Sent folder.
- "Password": set a password for signing in here without the client.
- "Stations": the station keys of the mailbox and what to do with them. "Stations waiting" lists stations that asked to join, each with the fingerprint of its key, to compare with that station's own "Station key:" line before you press "Approve" (or "Refuse"). "Make a code" gives a code for a new station, shown once, for 15 minutes. "Station keys of this mailbox" lists every key; while more than one is in use each has "Remove", which asks first. A removed station can no longer pick up or send the mailbox's mail, and can join again later like a new one; the last key stays. Making a code, approving and removing need a sign-in from the last 15 minutes: sign out and in again if the page says so.
The server's administrator has pages of their own at the same address, signed in with a code made on the server (Section 27.3.6).
7.5.5 Chat
"Chat" keeps every conversation the station can have in one window, one chat message at a time, in the style of IRC or a keyboard net. On the left is a list of threads; on the right is the thread you chose, with a box to type in at the bottom. On a narrow screen, such as a phone, the list and the thread take turns, with a back arrow at the top of the thread. The window is an applet that comes with mLink, so it can be updated without a new release of the program (Appendix E).
On a wide window the list can be hidden, so that only the thread shows. The button with three bars at the top left of the thread hides the list and brings it back; dragging the divider between the list and the thread to the left edge also hides it. While the list is hidden, that button carries a count of the chat messages you have not read in the other conversations. The window keeps your choice when mLink restarts.
The list has two parts, and a search box and a "+ New" button above it.
- Rooms, on top: "Radio · Everyone", the chat messages to everyone on the frequency (
0CQCQCQ); each Virtual Net you are in; the internet rooms at the mailserver (#cqis there from the start, and a room needs a registered station); every channel on the MeshCore board, when one is attached, whether anyone has spoken on it or not ("Public" first;#mlinkdata, which carries mLink's own data, is left out); and "Seats", between the operators signed in to this station, including other members of its cluster, never transmitted and shown only at a station with more than one operator. - Conversations, below: one thread for each person on each link. The same callsign heard on the air and reached over MeshCore is two threads, because they go out differently.
Every thread is named with its link in front: "Radio · W1AW", "Radio · Net EMCOMM", "Internet · #cq", "MeshCore · Public", "MeshCore · #emcomm". "Radio" is mLink on the air, through this station's radio. The same name on two links, such as #emcomm at the mailserver and on MeshCore, is two threads that read differently. The thread's header and the line under the box to type in say the link again, and to whom the chat message goes, before anything is sent. Each thread also shows a small icon for its link (radio, internet, net, MeshCore, seats), the time and the start of its last chat message, and a count of the ones you have not read. A conversation with nothing in it shows no preview, and its thread says "Empty Chat". A chat message addressed to you counts in your thread with that person; the room counts the rest. Right-click a thread for "Mark as read" and the other choices. Opening a thread, or leaving it showing, marks its chat messages as read as long as you can see the window; the station keeps this, so a second client or a restart does not bring them back. A "new messages" divider in the thread sits above the first one you had not read.
A thread whose link is down is grayed and cannot be sent to, and says why in plain words under its name: the client is not connected to the station, transmit is turned off, you are not in that net now, the station is not registered with the mailserver, the MeshCore board is not connected. Where something can be done, a button beside the reason does it. The chat messages it holds stay readable.
"+ New" starts a conversation that is not in the list yet. It shows the links one under the other, always in the same order, each with what it reaches: "Radio" (type a callsign and press "Message"), "Internet" (type a room name and press "Join room") and "MeshCore" (a button for each channel on the board, so "Public" opens with one press; a #name to add a channel to the board; and the board's contacts, for a direct message). A link that cannot be used now offers nothing to type: it says why, with a button to fix it where one exists. A #name channel added from here goes in the board's first free slot, with the key every MeshCore app makes from the same name; a private channel with a key is added in the MeshCore Manager. An internet room you join stays in the list; "Leave" at the top of the room takes it out. The "Chat" buttons in "Stations" (the heard list, "Logbook" and "Friends") open this window on that station's thread, and so does a click on a notice for a chat message.
Enter sends, and so does the "Send" button. In "Radio · Everyone" the "To:" list chooses who the chat message is for: "Everyone", or one station. Everyone on the frequency hears a chat message to one station, but only that station confirms it. The list offers the stations in the thread, your direct chats on the radio and the stations heard in the last hour, the most recent first; a station not heard in the last hour can still be chosen, and says "(not heard lately)". Clicking a chat message from another station chooses that station too. The words above the box, the empty box itself ("Message to W7ABC only" in place of "Message to Radio · Everyone") and the "Send" button then all name the station, and after each send "To:" goes back to "Everyone". In every other thread "To:" shows where the chat message will go. A counter shows how much room is left: a chat message is capped at 160 bytes, the most one short message carries (Section 17.2); a MeshCore message has the board's own limit. Anything longer is mail, and on the air the "Mail" button opens the composer already addressed to the same callsign.
Chat messages sit in the order they reached the station, your own by when the station sent them. A chat message that reached it 30 seconds or more after it was written (after retries, or through a relay) is put back where it was written, when the station knows the sender's clock agrees with its own (Section 23.3.1); otherwise it too sits where it arrived. A message put back carries a small mark, "arrived 12:03"; hover over the mark, or click the message, for "written 12:00 · arrived 12:03". If you have scrolled up, a message put in above what you are reading does not move the view, and the "new messages" divider never has a message you have already read below it: a late message above the messages you have read is found by its mark. A chat message sent twice on purpose shows twice. A retry of one is not shown again for 16 minutes after the first copy; later than that, or on a very busy channel, it can show twice.
Your own chat messages are shown in dark red, each with a small mark to its left that says how far it got. On the air: "queued" (waiting its turn), "on air", "sent", "acked" (the station you addressed acknowledged it, straight back or through the relay that carried it), "relay wait" (set aside while the station waits for a relay or for the station you addressed; its words say until what time the message is kept, and that it is given up if that station is not heard by then), "retry 4" (not acknowledged yet; this is the fourth try and the station keeps trying until the message expires), "failed", "gave up" (nobody answered in time), or "aborted" (you stopped it with Abort, Remove or Stop all before it was delivered, and nothing more is sent for it; an aborted message also waits in Drafts when Abort put it there), or "interrupted" (the station stopped, a crash or a power cut, while the message was on the air: it may have gone out, and it waits in Drafts). A message to everyone or to a Virtual Net has no acknowledgment, so its mark ends at "sent". On MeshCore: "queued", "waiting" (the board is not connected; the message goes out when it is), "sending", "sent", "retry", "delivered" (the other radio confirmed it) and "failed". A channel message on MeshCore has no acknowledgment, so it also ends at "sent". Hover over a mark for the words, or click your message: its words also show at the bottom of the thread.
A directed chat message on the air that cannot be delivered is tried only for one message lifetime, 25 minutes or longer on a crowded frequency, and then its mark becomes "gave up" and the station stops trying (Section 22.6). Right-click it and choose "Send as mail" to open the composer addressed to the same station, with the message's text as the body; nothing is sent until you press Send in the composer.
Right-click a chat message for its menu: "Reply quoting this message", open the station's card, show the station on the map, mail the station, add it to your friends, "Copy this message", "Share this message via mail...", add it to the favorites (the star beside a message does the same) or mute its station ("Mute W7ABC (hide its messages)"). A muted station's chat messages are hidden, and "Muted" above the thread unmutes it. "Filter" narrows a thread by station, words, favorites or how recent, and the list beside it sorts by time or by station. Drag across chat messages to select text, then right-click for "Copy selected text"; with nothing selected "Select all" takes the whole thread. Click a chat message you heard on the air and the bottom of the thread says how many times the station heard it. The view follows new chat messages only while you are at the bottom.
"Chat" keeps running with its window closed (an applet that comes with mLink may do that unless you turn it off in "Applets"), so the count on its launcher and the notices for new chat messages go on. "Notifications" in "Settings" chooses which kinds of chat message make a notice, a sound or a count. A plain dot on its launcher or tray icon, instead of a count, means "Chat" is not running: it stopped on an error, or it is not allowed to run with its window closed. Open it to start it again; "Applets" shows the reason.
7.5.6 Nets
"Nets" runs or joins a virtual net: an optional net with a name, a net control, numbered members and roll calls (Chapter 24). The window has three parts: status lines at the top, a row of buttons that depends on what you are in the net, and the roster.
The status lines. With no net heard the window says "No virtual net on frequency." Otherwise the first line names the net, its type ("Casual" or "Safety Critical"), its net control, and two counters, the term and the roster's edition. The second line says what you are:
- "You hear this net; you are not in it (a bystander)."
- "You are member n.", with "for now" and an explanation added when a stand-in gave you the number (Section 24.9.3).
- "You are net control (member n)", with how many are on the roster and how many were heard lately.
- "Listening only: you hear this net and will not transmit.", at a station set to listen only.
More lines appear when they apply: that you follow net control through another member; who owns the net when the station running it is a stand-in or was handed the job; whether the net's standing orders are in your mail; "Asking to join ..."; "Roll call in progress", with a note when routine traffic is held, and afterwards "Last roll call:" with how many did not answer. After each roll call net control also reads how many members it heard directly, and, when another member reports hearing more of the net, a suggestion to let that member run it (Section 24.9.6).
The buttons follow from what you are.
- Not in a net: a "Net name:" box with "Open" (start a net under that name and become its net control), a "Net type:" list with "Casual" and "Safety Critical" for the net you are about to open (Section 24.9.9), "Join" (ask to be listed), and a "whenever heard" tick box that keeps the request on file across restarts. While a join is pending the only button is "Withdraw join".
- Member: "Leave net"; "Mail the net", which opens
the composer addressed to
0and the net's name; and two tick boxes, "Traffic to pass" and "Need help", that your next roll-call check-in carries. A "Get roster" button appears when your copy of the roster is shorter than net control's; it reads "Asking..." while the request is out (Section 24.4.3). - Net control: "Call the roll", "Step down", "Close net" (it changes to "Sure? Close" for a few seconds; click again to confirm) and "Mail the net". Select a member in the roster and more appear: "Remove selected"; "Hand to callsign", which steps down and names that member as the next net control; "Let callsign run it", offered to the owner, which makes that member net control while you stay the owner (Section 24.9.5); and "Make alternate n" or "Drop alternate n", for up to three alternates (Section 24.9.4). The "Net type:" list switches a running net between the two types, and "Cycle:" sets the time between net control's heartbeats, 150 to 600 s in 30 s steps (Section 24.5). A station that is only standing in for the owner sees "Take over this net" in place of the alternate and type controls.
- The owner, when another station runs the net: the member's buttons, and on a second row "Take the job back", "Mail me the net's state" (the station running the net mails you its roster, last roll call and held mail; Section 24.9.7), "Close net", the "Net type:" and "Cycle:" lists, and, with a member selected, "Remove selected", "Let callsign run it" and the alternate button.
Two more lines sit under the buttons. "Bulletin:", for members and net control, takes a text every member must have and sends it with "Send bulletin"; net control's window then shows whether every member confirmed it or how many still lack it (Section 24.7.2). "Standing orders:", for the owner and the station running the net, takes a subject and a text; the button reads "Post standing orders", or "Replace standing orders" when the net already has some (Section 24.7.3).
The roster has three columns: the member's number, CALLSIGN and NOTE. The note says what the station knows about that member: "net control", "owner", "this station", "this station, net control", "this station, owner", "this station, listening", "left the net", "did not answer the roll", "not heard lately", "listed on another member's word", and "alternate n". Net control's own line carries no number when your copy of the roster has no entry for it.
Things the net tells you arrive as pop-up notices and as rows in "Notifications": a message or bulletin to the net ("Net name: message from callsign", or "(not a member) writes to the net" at net control), a roster copy that arrived, standing orders that reached your mail, that net control has taken you off the roster, that a member which hears more of the net took over as net control (or that your station did), and that another net with the same name is on the frequency.
7.5.7 Standard Forms
"Standard Forms" fills in the message forms that emergency communicators already use: ICS-213, Radiogram and about 150 others. They are the Winlink Standard Forms, written and published by the Winlink Development Team (winlink.org) and its contributors. They are not part of mLink and do not belong to the mLink project. mLink ships an unmodified copy so the forms are there without internet access, and says whose they are in a line under the tree ("Winlink Standard Forms", the version, "from the Winlink Development Team; not part of mLink") and in "About this build". The client unpacks its copy into its data folder when it starts, whenever that folder has no forms or older ones. "Update forms from Winlink" has the station download the current set from the internet and hand it to the client; a set is never replaced by an older one, and a failed download leaves the installed forms as they were. The window has three tabs: "Forms", where you pick and fill in a form; "Installed", which lists every form on this computer (Section 7.5.9); and "Shared forms" (Section 7.5.10). On "Forms" the forms are grouped by organization and region in a tree, with the forms you used recently at the top under "Recent" and a "Search:" box above. Choose one and it appears as ordinary fields. Required fields that are still empty are outlined in red when you press the form's submit button, and the form will not submit until they are filled. A successful submit places the finished text in the composer with the subject filled in; you choose the recipients and press "Send". Four buttons above the form do the rest: "Save draft" and "Load draft" keep a half-finished form, "Attachโฆ" adds a file, and "Save PDF" makes a copy for a paper file.
Most stations use a handful of the 150 forms. Select one you never use and press "Hide": it leaves the tree, the search and "Recent", and is listed under "Hidden Winlink forms" at the end of the tree, where you can still open it. Select it there and "Show" puts it back in its folder. Select a folder and "Hide folder" hides every form in it. A hidden form stays installed, and stays hidden when the forms are updated.
7.5.8 My forms: your own forms
The branch "My forms" at the top of the Standard Forms list holds forms you made or were sent. A form of
your own is one plain text file ending in .mlform, in the folder forms/mine inside the
client's data folder, and you write it in Notepad. Updating the Winlink forms never touches that folder.
"New form" writes a small working form and opens it in Notepad: change it and press "Save", and it is in the list. Select a form of yours and "Edit" opens its file; every Save reads the list again, and if the form is open on the screen it reloads, keeping what you had typed in the fields that are still there. Select a Winlink form and "Copy as mLink form" turns it into a file of your own: its fields, choices, required marks and message come across; its layout and scripts do not. A form with a mistake shows a "!" in the list, and selecting it names the line and what is wrong; the form does not open until "Edit" and a Save have put it right.
The file has three parts. The header says what the form is, the fields say what is asked, and the message says what is sent:
mlform 1
name: Net Check-In
version: 3
author: K7OTR
category: Nets
subject: Check-in <var callsign> <var date>
[fields]
heading "Net Check-In"
text callsign "Callsign" required cols=10 default=$MYCALL
text date "Date" default=$UTCDATE
choice status "Status" choices="Available|Busy|Off duty" default="Available"
check traffic "I have traffic" value="Yes"
area notes "Notes" rows=4
note "Send this to net control."
[message]
Check-in from <var callsign>
Status: <var status>
Traffic: <var traffic>
<var notes>
- The first line is
mlform 1. The header lines arekey: value. "name" is required. "version" is a whole number (1 if you leave it out; raise it when you change a form you have shared). "category" puts the form in a group under "My forms", and a/makes subgroups. "subject" is the mail subject (the form's name if left out). - Each line under
[fields]is a kind, a name and a label in quotes, then options. The kinds aretext(one line),area(several lines),choice(a drop-down menu),radio(the same choices shown as buttons),check(a tick box),headingandnote(text with no field; they take only the text), androw...end(the fields between them sit on one line). A name is 1 to 47 letters a to z, digits or_, and no two fields share one. A line starting with#is a comment. - The options are
required,cols=N(the width of a text box),rows=N(the height of an area),default="...",choices="a|b|c"andvalue="..."(what a ticked box puts in the message; "Yes" if left out; adefault=onstarts it ticked). Inside quotes,\"is a quote,\\a backslash and\na line break. A required field is marked with a star, and Submit waits until it is filled. - Everything under
[message]is the message.<var NAME>is replaced by that field's value (the same placeholder Winlink's templates use). A name no field has is an error, so a typo is caught before anyone sees it. - These words in a
defaultare filled in when the form opens:$MYCALL,$MYNAME,$GRID,$UTCDATE(year-month-day),$UTCTIME(hour:minute),$DATEand$TIME(your computer's clock), and$SEQ, a number that counts up each time that form is submitted. Any other$WORDstays as you wrote it. - The file is UTF-8 text with no byte order mark, at most 16 KB and 128 fields. Windows line ends are read as normal lines.
To share a form, select it and press "Send form": the file goes into a new mail as an attachment. A mail
that carries a .mlform file shows "Install form" beside the attachment. If you already have a form
of that name, mLink shows both versions and asks before it replaces yours. A form is known by a short code
made from the file's text (the same eight-digit code the applet list uses), so two stations can tell by
comparing it whether they hold the same form.
7.5.9 Installed: every form on this computer
The "Installed" tab of "Standard Forms" is where you look after the forms you have. At the top is the Winlink set: its version, how many forms it has and how many you have hidden, with "Update forms from Winlink" and, when some are hidden, "Show all hidden forms".
Below it, "My forms" lists every form file in My forms, and says under each name where it came from: your own form, copied from a Winlink form (and which one), from a station by mail (and which station), or from the catalog (with its catalog version, whether you have edited it, and whether a newer version is listed). A form with a mistake says what is wrong and on which line. Each row has "Open" (fill it in on the "Forms" tab), "Edit" (open its file in Notepad), "Send form", "Update" when the catalog lists a newer version, and "Remove". "Remove" asks first and says how you would get the form back: install it again from "Shared forms", or from the mail it came in, or copy the Winlink form again (losing your changes to the copy). A form you made yourself has no other copy, and the question says so. If the form is open with something typed in, the question says that is lost too.
7.5.10 Shared forms
The "Shared forms" tab of "Standard Forms" is the project's catalog of forms that stations wrote and shared: a net check-in, a weekly report, a form for a club event. It works as the "Available" and "Submit" tabs of "Applets" do, with its own service, FORMS, and its own internet source, "mLink forms" (off until you turn it on). A form here is one small text file, an mLink form file, so it is a few hundred bytes to a few kilobytes and travels in a mail or two. The project looks at every form, and every new version of one, before it is listed; nothing arrives on your screen unseen.
Under the tab there are two views. "Available" lists the forms your client knows of, with the same buttons as the applets' tab: "Refresh" and "Turn on the internet source" fetch the list from the internet through the station; "Check for updates" asks FORMS by mail for what changed since your list, or for the list when you have none; "Search by mail", "Next page", "Details" and "Get by mail" ask a little at a time, each answer fitting one bulk frame, and "Install" appears once the form has arrived. The box above the list filters what the client already knows, with no mail. The client checks every form against the list before it installs it. "Submit" sends one of your own forms, from My forms, with a line saying what it is for; the form is checked here first, with the checks the server makes, and the answer comes back as mail.
An installed shared form is a file in the folder "shared" inside My forms, so it is listed under My forms, in its category, like one of your own; "Update" and "Remove" for it are on the "Installed" tab. Edit it and it is yours to keep, but the next "Update" asks before it replaces your changes; copy it out of the shared folder first if you want to keep both. A form you wrote yourself under the same name is never replaced unasked. The catalog knows a form by a short name made from its name (Net Check-In is net-check-in); the first station whose form the project lists under a name owns it, and only that station can list later versions.
7.5.11 Beacons
"Beacons" holds up to sixteen canned chat messages you send with one click: a net check-in, a standing CQ, a status note. Each slot has a
"Label:", a "To:" and a "Body:". Wherever the body says
%CALLSIGN%, your callsign is filled in; the "Preview:" line
underneath shows the result. Press "SEND" on a row, or "Send Beacon" in the
editor. "New slot" adds one and "Delete" removes the selected one.
These are separate from the beacons the station sends by itself (Section 20.3).
7.5.12 Emergency
"Emergency" has two tabs: "Declare", to send a distress call, and "Heard", for distress calls the station has received. The service behind them is described in Chapter 25.
Open it from Start (Emergency is the first group) or by a double click on the Declare Emergency icon on the desktop; both land on "Declare". Nothing stands in front of it: if a question or dialog is open, Start and the icon still work, and opening Emergency closes the dialog first. On the phone the red "Emergency" button at the top of Home opens it.
The "Declare" tab is built so that nothing on it can stop you sending. The red button at the bottom is always live. It reads "SEND DISTRESS" when a position will be included and "SEND DISTRESS (no location)" when not. Every field above it is optional, and a line of advice at the top changes as you fill them in, for example "No position - rescuers cannot locate you directly", in red when the news is bad. It warns; it never refuses.
Most fields are short menus, so they are quick under stress:
- "Drill (practice - not a real emergency)", a tick box at the top, off unless you tick it. A ticked call goes out marked as a drill: a yellow band with black letters appears under the box, reading "DRILL DRILL DRILL - NOT A REAL EMERGENCY", with "This will go out marked as a drill. Every station that hears it shows the words above." beneath it, and the red button turns dark and reads "SEND DRILL". The box clears itself after every send (Section 25.3.5).
- "Severity:", such as "Immediate threat to life (Mayday)" or "Urgent, no immediate threat (Pan-Pan)".
- "Position:" has three choices. "Use my fix" sends the position the station already holds, and the window says which that is: the GPS fix, or the configured position when there is no live fix, with the coordinates. If the station has nothing, a line starting with "!" says why. "Enter manually" gives a "Grid:" box, "lat" and "lon" boxes and a "Pick on map" button, which brings the World Map forward for one click. "No position" sends none.
- "Accuracy:", "Where:" (water, wilderness, roadway and so on), "What:" (medical, injury, fire, lost and so on), "People:" and "Mobility:".
- "Who you are:" and a free-text "Detail:". If you type a character the distress call cannot carry, an amber "Not sent:" line lists what will be left out (Section 25.3.3).
If the station is transmitting something else at that moment, a line above SEND says "The station is transmitting now. Sending will interrupt it." SEND is still one press. Afterwards a small window, "Emergency broadcast", opens by itself and names what was stopped: "Message 12 aborted to transmit emergency broadcast." That message is in "Drafts" (Section 25.2). The window is an ordinary one, not a box you must answer first: the Emergency window and every other window stay usable, so you can cancel or declare again at once. "OK" or its close button puts it away.
If the station refuses the send, for example because this build is out of date (Section 7.8.18), a red pop-up gives the station's reason and the tab stays as it was: nothing on screen claims a beacon the station did not start.
After you send, the tab changes. It shows "BEACONING - repeating until cleared, stopped or acknowledged", the severity and whether a position went out, and three buttons. "All clear (tell everyone)", the big green one, is for when the trouble is over: a line under it says it sends a short message three times saying your emergency is over, and every station that heard the call, and any dispatcher a gateway told, learns it (Section 25.7). "Stop without telling anyone" only stops your beacon, for a station that cannot or will not send more. "UPDATE (re-send)" sends a corrected version after you change the severity or the detail in the fields below. Neither stopping button asks for confirmation. A critical notification at the same moment gives the expected time between repeats (Section 25.4.1). Every client connected to the station shows the beacon, so any operator there can cancel it, not only the one who sent it. While your beacon is on the air a red strip across the top of the screen, above every window and in the phone layout too, says "EMERGENCY BEACON ON THE AIR" (a drill's is yellow and says "DRILL BEACON ON THE AIR"); it stays when the Emergency window is minimized or closed, a click on it brings that window back, and it goes when the beacon stops. A drill beacon has the yellow "DRILL DRILL DRILL - NOT A REAL EMERGENCY" band above everything else in the tab, and "This beacon is marked as practice. UPDATE keeps it a drill." below; on the World Map its marker is yellow and carries the same words instead of "SOS".
After the beacon has stopped, whether you stopped it or somebody acknowledged it, the Declare tab still offers the same green button at the top, with "Your last emergency is no longer sending. If it is over, tell everyone." (under the yellow drill band when it was a drill). Once you press it the line reads "All clear sent 1 of 3.", then 2, then 3. Only your own most recent call can be cleared. It stays offered after the three passes, in case you want to send it again.
The "Heard" tab label carries a count of unacknowledged calls, as in "Heard (1!)". A new call also raises a critical notice, a red pop-up whose text starts with "EMERGENCY"; the "Go to" button on its row in "Notifications", and the pop-up itself, open the Emergency window on that call. A client that connects after a call was heard, or reconnects, shows each call that is still open in the same way, once, with the time it was first heard.
While any heard call is still open (nobody has acknowledged it, and its sender has not said all clear), the client does not leave it to the tab. A red banner runs across the top of the screen, on the desktop and on the phone: "Emergency heard from KX0DDD 3 min ago: open", with "(+1 more)" when there are several. It names the newest call; click or tap it and the Emergency window opens on that call. The "Emergencies" folder of "Mail" (on a phone, its "Emergency" tab) is tinted red and pulses. The banner and the pulse stop on their own as soon as the call is acknowledged, by you or by any other station, or its sender says all clear; a call heard again after its all clear brings them back. A confirmed drill never raises either (it is not counted in the tab's label, either).
Each call heard is a box, one under the other: open calls first, then acknowledged ones, then those that were cleared, and the newest first in each group. A box shows who is calling and what (the severity and the nature), how long ago it was heard, its state in words ("open", "acknowledged" or "cleared"), the position as a grid square with latitude and longitude (or "no position"), and how it reached you: "via KX0AAA, KX0BBB (3 copies)" lists every station you heard it through and how many copies arrived, "heard direct (1 copy)" says it came straight from the sender. The last line is the record. An open call says "Not acknowledged: nobody has said help is moving", and has a red edge. Once acknowledged it says who acknowledged it, at what time, and the words they gave ("Acknowledged by KX0SAR at 14:05 Z, contact: Teton SAR case 4471"). A call whose sender said it is over turns green and says "All clear said by the station" with the time; if it is heard again after that, the box says "STILL SENDING after an all clear" in red and counts as open again.
Click a box to pick it. The pick stays on that call whatever else arrives or is removed from the list; if the picked call leaves the list, nothing stays picked until you click another. The actions below the boxes act on the picked call only.
A drill looks different everywhere, so nobody mistakes it. Its box has a yellow background with dark letters and starts with "DRILL DRILL DRILL - NOT A REAL EMERGENCY", ahead of every other mark; it is never red, raises an ordinary notice instead of the red pop-up (the notice also starts with those words), and is not counted in the tab's label. Selecting it shows the same words in a yellow band at the top, above everything else, and "The sending station marked this as practice." under it.
If the station cannot be sure whether a call is real or a drill (copies of it disagree, Section 25.3.6), it says neither. Its box is purple on lavender and starts with "EMERGENCY STATUS UNCONFIRMED - CONFIRM WITH THE SENDING STATION BEFORE ACTING"; selecting it shows those words in a purple band at the top and "This station cannot tell whether this call is a drill. It is handled as a real emergency until you confirm with the sending station.". It raises the red pop-up and counts in the tab's label, like a real call. Confirm with the sending station, by voice if you can, before you act on it.
Under the boxes the picked call is read out in full: the banner for a drill or an unconfirmed call, "What:" and "Where:", the detail text, "Heard" with the age and the relays, and "Position:" with an "On map" button, which opens the map centered on the call with its marker selected, or a line saying there is no position. A button "Chat with KX0DDD" opens that station's thread in "Chat" for the caller when the call's identity starts with a callsign. Once somebody has acknowledged the call, the read-out says "ACKNOWLEDGED by KX0SAR at 14:05 Z - help is moving." and, on the next line, the words they gave. After you have passed the call to the authorities, fill in "Contact:" (agency, case number or phone; optional) and press "Acknowledge (I forwarded this)" (Section 25.6). The box then shows your callsign as the one who acknowledged it, the time and your contact text.
At the top of this tab, the tick box "Auto-relay heard SOS beacons" lets the station re-send distress calls it hears (Section 25.8). Leave it on unless you must stay silent.
7.6 Stations and the map
7.6.1 Stations: Heard
The "Heard" tab of "Stations" is the station's
heard list
(Section 20.6). The columns
are CALLSIGN, GRID, SNR (Section 20.6.1),
KM and BRG (distance and bearing from you), LAST HEARD, MODE (the mode the
last frame arrived in, with your dial frequency when your rig reports it),
VIA (which member of a cluster heard it) and EM: "SOS" for a station
with an open distress call, "SOS?" when the station cannot confirm whether
it is real or a drill, "DRILL" for a drill. A station counts as the caller
when its callsign is the first word of the call's "Who you are" text; a
station only named later in the text, or one that relayed the call, is not
marked. Pick a marked station and its detail panel offers "Open this call in
the Emergency window". [NC] after a callsign marks
the net control of the net on the frequency. The list is sorted by SNR,
strongest first, until you pick another column. Distance and bearing need
your own position; with only a grid square set they are worked from the
grid.
The list has no age setting of its own. The station forgets a station one hour after it last decoded it (longer on a frequency with more than twenty stations), and LAST HEARD tells you how fresh each row is, so sort on that column to see who is on the air now. In a cluster, stations heard by other members are listed too.
Select a row and its buttons appear: "Chat" opens its thread in "Chat", "Mail" opens the composer addressed to it, "Show on map", offered when the station's position is known, centers the World Map on it, "Add friend" puts it on your friends list, "Log contact" starts a QSO log entry for it and "Signal plot" opens a graph of how loudly you have heard it; a right-click on the row (a long press on a phone) opens the same list as a menu.
The signal plot has one dot for each transmission your radio decoded from that station, placed by the time it was heard (across, in the time zone chosen in "Settings") and its SNR (up, in dB on the 3 kHz scale). "24 hours" and "7 days" switch the span. A path that opens and closes with the day shows as a rising and falling band of dots; a stretch with no dots is a time when nothing was decoded; a dot far below its neighbors is a fade or a burst of interference. Dots joined by a line were heard close together in time, so a break in the line is a gap in reception. Hold the pointer over the plot to read a dot's time and SNR. When a span holds more than a thousand readings, each dot is the average of a stretch of time and a bar through it shows the weakest and strongest reading in that stretch. The station keeps these readings for 7 days, at most one for each station every 15 seconds, and starts keeping them when it first runs a version that has the plot, so a new plot begins empty.
After you chat with or mail a station that your own radio hears directly, a notice offers to log the contact in the QSO log; nothing is logged unless you click it.
7.6.2 Stations: Logbook
The "Logbook" tab is an ordinary contact log: WHEN, CALLSIGN, GRID, FREQ, MODE, SENT and RCVD reports, and a COMMENT. "New" starts an entry stamped with the current time; the editor under the list changes the selected entry, with "Mail" and "Chat" buttons for that callsign and a "Delete" that asks first. "Export ADIF" writes the whole log to an ADIF file in your home directory, ready for LoTW, QRZ or any logging program, and "Import ADIF" reads one in.
7.6.3 Stations: Friends
"Friends" is your list of up to 32 regulars, whether or not they have been heard lately. Type a callsign next to "Add:" and press "Add". Each friend has a "Note:" and an "Alert:" setting of "Mute", "Notify" or "Sound", and "Mail", "Chat" and "Delete" buttons. With anything other than "Mute", a chat message from that friend puts a row in "Notifications". "Sound" also plays one short beep for each chat message or mail from that friend, on the speaker chosen in Settings, "Alerts" (Section 7.8.4); under the setting the window says whether sound is on, or why not. Friends are also the first suggestions when you address mail.
7.6.4 World Map
"World Map" shows you, the stations heard, the links between them, your own map objects, objects other stations have shared, and weather observations. The map ships with the client and needs no internet. It opens fitted to the stations it knows: yours and the stations heard that have a position or a grid square, with room round them (as the stations come in it refits, until you first move the map); with only your own station, centered on it at a regional zoom; with none known, the whole world and a note saying so, with a button to Settings to set your position. The world view shows only the largest cities, more appearing as you zoom in. Drag with the left button to move it; turn the wheel to zoom around the pointer, or press the "+" and "-" buttons at the map's top right ("Fit" goes back to the opening view). A line at the top left says how, until you first zoom or drag. Far zoomed in with no map pack under the view, a note says there is no map detail, names the pack on the station's list that has it and its size, and its "Get map detail" button opens the Maps panel. In a small window the column of buttons on the left gets smaller icons and then a second column. The night side of the Earth is shaded. The read-out at the bottom right follows the pointer: latitude and longitude, grid square, approximate local solar time there, and the distance and bearing from you. A scale bar in kilometers sits in the corner below it.
Markers. Your own station is green. A heard station is yellow, or a dimmer yellow when only its grid square is known and it is shown at the square's center. A station not heard for half an hour fades, and fades further after six hours. A station with an open distress call, by the same rule as the EM column above, takes the call's color, red for a real call, yellow for a drill, purple when unconfirmed, and never fades, and while your own distress call is active your marker is joined by a pulsing red "SOS". A gateway has a ring round it. Click a station that has been sending position reports and its recent track appears.
Layers. The column of buttons down the left edge switches layers on and off: heard stations, your own objects, shared objects from others, link lines, a panel listing links station by station, weather, city names and the legend. A layer that is off shows its button pushed in and grayed, and the client remembers your choices on this computer. Below a divider are four actions: drop a search datum, center on your position, zoom to fit every object, and "Beacon my position now".
A distress call the station heard is plotted at the position it reported, whatever the layers say: a red marker labeled "SOS" with its number and sender for a real call, a yellow one labeled "DRILL DRILL DRILL - NOT A REAL EMERGENCY" for a drill, and a purple one labeled "EMERGENCY STATUS UNCONFIRMED - CONFIRM WITH THE SENDING STATION BEFORE ACTING" when the station cannot tell which (Section 25.3.6). A call that sent no position has no marker. "On map" in the Emergency window centers the map on the call and selects its marker, and selecting a marker selects the same call in the Emergency window.
The legend lists only the kinds of marker now on the map, from "You", "SOS (armed)", "SOS heard", "DRILL heard (not a real emergency)", "Emergency, real or drill UNCONFIRMED", "Station", "Station (grid only)", "Station in emergency", "CMS gateway (ring)", "My object (dashed + DRAFT: not sent)", "Shared object (heard)", "Weather", "Link (strong)" and "Link (weak / ~seen)". The link lines and the link panel come from the links map (Section 20.8). The panel, headed "Links - who hears whom", lists each station and the stations it hears, with their SNR; a double-click on a line centers the map on that station.
The toolbar along the top holds the drawing tools for the tactical overlay (Section 30.3) and, at its right end, the buttons for the map's two panels, "Objects" and "Maps". While a tool is selected, a line across the top of the map says what the next click will do. "Object" stays selected so you can place several; the shape tools go back to "Select" when the shape is finished, and Escape goes back at any time. Dragging still moves the map in every tool. Nothing on the toolbar sends anything: what you draw stays on your map until you send it.
| Button | What it does |
|---|---|
| Select | Click a marker or a shape to select it. Dragging an object of your own that is already selected moves it; Escape during the drag puts it back. |
| Object | Click to place a named point |
| Line | Click each corner; Enter or a right-click finishes, Backspace removes the last corner, Escape abandons |
| Area | Click each corner; it closes itself when you finish, and is labeled with its size in square kilometers |
| Circle | Click the center, click again to set the radius |
| Vector | Click the origin, then a point along the bearing; the map shows the bearing and range |
| Objects (n) | Opens or closes the Objects panel: your objects, what each is on the air, editing and sending |
| Maps | Opens or closes the Maps panel: the map packs that cover the view, downloading and installing them |
The panels dock at the map's right edge, or along its bottom in a narrow window such as a phone's; "Close" at the panel's top right closes it, and the client remembers which panel was open. "Beacon my position now" is in the column of actions on the left and in the right-click menu.
Drafts and what is on the air. Each of your objects shows on the map what it is on the air. A new object is a draft: only your map has it, it is drawn dashed, with a dashed ring round its marker and the tag DRAFT. An object that has been sent is drawn solid; selected, it is tagged ON AIR. An object you edit or move after sending it is tagged CHANGED: the other stations keep the version you sent until you send it again. QUEUED means the station has it and has not sent it yet, NOT SENT that the last send did not go out, and WITHDRAWN (drawn faint) that you withdrew it. Nothing is sent again by itself. How objects travel, and how a newer copy replaces an older one, is in Section 30.3.2.
While some of your objects are drafts or changed and the Objects panel is not showing, a line at the top of the map says how many, with a "Review and send..." button that opens the Send step.
The right-click menu starts with "Place a map object here", which places a draft and opens the Objects panel on it so you can name it. Then come four groups: Place ("Drop datum here (SAR)", "Search pattern here..."), Navigate ("Center map here", "Copy coordinates", "Measure from here"), Weather ("Get weather here (one-off)", "Track weather here") and Radio ("Poll this area (who's here?)", "Beacon my position now"), and last "Set my position here".
- "Search pattern here..." opens a "Search pattern" box: choose "Expanding square", "Sector search" or "Ladder", give its size in kilometers and the heading of the first run, and for the square and the ladder the number of runs (6, 8, 12, 16 or 23); "Generate" lays the pattern out as a line object (Section 30.3.5).
- "Measure from here" sets point A of a measurement; Shift+click sets B, and the map shows the distance and bearing. Two Shift+clicks do the same without the menu, and Escape clears it.
- The two weather items add a row to "Internet data" ("Tracked") for that spot and open that window.
- "Poll this area" asks, over the air, who is within 100 km of that point: a geopoll (Section 20.5).
Groups. Objects can carry a group label, such as a mission or team name. When any object on the map has one, a choice at the top right shows only one group's picture, yours and everyone else's together; "All groups" brings everything back. While a group is chosen, the Objects list shows only that group, the Send step starts with only its objects ticked, and zoom-to-fit fits only what is shown. The choice lasts until you close the client (Section 30.3.3).
7.6.5 Map objects
The World Map's Objects panel lists your own map objects (points of interest and shapes) with STATE, LABEL and GROUP. STATE is one of Draft, Queued, On air, Changed, Not sent, Withdrawn and Withdraw not sent (the kill did not go out, so others still have the object; the editor offers "Withdraw again..."), as described for the map above; the drafts and changed objects are in bold. "Find" above the list matches any part of a label, group or note, in capitals or not. A click on a row selects the object and centers the map on it; selecting an object on the map selects its row. Under the list a line says how many objects are not sent, beside "Send...".
The selected object's editor starts with where it stands, for example "Sent to everyone 12 min ago. Aired (a broadcast is not acknowledged)." or "Changed since it was sent to KD7ABC 3 min ago. KD7ABC still has the old version", and its buttons: "Send..." (or "Send again..."), "Withdraw..." for an object that was sent, or "Delete" for a draft or a withdrawn one, and "Center". Then the fields: "Label:", "Notes:" (the first 120 characters go on the air), "Group:", "Owner:", "Symbol:" and a color, and fields that depend on the shape, such as "Radius (m):" with optional rings at two and three times the radius, "Brg/Range:" for a vector, a "Filled" box for an area, or a "Moving" box with a course and speed (Section 30.3.1). Tick "Set" next to "Expires:" to give it an expiry time, or leave it clear for an object that never expires.
The Send step. "Send..." under the list, or "Review and send..." on the map, opens "Send map objects": every object of yours with a tick box, the drafts, changed objects and objects whose last send failed ticked to start with ("Send..." in the editor ticks only that object). "To:" is "Everyone who hears", "One station:" with its callsign, or "Attach to a mail". Below, the batch's size and what it costs on the air, for example "113 bytes: one short burst, a few seconds on the air". One transfer carries up to 64 objects; for a batch for everyone larger than one broadcast carries, the step says so and "Send" stays off (Section 17.4.4). "Send" hands the batch to the station; when the station accepts it, a message says how many objects were queued, for whom and how many bytes, and the objects read Queued, then On air. Sent to one station, the editor says "Acknowledged by the next station on the way" once that station acknowledged it. "Attach to a mail" puts the objects in a file attached to the mail being written and opens it: nothing is sent until you send the mail, and the objects stay as they were.
Withdraw and delete. "Withdraw..." asks first, then sends a kill to where the object was last sent; the object stays on your map, withdrawn, until you delete it, and "Send again..." puts it back. "Delete" removes a draft or a withdrawn object from your map at once, with nothing sent; "Undo" in the panel brings it back for a while.
7.6.6 Map packs
Map packs give the map streets and roads, towns, water and sea marks when you zoom in (Section 30.5). They are got on the World Map, in its Maps panel. While the panel is open, the map draws where each pack covers: a pack installed here in green, following the ground it has data for, and a pack on the station's list as a dashed purple box, with its name and size where there is room. A click on the map picks the pack there and highlights it and its row.
"For this view" lists the packs that cover what is on the map, the best match first, each with its size and whether it is installed, and a "Download", "Update" or "Retry" button; a download shows its progress on the row. The list of packs ships with mLink, so every pack is listed and outlined before the station has ever had the internet; once it has, the station gets the newest list from the project's server and uses whichever of the two is newer. "Download through the station" says how many packs are on the list and its date, with "Get the list again"; "Show every pack on the list" lists them all by country. "Installed on this computer" lists the installed packs with their size and map date, each with "Remove" (it asks "Remove it" or "Keep"). "Install a pack from a file (.mlpk)" installs one from a file. The station's download source is on from the start; turning it off is station set-up, in Settings, Display, "Map packs", which has a button to open the Maps panel.
7.7 Radio
7.7.1 Waterfall and spectrum
"Waterfall" is the familiar scrolling picture of the band, ten rows a second, 0 to 3 kHz of audio as your receiver passes it in 10 Hz steps. A two-way switch at the left of its toolbar, "Flat" or "Isometric", picks how it is drawn; "Settings" > "Display" > "Waterfall" has the same switch, and the choice is kept on this computer.
"Flat" puts frequency across and time downward, newest at the top. Its toolbar has a "dB floor" slider (lower it to bring out weak signals; the colors span 60 dB above it), a color scheme ("Heatmap", "Viridis", "Grayscale" or "Plasma"), and a "samples/row" slider that averages several rows into each one, which scrolls slower and shows weak signals more steadily. Make the window taller for more history.
"Isometric" draws the last six seconds as a landscape seen from above at an angle: frequency runs to the right and down along the bright front edge, which is now, and older moments recede to the right and up. Anything louder than −60 dB stands up as a bar, taller and brighter the louder it is. Faint bands on the floor and a ruler along the front edge mark where mLink's signals belong (emergency, the three announce channels, bulk and its control channel); while the emergency light is on, bars in the emergency region turn red. In FM mode the HF marks are hidden. The picture needs a window of some height; a window too short for it says so.
The spectrum, a strip of bars across the top of the Waterfall window when the window is tall enough, shows the latest tenth of a second as a bar graph on a fixed scale from −90 to −10 dB, where 0 dB would be a tone at the sound card's full scale.
7.8 Station, data and system
7.8.1 Settings
"Settings" has a tree on the left and a page on the right. The tree
lists nine pages (ten in a development build), in the order a new station is set up, with the sections
of each under it. A page shows all its sections one under the other, with
one or two sentences at its top saying what the page is for; scroll down it,
or pick a section in the tree and the page scrolls to it. Settings opens on
the first page, "Station", and whenever it opens the selected row is in view
in the tree. A box above the tree, "Filter settings...",
shows only the sections whose name, or whose page's name, contains what you
type; type vox and you are one click from the keying settings.
Each section's help lines sit under its controls. At a station run by one
person every section can be changed. Where a section needs more than this
seat has, it opens with one line saying so: who can change it at a station
with accounts, or "Needs the technician password: enter it" with a box and
"Sign in" at a station with separate passwords
(Section 9.1). The pages and
their sections are:
- Station: "Callsign", "Grid square", "Position and GPS", "Operator presence" and "Station clock". "Position and GPS" has three parts. "Latitude", "Longitude" and "Altitude (m)" take a precise position. "GPS" has a "Use gpsd" tick box with an address and port, and shows "FIX" or "no fix" while it is on. On an Android phone the box reads "Use this phone's GPS", there is no address, and a line with an "Open app settings" button appears if Android has not been given permission to use location. "Auto beacon" sends your position by itself: "Off", or "Every 2 min", "Every 5 min", "Every 10 min" or "Every 30 min" (Section 30.2.2).
- Radio, in the order a radio is set up: "Rig control" (the rig's live status above its settings), "Test the keying" (the radio keyed for a second with no audio, see Section 5.3.10), "Sound devices" (the sound system and the "Capture (RX)" and "Playback (TX)" devices, with "Show all interfaces"; the lists follow what is plugged in by themselves), "Levels and Tune" (the "RX gain" and "TX level" sliders with a receive meter and its "CLIP" lamp, a transmit meter with its "OVER" lamp, and the "Tune" button, which sends your identification and then a steady tone for setting the radio's drive, see Section 5.3.7), "Radio self test" (the last result and the button that opens it in Diagnostics, Section 5.3.11), then "FM mode (FmLink)", "VOX keying (FM only)", "Relay policy" and "MeshCore radio" (below). Each test says what it still needs before it can run.
- Alerts: "Alert sounds" (the speaker this client plays its alert sounds on, and their volume).
- Notifications: "What notifies you", one table of every kind of notification, with what each one does (Section 7.8.5).
- Mail: "Mail server": the server's address and the three gateway tick boxes, applied with the page's "Apply" (the actions, such as registering, are in Mail, folder "Mailbox (net)", which the page opens). Internet data: "Sources", with one button, "Open Internet data (Sources)".
- Display: "Size and layout": "UI scale", eight steps from 75% to 300%, saved with your window layout, and the "Use desktop layout" and "Use phone layout" buttons; "Text size": "Normal", "Large" (115 %) or "Larger" (130 %), every piece of text with the rows and buttons around it and room for it in each window, without shrinking the desktop as UI scale does, kept on this computer; "Theme": "Classic", the gray look, or "Motif", a blue-gray look with deeper bevels, taking effect at once and kept on this computer; "Depth": "Flat", "Subtle", "Medium" or "Bold", how much shadow and light the windows, menus and buttons are drawn with (the window in front stands out and the others sit back), "Medium" at the start, working with either theme and kept on this computer; "Redraw only windows that changed", on at the start, which copies a window that looks exactly as it did a moment ago instead of drawing it again (less work for the screen and the processor, the same picture): turn it off if a window ever shows a stale picture, kept on this computer (when the computer's graphics cannot do it, it turns itself off until mLink is started again and the page says why); "Time zone": "UTC (Z)" (the default), "This computer's local time", or "A named zone" with its name typed in the form the zone list uses, such as America/Denver or Asia/Kolkata, applied with the page's "Apply" and kept on this computer. Every time the client prints (chat messages, the logs, acknowledgments and the tables, and the taskbar clock's local line) then reads in that zone and ends with its name (Z, MDT, IST). A named zone needs the computer's zone list, which Linux, macOS and the BSDs have; on Windows it shows the computer's local time and the page says so. The present time comes from the computer's clock. "Pop-up time": how long a pop-up notice stays when its row in the Notifications table says "Display setting". And "Waterfall".
- Connection: "Station address", "Station port" and "Station password". Applying a new host or port reconnects this client at once; a new station password applies to the next sign-in.
- Debugging: "Radio control traffic", the first of the advanced tools for finding out what went wrong (Section 7.8.3).
- Advanced, in a development build only: "Fake-OTA hub (testing)", for rehearsals without a radio.
The "Station" and "Radio" pages and "VOX keying (FM only)" are covered step by step in Chapter 5, what to set on the radio itself in Chapter 6, and "Alerts" has its own section below. Three others need a word here.
"Relay policy" sets how much this station carries for
others. The list offers, in words with the station's own name for each,
listen_only, relay_off, announce_only
and allow_bulk; the page's "Apply" sets it. The
page itself says that allow_bulk is right for almost every
station; what each level does is in
Section 21.9. The level shown is the saved one;
it takes effect once the Inhibit switch allows transmitting
(Section 7.3.4).
"Operator presence" has one tick box, "Operator at the radio". It is ticked until you untick it, and the choice is saved, so it holds the next time the station starts. Unticked, the station announces itself as unattended (Section 20.3.1).
"Station clock" shows the time the station thinks it is, the time on the device you are sitting at, and the difference. A small computer such as a Raspberry Pi has no battery-backed clock and often no internet, so after a power-up its clock can be hours or years wrong. A wrong clock dates mail and messages wrongly, throws off the time stations share over the air, and can stop the link to the mail server (its certificate check fails when the clock is far off). "Set the station's clock from this device" sends this device's time to the station. "Open the Time window" opens every clock mLink knows in one place (Section 7.8.2).
The client also does it by itself when it is sure of its own time: it asks the project's web server (mlinkproject.org) for the time once in a while, the Android client reads the phone's "automatic date and time" setting, and when that check worked, the station reports no time source of its own, and the station is more than 2 seconds off, the client sets it once per connection and shows a pop-up such as "The station's clock was 3 hours 12 minutes off; set from this device." It sends the time again every 10 minutes while it stays connected. A device that only trusts its own clock sets the station only when you press the button. Setting the clock needs the technician role (Section 9.1).
Every time the client connects, it also compares the station's clock with the clock of the computer you are sitting at. If they differ by more than 2 seconds and the automatic setting above has not fixed it (this computer's time was not checked, or the web page cannot check it), a window titled "The clocks disagree" opens. It shows both times, in the time zone chosen under Display and in UTC, says in words how far apart they are ("The station's clock is 3 days 2 hours behind this computer's."), and says which clock, if either, was checked against internet time. "Set the station to this computer's time" sends this computer's time; "Enter the time..." lets you type the correct date and time, read in the zone shown beside the fields, and sets the station from that; "Leave it" (or closing the window) is your answer for that station and that difference for as long as the client runs: signing in again after a dropped link does not ask again, and the window comes back by itself only for another station or when the difference moves by more than a minute (for a difference of hours or days, a tenth of it, but never more than ten minutes). While the clocks still disagree, the status row shows "clock differs"; pressing it opens the window again. A seat that may not set the station's clock sees the two times and how to get the right to set it, but no set button.
If the program on the station computer is allowed to change the computer's clock, it does, and every other program on that computer sees the new time. If it is not, it keeps the correction in memory only: mLink itself uses the right time, but other programs on that computer do not, and after a restart the client sends it again. A time earlier than the version of mLink in use is refused. A station whose time came from an internet-checked client counts as having an internet time source for 15 minutes after each setting.
"FM mode (FmLink)" belongs to FM operation, which has its own part of this book (Section 34.5).
"MeshCore radio" connects the station to a MeshCore board: a small LoRa radio running MeshCore's companion firmware, reached by a USB cable or by Bluetooth. It sits beside the station's own radio and never takes its place: mLink keeps working on the air as before. The section shows whether the board is connected, with its name and firmware, or why not. "Open the MeshCore Manager" opens the applet that shows and changes the board, and turns the link on and off as well. Which way the board connects depends on how it was flashed: MeshCore's USB companion firmware talks only over the cable, its Bluetooth companion firmware only over Bluetooth, so choose "USB cable" or "Bluetooth" to match. With "USB cable", pick the board's USB port in the list and tick "Use a MeshCore radio". Before the link starts, mLink says which board it has been tried with so far (one: a Meshnology copy of the Heltec V3, an ESP32-S3 board with a separate USB chip, on MeshCore's USB companion firmware 1.18) and asks you to be sure of the port; "Turn it on" starts the link, "Cancel" leaves it off. Other boards should work the same way but have not been tried. If you do not know which port it is, press "Find the port": unplug the board's USB cable when asked, plug it back in, and mLink picks the port that went away and came back. If a new port appears before any went away, mLink offers it but says it is not sure: it may be the board being plugged in, or another device, such as a radio whose USB ports appear when it is switched on.
With "Bluetooth", press "Look for boards": the station listens for about eight seconds and lists the MeshCore boards it heard, with their signal strength and whether this computer is paired with them already. Pick the board and tick "Use a MeshCore radio". The board asks for a six-digit PIN the first time; a board with a screen shows it there (a new one each time it starts, unless a fixed one was set), and a board without a screen uses 123456 unless it was changed. Android and macOS ask for the PIN in their own window. On Linux, type it in the "PIN" box first (here or on the MeshCore Manager's "Connection" page; six digits): the station pairs with the board itself, which a Raspberry Pi without a desktop needs; leave the box empty if the desktop's own Bluetooth settings ask instead. mLink does not keep the PIN. Windows lets mLink use only a board already paired in Windows' own Bluetooth settings, so pair it there first; "List the paired boards" then shows it. The board takes one Bluetooth connection at a time: while the station holds it, a phone app cannot use it, and turning the link off lets it go. Over Bluetooth the board has been tried from Linux and from an Android tablet; Windows and macOS have not been tried yet. The BSD builds of mLink have no Bluetooth support.
With the port the station keeps which device it is (its USB maker, product and serial number), and it will not open that port while another device is on it: it says so instead, and waits for the board. On Linux it also stores the port by a name that stays with the board when the computer numbers its USB ports differently after a restart or a replug. That name comes from the board's serial number, so a board without one of its own (or sharing it with another device) keeps the name the system gave it, and the section says so.
The station refuses a port that "Rig control" uses, whichever you choose
first, and while the link runs the lists in "Rig control" mark the board's port
"(MeshCore radio)". When the board's port opens, the station lowers the lines that
can key a transmitter at once, as on every port it opens. A board whose own chip
does the USB (the nRF52 and RP2040 boards, for instance) talks only with one line,
DTR, raised: the station recognizes those chip makers by their USB maker numbers
and raises DTR for them alone. On a Mac the station cannot read those numbers yet,
so such a board does not answer there; a board with a separate USB chip (most
ESP32 boards) does. When the board connects, the station sets the board's clock (it
never moves it backwards) and adds the #mlink and
#mlinkdata channels to free channel slots if they are missing. From
then on it reads the board's statistics every 30 seconds and its contacts
every five minutes. The station sends nothing over the board's radio unless you
ask for an advert; the "MeshCore Manager" applet, which "Open the MeshCore
Manager" opens, shows and changes the board's settings.
"Sources", the second tab of "Internet data" (Settings, "Mail and internet" opens it too), is the list of data providers behind "Tracked" (Section 29.2): ID, NAME, KIND, ORIGIN, REFRESH, ON and STATUS, with "List Sources", "Refresh Selected" and "Toggle Enabled".
7.8.2 The Time window
Start, This station, "Time" (or "Open the Time window" under Settings, Station clock) shows every clock mLink knows, each with its time in the zone chosen under Display and a line on where it comes from: this computer (and whether it was checked against internet time at mlinkproject.org, and by how much it was off), the station (what last set it, and how far it is from this computer), the last WWV check, GPS and another station on frequency. mLink does not read the time from GPS or from other stations yet; those two rows say so.
Under "Time source" a list chooses where the time comes from. "This computer" sets the station's clock to this computer's time, as the button under Settings, Station clock does. "Typed by hand" gives a date and a time field, read in the zone shown, and sets the station's clock to them. "Another station on frequency" is grayed: it is not built yet. "WWV by radio" checks the time, and the radio's frequency, against NIST's time station WWV without transmitting: "Check ppm and time..." opens a window that says what will happen. Press "Start", and the station turns Transmit Inhibit on (it finishes anything it is sending first), tunes the radio to WWV at 10 MHz in USB with the dial 1 kHz below the carrier (9.999 MHz), and listens. If 10 MHz cannot be heard, it tries 5 MHz. The window shows what the station is doing, a bar with how much of the time code it has heard, and, once the time is confirmed, the time from WWV, ticking. It usually takes about a minute. Then it measures the radio on WWV's carriers at 5, 10 and 15 MHz, a few seconds each, and the radio goes back to its frequency and mode; the inhibit is lifted, unless it was on before the check. Let the radio warm up for 10 minutes first: the station offers the check itself, once, when the radio has been on that long ("Check ppm and time..." or "Not now" at the top of the Time window).
When the stations heard agree that the station's clock is off, the top of the Time window says so, for example "This station's clock looks about 4 min slow (KX1ABC, W7XYZ and N7DEF agree).", with one button: "Check the time on WWV" opens the check's window, as above; nothing is retuned until you press "Start" there. On FM, where there is no WWV, the button is "Set the clock": it sets the station's clock from this computer. When this computer is the station's own and has not checked internet time, there is no button: the window says the station's clock is this computer's clock, to be set in this computer's own date and time settings. A station whose clock reads earlier than the day its mLink was built says that instead, with the same button. The status row says "clock looks off" meanwhile. The notice goes away at once when the station takes the time from a WWV check or you set the clock, even by a second; it also goes away when more of the stations heard agree with the clock than say it is off, or an hour after the last stamps that said so. How the station judges it is in Section G.5.4.
The time sets the station's clock, and the window says by how much it moved. When the year's own bits have not been heard by the time everything else is confirmed, the year is taken from the date this version of mLink was built, and the window says so, with "Year earlier" and "Year later" to correct it and "Set the station's clock" to set the clock with the year shown; when the station's own clock gives another year, the clock waits for that button.
With rig control, the window then says "This station is now frequency-corrected", how far the radio's dial reads off and by how many hertz mLink now moves it at your frequency, and what each band measured. From then on every dial mLink sets is corrected: press 10 m in Rig Control and the radio goes to 28.085 MHz for real, and Rig Control shows the radio's own dial under the frequency ("Corrected for the radio's +1.46 ppm (WWV check): its own dial reads 28.085.041 MHz"). If the error changed a lot since the last check, has a part that does not grow with the frequency, or is past the 1.5 ppm mLink recommends (Section 6.11), the window says so: such a radio may need to be repaired or aligned. It then asks: "This station will be frequency-corrected. Would you like to schedule a new correction every hour (this takes about 10 seconds)?" "Yes, every hour" turns that on. Under "WWV by radio" the Time window shows the correction in force, with "Clear the correction" to take it off, "Correct the frequency every hour" (or "Stop the hourly correction"), and "Check WWV at start without a time source". A station that has no reliable time source of its own asks that last question at the top of the window once. Without rig control nothing is kept: the window tells you how far off the dial is, and you tune for it yourself.
When mLink cannot set the radio's dial (no rig control, or you said never to the radio's setup), the window tells you where to tune ("Tune the radio to 9,999.000 kHz in USB...") and waits for "I have tuned it"; at the end it asks you to tune back and waits for "The radio is back". A radio whose dial mLink can read is seen arriving, so the button is not needed. "Stop the check" puts the radio back at once. Closing the window does not stop the check: "Show the check..." opens it again. While the radio is away, lifting Transmit Inhibit does not let the station transmit on the time station's frequency: the check brings the radio back first, then lifts it. If the radio cannot be put back, the window asks you to tune it back by hand and the inhibit stays on until you have. If the station stops in the middle of a check (a crash, a power cut), the radio may still be on WWV when it starts again. If the check was tuning by CAT, the station was stopped less than 10 minutes, and the radio still reads the WWV dial, mLink puts it back by CAT and tells you. Otherwise the Time window asks you to tune it back, and the inhibit cannot be lifted until you have. How the check reads the broadcast, and what the station does every hour and at start, is in Appendix G.
7.8.3 Debugging: recording the radio control traffic
The "Debugging" page holds the advanced tools; each is off until you switch it
on. The first is the "Radio control" row's tick box, "Record in the log", changed with
the page's Apply. While it is on, the station writes to its log every byte it
sends the radio and every byte it reads back, in the form
IF; or \x0D for a carriage return (any byte that is not a
printable letter, digit or sign is written as \x and two hex digits).
It also writes any input it throws away unread before a question, which is how
a radio that has fallen into its own terminal menu shows itself, whether
each reply was valid or not (matched what the rig file says a good answer
looks like), the state of the serial port's lines (speed, DTR, RTS and, where
the system can read them, CTS, DSR and carrier) whenever the station changes
one and every ten seconds, and every ten seconds a one-word health
verdict for the radio link: ok (everything asked was answered
validly), degraded (some answers were wrong, missing or echoes, or the
radio sent input nobody asked for) or failing (questions were asked
and none got a valid answer).
The switch is kept at the station, so it holds across restarts and works
with no client attached; mlinkd --cat-wire-log turns it on for one
run. It makes the log grow: about 1.5 MB an hour at the default polling
interval, and the log keeps the last 20 MB or so, about thirteen hours.
Switch it off when you have what you need. The page also shows, with the
switch on or off, how many questions the radio has been asked and how many it
answered, answered wrongly or did not answer, and how many bytes it sent
unasked. To read the record, run mlink-logsum --cat
(Section 5.3.3).
7.8.4 Settings: Alerts
Settings, "Alerts" is about this client's own sounds, which play on the computer the client runs on. The top line says whether alert sound is on, and where, or why it is off. Below it, "Speaker for alerts" lists this computer's sound outputs. Next to each, the list marks the one in use "[chosen]", this computer's default output "[suggested]" when it is safe, and any device that is, or may be, the radio's "[radio - not allowed]". Select a row to read why, then press "Use this speaker". The client refuses the radio's device with the reason, and never picks one by itself; why is in Section 5.3.9. "No speaker" turns sound off, and "Refresh list" looks again after you plug something in. The choice and the volumes are kept on this computer.
"Master volume" runs from 20 to 100 %. "Emergency and drill" is a share of the master, from 30 to 100 %: emergency sound can be made quieter but never silent. Which events make a sound at all, and with which tone, is chosen in Settings, "Notifications" (Section 7.8.5). The computer's own volume and mute still apply. "Test emergency", "Test drill", "Test chat" and "Test mail" play each sound once. No sound plays while this station is transmitting from this computer; it waits for the end of the transmission. You hear:
- for a real emergency, and for one marked EMERGENCY STATUS UNCONFIRMED: two pitches alternating high and low for about two seconds, again every four seconds until you open the call (Section 25.5.3);
- for a drill: one steady, lower note, once;
- for a chat message or a mail from a friend whose alert is "Sound" (Section 7.6.3): one short beep, a higher one for mail.
In the web client the sound comes from the browser, on the computer you are using, through its default output. Browsers allow a page to make sound only after a click on it, so the client asks once, with a note you can click or the "Allow alert sounds" button on this page, and remembers the answer. After a reload the browser starts sound again at your first click on the page. If the page is open on the radio's own computer and the radio transmits on that computer's default output, the web client refuses to play and says so; use the desktop client there.
7.8.5 Settings: Notifications
Settings, "Notifications", "What notifies you", is one table of every kind of notification the client can make. Each row is one kind, such as "New mail", "Chat message from a friend you watch" or "Connection to the station lost", under a heading that groups it (Messages, Emergency, Station and radio, Network and connection, Updates, Contacts and log, What you just did). The columns are what a notification of that kind can do: "Pop-up" (a notice in the corner of the screen), "Sound" (a tone), "Phone" (a notification of the phone, outside the client), "List" (a row in the notification list behind the bell, Section 7.8.8) and "Badge" (a count or dot on a launcher or tab). Tick the boxes you want and clear the rest. A dash means the kind has no such channel. Two selectors sit at the end of the row: "Sound" picks which of the client's tones plays, and "Pop-up stays" says how long its notice stays, from "Display setting" (the time in Settings, "Display", "Pop-up time") to "Until I click it". "Restore defaults" puts every row back as the client shipped. Every change is kept on this device at once. On a phone-sized screen each kind is a card with one large row to touch per channel.
Everything is on except the offer to log a contact you have just worked: the client no longer pops that up unless you tick it. Stations, "Logbook" and its "Log contact" action work whether it is on or not. Choose what distracts you in the middle of real traffic; a row you cleared still has its other channels, so a notice with its pop-up cleared still appears in the list.
7.8.6 Alerts and notifications on an Android phone
On an Android phone the station keeps running when the client window is closed, so the phone tells you about traffic itself, in three places. All of them are silent as far as Android is concerned; the sounds are mLink's own and are described below.
- The station notification, "mLink station running", stays in the pull-down. Besides the station's state it shows how many unread mail you have and how many chat messages have come in since you last looked at "Chat". Expanded, it lists the newest unread mail (who from, the subject) and the last few unread chat messages. Touch it to open mLink; "Stop mLink" in it stops the station.
- "Mail and messages" posts a notice when new mail arrives and when a text addressed to this station is heard. Touching it opens "Mail" or "Chat". The notice goes when the mail is read in the client, or the chat looked at.
- "Emergencies" posts a high-priority notice when an emergency call is heard, which opens "Emergency" and stays until you have looked at the call, or it is acknowledged or cleared. Its channel asks Android to let it through Do Not Disturb. Android does that only if you allow it for mLink (Settings, Notifications, Do Not Disturb, Apps), so check that setting once.
While the mLink window is in front, it shows these itself and plays its own sounds, so the notices for mail and messages are not posted over it. An emergency notice always is.
The sounds are the same short tones as on the desktop (Section 7.8.4), at the volumes set under Settings, "Alerts", and they play on the phone's built-in speaker and nowhere else. This is deliberate. A radio's USB audio interface looks to the phone like a sound card, and Android may send media and notification sound to it. That sound would go into the radio's audio input, key the transmitter and put an unidentified signal on the air. So mLink never lets Android play its alerts: it plays them itself, asks for the built-in speaker, reads back which output was really chosen before the tone begins, and stops if it was any other. The output is opened for one tone and closed again. A phone with no built-in speaker vibrates instead and plays nothing.
7.8.7 Organization
"Organization" has two tabs, "Cluster" and "People". At a station run by one person every control in them simply works. Where a control needs more than this seat has, the window says so at that control (Section 9.1).
"Cluster" is for a station made of several daemons sharing one callsign (Chapter 33). It shows this member's name; a MEMBERS list with STATE, BAND, DIAL and LAST SEEN, and a "Query member" button that fetches a live member's status; PENDING JOIN REQUESTS with "Approve" and "Deny"; and a JOIN A CLUSTER form with "Host:", "Port:" and "Name:" and a "Join cluster" button. A member of a cluster sees "Leave cluster" instead, which asks first.
"People" is for operator accounts (Chapter 9). The first line says, in one sentence, what this seat may do: "One-person station: you have every control." at a station run by one person, or for example "Signed in as bob. You can send and receive; changing the radio or the station's settings needs a technician, and managing people needs an administrator." at a station with accounts. Below it:
- PEOPLE: at a station with no accounts, one sentence and "Add person". "Add person" first shows BEFORE YOU ADD THE FIRST PERSON, which says what changes, including that the station password stops giving full control; "Continue" opens the form and "Cancel" leaves everything as it was. At a station with accounts: the list with NAME, ROLE, STATUS and POSITION, and the buttons "Add person", "Change role", "Reset password", "Disable" or "Enable", and "Remove", which asks first. Adding or editing opens a short form: "Name:", "Role:" (with one line on what each role may do), "Position:", "Password:" and "Confirm:".
- WALK-UP ACCESS (only with accounts): one tick box, "Allow walk-up guest operating (station password)", with the consequence of switching it off written under it.
- STATION PASSWORD: a box for a new one and "Change".
- SESSIONS ON THIS MEMBER: who is signed in, with NAME, FROM and IDLE, and ROLE as well at a station with accounts. Select another seat and "Sign out" ends its session.
At a station that uses separate station passwords (Section 9.1.3), a seat signed in on the station password also sees ANOTHER PASSWORD: a box and "Sign in". The same box appears at any control the seat may not use, under "Needs the technician password: enter it" (or the administrator password). "Sign in" signs this seat in again with what you typed; if it is wrong, the seat signs straight back in with the password it had. If another seat, or a program talking to the daemon, switches on separate passwords or creates the first account while you are signed in, a notice says so and WHAT CHANGED here explains it once.
7.8.8 Notifications
"Notifications" is the one list behind the taskbar bell, newest first,
holding the last 64 rows. Each row is a pop-up notice that has gone, or an
event the station reported: acknowledgments for what you sent, mail arriving,
area broadcasts for your position, relay outcomes, what a virtual net tells you,
the state of a distress beacon, distress calls heard, a chat message from a friend
you watch, and the problems that stop the station transmitting. A star marks a row
you have not read; selecting a row reads it. A > at the end of a
row means it leads somewhere, and "Open" takes you there: mail and message
events to "Mail" (new mail opens that mail, mail you sent opens "Sent"), a friend's chat message to that friend's thread in "Chat", emergency events to
"Emergency" (the call that needs attention, else the newest), net traffic to "Nets", update notices to "About this build", relay events to the "Relay" tab of "Diagnostics", other transmit events to "Send
queue", cluster events to "Organization", rig and PTT events to Settings, and
the station's findings about its own audio to the "Audio and radio" tab of "Diagnostics". A row
without a > has nowhere to go. "Mark all read" reads every row,
and "Clear" empties the list.
7.8.9 Internet data
"Internet data" (Start, Heard & Map) has two tabs. "Tracked" is where you ask for data from the internet, such as weather observations, and keep it fresh (Section 29.3). Tabs across the top sort the rows by kind, starting with "All". Each row shows LABEL, PARAMS, MODE, VIA, AGE, STATUS and whether it is ON. Four buttons act on the list:
- "+ Add" opens "Track new data": pick a "Source:", give its parameters and an optional label, choose "Tracked (auto-refresh)" or "One-off (fetch once)", and choose "HTTP (our internet)" or "OTA (ask a peer)" to have a station with internet fetch it for you over the air (Section 29.4). "Track" adds the row.
- "Refresh now" asks again for the selected row.
- "Toggle Enabled" and "Remove".
The pane below shows when the selected row was last fetched, where from, and the data itself. The easier route for weather is the map: right-click a spot and choose "Track weather here". Weather with a position also appears on the map's weather layer.
7.8.10 Station
"Station" (Start, This station) is the operator's window, with the tabs "Status" and "Send queue". "Diagnostics" (Start, Tools) is the technician's window.
"Status" is the at-a-glance panel, in four groups. CONNECTION: the daemon address, the state, the session number. STATION: the callsign and grid the station transmits, and "Access", one sentence on what this seat may do; at a station with accounts also who is signed in and the role, colored by authority. RADIO: "Doing now", what the station is doing in words ("listening; the channel is free", "transmitting"...) and when it last changed, the "Mode" ("HF" or "FM (FmLink)", with ", keyed by VOX" for a VOX-keyed radio), "Relay", what the relay policy carries for others in words, the outbox with how many messages are pending and how many are on the air, the net control heard on the frequency, and the virtual net with what you are in it. "Frequency" says whether your radio is on the same frequency as the stations you hear: "in step", "retuning the radio +12 Hz" while the station corrects it through CAT, or in red "about 12 Hz off (4 of 5 stations agree)" with the advice on which way to turn the dial when there is no CAT control (Section 15.11). An off-frequency warning also appears as a notification once, and clicking it opens this tab. A second notification, "Announce frames are arriving about so many hertz above or below where mLink listens", comes when three announce frames in thirty minutes have shown the same offset of 18 Hz or more (Section 15.11.3). It says one of the two radios is off, yours or the sender's, and cannot say which. If it is yours, it gives the dial move for your sideband; turn the dial by that much. If the radio is accurate, the sender is the one off and there is nothing to do. Past about 90 Hz it gives no figure, only "more than about 64 Hz", and you set the dial to the band's frequency again. The notice is taken back at once when the stations that were far off arrive within reach again ("back on frequency"), and otherwise, with a short note, after thirty minutes without such a frame. CLUSTER: this member's name and how many members are reachable, or "Standalone station". The panel is read-only.
"Send queue" lists everything the station still owes the air: messages waiting their turn for the transmitter, the one on the air, and messages waiting to try again, for example until a relay offers to carry them. Each row gives its state in words, its type, who it is for, its size, how many times it has gone to the air and why it waits. Select a row for the whole story under the list and its buttons: "Abort" takes a queued or airing message back to Drafts, "Remove" deletes it so nothing more is sent, and for a message still in the transmitter's queue you can rewrite its destination or text ("Apply edit") before it goes out. When anything is in that queue, "Stop all waiting..." offers to stop them all; the question it asks gives the count and reminds you that the message on the air and emergency traffic are not affected.
7.8.11 Diagnostics
"Diagnostics" (Start, Tools) is the one window for how the station is working. It has four tabs, and each asks the station only while it is shown. Every tab has "Copy" at the top right, which copies what the tab shows as text, and "Share", which starts a new mail with that text; "Share" shows only where sharing works. "Audio and radio" and "Counters" also have "Refresh".
"Audio and radio" lists what the station found wrong with its own sound card and radio control (Section 7.8.20). Each item is marked "Warning" or "Notice" and says what to check; one that held over several checks adds "seen in N of the last M checks". An item leaves the list by itself once its cause is gone. When there is nothing it says "No problems found with this station's audio or radio control." On the simulated air it says "Not watched in this build (simulated air)." The tab asks every five seconds. Under the list, "Check the radio and its sound" has three buttons: "Sound devices" opens Settings, Radio, Sound devices; "Radio self test" and "CAT profile" open those tabs.
"Radio self test" runs the test that checks the radio transmits the whole audio band, shows each tone's reading as it arrives and the verdict at the end (Section 5.3.11). It transmits.
"CAT profile" reads every function the radio's rig file declares and writes a report to send to the project (Section 6.13). It keys the radio only when its key test box is ticked.
"Log" shows the station's recent log lines, newest at the bottom: the time, the level (DEBUG, INFO, WARN or ERROR), the part of the station and the line. "Show" picks "Everything", "Information and above" (the start value) or "Warnings and errors", and "Find in the lines" keeps only the lines with your words. The tab follows new lines while you are at the bottom, so you can scroll back without it jumping away, and it keeps the last 512 lines. Drag across lines to select them; right-click a line for "Copy this line", "Copy the selection" or "Copy every line shown". The whole log is in the station's log file, mlinkd.log, on the computer the station runs on; there, Notepad's "Open the daemon log" shows its end (Section 7.8.14), which a browser cannot do. What the daemon logs is in Chapter 31; where the file is, and the file to send with a problem report, are in Section 5.3.2, and a program that reads it and says in plain words what went wrong is in Section 5.3.3.
"Counters" is the daemon's own counters, with the age of the figures ("Updated N s ago"), a "Refresh" button, and a new answer every three seconds while it is shown. Its sections are "Status" (the state, the last SNR, frames sent and received), "Defer (busy time remaining)", "Announce channels (unreadable detections, last minute)", "Stations", "MAC layer", "Relay" and "Emergency channel". Under "Defer" is how long the station believes each announce channel and the bulk region stay occupied, which this book calls a defer (Section 19.2). Received-frame counts that go up show the station is decoding mLink signals, even before any station has shown up in "Heard". Under "Announce channels" each announce channel, named by its frequency, shows how many times in the last minute the station started on something there that it could not read, with "(occupied: not waited for before sending)" while the channel is filled with noise or another signal (Section 15.6).
"Relay" has two tables: "Relay candidates (heard recently, usable link)", the stations heard recently with a usable link, and "Learned routes (what has worked, recent first)", the relay paths that have worked lately. It is where a relay notification's "Open" takes you (Chapter 21).
7.8.12 Updates
"Updates" (Start, then This station) shows in one place everything this station and this client keep current: mLink itself, the applets, the rig files and the map packs. Each row says what is installed and who made it ("from mLink", "by" a call sign for someone else's applet, "your own copy"), what is newer and what it changes, and whether an update is going on, went in or failed, with the reason. "Recent", at the bottom, lists what changed and when, and whether you pressed for it or it happened by itself. The line under the buttons says what updates by itself and when the station looks next.
"Check now" asks the station for every list again and shows what is new; it installs nothing. "Update all" takes every row with a plain update; each row has its own button: "Update", "Install", "Use it now" for the radio in use, and for a rig file you changed "Keep mine" or "Use the new one" (yours is then kept beside it, listed with "(custom)"). A newer mLink is installed from About this build (Section 7.8.17), where the station asks for a technician. Without a station the window shows what this client has. What updates by itself, and why the radio in use waits, is in Section D.2.1 for rig files and in the Applets paragraphs below for applets.
7.8.13 Applets
Applets are small programs that run in windows of their own inside the client: games, pages that show the station's data your way, tools someone wrote for a net. mLink comes with several, "Updates" among them (Section 7.8.12). "Toolbox" shows everything an applet can do, one page each. "MeshCore Manager" (under Radio) reads and sets a MeshCore radio attached to the station: its first page, "Connection", turns the link on and off and picks the board (a USB port, or a board a Bluetooth scan found); it sets the name, radio settings, power, position and channels, shows the contacts, battery and statistics, and can send an advert or restart the board. "Checkers" is a game for two players at one station or two stations over the air, and "Hamtillery" one with tanks on a hillside taking turns to aim and fire, the wind blowing and the hills blowing up: two to four players at one station, or two to six stations over the air. Over the air one operator invites the others from the game's window; each move goes to the other stations' copies as a short message of its own, never into the chat. A message for an applet that is not open waits for it, and a notice says it came. Each applet is listed in the Start menu where it asks to be, the games under Tools, then Games.
"Rig control" (under Radio) is the station's radio in one window. It shows the frequency the way the radio shows it, its band, the mode, how the radio is keyed and whether it is transmitting, the power setting and the SWR of the last transmission where the radio reports them, the side and split of a radio with two, and mLink's own FM mode with its "Follow the radio (Auto)" box. "Set-up notes" at the top shows what the radio's rig file says to set on the radio by hand, and "Radio settings" opens Settings, "Radio". A radio that mLink can tune is tuned from here: type the frequency and press "Tune VFO", step it with the buttons either side of the step size, or press a band (it goes back to where you last were on that band; the first time, to mLink's frequency there: 1.850, 3.555, 7.085, 10.125, 14.125, 18.085, 21.125, 24.905 and 28.085 MHz in USB, and 51.540, 145.070, 223.580, 446.100, 927.100 and 1294.700 MHz in FM, a proposed band plan that may still change; on 60 m and 4 m, which have none yet, it puts the band's start in the field for you to finish). "Set mode" puts the radio in the mode chosen from the modes its rig file can set, and when the radio is in a mode that part of the band does not usually run, a button offers the usual one. Nothing is sent to the radio until you press a button, and the window shows what the radio reads back. For a radio whose rig file sets and reads the power in watts, type the power under "Meters" and press "Set power": the radio holds it to its own limits and the window shows what it took. mLink does not change the power while the radio self test has it lowered; once the test has put the old power back, a power you set stays. When the radio's rig file describes controls (the FT-991A's file does), a "Radio controls" section lists them: a row of buttons for each switch or choice (the antenna tuner in line or not, the preamp, the attenuator, the AGC, the noise blanker), with the radio's own state in brackets, and a "Tune antenna" button for the radio's tuner. Each button is one write, only when you press it. "Tune antenna" makes the radio key itself and send a carrier, so connect an antenna first: it waits for clear air, is refused wherever the Tune is (an emergency, transmit inhibit, a net that is running, messages going out), is never repeated, ends when the radio stops, and mLink cuts it off if the radio is still transmitting after 15 seconds. "Stop" ends it at once. A radio whose file has no controls shows no such section (Section D.10). For a radio that cannot tell mLink its frequency, type the frequency it is on and press "Tell mLink": mLink then knows the band, and the FM mode's Auto follows it. Say it again when you turn the dial; the window asks "Still on ...?" after the station restarts and after four hours, and until you answer, Auto does not go by it. It also asks when you lift transmit inhibit after saying the frequency (you are about to transmit: is the radio still there?); Auto keeps going by the value meanwhile.
"Applets" (Start, then Tools) has two tabs. "Installed" lists them all, with who made each and its version ("from mLink", "by" the call sign the repository lists for someone else's applet, or "your own") and whether it is running. Who made an applet is the repository's word, kept when it was installed: the project's own applets are "from mLink" whether they came with mLink or were updated from the repository since, and are trusted the same way, until you change them. "Open" opens it; "Run again" starts it afresh. "Edit" opens its file in Notepad; for an applet that came with mLink it first makes your own copy, which runs from then on and which an update never overwrites. "New applet" makes a small working applet to start from and opens it in Notepad. Saving the file, from Notepad or any other editor, runs the applet again at once. "Look again" finds an applet folder someone gave you after you put it in the folder the window names. "Hide" takes an applet that came with mLink out of the Start menu and the list; it waits under "Hidden", where "Bring back" returns it, and an update of mLink keeps it hidden. "Remove" deletes an applet from the repository or one of your own, after asking ("and its saved data" deletes what it saved too). "Update..." appears when the repository lists a newer version and opens Updates, where it is installed; if you edited the applet since installing it, this window asks first, because the update replaces the whole folder.
The applets that came with mLink keep themselves current. When the station has the internet, it fetches the repository's list when you start and then every hour while a client is connected; when that list holds a newer version of one of them, the client installs it by itself (a list fetched by "Check now" in Updates only shows it); a running applet starts again on the new version with what it had saved, and the row says "from mLink, version N" (Updates lists it under "Recent"). Nothing of this goes over the air. An applet you made your own copy of, or edited, is never updated by itself: Updates shows it with "Update...", and this window asks first. When an update of mLink brings the same version or a newer one, that one runs again.
"Available" lists the applets in the project's repository that your client knows of; a new install already knows the list as it was when that version of mLink was made. The station fetches the whole list, and the applets you install, from the internet when its "mLink applets" internet source is on (it is from the start; "Turn off the internet source" on this tab stops it). Without it the tab asks APPLETS by mail, a little at a time so as not to fill the channel: every answer fits one bulk frame, and a longer list comes a page at a time ("Next page"). "Check for updates" asks only for what changed since the list you last had, from the internet or by mail; when too much has changed for one answer of three frames, "Check my installed applets" asks only about the ones you have. The box above the list filters what the client already knows, with no mail; "Search by mail" asks APPLETS for applets whose name or description holds those words. "Details" asks for an applet's description, and "Get by mail" for the applet itself. These mails go straight to the mail server by the internet when your station is registered with it (the answer is in your mailbox seconds later), and over the air otherwise; the answers come back as ordinary mail, and the tab offers "Install" once an applet's mail has arrived. Either way the client checks every applet against the list before it installs it. On the Installed tab, an applet of your own, or one from the repository that you changed, has a "Submit" button: it sends the applet to the repository, with a line saying what it does; the project looks at every applet before it is listed, and the answer comes back as mail (Section E.16).
An applet that goes wrong stops alone: its window shows what happened and on which line, with "Open line N in Notepad" and "Run again", and the rest of the client carries on. An applet's sounds play only on the speaker chosen for alerts. An applet can read what the station shows you and send chat and mail under your callsign, within limits; run applets from people you trust. Writing one is Appendix E.
7.8.14 Notepad
"Notepad" (Start, then Tools) is a plain text editor for your own files: station notes, a net script, a message you are drafting, a radio's settings file. "New" starts an empty text; "Open" picks a file, or type its path in the File box and press Enter; "Save" writes it back and "Save as" picks another name. "Reload" reads the file again and gives up your changes. If something else changed the file after Notepad read it, Notepad says so, and "Save" asks before it replaces what is there. Closing the window, or opening another file, with unsaved changes asks whether to save, discard or stay.
Select with the mouse (drag, or Shift and click to extend), then "Cut", "Copy" or "Paste"; "Undo" and "Redo" step back and forward through up to fifty changes, a run of typing counting as one. "Find" (Ctrl+F) looks for text without caring about capital letters; "Next" and "Previous" move between the matches and the box says which one you are on. "Word wrap" can be turned off, and then long lines run past the edge and Shift and the mouse wheel scroll them sideways. A text of up to 128 KB and 15,000 lines is held; a longer file opens read only, cut, with a notice saying so.
A file whose name ends in .lua, such as an applet's, gets help of its own. Keywords, text, comments,
numbers and the applet libraries' names are shown in colors of their own. A moment after you stop
typing, and when the file opens, Notepad checks the file without running it: a bar under the text names
the first problem it found (a line Lua cannot read, a name that was never set, a call or option the
libraries do not have, a command or event name with a typo, a message to other stations written as text
where packing it would take a fraction of the airtime) with "Go to line N", and "Next" when there
are more. After ui., mlink., applet., fs.,
json., util., geo., bits. or rl. a
short list of the names that can follow
opens under the cursor: typing narrows it, the up and down arrows move in it, Tab or Enter puts the name
in, and Escape closes it. While the cursor is inside a call's brackets, a line above it shows what the
call takes and gives back.
"Send via mail" opens New mail with the selected text (all of it with nothing selected) as the body. A text of more than 8,191 bytes, which is more than the mail body holds, goes as an attached .txt file instead. "Open the daemon log" shows the end of the station's log file, read only; it works when the station runs on this computer, and "Save as" keeps a copy. The log file itself is never written. In a browser, "Save" downloads the file, and "Open" and "Reload" are not available, because a web page cannot read your files; paste the text instead.
7.8.15 Pre-release builds: the notice, About this build and feedback
While mLink is a pre-release, a released build checks for newer releases, reports to the project and can stop itself from transmitting. A build you compiled yourself (a development build) never checks for updates and never locks. Its update tile is gray with a "D", and "About this build" says "development build (exempt)". Its telemetry works as a release build's, but goes to a separate place for development builds only (the report window below says how).
7.8.16 The pre-release notice
The first time the client connects to a released build whose notice has not been answered, a large window, "Pre-release notice", opens on the desktop. It is an ordinary window, never a box that locks the screen: the Emergency window and every other window stay usable while the notice waits. Its words are the ones the daemon prints in its terminal at every start; the client asks the daemon for them, so the two always agree. They say, in order:
- Do not rely on mLink for any kind of safety. It is unfinished software; keep another way to call for help.
- A release is one exact version of the source, named by the git hash of the project's main branch. mLink does not update itself: it checks for a new release and tells you, with the date it stops transmitting. You press "Update now" in "About this build", and only then does it download the release, check it and install it. The AppImage and the Windows zip start the new release the next time mLink stops and starts; any other copy shows the download page, to unpack over the old folder by hand (Section 5.2.6).
- A station that is not up to date goes listen-only for everything, emergency calls included, 14 days after a newer release came out and was not installed, or 14 days after it was last online and up to date. A new download counts as up to date on the day it was built. Listen-only ends when the update is installed and mLink is started again.
- Every build also goes listen-only 14 days after it was published, even when no newer release has come out: the pre-release notice and "About this build" say "This build stops working on" that date, in UTC.
- The station gathers data on how mLink is used and on the problems it runs into, and about once an hour uploads it to mlinkproject.org: the computer's type, memory and processor, how mLink is running, its settings (never passwords or keys), everything the station heard and sent with exact times, message text included, and its event log. Mail that came from the internet goes up without its text. What is kept, and for how long, is on mlinkproject.org/privacy.html. A station that uses a mail server also tells that server which version of mLink it runs.
- There is a window for sending a report to the project.
Two buttons end the notice. "Accept" says you have read it and agree to send reports. "Turn telemetry off" asks once more, in the daemon's own words, and says plainly that problem reports from this station will go unanswered; the update check and the 14-day rule stay on. The status row says "notice waiting" until the notice is answered, and clicking it brings the window back. At a station run by one person you simply answer it. Where answering needs more than this seat has, because the answer changes how the station behaves, the seat reads the same text and gets a "Close" button, with a line above it saying who can answer or asking for the technician password (Section 9.1). Nothing is uploaded before "Accept". To read the notice again, open "About this build" and press "Pre-release notice".
7.8.17 About this build
Open it from Start, Help, or click the update tile in the tray. It shows:
- a one-line verdict: "Up to date", "Out of date: listen-only in 9 days 3 hours (2026-10-28)", "Update check overdue: ..." or, in red, "Listen-only: this build is out of date. Update to transmit.";
- the version, the git hash, the release channel ("development build (exempt)" for a development build), the platform and "Log file": where the daemon writes its log, on the computer the daemon runs on, or "none" (Section 31.10.1);
- the update state: the status, the days left until listen-only and the date, the time of the last check with its result and where the answer came from (the mail server or the project's website), the last time the station was up to date, and the newest release it knows of. "Check for updates" asks again now. While a newer release is out, an "Update" block says so, with the date the station stops transmitting, and offers "Update now" (a seat that may not install sees who can, or the password box, instead) or, on a copy installed by hand, "Open the download page". One press downloads, checks and installs; the new release runs the next time mLink is stopped and started;
- when an update could not be installed: the station's words in full, the exact error, whether the report of it has gone to mlinkproject.org, and "Open the download page" (Section 5.2.6);
- the telemetry state (on, or off with the warning that problem reports go unanswered), whether the notice was accepted, how many snapshots were taken, are waiting and were sent, and the last upload and its error, if any;
- how many seconds of audio a report would carry ("Recorded audio");
- the installation id, with a "Copy id" button. Quote it to request that your reports be deleted (reports may be deleted upon request);
- "Send a report to the project", which opens the report window (Section 7.8.19). The daemon's log file is worth sending with a report (Section 5.3.2).
The page refreshes itself every 15 seconds while it is open and every five minutes otherwise, and at once when the station's list of problems changes.
7.8.18 When the station is listen-only
A locked station still receives. The red strip at the top says why, and "About this build" opens with a red band reading "Listen-only: this build is out of date. Update to transmit." The places you would transmit from say so too. In "Mail", choosing the Radio route shows "listen-only: out of date" beside it. In "Emergency" a red note above the red button says that this station cannot send an emergency and that you should use voice on the radio. The button stays, and the station refuses the send. The Inhibit switch cannot lift the lock: pressing it answers with a note saying the station stays listen-only until it is updated.
7.8.19 Send a report to the project
Open "Send a report to the project" from Start, Help, from "About this build", or from "Send to the project" on Diagnostics' "CAT profile" tab, which ticks its report for you (Section 6.13). It is the one place to tell the project what worked and what did not. Type a note. Below it the window lists what goes with the report, in the station's own words and with sizes. A station snapshot always goes: this build, the computer, mLink as a running program, the settings without passwords or keys, the station's state, its sound devices and radio control with what it found about them, and the session form if you filled it in. Each of the others has a tick box: the journal (every event the station logged since its last snapshot, with the messages, mail and stations it heard and sent since then, message text included), the recorded radio audio (Section 7.8.20), the last radio self test's result and the last CAT profile report. A part the station does not have is listed without a box, with the reason.
Under the note the window shows a preview that follows what you type and tick by itself, a moment after you stop. The station cleans the note (it removes control characters and terminal escape sequences, replaces bytes that are not valid text and cuts anything past 16 KiB), and the preview shows it exactly as it will be sent, with its size in bytes and what was removed, and says how the report goes. There is nothing to press to see it, and "Send" never waits for it: it sends the note and ticks as they are at that moment, cleaned the same way. After it is sent the window says what became of it: sent, or not sent and why. What each report sends is also set out on mlinkproject.org/report/.
Sending a report yourself is your consent for that one report. It goes to mlinkproject.org at once even when telemetry is off or its notice is not yet accepted, and nothing else goes with it: the snapshots the station kept wait for the notice as before, and telemetry stays as it was. A station with telemetry off records nothing, so its report carries no journal, no messages and no recorded audio, and if it cannot be sent the station keeps no copy. With telemetry on and the notice accepted, the report goes at once together with the snapshots waiting.
When the station cannot reach mlinkproject.org, tick "Send by mLink mail instead". The report then goes as an ordinary mLink mail to the project's mailbox, SYSRIG1, by the station's usual mail path, and carries the note, one line naming the build and your callsign, and the CAT profile report's text when it is ticked; nothing else. When a report could not be sent the window offers this route itself. From a terminal, the daemon takes a note as a command-line option (Chapter 31); that note needs telemetry on and goes once the notice is accepted.
A development build records telemetry like a release build, with the same notice, the same switch in Settings and the same Accept or Turn off choice, but what it uploads goes to a separate place on mlinkproject.org, kept apart from the release stations' telemetry; it is never mixed with theirs or counted with it. On the simulated air a development build records nothing and sends nothing. In the report window the journal and the recorded audio are ticked as in a release build; they travel as one telemetry snapshot to that separate place, and the report's mail names the snapshot so the two can be matched. What you can also tick is the last rig test (the CAT profile report: the commands the station sent, the radio's answers, the rig file's name and its fingerprint), the last radio self test's result, the device and platform information (on Android the phone's model and version, the sound devices in use and the USB devices seen with their vendor and product numbers) and the last lines of the station's own log. Under the preview the window shows every ticked attachment in full, as it will be sent. A part within its size limit goes whole; a longer one is cut at the end of a line, with a line saying how much was left out. The report goes over the internet, as a mail with the subject "mLink dev report", to the project's development mailbox, SYSDEV1, kept apart from the reports of release stations; the mail begins with the channel (dev), the build's git hash when it has one, the platform, the version, your callsign and, when a snapshot went with it, the snapshot's number. "Send by mLink mail instead" works as it does everywhere.
7.8.20 Recorded audio and what the station checks for itself
Audio is the road mLink drives on, so the station watches its own sound card and radio control and says what it finds, in plain words. The findings are listed on the "Audio and radio" tab of "Diagnostics" (Section 7.8.11), each marked "Warning" or "Notice" with how often it held in the last checks and a sentence that says what to try. When findings come to stand, one pop-up notice says so for all of them and opens the tab (Section 7.3.6); a finding that clears and comes back is told again only after six hours. When nothing is wrong the tab says "No problems found with this station's audio or radio control." A finding needs more than one moment of evidence: two of the last three minutes of receive audio, three of the last five transmissions, or at least three dropouts. The station looks for:
- receive audio that is silent, very weak, overloaded (clipped at full scale) or flat-topped by a limiter, or carries a DC offset;
- a sound card nobody chose: the station is listening to the computer's default input, which may be a microphone (Section 5.3.5);
- mains hum at 50 or 60 Hz and its harmonics, which lands on the emergency channel near 325 Hz (a ground loop between the computer and the radio);
- a receive filter in the radio that cuts off part of the audio mLink uses, such as a high cut below 2,900 Hz that removes the top of the bulk region; the station reads the filter's edges from the shape of the band noise. When the radio's rig file states what its receive filter passes in the mode you are using, the station compares the two. A filter that is as narrow as the file says (a radio with no wider filter to select) is shown as information in the diagnostics and in the log and raises no warning, because it is a known limit of that radio. A filter clearly narrower than the file says does warn, and the warning points at the likely cause: the radio's filter or DSP setting, the mode, or the sound interface. Where the file names a wider choice, the message names it;
- a slow AGC (automatic gain control): the noise drops for a long moment after every strong signal, so weak frames right behind it are lost;
- impulsive noise: short pulses that lift the noise by 6 dB or more over its quiet moments, in at least four of every ten seconds of a minute. A vehicle's ignition or alternator, an electric fence, a switching power supply, a charger or an LED driver sends pulses at a steady rate, and the finding gives the spacing so the source can be found by switching things off; lightning static comes at random times, and the finding says that instead. Either way it tells you to try the radio's noise blanker, the one place where mLink asks for it (Section 6.2);
- a transmission keyed with no audio at all;
- your own transmission heard back on the receive audio (harmless if the radio sends a transmit monitor over USB), or something else rising on the receive audio only while you transmit;
- the receive audio taking a long time to come back after each transmission;
- an announce channel filled with noise or another signal for at least half of each of two of the last three minutes (Section 15.6);
- a sound card whose clock runs far from its rate, or that plays at a different rate from the one it records at, and samples lost to an overloaded computer (the card is timed against the computer's own crystal, not the clock a time service is correcting, so a computer that has just set its time is not mistaken for a card running fast or slow);
- the sound card, the radio's control port or their USB devices dropping out. Each dropout is noted with whether the station was transmitting, how long after the key went down, the dial frequency and the transmit level. When the dropouts come with transmitting and not with receiving, and the counts are large enough to rule out chance, the station says so, for example: "Audio and radio control dropped 4 times while transmitting and never while receiving: likely RF getting into the USB cable (try ferrite chokes, lower power, cable routing)."
The findings that judge the radio from the receive audio (its filter, its AGC, hum, what comes back while transmitting, an occupied announce channel) wait until the audio can be taken to be the radio's: a sound device you chose, neither silent nor clipped. Until then they are not listed or told.
These findings, with the figures behind them, go with every snapshot. None of them needs a recording.
The recording a problem report carries. A released build keeps the newest 60 seconds of what the sound device delivered and what the transmitter produced, in memory only. A technician can set the length from 0 to 180 seconds; 0 keeps none and uses no memory for it. When you press "Report a problem" or send feedback, the report carries that recording as it is at that moment, and the window says beforehand how many seconds it holds and how large it is (about a megabyte a minute; the exact 16-bit samples at the modem's own 12 kHz rate, packed losslessly). With the length at 0 the window says the report carries no recording. Nothing else ever copies the recording out.
Frames the station could not decode. When the receiver hears a frame but cannot decode it, the station may keep a short recording of that frame alone, with half a second on either side, and what the receiver knew about it: the channel and kind of frame, how strongly it was detected, the SNR estimate, the frequency offset and which step of decoding failed. A few frames that decoded only just are kept the same way, to compare against. They hold only on-air signals on mLink's channels. At most 24 are kept a day (6 MB), never more than two in an hour and ten minutes apart, spread over the day, and no more than 8 of any one kind; they go up with the ordinary uploads. All recorded audio together is uploaded no more than 50 MB a day; the rest waits for the next day.
The report's snapshot also lists your sound devices and which one mLink uses, the receiver's and transmitter's levels, counts of audio glitches, the radio's control port, the USB devices and serial ports that are plugged in, which program (by name and process number) has mLink's audio device or radio port open, and which programs from a fixed list of radio and audio software are running (rigctld, flrig, fldigi, WSJT-X, JS8Call, Direwolf, ARDOP, VARA, Pat, Winlink Express, GridTracker, gqrx, SDR++, SDRangel, CQRLOG and the PulseAudio and PipeWire sound servers). No other program is ever named.
7.8.21 Help
"Help" is a tree of short topics in the same groups as the Start menu, plus an introduction and a "Troubleshooting" page. The "?" button on any window's title bar opens Help at that window's topic. This manual and the quickstart come inside every download: "Open the manual" and "Open the quickstart" across the top of Help show them in your web browser with no internet connection, and "mlinkproject.org" opens the project's site.
7.9 Habits worth forming
- Glance at the tray, not the windows. "Transmit on", a green light by your callsign and no red "cannot transmit" in the row above mean the station is fine.
- Read the size color before you send.
- Use "Abort", not the radio's power switch. Abort keeps your message as a draft.
7.10 What to remember
- A released pre-release build asks you to read and answer a notice, can report to the project, and goes listen-only, emergency included, when it is out of date; "About this build" shows where it stands.
- The Start menu groups every applet under seven headings, Emergency first, each group opening beside it; typing searches every applet by name; "Mail", "Stations", "Station" and "Diagnostics" are hubs with tabs.
- The tray shows the station's health at a glance, a red "cannot transmit" in the row above it means the station cannot transmit until you fix something, and clicking either takes you where you need to go.
- Escape removes one layer per press, and with nothing else open it closes the front window.
- On a phone-sized screen the same applets appear one at a time, with a Back button and a Home list in place of windows and the taskbar.
- The distress button is always live, and every field above it is optional.
The Outbox, and Why Your Station Waits
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
8.1 Where to look
Everything you ask the station to send is written to its outbox before anything reaches the air. You see the outbox in "Mail" (Section 7.5.1). "Waiting to send" lists the messages the station is still working on; "Sent" lists your own mail and chat messages that have left Drafts and are no longer waiting. Tick "Show carried and control traffic" above Sent to see everything else that left the station as well: mail it carried for other stations, net notices, map objects and mail control messages.
Both lists have the same columns. STATE says where the message is, in the words of Table 8.1. TO is the station it is for. WHAT is the subject of a mail, or the first words of a chat message, so three mails to one station can be told apart. TYPE says what kind of message it is ("Mail", "Chat", "Carried: Mail" and so on). SENT (QUEUED in "Waiting to send") is the clock time it was sent; hold the pointer on it to see when it last changed. TRIES is how many times it has gone to the air. WHY holds the station's note on the row, which is very often not an error at all: the commonest notes are shown reworded in plain words, the rest as the station wrote them, and a delivered row says who confirmed it. BYTES is its size. "View" opens the selected row under the list, with the same words in full. The "Station" window counts the waiting rows, and its "Send queue" tab lists the same rows with the same words (Section 7.8.10).
8.2 The states
In everyday running most rows go "Waiting its turn", "On the air now", then "Delivered to" the station they were for. "Waiting for ..." and "With ..." rows come and go; "Not sent" is rare. A row says "Delivered" only when the addressee's own station confirmed it, straight to yours or in the report of the relay, courier or net control that carried it. When another station holds the message, the row names that station instead.
| STATE | What it means | What you do |
|---|---|---|
| Waiting its turn | Accepted and waiting for the transmitter. | Nothing. If it stays for long, see Section 8.5. |
| On the air now | Being transmitted, asking the addressee whether it can take a long message, waiting for its answer, or in the middle of a search for a relay. Mail sent by internet is on the air while it is handed to the mailserver. | Nothing. "Abort" stops it. |
| Trying again (3) | A message to one station that has gone out before and is going again; the number is how many times it has been on the air. | Nothing. "Abort" stops it. |
| Waiting for W1AW (busy) | The addressee answered your station's ask with "not now". The message goes when that station is next heard, and never to a relay for this reason (Section 19.3.3). | Leave it alone. |
| Waiting to hear W1AW or a relay | The addressee did not answer and no other station has been heard lately, so there is nobody to ask to pass the message on. It goes out when the addressee or another station is heard. | Leave it alone. |
| Waiting to hear W1AW | The message has waited one lifetime for its addressee and the station keeps waiting for that station to be heard. | Leave it alone. |
| Waiting for a relay | The addressee did not answer, and the station has asked for a relay and nobody has offered yet, or a relay could not deliver; it asks again after a growing wait (Section 21.7). | Leave it alone. |
| Waiting for a gateway | A mail went out for any gateway to pick up, and none has taken it yet. It goes again when a gateway is heard. | Leave it alone. |
| Waiting for the mail server | Your station has internet and is handing the mail to the mailserver instead of transmitting it. | Nothing. |
| Waiting | Set aside for a reason the WHY column gives in the station's own words. | Read the note. |
| With relay K7ABC | That relay took the message and has not yet reported whether it was delivered. It may well have been (Section 21.6.1). | Leave it alone; do not send it again. |
| With gateway N7XYZ | Mail only: that gateway acknowledged the mail and holds it for its addressee, who has not confirmed it yet. At a station made of several daemons it can also be another member that took over sending it (Chapter 33). | Nothing. |
| With net control N7XYZ | Mail only: the net control of a Virtual Net you and the addressee both belong to keeps it for the addressee, who is off the air, and delivers it when they check in again (Section 24.8). Your station sends it no more. | Nothing. |
| With the mail server | Mail only: the mailserver holds it for its recipients. Your own station put it there over the internet, or a gateway that heard it did and said so (WHY names it). It also reads this way while a copy is at the mailserver and your Virtual Net carries the mail over the air. The recipient has not fetched it yet. | Nothing. |
| With the next station | Mail acknowledged by the next station on the way, from a time before the station recorded which one. The addressee has not confirmed it. | Nothing. |
| Delivered to W1AW | The addressee's own station confirmed it. WHY says "W1AW acknowledged it" for a direct delivery, or "Through relay K7ABC" (or courier, or net control) when a station between reported the addressee's acknowledgment. | Nothing. It is done. |
| Sent to everyone | A message to everyone, an area or a Virtual Net went out. Nobody acknowledges such a message, so this is as far as it goes; it does not mean anyone received it. | Nothing. |
| Gave up: it may still have arrived | A chat message to one station whose lifetime ran out before that station acknowledged it. The station has stopped trying, and the message may well have arrived with only the acknowledgment lost. Mail never gives up: its lifetime running out leaves it waiting and the station still trying (Section 22.6). | Send it again if it still matters, or "Send as mail". |
| Stopped | You stopped it with "Stop all waiting...". | Send it again if you want it to go. |
| Not sent | The station has stopped trying. WHY says why. | Read the note, fix the cause, then "View", "Edit as new mail" and send again. |
A message you saved, or one that came back because you aborted it, is a draft: it is in "Drafts", not in these lists.
8.3 Waiting, or not sent?
A row that says "Waiting for ...", "Waiting to hear ..." or "With ..." is one the station is still working on. In the station's own word it is deferred: set aside, kept on disk, and tried again without being asked, at growing intervals, once it has heard some station since the last try (Section 22.6.1). A message is set aside when:
- the addressee answered the station's ask with "not now": it is busy, and the message goes when it is next heard (Section 19.3.3);
- the station asked for a relay and nobody offered;
- a relay took the message and has not yet reported the outcome;
- a relay reported that it could not deliver, and the message still has time left;
- a mail for everyone to pick up went out and no gateway took it;
- a mail is on its way to the mailserver over the internet.
"Not sent" means the station has stopped, and tells you why. The reasons fall into four groups:
- This station is not allowed to transmit. Its relay policy is set to listen only (Section 21.9). Change the policy if that was not intended.
- The message cannot be sent in this form. It is too big, or too big for the link to that station as it stands, or a message to everyone that is longer than a broadcast may be (Section 17.5.5). Shorten it, address it to one station, or send it as mail.
- The station could not put it on the air. Preparing or starting the transmission went wrong. This is rare; look at the Daemon Log.
- Every way out is used up. A relay reported failure and the message had no time left, or a deposit at the mailserver failed and there was no way to send the mail by radio instead.
8.4 Reading the note
The notes are in the station's own terse words; the WHY column shows the commonest of them reworded in plain words, and "View" shows the row's note in full. "CMS" means the mailserver and "B" means bytes. The ones you are likely to meet, with the STATE each goes with:
| STATE | Note | Meaning |
|---|---|---|
| Waiting for a relay | "no relay volunteered yet; asking again after a growing wait" | No answer from the destination, and nobody offered to relay (Section 21.7). |
| Waiting for callsign (busy) | "callsign is busy; sending when callsign is next heard" | The addressee answered your station's ask with "not now". The message goes when that station is heard again, or after a growing wait, and never to a relay for this reason (Section 19.3.3). |
| With relay callsign | "relay handed off; awaiting confirmation on next contact" | A relay took the message but has not reported back. It may well have been delivered (Section 21.6.1). |
| Waiting for a relay | "relay failed; asking again after a growing wait" | The relay reported it could not deliver. The station will look for another way. |
| Waiting for a relay | "relay hand-off preempted; asking again after a growing wait" | A station agreed to relay but did not get the message from yours. It will ask again. |
| Waiting for a relay, Waiting to hear callsign or Waiting | "still seeking a relay; will keep trying", "waiting to hear callsign; will keep trying" or "delivery still unconfirmed; will keep trying" | The message has waited a whole lifetime and the station has started another. A chat message does not get another: it gives up. |
| Waiting to hear callsign or a relay | "callsign did not answer. No other station has been heard for n min, so there is nobody to ask to pass it on. Kept; it goes out when callsign or another station is heard." | Asking the frequency for a relay would be heard by nobody, so the station waits for a station to be heard first. |
| Waiting for a gateway | "no pickup: waiting for a gateway", later "still waiting for a gateway; will keep trying" | Your mail went out for pickup and no gateway took it. It goes again when a gateway is heard. |
| Delivered to callsign | "confirmed: callsign, callsign, ..." | A mail to several stations: every station it names confirmed it, in its reply slot or when asked (Section 26.5). It is done. |
| Waiting for a gateway | "confirmed: ...; not confirmed: ...; not confirmed, not asked: ...; n more with no reply slot; the mailserver or a courier takes the rest" | A mail to several stations: which of the stations it names confirmed it. "Not confirmed" were asked and did not answer; "not asked" were not heard lately, or the asking stopped. The rest are left to a gateway and the couriers, and the mail goes again when a gateway is heard: to everyone when one of the stations still unconfirmed has been heard lately, otherwise to the gateway alone. |
| With the mail server | "taken by callsign; confirmed: ...; not confirmed, not asked: ..." | A mail to several stations that a gateway took: the mailserver has it for the stations that did not confirm it. Nobody more is asked and it does not go again. |
| On the air now | "sent to gateway callsign for deposit" | A mail to several stations too large to send to everyone at once goes to that gateway, which deposits it at the mailserver for them. The row reads "With the mail server" once the gateway reports the deposit. |
| Waiting for a gateway | "too large to send to everyone at once; held until a gateway is heard to deposit it" | The same, with no gateway heard lately. It goes when one is heard. |
| Waiting for the mail server | "cms deposit in flight: addressee not heard lately - depositing at the CMS", or the same with "we have internet - depositing the pickup at the CMS" or "no path to the addressee" | Your station has internet and is handing the mail to the mailserver instead of transmitting it. |
| With the mail server | "copy left at the mailserver; asking the net to carry it over the air" | A copy is at the mailserver while your Virtual Net carries the mail to a member over the air. |
| Waiting its turn | "gateway heard; retrying pickup" | A gateway has just been heard, and the waiting mail is queued again. |
| Waiting its turn | "mailserver deposit failed - sending over the air" | The internet deposit did not work, so the mail goes by radio after all. |
| With the mail server | "cms fallback: deposited for pickup" or "own mail returned by courier: deposited at the CMS" | The mail is at the mailserver, by one route or another. |
| With net control callsign | "held by net control callsign" | That net control keeps the mail for its addressee. |
| Not sent | "the relay policy is listen only: change it in Settings > Radio > Relay policy" | The station is set to listen only. |
| Not sent | "this version is out of date: the station only listens until it is updated" | The update lockout keeps the station listening until it is updated. |
| Not sent | "no reply, and no relay asked for: " and one of the three reasons above | Nobody answered, and the station could not ask for a relay because it had stopped transmitting. |
| Not sent | "tx mode UNSUPPORTED (reason) for n B compressed (m B raw)" | No way to send this size to this destination. The reason begins "link below announce floor" (the link is too weak for anything), ">1 bulk frame and link too weak for bulk" (too big for so weak a link) or "broadcast > one segment" (too long for a message to everyone). |
| Not sent | "bulk build failed (...)", "shortburst build failed (...)", "longburst build failed (...)" or "envelope wrap failed" | The transmission could not be prepared; with "bulk", usually because the message is too large even after compression. |
| Not sent | "link too weak for bulk; wait or request a relay" | The addressee answered the ask "too weak for bulk", and the message could not be put back in line to be sent another way. |
| Not sent | "member busy; net control keeps the mail" | Your station is net control; the member answered its ask with "not now". The mail stays kept for the member's next try. |
| Not sent | "not answered; net control keeps the mail" | Your station is net control and tried to deliver mail it keeps for a member; the member did not answer. The mail stays kept for the member's next check-in. |
| Not sent | "relay reported delivery failure" | The relay could not deliver and the message had no time left. |
| Not sent | "mailserver unreachable / rejected the mail", "cms fallback deposit failed" or "internet send could not start" | The mailserver could not be reached or refused the mail. Check "Mailbox (net)". |
| Not sent | On a row whose TYPE begins "Carried:" (shown with "Show carried and control traffic"): "relay delivery failed" or "relay transmit failed to start" | Traffic your station carried for someone else, and how that went. Nothing for you to do. |
A note not listed here is the station reporting something unusual; the "Log" tab of "Diagnostics" has the detail (Section 7.8.11).
8.5 Why the station waits before keying
A row that says "Waiting its turn" for a few seconds, or occasionally much longer, is waiting for one of these reasons:
- Somebody announced a transfer. Your station heard another station's opener, or an ask or its answer, and is staying off that piece of the passband until the announced time has passed (Section 19.2). A long transfer between two other stations can hold a large send of yours for most of a minute, and a message to a station that has just granted someone else's ask waits until that transfer is over (Section 19.3.4).
- The air is busy right now. The receiver is in the middle of a frame, or has just finished one (Section 19.6).
- The channel has just cleared. Every station that was waiting picks a random moment in the next few seconds, so they do not all key at once (Section 19.8).
- The channel has been quiet. A new message on a quiet channel waits a random moment of its own too, so stations given messages at the same moment do not all key together (Section 19.8).
- Your own large sends are being spaced out. After signs of collisions, the station leaves gaps between the big transfers it starts (Section 19.8.2). Short messages are not held by this.
- Something more urgent goes first. Replies the station owes go ahead of new traffic (Section 19.5), and while your own distress call is active, routine traffic waits (Section 25.2).
You can watch the first reason directly. "Diagnostics", on its "Counters" tab, shows, under "Defer (busy time remaining)", how long the station believes each announce channel and the bulk region stay occupied.
8.6 What you can do to a row
- "Abort", in "Waiting to send" or on the taskbar, is offered while a row is in "Waiting to send". It calls the message off wherever it is (on the air, in a search for a relay, set aside) and moves it to Drafts (Section 18.9).
- "View", in Sent and in "Waiting to send", shows the message as it was sent, under the list; "Edit as new mail" there opens a copy in the composer to change and send, and the old row stays until you delete it. This is how you re-send a failed message.
- "Delete" removes a row from the list. A row that is on the air must be aborted first.
- "Send as mail", on a chat message that gave up, opens a mail to the same station with the same text, for you to review and send.
- In Drafts, "Send" transmits the draft exactly as saved, "Edit" reopens it and "Delete" removes it. The last column, "WHY IT IS HERE", says how each row came to be a draft: "Saved by you", "You stopped it", "Cut by your emergency broadcast", "Program stopped while sending", "Not sent before a restart", "Mailserver deposit interrupted" or "Send queue was full".
- In "Send queue" (the "Station" window), a message still waiting for the transmitter can be changed ("Apply edit") or removed ("Drop"). "Stop all waiting..." removes every waiting message at once, after asking: they read "Stopped" in Sent and can be sent again from there. The message being transmitted at that moment and emergency traffic are not touched.
There is no "retry now" button; a waiting row tries again by itself.
One more thing puts a message in Drafts: sending a distress call while that message is on the air. The message stops, and its row carries the note "interrupted by emergency broadcast" (Section 25.2).
8.7 After a restart
The outbox is kept on disk, so nothing is lost when the daemon stops. Rows that were waiting their turn or on the air, and mail whose deposit at the mailserver was under way, come back as drafts: look in "Drafts" after any restart and send what you still want sent. Rows set aside (waiting for a relay, a gateway or a station, or with a relay) stay that way and carry on where they were. Section 22.7 has the reasoning.
8.8 What to remember
- "Waiting its turn", "On the air now" and "Delivered to" are the normal path. "Delivered" means the addressee's own station confirmed it; "With ..." names who holds it now, and "With the mail server" means the mailserver has your mail, not yet the recipient.
- "Waiting for ..." means the station is still trying and will try again by itself. Leave it alone and do not send a second copy.
- "Not sent" means the station has stopped. WHY says why; fix the cause, then "View", "Edit as new mail" and send again.
- After a restart, look in Drafts: whatever was waiting its turn or on the air is there, and it is not sent again until you say so.
Accounts, Roles and Shared Stations
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
9.1 One person, separate passwords, or several people
There is no setup question. The station works out its posture from what exists, and the client words everything about access to match.
| Situation | How the station knows | What the client shows |
|---|---|---|
| One person | No accounts, and no technician or administrator password. | Every control. No role words, no refusals, and the taskbar shows only the callsign. |
| Separate passwords | No accounts, but a technician or administrator password is set. | Role words only at a control this seat may not use: "Needs the technician password: enter it", with a box and "Sign in" right there. |
| Several people (organization) | One or more enabled accounts. | The person's name and what they may do; a control above their role says who can. |
9.1.1 One person
A new station starts here and most stay here. The station password gives full control on every member, and nothing on screen mentions a role. A refusal here would be a fault; the client says so and shows the daemon's reason.
9.1.2 The station password
A new station's password is mLink. Change it before the
daemon can be reached from anywhere but its own computer: "Organization",
"People", STATION PASSWORD, or Settings, "Connection", "Station
password". It can be up to 63 characters and cannot be empty. Changing it
does not sign anyone out; it applies to the next sign-in.
9.1.3 Separate passwords
A station without accounts can also have a technician password and an administrator password. The client has no control for setting them; a program talking to the daemon does (Chapter 32). Once an administrator password is set, the station password signs a seat in as an operator, the technician password as a technician and the administrator password as an administrator. A technician password on its own changes nothing for the station password, which keeps full control until an administrator password exists.
"Sign in", next to the password box at a guarded control, signs the seat in again with what you typed; a wrong password signs it straight back in with the one it had. A station that wants each person to sign in by name creates accounts instead.
9.1.4 Several people
There is nothing to convert: create the first account and the station is an organization, and it stays one, because it always keeps at least one administrator account. Before the form opens, the People tab explains what changes, including that the station password stops giving full control. If another seat or a program changes the situation while you are signed in, a notice says so and the People tab explains it once. The screens are the sign-in window (Section 7.2) and "Organization", "People" (Section 7.8.7).
9.2 Operator accounts
An operator account is a named person: a name, a password, a role, an enabled switch and an optional tactical position of up to 31 characters, such as OPS CHIEF. Names are 1 to 24 characters of lower-case letters, digits, underscore and hyphen, so that one person has exactly one spelling wherever the name appears. A station holds up to 64 accounts.
An administrator manages accounts in the People tab. Two guards keep a station from locking itself out: the first account created must be an administrator, and the last enabled administrator cannot be removed, disabled or given a lower role until another administrator exists.
Accounts belong to the station, not to one computer. At a station made of several daemons, an account created on one member works on all of them (Chapter 33).
9.3 The sign-in rule
You always type a name and a password. What happens next leaves no room for doubt:
- If the name is an account's name, the password must be that account's password. Capital letters in the name are ignored. There is no falling back to the station password: an account name belongs to its owner, and nobody borrows a colleague's identity by knowing the station password.
- If the name is not an account, the station password applies. At a solo station it gives full control. At an organization it gives a walk-up guest session with the lowest role, operator, if the administrator allows guests; otherwise the sign-in is refused and the station says it requires an account.
Guests are allowed until an administrator unticks "Allow walk-up guest operating (station password)" in the People tab. With guests off, someone without an account cannot use the station for anything, a distress call included (Section 25.1.1). Think about that before switching it off at a station that might be the only radio in the room.
A wrong password and a disabled account get the same refusal, and take the same time to get it, so the answer does not reveal which accounts exist or are suspended. The real reason is in the station's own log.
9.3.1 How passwords are kept
The station never stores a password. It stores a one-way fingerprint made with PBKDF2: the password is mixed with 16 random bytes, different for every password, and run through a cryptographic hash 100,000 times, leaving 32 bytes that cannot be turned back into the password. Checking a sign-in repeats the work on what you typed and compares the two results. The station password is kept the same way as account passwords. The only place a password is ever written down as typed is the client's own settings file, and only if you tick "Save password (plaintext)" in the sign-in window.
The repetition is deliberate. One check costs the station a fraction of a second, which you never notice when signing in, but it makes guessing passwords from a stolen database very slow. So that a flood of attempts cannot tie up the daemon, each network address gets five sign-in attempts in any ten seconds; further ones are told to wait, whether or not their password was right.
No password of any kind is ever sent by radio (Chapter 28). Between a client and the daemon, however, the sign-in crosses your network unencrypted, which is one more reason to keep the daemon on a network you trust.
9.4 Changes take effect at once
Whenever an account changes, every signed-in session that belongs to an account is checked again on its next command:
- A changed role applies from that command on, without signing out.
- A removed or disabled account's session is ended there, and the client returns to the sign-in window with the station's explanation.
The same holds across a cluster: an account disabled on one member stops working on the others as soon as the change reaches them.
Sessions that signed in with the station password are not tied to an account, so account changes do not touch them. Those from before the first account was created keep the role they had; the People tab points them out and offers "Sign out others". Switching guest access off stops new guest sign-ins at once; to be sure a guest who is already signed in is gone, select that session under SESSIONS ON THIS MEMBER and press "Sign out". An administrator can end any session that way.
A session that sends nothing for 30 minutes is closed by the station. An open client talks to the daemon every few seconds, so this only clears away seats whose client was closed or lost its network. A daemon holds up to 32 sessions at a time.
9.5 Roles: who may do what
mLink has three roles. Each may do everything the one below it may do.
| Role | May do, in addition to the roles below | Typical person |
|---|---|---|
| Administrator | Create, change and remove accounts; switch walk-up guest access; change the station password; sign out other people's sessions. Join or leave a cluster, and approve or deny a member that asks to join. | The station's trustee or a club officer. |
| Technician | Everything that sets how the station behaves on the air: callsign, grid, the station's position, gpsd and the automatic position beacon; relay policy and operator presence; the FM mode and keying settings; rig control; sound devices; whether heard distress calls are repeated. The mail server link: its address and registering with it. Adding, changing and refreshing internet sources. | Whoever looks after the radios and computers. |
| Operator | Their own traffic and their own work: sending chat messages and mail by radio or by internet; drafts, the Sent list and the transmit queue, including Abort; reading and filing mail; checking the mail server for mail and fetching it, by internet or by radio; a sign-in code for the mail portal and the five written-down codes, including asking for new ones; mailing-list subscriptions and the internet chat room; position reports, map objects and area calls; everything in the Nets window; tracked-data requests; notes, the QSO log, friends and beacons lists; every status, log and diagnostic view; station chat; and every emergency action. | Everyone at an operating position. |
Three principles decide which role a command needs.
- Roles guard changes, not looking. Reading the station's configuration, rig status, sound devices, cluster status or mail-server status is open to operators; changing them is not. One thing an operator cannot even read: the list of accounts.
- Your own traffic is yours. Sending, editing, dropping or aborting queued messages is operator work, even though it keys the radio.
- Emergency is never above operator. Every emergency action is open to the lowest role.
Refusals are explicit. A command above your role comes back with the reason, the role it needs and the role you have, and nothing is silently ignored or half done. The client words the refusal for the station's situation: at an organization, who may do it and to ask the person who runs the station; with separate passwords, which password it needs and where to enter it. An operator who tries to change the mail server's address meets exactly this, because setting up the mail server link is technician work; pressing "Get Mail" is not, and works for every role.
9.6 Several operators at one station
Many clients can be connected to one daemon at the same time: desktop clients on the shack computers, and browsers on anyone's laptop. Each connection is a seat, named by the account or, for a guest, by the name typed at sign-in. All seats see the same station: the same heard list, the same inbox, the same Sent list. The radio behaves exactly as it would with one operator; what follows happens between clients and daemon, never on the air.
9.6.1 Who wrote this mail
Mail from a shared station can say which person wrote it and in what capacity. The client attaches the name you signed in with and whatever you typed in the "Position:" field of the sign-in window, each up to 31 characters, and the receiving operator sees them as an "Operator:" line when reading the mail. This is separate from the callsign: the station is who sent it on the air, the author is who wrote it. The position kept with an account in the People tab is a record for the administrator; it is the sign-in window's field that travels with mail. Chapter 26 covers the mail format.
9.6.2 Not answering the same mail twice
When one seat starts a reply to a received mail, every other seat's inbox shows a pencil in front of that mail. Anyone else who presses "Reply" on it is told who is already answering and asked "Reply as well?". The mark clears when the reply is sent or abandoned, and when that seat signs out or its session ends. A daemon tracks up to 16 replies in progress, and in a cluster each member keeps its own.
9.6.3 Talking between seats
At a station with more than one operator, "Chat" lists "Seats" among its rooms: a conversation among the station's own operators (Section 7.5.5). It is never transmitted and never written to disk. The daemon remembers the last 100 lines so that a seat connecting later can catch up, and forgets them when it stops. In a cluster it is one conversation for the whole station: a line typed in the shack reaches the operator at another member (Chapter 33).
9.7 What to remember
- Most stations are one person: no accounts, one station password, full control, no setup, and the client never mentions roles. Separate passwords show a role only at the control it guards. Create one account and the station signs people in by name.
- An account name always needs its own password. Any other name uses the station password and, at an organization, gets a guest session with the operator role, unless guests are switched off.
- Administrator, technician and operator guard changes, not reading. Account changes take effect on the person's next command.
- Emergency actions need only the lowest role and survive the loss of an account in mid-session, but nobody can send anything without first signing in.
- Seats share one station. Mail can carry its author's name and position, a pencil marks a mail someone is already answering, and "This station" chat never goes on the air.
Part III: The Signal
One Passband, Three Regions
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
10.1 Band, channel, region
Three words carry the whole geography of mLink, and they nest like boxes inside boxes.
A band is an amateur frequency range: 40 meters, 20 meters, 2 meters. It is the thing on your license and the thing the band plan chops up.
A channel is one mLink operating frequency inside a band: the dial frequency, and sideband, that you and everyone you want to reach have set.
A region is the part of the audio that comes out of (and goes into) your rig on that channel. There are three: emergency, announce and bulk, and each belongs to exactly one kind of modem.
Band contains channel, channel contains regions. They are levels, not synonyms. In this book "channel" never means a region, with one deliberate exception: the announce region is itself split into narrow announce channels, and that is simply what they are called.
10.2 The map
Every frequency in this chapter is an audio frequency: "325 Hz" means 325 Hz above your dial frequency on the air (Chapter 3).
The lines on the map come in two kinds. The allotment boundaries are round numbers that say which region owns which part of the audio: emergency from 300 to 350 Hz, announce from 350 to 1,500 Hz, bulk from 1,500 to 2,900 Hz. The energy edges are where each modem's signal actually starts and stops, and they sit well inside the allotments. The modems themselves are in Chapter 12, Chapter 13 and Chapter 14; every figure is collected in Appendix A.
10.3 The emergency region: 50 hertz at the bottom
The emergency region is the narrowest region, centered on 325 Hz. One modem sends one of eight tones at a time, 6.25 Hz apart, from 303.125 up to 346.875 Hz, and starts each frame with a sweep from 300 to 350 Hz lasting just under a second. Its filter passes nothing below 290 or above 360 Hz.
That tiny footprint is the point. The emergency modem gets through far below the noise by going very slowly in a very narrow region, so it needs little room, and it gets that room at the bottom of the passband, where it takes nothing from the wide middle the data modems want. It sits at 300 Hz and above because that is where nearly every radio's transmit and receive filters still pass audio at full strength: the low cuts radios ship with (100, 200 or 300 Hz) all fall below it, so the one signal that must always get through does not depend on how a radio's low cut is set.
It is also the only region a station never waits for: the rules about holding off while others are busy (Chapter 19) do not apply to a distress call.
10.4 The announce region: three channels side by side
The announce region holds three identical, independent announce channels, numbered 0, 1 and 2. Each carries the same QPSK modem at its own center frequency: 550, 900 and 1,250 Hz, 350 Hz apart.
Each channel's signal is about 270 Hz wide, so the three occupy 415โ685, 765โ1,035 and 1,115โ1,385 Hz. Each is its own resource: three stations can be sending on the three channels at once, and a listener hears all three.
Why three channels and not one wider, faster one? Announce traffic is many short, independent frames from many stations, and three conversations at once beat queuing for one fast channel when most transmissions last a second or two. How a station chooses among the three is in Chapter 19.
10.5 The bulk region: the wide top half
The bulk region carries the high-throughput modem: OFDM (orthogonal frequency-division multiplexing), 28 closely spaced carriers sent at once. The carriers run from 1,567 to 2,833 Hz, centered on 2,200 Hz, and the modem's filter stops its signal at 1,500 and 2,900 Hz, far enough out that the outermost carriers keep their whole spectral shape (Section 14.7.2). It gets the widest region because it moves the most bytes: more bandwidth is more carriers, and more carriers is more bits per second.
10.5.1 The bulk-control channel
One more tenant lives in the bulk region. At its center, 2,200 Hz, there is a fourth QPSK channel, the same modem as the three announce channels. This is the bulk-control channel, and it carries only the short control frames of a bulk exchange: the ask before a long transfer and its answer (Section 19.3), the opener (the sender's PRESENCE and the frame that says "I'm about to send a bulk burst"), the replies that say what arrived, and the openers of any repair or follow-on burst. Short messages and other routine announce traffic never use it.
How can a QPSK channel sit in the middle of the OFDM modem's region? Because the two take turns. A station keys the bulk-control channel only while the bulk region is quiet, under the same rule that decides when it may start a bulk burst; the burst it opens follows its control frames instead of overlapping them; and the replies go out once the burst has ended. At any moment the bulk region carries either a bulk burst or bulk-control frames, never both.
The pay-off: the frames managing a big transfer never compete with the routine chatter in the announce region.
10.6 Guard bands: measured from energy, not from lines
A guard band is empty spectrum left between two signals so that one's skirts do not spill into the other's receiver. The honest way to measure one is from where the energy really stops.
Take the gap between the emergency region and the lowest announce channel. On the allotment map there is none: the emergency region ends at 350 Hz and the announce region starts there. But nothing transmits at 350 Hz. The highest emergency tone is at 346.875 Hz and the lowest announce signal begins at 415 Hz, so the real separation is about 68 Hz. That leaves room for a rig that is off frequency: the emergency receiver looks for a frame up to 80 Hz either side of the region's center, 245 to 405 Hz, and that whole search still sits below the announce channel's energy (Chapter 12).
The same reading applies everywhere:
- Between announce channels: about 80 Hz (685 to 765 Hz, and 1,035 to 1,115 Hz).
- Between the announce and bulk regions: 115 Hz from the top announce signal near 1,385 Hz to where the bulk filter stops at 1,500 Hz, and 135 Hz to where it passes in full at 1,520 Hz. The 1,500 Hz allotment line is the bulk filter's edge.
- At the top: the bulk filter stops at 2,900 Hz, the transmit edge of many radios; the top bulk carrier at 2,833 Hz sits 67 Hz under it, outside its own main lobe.
10.7 One audio stream, many signals
The audio coming out of your receiver is one stream of numbers. If one station is sending an announce frame on 900 Hz, another is halfway through a bulk burst, and a third is sending a distress call, your audio is simply those three signals added together, plus noise. There is no switchboard and no time slot; the rigs and the air do the adding.
Taking the sum apart is equally simple: every detector and demodulator in the receiver is handed the same audio, and each looks only at its own region through its own filter (Chapter 15). Because the regions do not overlap, the other signals are, to it, silence.
10.8 Keeping each signal in its own region
The sum only works if nobody spills. A signal that leaks outside its region, even faintly, lands inside somebody else's detector. So there is one rule, applied everywhere: every modem filters its own output before it goes to the radio. The filter is part of the modem, not an optional stage somebody might forget to add.
- The emergency modem passes its finished signal through a sharp filter from 290 to 360 Hz, which leaves the tones untouched and removes the faint sidelobes any keyed tone produces.
- Each announce channel is already smoothly shaped by its pulse filter, but that alone lets through skirts only 10 to 15 dB down. So the modem also applies a sharp filter 189 Hz either side of the channel's center (the 270 Hz signal plus a 20% margin each side). Because it trims an already smooth spectrum, it does not ring.
- The bulk modem filters the whole burst, sync symbols and the joins between frames included, to 1,500โ2,900 Hz, with a smooth 20 Hz roll-off at each edge.
The receiving side's own protection against a very loud neighbor's leftovers is in Section 15.5.
10.8.1 All modems at the same level
Every frame leaves the station at the same peak: it is scaled so that its largest swing is the largest the sound card can carry, whichever region it is for. The same peak does not mean the same average power. The emergency tones are steady and their average sits close to their peak; announce and bulk frames are sums of many tones, with rare tall spikes far above their average. So before the scaling, each announce and bulk frame has those spikes shaved to a set height above its average and is then filtered to its own region once more (the 270 Hz of its announce channel, or 1,450 to 2,950 Hz for bulk), so that what the shaving spreads stays inside the region. The shaved part comes back as a faint hiss inside the frame, and the frame gets more average power at the same peak. The emergency tones, and the announce-type frames of an emergency relay chain, are only scaled, never shaved. Whatever your rig's drive and ALC (automatic level control) do, they do to every region alike; the average power each mode gets from a 100 W radio is in Table A.14, and how to set the level is in Section 5.3.7.
10.9 Soft edges: the keying ramp
Switching a signal on or off instantly makes a click, and a click splashes energy across the whole passband. On the air that is the familiar key click. Inside mLink it is worse: to a sensitive detector in another region, a loud station's click looks a little like the start of a frame.
So every announce and bulk transmission gets a soft start and a soft finish. The first and last 20 ms (240 samples) of the assembled transmission are faded along a raised-cosine curve, the smooth S-shape that goes from nothing to full without a corner. The 20 ms is shorter than the natural run-in and run-out of an announce frame's pulse shaping, so on an announce frame the fade touches only the part of the signal that is already rising or falling, never a symbol that carries data.
The emergency modem's sweep carries its own fade-in and fade-out of about 21 ms.
10.9.1 No leader tone on HF
On HF, mLink sends no tone of its own ahead of a transmission: every frame of the plan above is the whole transmission. That is because mLink keys an HF radio by a CAT (computer control) command or a keying line, never by VOX (the radio keying itself when it hears audio); what a radio that only VOX can key may still send is in Section 5.3.12. On an FM channel the leader stays (Section 34.2.2).
10.10 What to remember
- Band contains channel, channel contains regions: emergency (300โ350 Hz), announce (350โ1,500 Hz) and bulk (1,500โ2,900 Hz).
- The announce region holds three independent announce channels at 550, 900 and 1,250 Hz; the bulk region holds the OFDM modem plus the bulk-control channel at 2,200 Hz, which takes turns with it.
- Guard bands are measured from where energy really stops, not from the allotment lines.
- Every modem filters its own output, all send at the same peak level, and announce and bulk transmissions start and stop with a 20 ms ramp.
- mLink's signals occupy 290 to 2,900 Hz, inside what nearly every radio passes.
Error Correction: Reed-Solomon, LDPC and Polar Codes
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
11.1 Why error correction
A voice operator who misses a word says "say again". A data station could do the same for every damaged frame, and on a noisy path it would spend most of its time asking.
Forward error correction (FEC) turns that around. The sender adds redundancy up front: extra bits computed from the data by fixed rules. The receiver checks the rules, and when some of them fail, it works out which bits must be wrong and flips them back. No second transmission is needed. The price is air time: every redundant bit is a bit of payload that was not sent. The code rate says how the air time is split. At rate 1/2, half the bits are data and half are redundancy; at rate 5/6, five out of six are data.
FEC does not replace asking again; it makes asking rare. Each frame fixes its own small errors, so the only frames left to repair (Chapter 18) are the ones that were truly overwhelmed.
11.2 Parity: the whole idea in one bit
Every code in this chapter is built from one operation, XOR (exclusive or). XOR of two bits is 1 if they differ and 0 if they match. XOR a string of bits together and the answer tells you whether it contains an odd or even number of 1s.
A parity bit is one extra bit chosen so that a group of bits, parity included, has an even number of 1s. If one bit in the group flips on the way, the count turns odd and the receiver knows something is wrong. It does not know which bit, though.
To find the bit, use several overlapping groups. Lay nine data bits out in a 3 × 3 grid and add a parity bit for every row and every column. When one bit flips, exactly one row and one column go odd, and the bad bit sits where they cross. Flip it back and the data is repaired.
That is the whole trick behind real error-correcting codes: many overlapping parity checks, arranged so that any likely pattern of damage leaves a distinctive pattern of failed checks. The codes mLink uses are far more efficient than the grid, but they rest on the same idea.
11.3 Reed-Solomon: the classic short code
11.3.1 Bytes instead of bits
A Reed-Solomon code (RS) works on whole bytes rather than single bits. The sender treats the data bytes as the coefficients of a polynomial and appends extra bytes computed from it, using arithmetic in which every byte value from 0 to 255 is a number and every sum and product stays inside that range. The receiver can then solve for which bytes are wrong and what they should have been. The same codes protect CDs, QR codes and deep-space probes.
The useful property is simple to state: for every two parity bytes added, the code can correct one damaged byte, anywhere in the block, whether one bit of that byte is wrong or all eight.
11.3.2 RS(23,11): the yardstick
The classic Reed-Solomon code for a frame the size of mLink's short frames, the yardstick their polar code is measured against, is written RS(23,11): 11 data bytes followed by 12 parity bytes, 23 bytes in all. Twelve parity bytes let it correct up to six damaged bytes out of the 23, in any positions, without being told which ones they are. (Technically it is the standard 255-byte Reed-Solomon code with the unused positions filled with zeros that are never sent; the receiver puts them back before decoding.) Each 23-byte block is one codeword: data and redundancy together.
No mLink frame uses it on the air. Both short frames, announce and emergency, are 11 bytes in 184 coded bits, exactly this size, and both use a polar code of that size instead (Section 11.7), which needs 2 to 4 dB less signal, depending on the frame (Section 11.8.1). RS(23,11) stays in the station's code as the yardstick for that comparison.
11.3.3 Hard decisions, and knowing when it failed
A Reed-Solomon decoder usually works on hard decisions: each received bit is rounded to a plain 0 or 1 before decoding, and the code's six-byte budget does the rest. Rounding throws away how sure the receiver was of each bit, and that is where the polar code gains most of its 3 dB. Reed-Solomon has a valuable second talent, though. When a frame has more damage than the code can fix, the decoder almost always notices that the damage cannot be explained and reports failure instead of inventing an answer. For a frame that carries a callsign or names a message, a missing frame is far better than a wrong one. The polar code gets the same protection from a check value sent inside the frame (Section 11.7.6).
11.4 LDPC: the code for bulk frames
The bulk modem (Chapter 14) sends large frames close to the noise, and for that mLink uses a low-density parity-check code (LDPC). LDPC codes were invented by Robert Gallager around 1960 and sat unused for decades because computers could not decode them in reasonable time. They now protect Wi-Fi, 5G and satellite TV, because given a long enough codeword they correct errors almost as well as theory allows.
Every bulk frame is exactly one LDPC codeword of 9,720 bits, whatever its code rate. A higher rate does not make the frame longer or shorter; it only changes how many of the 9,720 bits are data and how many are parity. So every bulk frame takes the same time on the air, and a receiver always knows how much to collect.
11.4.1 The rulebook: the parity-check matrix
An LDPC code is nothing more than a long list of parity checks like the rows and columns of the grid example. Each check names a handful of bits in the codeword and says "these must XOR to zero" (contain an even number of 1s). Written out as a table, with one row per check and one column per bit and a 1 wherever a check includes a bit, this list is the parity-check matrix, usually called H.
"Low density" means that table is almost entirely zeros. Each check touches only 6, 12 or 18 of the 9,720 bits, and each bit takes part in exactly three checks. That sparseness is what makes decoding fast.
| Rate | Information bits | Parity bits (= checks) | Bits per check |
|---|---|---|---|
| 1/2 | 4,860 | 4,860 | 6 |
| 3/4 | 7,290 | 2,430 | 12 |
| 5/6 | 8,100 | 1,620 | 18 |
The three matrices are fixed tables built into every mLink station, generated once from fixed random seeds. Two stations can only talk bulk if they hold the identical tables, so they are part of the protocol in the same way the carrier frequencies are. Which of the three rates a given frame uses is decided by the frame's position in its transmission, up to a limit the sender announces beforehand; Chapter 17 explains that ladder.
11.4.2 The Tanner graph
The same rulebook is easier to think about as a picture. Put every bit on the bottom row as a circle and every check on the top row as a square, and connect each check to the bits it covers. This is a Tanner graph. Decoding is a conversation along its lines.
11.4.3 Soft bits: how sure is each bit?
The bulk modem does not hand the decoder plain 0s and 1s. For every bit it hands over a number that says which way the bit leans and how strongly: a log-likelihood ratio (LLR), a soft bit. In mLink it is a whole number from −127 to +127. A large positive value means "almost certainly 0", a large negative one "almost certainly 1", and anything near zero means "no idea". A bit that came in on a strong, clean carrier gets a big number; one that came in on a carrier sitting in a fade gets a small one (Section 14.8.4 shows how the modem sets them).
Those confidence values are worth decibels. A hard-decision decoder has to treat every bit as equally trustworthy. A soft-decision decoder knows that the doubtful bits are the likely culprits when a check fails, and fixes those first.
11.4.4 Belief propagation: decoding as a conversation
The LDPC decoder uses belief propagation, also called message passing. A useful picture is a room full of people (the bits), each with a hunch about their own value, and a number of committees (the checks), each made up of a few of those people and bound by one rule: their answers must add up to even.
- Everyone starts with the modem's hunch. Each bit sends its soft value to every check it belongs to.
- Each check replies to each of its members. A check looks at what its other members said and tells this one: "given what the rest of us believe, for our sum to be even you should be a 0 (or a 1), and I am this sure." A check is only as sure as its least sure other member.
- Each bit updates its belief. It adds its original hunch to what all its checks told it. A bit that the modem called a weak 1, but whose three checks all say firmly "you must be 0", now believes 0.
- Test. Take every bit's current belief as a hard 0 or 1 and run every check. If they all pass, the codeword is found: stop.
- Otherwise go round again. Each bit tells each check its updated belief, leaving out what that same check told it last time (so no committee just hears its own opinion echoed back), and the conversation continues.
mLink's decoder uses the min-sum form of this algorithm: in step 2 a check's reply takes the product of its other members' signs and the smallest of their sizes. It is a well-known shortcut, far cheaper to compute than the exact rule but a little overconfident, so mLink scales each reply down to 13/16 of that size (normalized min-sum), which recovers most of the difference. Inside the decoder the running totals are kept as 16-bit numbers, so a bit that many checks agree on never hits a ceiling and stops counting. The decoder allows at most 15 rounds. If every check passes before then it stops early; if not, it gives up and reports that the frame did not decode.
11.4.5 Knowing when a decode is wrong
"All checks pass" nearly always means the right codeword, but not quite always. Very occasionally, a badly damaged frame lands on a different valid codeword, one that satisfies every check but holds different data. mLink guards against that with the filler described in Section 11.5: every bulk frame ends with a stretch of known bits, and a decode that lands on the wrong codeword scrambles them. A bulk frame is accepted only if the decoder converged and the filler came out exactly right. Anything else is treated as a lost frame, which the receiver can ask for again by number (Chapter 18), instead of as garbage that would only show up when the whole message failed its check.
11.4.6 Encoding straight from the rulebook
The sender's job is the reverse: given the information bits, find parity bits that make every check pass. mLink's codes are systematic, which means the information bits appear in the codeword unchanged, behind the parity bits. The textbook way to compute the parity needs a second table derived from H, and for a 9,720-bit code that table is huge. mLink instead encodes directly from the sparse H, with a method published by Richardson and Urbanke: it rearranges H once so that most of it forms a staircase in which each check introduces exactly one parity bit not yet fixed, then works along the staircase, each new parity bit being simply the XOR of bits already known. A small leftover block is solved by ordinary elimination. The sender needs no table the decoder does not already have.
11.5 Filling the codeword: the pi pattern
A codeword has a fixed number of information bits (4,860 at rate 1/2), but the last frame of a message, or the only frame of a short one, rarely has exactly that much to carry. The rest of the space has to be filled with something, and the receiver has to be able to tell where the real data stops. mLink solves both with one pattern. After the frame's payload bytes, the sender writes:
- a two-byte marker,
00 00; - then a fixed 200-byte pattern that begins with the digits of pi
(
03 14 15 92 65 35 89 79…), repeated as often as needed, up to the end of the information bits.
00 00 marker, then the fixed pi pattern. Bottom: the
codeword that comes out of the encoder, parity in front of the unchanged
information bits.
The receiver, after decoding, searches from the start of the information bits
for a 00 00 whose every following bit matches the pi pattern
exactly. The first such position is the end of the payload. The length of each
frame's data is therefore never sent anywhere: it is written into the frame
by the filler itself. A payload that happens to contain 00 00
causes no confusion, because every bit after that point, all the way to the
end of the information bits, would also have to match the pattern.
To make sure there is always room for the marker, the sender never fills a frame completely: it holds back four bytes of every frame's capacity for the marker and at least two bytes of pi. That is why a rate-1/2 frame carries 603 payload bytes rather than 607 (4,860 bits is 607 whole bytes).
The same filler is the tripwire that catches a decode that landed on the wrong codeword. A lightly filled frame ends in thousands of known bits; even a frame filled to capacity ends in about 35 of them, and a wrong decode is very unlikely to reproduce them by chance.
11.6 The bulk path, end to end
An interleaver reorders bits before transmission so that errors which arrive in a clump on the air are spread out by the time they reach the decoder. LDPC works bit by bit, and a clump concentrated on a few checks can overwhelm them, so a bulk codeword is reordered twice on its way out. Straight after encoding, its 9,720 bits are written into a grid of 5 rows by 1,944 columns, row by row, and read out column by column, so bits that leave next to each other sat 1,944 places apart in the codeword. The modem then spreads the result across the frame's symbols and carriers with a second, larger grid of its own (Section 14.5). The receiver undoes both, in reverse order, before the LDPC decoder sees a single soft bit.
11.7 Polar codes: the code for short frames
The announce modem (Chapter 13) carries the network's bookkeeping and its short messages: PRESENCE, OPENER, replies, net traffic, everything on the three announce channels and the bulk-control channel. The emergency modem (Chapter 12) carries distress messages. Both kinds of frame are 11 bytes, and each travels as one codeword of a polar code: 184 bits on the air, 88 of them the frame itself. The two codes are built the same way and differ only in the length of their check (Section 11.7.6).
Polar codes are the youngest code in this chapter. Erdal Arıkan published them in 2009, and 5G mobile networks use them for the same job mLink gives them: short control messages that have to get through. Their strength is that, with a check attached and a decoder that keeps a short list of candidates, they stay strong at short lengths, where LDPC has too few bits to work with, and that their decoder uses soft bits (Section 11.4.3), the receiver's confidence in every bit, which a hard-decision decoder throws away.
11.7.1 Splitting one channel into good and bad ones
Everything starts from a trick with two bits. Call them A and B. Instead of sending A and B as they are, the sender sends two other bits: the first is A XOR B (1 if A and B differ, 0 if they match), and the second is B itself. Both cross the same noisy channel, so each arrives with the same chance of being misread.
The receiver works A out first, then B, and the two fare very differently:
- A becomes harder to read. A was never sent on its own. The receiver can only get at it by combining both received bits, so if either of them was hit by noise, A comes out doubtful. A is now worse off than a bit sent plainly.
- B becomes easier to read. Once A is decided, B can be read twice: directly from the second bit, and again from the first bit by undoing the XOR with the known A. Two independent looks at the same bit beat one, so B is now better off than a bit sent plainly.
Nothing has been gained or lost overall; the reliability has only been shared out unevenly, one bit worse and one better. Now repeat the trick on the results. Pair the "better" bits of two such blocks and mix them again, do the same with the "worse" ones, and keep going. After eight rounds there are 256 bit positions, and they have polarized: pushed apart towards the extremes, many nearly perfect and many nearly useless. At only 256 positions the split is not complete, and a real middle group remains; that is why mLink adds a list of candidates and a check, below. That is all the name means. It has nothing to do with the polarization of a radio wave or an antenna; it happens entirely in the arithmetic, and the signal on the air is ordinary QPSK.
11.7.2 Frozen bits: data only where it is safe
The code puts information only on the reliable positions. The announce code and the emergency code both use 112 of the 256: the 88 bits of the frame and a 24-bit check (below). Every other position is a frozen bit, always 0, and the receiver knows it in advance. A frozen bit costs air time like any other, but it is not wasted: knowing it for certain is what lets the receiver read the reliable positions so well.
Which positions are the reliable ones is worked out once, by a standard calculation of how much each position can be trusted, and then written into the station as a fixed list, one for each code. Every station uses exactly the same lists; they are part of the protocol, like the frame layout.
11.7.3 256 bits cut to 184
The mixing works in powers of two, so the code has 256 positions, but a short frame carries 184 coded bits: 92 QPSK symbols of two bits each on an announce channel, 62 tones of three bits each (two bits spare) in the emergency region. The last 72 positions are therefore frozen in a special way that forces the matching coded bits to come out 0 too. Those 72 bits are never sent. The receiver puts them back as certain zeros before it starts, so it loses nothing by not hearing them.
11.7.4 A frame you can read straight off the air
The encoder is arranged so that the frame itself appears unchanged inside the codeword. An announce frame's 184 bits go out as the 11 bytes of the frame, then the three bytes of the check, then nine bytes of parity, each byte most significant bit first; an emergency frame is laid out the same way. A code laid out this way is called systematic.
That costs nothing in strength: the same set of codewords, only labeled differently. It is convenient, though. A station building a frame can patch a field and re-encode it, and anything that only needs to glance at a frame it already holds can read the type byte straight off the front.
11.7.5 Decoding one bit at a time, keeping eight guesses
The receiver decodes the 256 positions in order, from the first to the last, just as the two-bit trick read A before B. For each position it combines the soft bits of the received frame with every decision it has already made, and gets a leaning: this position is probably a 0, or probably a 1, and how strongly. Frozen positions need no decision at all; they are 0.
Deciding one bit at a time has a weakness. A wrong decision early on is never revisited, and every later position is worked out on top of it. So the decoder keeps a list: at every information position it follows both answers, 0 and 1, for every candidate it holds, then keeps the eight most likely candidate frames and drops the rest. The frozen positions do the sorting. Each one is a checkpoint with a known answer, 0; a candidate that has gone wrong tends to disagree with the received signal there, and every disagreement counts against it. At the end it has up to eight complete candidates, ranked by how well each one explains what was received.
11.7.6 The check picks the answer
The most likely candidate is usually right, but not always: near the noise, the right frame can sit further down the list. This is what the check is for. It is a CRC (cyclic redundancy check) computed over the frame's 88 bits and sent inside the codeword. The decoder takes the candidates in order of likelihood and accepts the first whose own check matches. If none of the eight matches, the frame is discarded; it never reaches the protocol.
The same check is the frame's guard against a wrong decode, and its length sets how good a guard it is. Announce and emergency frames both carry a 24-bit check, because a false distress message is the costliest wrong frame there is and a false announce frame can start a false exchange. A wrong candidate passes it about once in 16.8 million tries, or once in two million frames of pure noise. In testing, the emergency decoder accepted 2 of 4.2 million frames of pure noise, as the arithmetic predicts, and the announce decoder accepted none of 200,000 noise windows.
A longer check is not free. Each check bit takes a reliable position away from the code, so the 24-bit code needs about 0.6 dB more signal than a 16-bit one would for the same share of frames.
11.8 The slope and the cliff
Plot the share of frames a code decodes against signal-to-noise ratio (all figures here are SNR@3k) and the two codes in this chapter trace very different curves.
11.8.1 Short codes fade out along a slope
Short frames fail gradually. Figure 11.8 follows one announce frame through the whole receive path in steady noise, decoded two ways: by its polar code, and by a Reed-Solomon RS(23,11) code of the same size decoded the hard way. With the polar code, 99 % of frames arrive at −8 dB, more than nine in ten at −9, three in five at −10, one in seven at −11 and almost none at −12. Reed-Solomon draws a similar shape a few decibels higher: practically everything at −5, two in three at −7, almost none at −9.
The reason for the slope is the size of the frame. With only 184 bits, luck matters: at a given signal level one frame meets a few bad bits and the next meets twice as many. A Reed-Solomon frame survives if no more than six of its 23 bytes are damaged; a polar frame survives if the right candidate stays on the decoder's list. Either way, as the signal weakens, the unlucky frames become steadily more common. Nothing snaps.
11.8.2 LDPC falls off a cliff
The bulk frames behave differently. This steep curve is called a waterfall, and for a long LDPC code it is nearly a cliff. A rate-1/2 bulk frame, perfectly located in steady noise, decodes almost every time from about −1.5 dB; one decibel below that, almost none do. The higher rates carry less parity and need more signal: rate 3/4 decodes almost every time from about +1.2 dB and rate 5/6 from about +2.25 dB.
Belief propagation is a chain reaction. Above the cliff, the confident bits outnumber the doubtful ones enough that every round of the conversation corrects more than it confuses, and the whole codeword snaps into place. Below it, the doubtful bits win the argument, the corrections never catch on, and after 15 rounds the checks are still failing. There is little middle ground: the decoder either gets the whole frame or does not get it at all. And where 23 bytes leave plenty of room for luck, 9,720 bits average it away; longer codewords make the cliff steeper.
11.8.3 A coin flip per frame, and why +3
On the narrow edge of the cliff, whether a given frame decodes depends on the exact noise it happened to meet. Each frame is effectively a coin flip, weighted by the SNR, and a transmission of many frames is many flips in a row. If each frame succeeds 60 % of the time, ten frames arriving without a single loss is about a one-in-165 event. The same link two decibels stronger delivers every frame.
So a station does not aim for the edge. It trusts bulk only on a link it has measured at +3 dB or better. A transfer's first frame goes at rate 1/2, its second at 3/4 and the rest at 5/6 (Chapter 17), so the line is set by rate 5/6, which delivers 99 % of frames from +2.25 dB, while rate 1/2 sits four decibels clear of its own cliff. Frames land on the flat top of the curve rather than its lip. Below that level, a message goes by the announce modem's short frames or through a relay with a better path (Chapter 17). And a lost frame is not a lost message: the receiver names exactly which frames are missing and only those are sent again (Chapter 18).
11.9 What to remember
- Forward error correction adds computed redundancy so the receiver can fix errors itself; the code rate is the share of each codeword that is data.
- Every announce and every emergency frame is one polar codeword: its 11 bytes and a 24-bit CRC on the most reliable of 256 positions, cut to 184 bits on the air and sent frame first. The receiver decodes it from soft bits, keeping eight candidates, and the CRC picks the answer and rejects noise.
- Reed-Solomon RS(23,11), the classic code for a frame this size, is the yardstick: decoded the usual hard way, it needs 2 to 4 dB more signal, depending on the frame.
- Every bulk frame is one 9,720-bit LDPC codeword at rate 1/2, 3/4 or 5/6, decoded from soft bits by normalized min-sum belief propagation in at most 15 rounds.
- Each bulk frame's payload is followed by
00 00and a fixed pattern starting with the digits of pi, which marks its length and catches wrong decodes. - Short frames fade out over a few decibels: announce frames from about −8 to −12 dB, 99 % at −8. LDPC frames fall off a cliff about one decibel wide. Rate 1/2 is reliable from about −1.5 dB, rate 5/6 from about +2.25, and stations trust bulk from +3.
The Emergency Modem: NB8FSK
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
12.1 One job, done at any cost
The emergency modem exists for distress calls and nothing else. Its whole design follows from one requirement: when someone is in trouble, the call must get through on the worst path, with the weakest signal, from the most improvised station. Speed does not matter. Being heard does.
The modem is called NB8FSK: narrow-band 8-tone frequency-shift keying. It lives in the emergency region, the 50 Hz region from 300 to 350 Hz at the bottom of the passband (Section 10.3). What the distress service does with it (who sends, how often, who answers) is the subject of Chapter 25. This chapter is only about the signal.
12.2 Eight tones, one at a time
Frequency-shift keying (FSK) is the oldest trick in data radio: pick a set of tones, and send information by choosing which tone to play. RTTY does it with two tones. NB8FSK does it with eight.
With eight tones to choose from, each tone choice carries three bits, because there are exactly eight different three-bit patterns (000 through 111). The tone number is simply those three bits read as a binary number, with the first bit sent as the ones place. Tone 0 means the three bits were all zero; tone 6, binary 110, means the bits sent were 0, then 1, then 1.
The eight tones are spaced 6.25 Hz apart, centered on 325 Hz:
12.2.1 Six and a quarter tones per second
Each tone is held for 160 ms, so the modem sends 6.25 tones per second: 6.25 baud. At three bits per tone that is 18.75 bits per second on the air, before any error correction.
The tone spacing and the baud rate are the same number on purpose. When the tones are exactly one baud apart, a receiver that listens to one tone for exactly one symbol period hears nothing from its neighbors: over those 160 ms a neighboring tone completes exactly one more (or one fewer) whole cycle, and its contribution averages out to zero. This is the tightest spacing at which the tones do not blur into each other for a receiver that does not track phase, and it is how eight tones fit into under 44 Hz.
The modem changes from one tone to the next without a jump in the waveform: the new tone picks up exactly where the old one's phase left off. A phase jump would be a small click at every symbol boundary, and clicks spread energy outside the band. What faint sidelobes remain are cut off by the modem's own transmit filter, 290 to 360 Hz (Section 10.8).
12.3 Why so slow, and why so narrow
Here is why going slow wins. The receiver does not listen to 3 kHz of noise when it decides which tone was sent. It listens to each tone position for 160 ms, and a 160 ms listen only admits noise through a filter about 6.25 Hz wide. The ratio 3000 / 6.25 is 480, which is about 27 dB. So a signal at −19 dB SNR@3k, invisible on a waterfall, is roughly 8 dB above the noise in the tone bin the receiver is actually looking at, and 8 dB is enough to tell which of eight tones is loudest often enough for the error-correcting code to repair the rest.
That is the whole secret, and it has a price: each halving of the symbol rate halves the noise the receiver lets in per decision (3 dB better) and doubles the time on the air. NB8FSK sits far out on that trade.
12.4 From eleven bytes to sixty-two tones
An emergency frame carries 11 bytes. Two of them are a small header (which frame of the message this is, how many frames the message has, and a number identifying the incident), and nine are content. The first frame's nine bytes are a packed summary of the emergency; later frames carry text, thirteen characters to a frame, from a fixed set of digits, capital letters, space and a few punctuation marks. Chapter 25 describes the contents; this section follows the bytes onto the air.
The 11 bytes are first protected by a polar code (Section 11.7), the same kind of code the announce frames use, with a longer check. It adds 3 bytes of check and 9 of parity, and the frame's own 11 bytes stay unchanged at the front.
The 23 bytes are 184 bits. Before they go to the modem they are shuffled into a fixed order that every station knows, so that a fade lasting a few tones damages bits scattered across the code rather than a run of neighbors; the receiver puts them back before decoding. In steady noise the shuffle changes nothing; on fading paths, measured in simulation, it helps slightly. The shuffled bits go to the modem three at a time, each group choosing one tone. 184 is not a multiple of three, so two zero bits are added at the end to make 186, which is exactly 62 groups. Sixty-two tones at 160 ms each is 9.92 seconds. The receiver knows the two padding bits are there and ignores them.
12.5 Finding the start: the sweep
A receiver can only decode a frame if it knows where the first tone begins, and at these signal levels there is almost no energy to go by. So every emergency frame begins with a known signal that the receiver searches for: a synchronizing sweep, a single tone that glides smoothly upward from 300 Hz to 350 Hz over 960 ms, exactly six symbol periods. Radar engineers call this a chirp. It is faded in and out at its ends over about 21 ms and passes through the same filter as the tones, so it is as narrow as the rest of the frame.
12.5.1 Why a sweep and not a tone pattern
The obvious synchronizing signal would be a short, fixed pattern of the modem's own tones: "tone 0, tone 7", say. The trouble is that the data can contain that same pattern. Any stretch of payload whose bits happen to produce tone 0 followed by tone 7 looks, to the receiver, exactly like a frame start, and in a message of several frames sent back to back the receiver can latch onto the data and decode garbage.
A sweep cannot be imitated by the data. Payload tones sit still on one of eight frequencies for 160 ms each; the sweep passes through every frequency in the band without stopping on any. It has two more virtues. Compared against incoming audio, it produces a sharp peak about 20 ms wide, which marks the frame start far more precisely than a pair of tones would. And random noise is less likely to resemble a sweep than a tone, so false alarms are rarer. The sweep is long because length is what makes it findable: the receiver adds up the sweep's energy over its whole duration, so a longer sweep stands out of the noise further. Six symbol periods is where that stops paying; a longer sweep finds no more frames than the decoder can read anyway.
12.6 Air time
One frame is the 0.96 s sweep plus 9.92 s of tones: 10.88 seconds for 11 bytes, a useful rate of about 8.1 bits per second. A message is one to fifteen frames, sent back to back with no gap, each frame with its own sweep, so the longest message lasts 163.2 s. The first frame alone is a complete distress call (Chapter 25), and it is the shortest thing the modem ever sends. The sweep is also what lets a radio that only VOX can key still send a distress call (Section 5.3.12).
12.7 Receiving it
Every station searches the emergency region for the sweep whenever it is not transmitting. The search compares the audio with five copies of the sweep, 12 Hz apart, so a sweep sent by a rig that is a few hertz off still matches one of them; it keeps up to sixteen tentative frame starts at once and tries to decode each. How that search works, how it sets its threshold against the noise and how it refuses to be fooled by a loud signal elsewhere in the passband are all in Section 15.3.1. What follows is what happens once the start of a frame is known.
12.7.1 Reading the tones
When the 9.92 seconds of tones have arrived, the receiver first measures how far the sending rig is off frequency, starting from the hint the search gives it, and takes that out (Section 15.11). Then the frame is filtered to 290โ360 Hz and, for each 160 ms tone period, the receiver measures how much energy is present at each of the eight tone frequencies. It does not need to know the phase of the signal, only how loud each tone is. This is called non-coherent detection, and it is what lets the modem work on paths where the phase wanders.
The receiver then estimates, over the whole frame, how strong the signal is and how loud the noise is. With those two figures it turns each tone's measured strength into a likelihood that this was the tone sent. For each of the three bits a tone carries, it adds up the likelihoods of the four tones that would mean "this bit is 0" and of the four that would mean "1", and compares the two sums. That gives every bit a decision and a confidence, a soft bit (Section 11.4.3). The 184 soft bits go to the polar decoder, which returns the 11 bytes exactly as sent or reports the frame unreadable.
When a frame decodes and its header says more frames follow, the receiver collects the next one exactly 10.88 seconds after this one's sweep, without searching for it again. It keeps that timetable for the rest of the burst, as many frames as the header counts. A frame that fades out and cannot be decoded therefore does not cost the frames behind it: each is still collected where it must start. The same holds when the station itself transmits for a moment in the middle of a burst it is hearing. Afterwards it collects the first frame that starts after its own transmission, and also tries the frame that transmission only partly covered, which at a strong signal can still decode.
12.7.2 Telling real frames from noise
A receiver that listens around the clock, below the noise, will sooner or later be handed noise to decode. Two things stand between that noise and a false alarm. Neither stops a frame being decoded; they decide whether the station acts on it.
- The check. The polar decoder accepts a frame only when its 24-bit check matches, which noise manages about once in two million frames (Section 11.7.6). This is the guard that matters.
- Making sense. Every field must hold something a real sender can produce: a frame count between 1 and 15 and a frame number below it; in the first frame a recognized layout, only listed codes, zero in every spare bit, and an empty position when the position is marked absent; in text frames only characters of the emergency alphabet, with padding only where a real message puts it. A sender fills in "not provided" for anything it cannot code, so a real frame always passes. The first frame has three recognized layouts: the alert, the acknowledgment and the all clear (Section 25.7). The all clear adds the strictest rules of the three, one frame only and 47 bits that must be zero, so noise passes it about once in 1017 random frames. Random noise that slips past the check passes the alert rules as a first frame only about 8 times in 10,000. A frame that fails is logged, naming the rule it broke, and not acted on.
A sudden rise of the whole-audio level, such as a gain step on the radio or a band change, no longer floods the receiver with false starts: the receiver also learns the level outside the emergency band, and a start that was carried over is trusted only when it stands well above that level. On simulated air, a step of +18 dB gave about 4,000 false starts an hour before this rule and gives 50 to 70 an hour now. A real frame moves only its own band, so it is still trusted.
The receiver also records each decoded frame's average confidence in its log. It does not act on it: measured against white noise, noise reaches the same figures as a real frame at the limit of copy, so it cannot tell the two apart.
12.8 Beyond one pass: repetition
Measured in steady noise through the whole receive path, a single emergency frame is found and read every time down to −18 dB, 99.5 % of the time at −19, 86 % at −20 and 30 % at −21. The 90 % point is about −19.6 dB and the 50 % point about −20.6. Down to there the limit is the tone decoder itself, not the search for the sweep: a frame whose start is already known decodes almost exactly as often (84.5 % at −20, 29 % at −21). A rig that is up to 20 Hz off frequency changes these figures by only a couple of percentage points.
The distress service does not send once. It repeats the whole message on a schedule until it is acknowledged, cleared or stopped by the operator (Chapter 25). The receiving side collects frames across the repeats: a frame missed on one pass is simply picked up on a later one, in any order, and the message is complete when every frame has arrived at least once. Each pass is another chance through the noise. If one pass at −20 dB succeeds 86 times in 100, three passes all failing happens about once in 300, if the passes are independent.
Real HF adds fading, which helps some passes and hurts others, and repetition is exactly the right tool for that, because a fade that swallows one pass is unlikely to swallow them all. The figures above are for single frames in steady noise; what repetition and combining add for a whole multi-frame message, in simulation, is below.
12.8.1 Combining the repeats
Collecting whole frames is not the only use of a repeat. When a frame cannot be read on its own, the receiver keeps what it measured for each of its eight possible tones in every one of the 62 tone slots, and adds those measurements to the ones from the same frame in the sender's other passes. Noise differs from pass to pass and the signal does not, so the sum is more reliable than any single copy. A frame is always decoded on its own first; combining only adds attempts after that has failed, so it cannot lose a frame that one pass would have read.
Matching the repeats. Two passes are taken to be one sender's when the frames already read from them carry the same incident number, the same drill flag and the same frame count. When the two passes cannot both be matched that way (one or both not yet read), they are matched instead by the tone position the receiver measured (the rig's frequency offset): within 2.0 Hz of each other. Either way the older pass must have ended before the newer one began and must be less than five minutes old. A frame is added only to the frame in the same place in the other passes. A frame the burst has already read in another pass is not combined.
What is tried. For a frame that failed alone, the receiver tries the sum of the newest pass and up to three older ones; if that fails and there are two or more partners, the newest pass with each partner on its own. That is at most four attempts. A result is accepted only if it passes the same 24-bit check and sanity checks as a single frame (Section 12.7.2) and agrees with what the summed passes already decoded. A wrong match simply fails and costs one attempt.
Limits. At most four passes of one burst are kept and twelve in all; a pass is dropped five minutes after its last frame, or the oldest goes when the store is full. The five minutes outlast the sender's gap between passes (75 s plus up to 15 s).
What it gains (simulation, not air). Steady noise at −21 dB, a three-frame message, independent noise on each pass and the sender's own spacing, 600 messages: with every frame decoded on its own, 38.8 % of messages were complete after four passes; with combining, 97.5 %. At −22 dB it went from none to 60.0 %, and at −23 dB to 4.8 %, where finding the start of each pass becomes the limit. No message was decoded wrongly in either arm. Fading channels and recordings of real noise have not been tried. The 2.0 Hz tolerance for matching by tone position is a chosen value, not yet a measured one. The figures are in the emergency record of the project's PHY measurements (repeat-combining rows, 2026-10-23).
12.9 What to remember
- NB8FSK sends one of 8 tones at a time, 6.25 Hz apart between 303 and 347 Hz, at 6.25 tones per second: 3 bits per tone, 18.75 bits per second raw.
- Slowness is the point: listening to each tone for 160 ms admits only about 6 Hz of noise, which is how a signal at −19 dB is decoded in one pass.
- Each frame is a 0.96 s sweep from 300 to 350 Hz, which no data can imitate, followed by 62 tones: 10.88 s for 11 bytes.
- One pass decodes 90 % of frames at about −19.6 dB; repetition, with frames gathered across passes and weak copies added up, adds further chances (−21 dB: 38.8 % of three-frame messages complete after four passes without combining, 97.5 % with it, in simulation).
The Announce Modem: QPSK
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
13.1 The modem every station needs
Everything that makes mLink a network rather than a pair of stations travels in announce frames: who is on the air, who is about to send, what arrived and what did not (Chapter 16). That role sets the design. The announce modem must be robust enough to reach every station worth talking to, short enough that a busy channel is not choked by bookkeeping, and simple enough to be completely fixed: every announce frame, from every station, looks exactly the same on the air.
13.2 QPSK: two bits in every twist of phase
The emergency modem changes which tone it sends. The announce modem sends one steady tone and changes where that tone is in its cycle: its phase.
Picture the tone as a clock hand spinning steadily. At each symbol boundary the transmitter can jump the hand to one of four positions, a quarter-turn apart. The receiver, knowing where the hand should be if nothing had changed, sees which of the four positions it jumped to. Four choices carry two bits. This is QPSK, quadrature phase-shift keying: "quadrature" because the four positions are a quarter-turn apart.
Look at the labels. Going round the circle, 00, 10, 11, 01: each dot differs from both its neighbors in exactly one bit. That arrangement is a Gray code, and it matters because when noise pushes a received phase to the wrong dot, it almost always pushes it to a neighboring dot. With Gray coding, that common mistake costs one wrong bit instead of two.
13.2.1 200 symbols per second
The announce modem sends 200 symbols per second, 200 baud, so each symbol lasts 5 ms (60 samples). At two bits per symbol that is 400 bits per second on the air before error correction: about twenty times the emergency modem's raw rate.
13.3 Smooth symbols: root-raised-cosine shaping
If the transmitter slammed the phase from one position to the next at each symbol boundary, every jump would be a sharp corner in the waveform, and sharp corners splash energy far beyond the channel. So instead of sending each symbol as a hard-edged 5 ms block, the modem sends each one as a smooth pulse that rises, peaks at the symbol's center, and dies away, overlapping its neighbors. The shape of that pulse decides how wide the signal is.
mLink uses a root-raised-cosine (RRC) pulse, the standard choice. The shaping is split in half: the transmitter applies one half, the root, and the receiver applies the matching other half, and the combination is the full raised-cosine shape. That combined shape has a subtle and useful property: the pulses from neighboring symbols overlap in time, yet at the exact center of each symbol all the neighbors pass through zero, so they do not disturb the reading. The receiver's half also happens to be the filter that best rejects noise for this pulse.
The pulse has one setting, the roll-off, which trades bandwidth against how quickly the pulse dies away. The announce modem uses a roll-off of 0.35, so the signal occupies 200 × 1.35 = 270 Hz. Each pulse is eight symbols long, which gives every stretch of symbols a run-in and run-out of about 40 ms where the first and last pulses fade up and down. A final sharp filter trims the skirts the shaping leaves behind (Section 10.8).
13.4 Where it runs
The same modem runs on each of the three announce channels, centered on 550, 900 and 1250 Hz (Section 10.4), and on the bulk-control channel (Section 10.5.1). Everything in this chapter applies to each of them identically.
13.5 The fixed eleven-byte frame
Every announce frame carries exactly 11 bytes. No more, no less, never a different modulation, never a header describing the frame. The receiver always knows exactly what is coming, which is what lets it be so simple, and it saves the air time a header would cost. The first byte says what kind of frame it is (Chapter 16); the byte layouts are in Appendix B.
The 11 bytes are protected by a polar code (Section 11.7), which sends the frame itself first, then a 24-bit check (3 bytes), then 9 bytes of parity. The 23 bytes are 184 bits; they go to the modulator in order, two at a time, and become 92 QPSK symbols.
13.6 One stream, thirty-two known symbols
An announce frame is one unbroken stream of 124 QPSK symbols, all at the same level, with no silence inside it. Ninety-two of them carry the message. The other 32 are always the same, and the receiver knows them in advance: 20 at the very start, the preamble, and three blocks of 4 placed inside the message, ahead of its 23rd, 46th and 69th symbols. The preamble's 20 symbols were picked by a computer search so that the pattern, slid against itself by a few symbols, matches as poorly as possible: a stretch of data or noise a few symbols out of place scores far below the true start. With the pulse shaping's run-in and run-out the preamble lasts about 140 ms.
The known symbols do three jobs.
- They say "a frame starts here." The receiver searches for the preamble on each channel continuously (Section 15.3.2). When it finds it, it knows exactly where the message begins.
- They tell the receiver the phase. QPSK carries its information in phase, but a receiver cannot know in advance what phase a distant station's tone will arrive with: the path, the two rigs' oscillators and the exact moment of arrival all shift it. Because the preamble's phases are known, the receiver can measure how far the whole signal has been turned, and turn it back. The tone runs on without a break from the first symbol to the last, so the phase measured on the preamble is the phase the message starts with.
- They let the receiver follow a changing path. On a path whose echoes drift (a fading, two-path NVIS link, say) the signal's shape changes within a frame's 0.66 seconds. The known blocks inside the message give the receiver fresh reference points all the way through, and the slower decoding attempts that follow a failed first reading (Section 13.8.1) lean on them.
13.6.1 Phase is measured afresh on every frame
Each announce frame carries its own preamble, and the receiver measures the phase from that frame's preamble and applies it to that frame only. It does not carry a phase from one frame to the next. From that starting phase the decoder follows the carrier symbol by symbol through the frame, using the known blocks as fixed points. This is what lets frames from different stations, arriving back to back on the same channel, each decode on their own terms: every frame brings its own reference.
Precise timing matters to this. Every sample of error in locating the preamble turns the measured phase by between 16.5ยฐ (on the 550 Hz channel) and 37.5ยฐ (on the 1250 Hz channel), and 45ยฐ of error puts a symbol on the edge between two dots. So the receiver finds the preamble's position to the single sample before it measures the phase.
13.7 Frame timing on the air
Adding it up: 124 symbols at 5 ms are 620 ms, and the pulse shaping's run-in and run-out add 40 ms. One whole frame is 7920 samples, 660.0 ms, with no silence in it.
When a transmission strings several announce frames together, the frames are separated by exactly 256 samples of silence, 21.3 ms. So in a string, each frame starts 681.3 ms after the previous one. The silence gives the receiver a clean break in which to find the next frame's preamble instead of hunting for it against the tail of the previous frame; it costs about 3 % of the air time of a string. A lone frame is 0.66 s on the air, two frames 1.34 s, and seven frames about 4.75 s.
Every transmission starts and ends with the keying ramp described in Section 10.9. The ramp is shorter than the pulse run-in, so it only touches signal that is already fading up or down.
13.8 Reading a frame
Once the detector has located a frame and measured its phase, the decoder takes the audio from the start of the preamble to the end of the frame, filters it to the channel's band, removes the channel's tone using that phase, applies the receiver's half of the pulse shaping, and reads the signal at the center of each symbol. Each reading lands somewhere near one of the four dots. The 32 known symbols are not message; they steady the decoder's following of the carrier. For the 92 message symbols the decoder does not just take the nearest dot: for each of the two bits it notes which way the reading leans and how far, a soft bit (Section 11.4.3), so a reading halfway between two dots counts for little and one sitting on a dot counts for a lot. The 184 soft bits go to the polar decoder. Out comes the 11-byte frame exactly as sent, or nothing: a frame whose 24-bit check does not match is not accepted.
13.8.1 More tries when the check fails
Only when that first reading fails its check does the receiver spend more effort on the same audio, in three steps. The same 24-bit check decides each of them, so a message they find is almost always one that was there: each candidate the decoder checks has about one chance in 17 million of passing by accident, and a failed frame is checked a few dozen times at most.
- An equalizer. On a path with an echo, each symbol is smeared into its neighbors. The receiver fits a small filter, trained on the known symbols and on the symbols it is already fairly sure of, that undoes the smear, and reads the frame again through it. It re-fits the filter along the frame, so a path that changes while the frame is on the air is followed. How much of the frame each fit learns from is chosen frame by frame: the stretch whose fits best predict symbols they were not trained on. A steady path takes the whole frame, where a filter learned from fewer symbols would carry more of the noise into its reading.
- A tracker for fast fading. On a path that flutters, several times a second, the signal's strength and phase change within a few symbols, faster than any filter fitted over a stretch of the frame can follow. The tracker follows it symbol by symbol instead: from the last few symbols it predicts what the next one will look like, reads it, and moves on. Through a deep fade the phase can jump by a quarter turn, and from there every reading would be a quarter turn out; so the tracker runs forwards from the preamble and backwards from the end, and between two known blocks it trusts each direction up to the deepest fade it had to cross. After the last block there is nothing to check against, so the receiver lets the code decide whether, and after which fade, that last stretch is a quarter turn out.
- A second search for the start. A detection can land in the wrong place: on a fading path the preamble may be faded and a stretch of the message, or the echo of the preamble, may score higher. The receiver correlates all of the known symbols (the preamble's two halves and the three inner blocks, whose distances apart are fixed) against the audio before the detector's start, takes the three best places and tries the equalizer and the tracker at each.
On a clean path neither step ever runs, since the first reading passes. On a path the first reading cannot cope with, they recover frames that would otherwise be lost, at a cost of some processor time per failed frame and nothing on the air.
13.9 The −9 dB floor
Measured in steady noise through the whole receive path, practically every announce frame arrives at −8 dB (99 %) and more than nine in ten at −9 dB SNR@3k. Below that the frames fade out over about three decibels: three in five at −10, one in seven at −11 and almost none at −12 (Figure 11.8). Half the frames are read at about −10.2 dB; the receiver's search still finds nearly all of them there (98 %), so what limits the range is reading the frame, not noticing it. On fading and echoing paths the figures are higher; Table A.17 gives them for each standard channel.
Simple arithmetic shows where the number comes from. Each 5 ms QPSK symbol admits noise through a filter about 200 Hz wide, and 3000 / 200 is 15, about 12 dB. So at −9 dB each symbol arrives only about 3 dB above the noise it is competing with, and many of its bits come out wrong; the polar code, weighing every bit by how sure the receiver was of it, recovers the frame anyway. The emergency modem's symbols are 32 times longer, which is 15 dB, and its floor is about 10 dB lower (Section 12.3): long symbols buy the emergency modem its margin, and the announce frame's stronger code wins part of it back. The announce modem sits where it does because its frames are everyday bookkeeping, and at eleven seconds a frame the bookkeeping would crowd out the traffic it exists to manage.
The announce floor is, in practice, the edge of the network. Two stations that can hear each other's announce frames can do everything mLink offers, if slowly. Two stations below it cannot exchange traffic directly, though a third station that hears both can relay for them (Chapter 21).
13.10 What to remember
- The announce modem is QPSK at 200 baud: 2 Gray-coded bits per symbol, root-raised-cosine shaped with roll-off 0.35, 270 Hz wide.
- Every announce frame is exactly 11 bytes, sent as one unbroken stream of 124 symbols at one level: 92 message symbols and 32 known ones (a 20-symbol preamble and three blocks of 4 inside the message).
- The preamble marks each frame's start and gives its phase, measured afresh for every frame; the inner blocks help the receiver follow a changing path.
- If the first reading fails its check, the receiver tries an equalizer, a tracker for fast fading and then a second search for the start, on the same audio.
- One frame is 660.0 ms; strung frames are separated by 21.3 ms of silence, one every 681.3 ms.
- Announce frames are polar-coded and decoded from soft bits: 99 % arrive at −8 dB, more than nine in ten at −9, half at about −10.2.
The Bulk Modem: OFDM
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
The bulk modem lives in the bulk region of the passband (Chapter 10) and uses a technique called OFDM, orthogonal frequency division multiplexing: the same family of modulation used by Wi-Fi, DSL, digital TV and DAB radio, scaled down to fit inside a single SSB channel. Which messages travel this way is decided in Chapter 17.
14.1 Why many slow carriers
On HF the same signal arrives several times, a few milliseconds apart, because it reaches the receiver by more than one path (Chapter 3). Those echoes are harmless to a slow signal and ruinous to a fast one. If each symbol (the smallest unit a modem puts on the air: one tone, one phase, one "letter") lasts 1 ms and the second copy arrives 3 ms late, every symbol is smeared across the three that follow it. If each symbol lasts 25 ms, the same echo only muddies the first eighth of it, and the receiver can simply look at the rest. So the fix for echoes is to go slow, and the cost is obvious: a single slow carrier moves very few bits per second.
14.1.1 Slow, but many at once
OFDM keeps the slow symbols and gets the speed back by running many carriers side by side. Each carrier is an audio tone at its own frequency, changing its phase only once per symbol. Any one of them is sluggish, but 24 of them carrying data at the same time move 24 times as many bits. The slow symbols make the signal robust against echoes; the parallelism makes it useful.
The alternative would be one fast carrier. To match the bulk modem's 1,636 bits per second, a single QPSK carrier would need symbols about 1.2 ms long, shorter than the echo spread of many HF paths, and the receiver would need an adaptive equalizer that learns and cancels the echoes as they change: complex, hungry for training signals, and prone to losing track in fast fading. OFDM avoids the problem instead of fighting it. What makes it practical is two tricks that the rest of this chapter unpacks: the carriers are packed so tightly that their spectra overlap and yet do not interfere (the "orthogonal" part), and one fast Fourier transform builds or separates all of them at once.
14.2 One FFT makes all the carriers
14.2.1 The FFT in one paragraph
The FFT (fast Fourier transform) is an algorithm that takes a short stretch of audio samples and tells you how much of each frequency is in it, and at what phase. Feed it 256 samples and it returns 256 "bins", each one a frequency slot with an amplitude and a phase. The inverse FFT (IFFT) goes the other way: give it the amplitude and phase you want in each bin, and it hands back the 256 audio samples that contain exactly those tones.
That is the whole transmitter in miniature. To send one OFDM symbol, the modem writes the phase it wants on each carrier into the matching bins, leaves every other bin at zero, and runs one IFFT. Out comes a stretch of audio that is the sum of all the carriers, each at its chosen phase. The receiver does the reverse: one FFT over the same stretch of audio, then it reads the phase in each carrier's bin. No bank of 28 oscillators and 28 filters is needed.
14.2.2 256 points at 12 kHz
At 12,000 samples per second, a 256-point FFT covers a window of 256 samples, or 21.33 ms, and the spacing between neighboring bins is the sample rate divided by the FFT size:
12,000 Hz ÷ 256 = 46.875 Hz
Each carrier sits in its own bin, so the carriers are 46.875 Hz apart. The design aimed for round 50 Hz spacing, which would need a 240-point FFT; the fast FFT wants a power of two, so the size rounds up to 256 and the spacing tightens slightly.
14.2.3 Orthogonality: overlapping but not interfering
A tone that lasts exactly one FFT window does not occupy a single thin line in the spectrum. Because it starts and stops, its spectrum spreads into a hump with ripples on either side (the shape is called a sinc). With carriers only 46.875 Hz apart, those humps overlap heavily. So how can the receiver tell them apart?
The answer is the spacing itself. When the carrier spacing is exactly one divided by the window length (1 ÷ 21.33 ms = 46.875 Hz), every carrier's sinc crosses zero precisely at the center frequency of every other carrier. When the receiver's FFT measures bin 7, it sees carrier 7 at full strength and all the other carriers at exactly zero. Two signals that can be added together and then separated perfectly like this are called orthogonal.
Orthogonality is fragile in two specific ways, and the rest of the modem is largely built to protect it. It needs the FFT window to line up with a symbol that is steady for the whole window (the job of the cyclic prefix, below), and it needs the carriers to land on their bins, so the two stations' frequencies have to be close to each other (Section 15.11).
14.3 28 carriers: 24 for data, 4 pilots
The bulk modem uses 28 carriers. Before being shifted up into place they occupy FFT bins 1 through 28; bin 0 (zero frequency) is left empty, as are all the bins above 28. After the shift described in Section 14.7, the 28 carriers run from 1,567 Hz to 2,833 Hz, centered on 2,200 Hz. Every figure in this chapter is fixed, never negotiated between stations, and all of them are collected in Appendix A.
In every symbol, four of the 28 carriers are pilots. A pilot carries no data at all. It sends a known value, a fixed phase, so the receiver can compare what arrived with what it knows was sent and work out what the path did to that part of the spectrum at that moment. In the first symbol of a frame the pilots are the 4th, 11th, 18th and 25th carriers counting up from the bottom (1,708, 2,036, 2,364 and 2,692 Hz), seven carriers apart. The other 24 carriers carry data.
The pilots do not stay put. In each following symbol every pilot moves up one carrier, wrapping round from the top of its group of seven to the bottom, so the pattern repeats every seven symbols and every one of the 28 carriers serves as a pilot once in every seven symbols. These are called scattered pilots. They cost exactly what fixed pilots would, four carriers in every symbol, but over a few symbols they let the receiver see every carrier directly, which is what it needs on a path with long echoes (Section 14.8.3).
14.3.1 Two bits per carrier
Each data carrier, in each symbol, takes one of four phases, which is two bits. This is QPSK, the modulation the announce modem uses on its single carrier, and Chapter 13 explains it. Here the four phases are 45°, 135°, 225° and 315°, all at the same strength, and the two bits are assigned so that the first chooses left or right of center and the second chooses up or down, independently. That lets the receiver judge each bit on its own axis: how far right or left the point landed says how sure it is of the first bit, and how far up or down says how sure it is of the second.
With 24 data carriers at two bits each, one OFDM symbol carries 48 bits.
14.4 The cyclic prefix
Slow symbols make echoes small, but not zero. An echo of symbol 1 that arrives 3 ms late still spills 3 ms into the start of symbol 2. If the receiver's FFT window covered that spill, the window would contain the tail of one symbol glued to the head of the next, the carriers would not be steady tones across the window, and orthogonality would break: every carrier would leak into its neighbors.
The fix is to put a buffer in front of each symbol and have the receiver ignore it. mLink's buffer is the cyclic prefix: a copy of the last 96 samples of the symbol, stuck on the front. The transmitted symbol is therefore 96 + 256 = 352 samples long, 29.33 ms, and the receiver takes its 256-sample FFT window from the end of it, started 10 samples (0.83 ms) before the prefix ends: a little slack for a symbol start found a few samples late, which leaves 86 samples, 7.17 ms, to absorb echoes. At 34.1 symbols a second and 48 bits a symbol, that is 1,636 bits per second before error correction.
14.4.1 Why a copy, and not silence?
A stretch of silence would also give echoes somewhere harmless to land. The copy does something extra. The FFT treats its window as if it repeated forever. Because the prefix is the symbol's own tail, the echo of a symbol that arrives a little late still shows the FFT a complete, seamless cycle of every carrier: it is the same tones, just shifted in time, and a time shift is only a phase change on each carrier. So an echo shorter than the prefix does not smear the symbol at all; it just changes each carrier's amplitude and phase by some fixed amount. The pilots measure exactly that change and the receiver undoes it carrier by carrier.
The prefix is 8 ms; with the window's slack, 7.17 ms of it absorbs echoes, which just covers the ITU's model of a near-vertical (NVIS) path, whose second copy arrives 7 ms after the first (two samples to spare). For the prefix to help, the receiver must start each symbol's window from the earliest copy it can see, not from the strongest: from a later copy the window runs into the next symbol of the earlier one. The receiver therefore moves its starting point back to the earliest clear peak of its sync match, within one prefix before the strongest (Section 15.9). When the first copy was too faded in the sync symbol to be seen there, the frame itself still shows it: the channel read off the pilots across the whole frame has a copy before the symbol start, and the receiver cuts the frame's windows again from that copy. In simulation on the NVIS model a rate-1/2 frame then decodes in 300 of 300 tries at +30 dB, where it decoded in 47 of 100 with a 5.33 ms prefix and the strongest copy. The price is time: more than a quarter of every symbol carries no new information (96 of 352 samples). mLink pays that for the robustness.
14.5 The cross-symbol interleaver
Fading on HF does not hit bits at random. A deep fade, a static crash or a brief burst of interference wipes out a stretch of time, and in OFDM a stretch of time is a group of whole symbols. Losing one symbol means losing all 48 of its bits at once. If those 48 bits sat next to each other in the codeword, the error-correcting code would face a dense hole in one spot, which is the hardest kind of damage for it to repair.
So before the bits go onto carriers, the bulk modem shuffles them with a cross-symbol interleaver. Picture a grid 48 rows tall and 203 columns wide. The codeword is written into it row by row; then each OFDM symbol takes one column, top to bottom. The 48 bits a symbol carries therefore come from 48 different rows: positions 203 apart in the codeword. When a symbol is lost, the receiver puts the bits back in order and the damage lands as 48 isolated doubtful bits spread evenly through the codeword, one every 203 positions. Scattered damage like that is exactly what the decoder is good at fixing.
Damage also comes in frequency: a radio's transmit filter that cuts off the top carriers, a notch from an echo, or interference sitting on one carrier for seconds. If a row of the grid rode the same carrier for the whole frame, losing that carrier would lose whole rows, long runs of neighboring codeword bits. So each column is also rotated on its way to the carriers: symbol k shifts its bits k data carriers up, wrapping round at the top, so one carrier carries a different part of the column in every symbol and, over the frame, visits every row. A lost carrier, or two neighboring ones, then turns into scattered doubtful bits, never more than two in a row in the codeword. Losing a whole symbol is unaffected: the rotation stays inside the symbol.
Why 203 columns? The codeword is 9,720 bits and each symbol carries 48, so a codeword needs 9,720 ÷ 48 = 202.5 symbols. The grid rounds up to 203 columns (9,744 cells), and the 24 spare cells at the end are filled with zeros that the receiver ignores. The error-correction layer has already applied a smaller shuffle of its own before the bits reach the modem (Chapter 11).
14.6 The bulk frame
A bulk frame is what the modem sends for one codeword of the bulk error-correcting code, LDPC (Chapter 11). It always has the same shape: one sync symbol of 352 samples, which the receiver uses to find the frame (Section 14.9), then 203 data symbols of 352 samples each. That is 71,808 samples, or 5.98 seconds. Frames in one burst follow each other with no gap, so frame i starts exactly i × 71,808 samples after frame 0.
The length never changes, because the codeword is 9,720 bits at every code rate: a stronger rate carries fewer message bytes in the same air time and never makes the frame longer. How many bytes each rate carries is tabulated in Appendix A, and which rate each frame of a burst uses is in Chapter 17.
14.7 The transmit path, step by step
Here is what happens to one frame's worth of codeword bits on the way to the radio.
- Cross-symbol interleave. The 9,720 codeword bits, plus 24 zeros, go into the 48 × 203 grid and come out column by column, each column rotated one data carrier further than the one before.
- Map to carriers. For each of the 203 symbols, the next 48 bits are taken two at a time and turned into QPSK points, one per data carrier, lowest carrier first, skipping that symbol's four pilots, which get their fixed known value. Every other bin is zero.
- IFFT. One inverse FFT turns the 256 bins into 256 audio samples: the sum of all 28 carriers for that symbol.
- Add the cyclic prefix. The last 96 samples are copied to the front, giving the 352-sample symbol.
- Shift up to the bulk region. Straight out of the IFFT the carriers sit between 47 Hz and 1,313 Hz. The whole block is shifted up by 1,520.3 Hz so its center lands on 2,200 Hz.
- Level. The symbols are scaled to the same average power every mLink modem starts from, and the sync symbol, generated separately and brought to the same level, is placed in front.
- Filter. Each OFDM symbol starts and stops abruptly, and those edges splash a little energy outside the carriers (the ripples of the sinc shapes in Figure 14.1). The modem removes everything outside 1,500 to 2,900 Hz so that none of it falls into the announce channels (Section 10.8). It filters the burst as one continuous stream, sync symbols and the joins between frames included (Section 14.7.2).
- Shave and scale. Last, each frame's rare tall peaks are shaved to a set height above its average, the frame is filtered to the bulk region once more, and it is scaled so that its largest swing is full scale (Section 10.8.1). The shaving works on each frame together with the edges of its neighbors, so the joins between frames stay smooth.
14.7.1 Audio in, audio out
Internally the modem works with complex signals: each sample has an in-phase and a quadrature part, which is what lets a carrier have a phase that the FFT can read. What goes to the radio, though, is ordinary audio. The transmitter keeps only the real part of the finished signal, and the receiver rebuilds the complex form with the pre-filter described below. Nothing in the bulk modem needs an IQ interface to the radio.
14.7.2 Where the band edges sit, and filtering the burst as one
Each carrier is a tone switched on for one symbol, 29.3 ms long counting the cyclic prefix. A tone that lasts a fixed time is not a single frequency: its energy spreads into a central lobe and smaller ripples either side, and the central lobe reaches 34.1 Hz each way before its first null (1 ÷ 29.3 ms). The band filter has to leave that central lobe alone on the outermost carriers. A filter edge that cut into it would take away part of those carriers' own signal, and what it took would come back in the receiver as distortion on exactly those carriers, which no amount of transmit power fixes.
So the edges sit at 1,500 and 2,900 Hz, 67 Hz outside the outermost carriers at 1,567 and 2,833 Hz, with a smooth 20 Hz roll-off just inside each edge on the transmitter. Measured with no noise at all, the outermost carriers then come through with their signal about 23 dB above the distortion the filters leave, and the middle carriers about 31 dB. Both are far cleaner than any band a bulk frame is decoded on, so the filters cost only a small fraction of a decibel. The upper edge, 2,900 Hz, is also where many radios' transmit filters end, so the top carrier keeps the same 67 Hz from a radio's edge as from mLink's own.
The transmitter filters the burst as one continuous stream. If each frame's pieces were filtered separately and then butted together, the signal would jump where they meet, and every jump is a click across the whole passband, announce channels included. Instead, each frame is filtered together with the last 2,048 samples of the frame before it and the first 2,048 of the frame after, so its edges come out exactly as a filter running over the whole burst would make them. The first frame's own run-in, a faint ring 85 ms long, goes into the last 85 ms of the 150 ms pause between the opener and the burst (Section 15.9.1). Measured in the announce region, the splash at the start of a frame is more than 100 dB below the burst's average power.
14.8 The receive path, step by step
Once the receiver has found where a frame starts (Section 15.9), the modem's job is to turn 5.98 s of audio back into 9,720 soft bits. It runs the transmit path in reverse, with two extra stages that do the heavy lifting: estimating what the path did to each carrier, and deciding how much to trust each bit.
14.8.1 The pre-filter
The receiver takes exactly one frame's worth of audio, 71,808 samples starting at the first sample of the sync symbol, and adds 59,264 zeros to make 131,072, a power of two, so the FFT runs efficiently. No window is applied: a window would taper the first and last symbols of the frame and damage them. One 131,072-point FFT turns the frame into bins 0.09 Hz apart.
Two things happen to that spectrum. Every bin outside 1,500 to 2,900 Hz is set to zero, a hard cut that removes the emergency and announce regions and any noise outside the bulk band. And every negative-frequency bin is set to zero while the kept positive bins are doubled, which turns the real audio back into the complex signal (the in-phase and quadrature parts) the rest of the receiver needs, at the same amplitude. A 131,072-point inverse FFT brings it back to the time domain, still at its original frequencies, and the first 71,808 samples are kept. The shift down to baseband happens later, symbol by symbol.
Filtering in the FFT this way treats the frame as if its end joined its start, so the filter's ringing at one end wraps round to the other. The sync symbol at the front absorbs that: it gives the filter 352 samples to settle on before the first data symbol, and the receiver never reads the sync as data.
14.8.2 One FFT per symbol
For each of the 203 data symbols, the receiver skips the 96-sample prefix, shifts the remaining 256 samples back down by the same 1,520.3 Hz the transmitter added, and runs a 256-point FFT. Bins 1 to 28 now hold one received value per carrier: an amplitude and a phase, bent by the path and sprinkled with noise.
14.8.3 Channel estimation from the pilots
HF does not treat the whole 1.3 kHz of the bulk region the same. Echoes create notches: frequencies where two copies of the signal arrive out of phase and cancel. One carrier may come in strong and nearly on its original phase while another, a few hundred hertz away, comes in weak and rotated by 90°. Before the receiver can read any QPSK point it has to know, for each carrier, how much the path shrank it and how far it turned it. That knowledge is the channel estimate.
The pilots provide it. Each pilot was sent at a known value, so whatever arrives in a pilot cell is the path's effect on that carrier at that moment, plus noise. Because the pilots move, the receiver can gather them in two ways.
- Across one symbol. Take that symbol's four pilot readings and join them with straight lines across the carriers in between; the carriers outside the end pilots borrow the nearest reading (Figure 14.6). This follows a path that changes from one symbol to the next, but each estimate rests on four noisy readings, and a notch that falls between two pilots is missed.
- Across time, carrier by carrier. Every carrier is a pilot once every seven symbols. Joining those visits in time, or averaging several of them, gives every carrier its own measured value: the narrow notches that long echoes cut are seen directly, and averaging cuts the noise. What this cannot follow is a path that changes within a few symbols.
The receiver builds several estimates of both kinds, with different amounts of averaging: across time over up to 56 symbols either side, then over up to three neighboring carriers; or symbol by symbol, then over up to three neighboring symbols. For each frame it keeps the one that best explains the data. With each estimate it reads every data cell's QPSK point, works out where that point should have arrived, and measures how far the received point actually sits from there. The estimate with the smallest leftover wins. On a still path or a long echo that is a long average across time; on a path fluttering ten times a second it is one symbol at a time.
Before any of that the receiver measures how far apart in frequency the two radios are, from the cyclic prefixes (Section 14.4). Each prefix is a copy of the last 96 samples of its symbol, so comparing the two shows how far the phase turned in between, which only a frequency offset can do. This needs no pilots and works up to 23 Hz either way; the receiver takes the offset out before its FFTs, so no carrier leaks into its neighbors. What little remains, along with any slow drift, is measured from pilots on the same carrier seven symbols apart and removed as well.
One more correction comes before the estimates. If the symbol windows start a little before or after the path's average arrival, the path looks to the receiver like a phase that turns steadily from carrier to carrier, and joining pilots seven carriers apart with straight lines then misses badly. The receiver measures that turn from pilots one carrier and one symbol apart and takes it out of every cell first, so the estimates see a path centered on the window.
14.8.4 Equalization and weighted soft bits
With an estimate for each carrier, the receiver can undo the path: rotate each received point back by the estimated phase and scale it back up by the estimated loss. That step is called equalization. The naive version divides by the estimate outright, which works beautifully on strong carriers and terribly on weak ones: a carrier sitting in a notch has been shrunk to almost nothing, and dividing by almost nothing multiplies its noise enormously. The result is a confident-looking point in a random place.
mLink never divides. It multiplies each received point by the mirror image (the complex conjugate) of the carrier's estimate, which rotates the point back by the estimated phase and, in the same step, scales it by how strong the carrier came in. A strong carrier comes out large and a carrier in a notch comes out small instead of being blown up. For QPSK in steady noise this is exactly the right confidence to hand the decoder: a bit's soft value should grow with the strength of the carrier that carried it.
Then the soft bits: the per-bit confidence numbers that Chapter 11 calls LLRs and feeds to the decoder. For each data carrier, the weighted point's horizontal position becomes the first bit's value and its vertical position the second's. The sign says which way the bit leans; the size says how sure. All of them are scaled by one number per frame, set from the frame's average pilot strength, so that an average carrier's soft bits land near 42, the strongest are clipped at 127 to fit in one byte, and a carrier 15 dB down still gets about 2 rather than being rounded to nothing. The scale is the same for every symbol in the frame: a symbol caught in a fade keeps its low confidence instead of being boosted back up.
One thing the strength of a carrier does not say is how good the estimate of it was. On a path that flutters, the estimate is worse on some symbols (where the path turned fastest) and on some carriers (the outermost ones, past the last pilot) than on others. So each soft bit is also divided by how far, on average, its symbol's and its carrier's points landed from the dots they were read as. In steady noise those spreads differ only by chance; the receiver pulls each weight back toward 1 by the share of its spread that chance alone would give, so on steady noise the weights stay close to 1 and the decode levels do not move.
14.8.5 Undoing the interleaver
The 203 symbols yield 9,744 soft bits. The receiver turns each symbol's 48 back by its rotation, writes them into the 48 × 203 grid column by column and reads them out row by row, restoring codeword order; the 24 filler values at the end are dropped. The remaining 9,720 soft bits go to the decoder.
14.9 The sync symbol
Everything above assumes the receiver knows, to within a few samples, where each symbol starts. If its FFT window is misplaced by more than the part of the prefix that the echoes have left clean, symbols bleed into each other and the frame is lost. So each bulk frame begins with one extra OFDM symbol whose only job is to be found.
14.9.1 A symbol that repeats itself
The sync symbol is built in the style of a well-known method published by Schmidl and Cox (the Schmidl-Cox preamble). Instead of data, it carries a fixed pattern of +1 and −1 on the even-numbered bins only (2, 4, 6 … 28: fourteen carriers), with every odd bin empty. Using only every second bin has a neat consequence in time: the 256-sample symbol consists of the same 128 samples played twice. It is scaled so its power matches the data symbols, and it has a cyclic prefix like any other symbol, so it is also 352 samples long.
That shape gives a receiver three things:
- A quick test. A receiver can spot the repetition without knowing anything else about the signal, by comparing each 128-sample stretch of audio with the 128 samples after it. Noise does not resemble itself 128 samples later; the sync symbol does, almost perfectly.
- An exact position. The symbol's waveform is fully known, so the receiver can slide a copy of it along the audio and find the one position where it matches.
- A frequency reading. If the two radios are slightly off each other's frequency, the second copy of the 128-sample pattern arrives rotated in phase against the first, and the size of the rotation gives the offset.
The repetition test alone is not enough to trust: any OFDM symbol repeats itself somewhat, because it carries a copy of its own tail in its prefix, and a steady tone repeats perfectly. How the receiver combines the three, and why it only looks for a bulk frame where an opener has told it to expect one, is in Section 15.9.
14.10 What to remember
- The bulk modem is OFDM: 28 carriers 46.875 Hz apart between 1,567 and 2,833 Hz, of which 24 carry QPSK data (2 bits each) and 4 are pilots. Many slow carriers beat one fast one because slow symbols shrug off echoes.
- Each symbol is 352 samples (29.33 ms): a 256-sample FFT window plus a 96-sample cyclic prefix that absorbs echoes. That gives 48 bits per symbol and 1,636 raw bits per second.
- One bulk frame is one sync symbol plus 203 data symbols: one codeword, 5.98 s long at every code rate.
- A 48 × 203 interleaver, rotated one carrier per symbol, spreads each symbol's bits and each carrier's bits across the codeword, so a fade or a lost carrier becomes scattered, fixable damage.
- The pilots are scattered: four per symbol, each moving up one carrier per symbol, so every carrier is a pilot once in seven symbols.
- The receiver corrects a frequency offset of up to 23 Hz, estimates the path either carrier by carrier across time or symbol by symbol, choosing per frame whichever explains the data best, and passes the decoder soft bits weighted by how strong each carrier was.
The Receiver: Always Listening
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
15.1 Why listen to everything, all the time
On one channel, at one moment, there may be an emergency call at the bottom of the passband, short frames on two announce channels, and a bulk transfer up top. Any of them might concern this station, and a distress call must never be missed because the station was "busy" hearing something else.
So the receiver has no notion of "busy". It keeps a continuous recording of the audio and runs three independent searches over it, one for each region, on every fresh slice of sound. Finding a frame in one place never stops the search anywhere else.
15.2 The recording
Audio arrives from the sound card in blocks of 512 samples (about 43 ms) by default. Every sample is written into a capture ring: a circular recording 524,288 samples long, about 43.7 seconds, in which the newest sample overwrites the oldest. Every sample also gets an absolute position, a counter that only ever counts up, so a detection, the frame it belongs to and the moment that frame's last sample will arrive are all numbers on one timeline.
For every block the receiver does the same four things, in this order:
- Write the block into the ring.
- Hand over any frame that is now completely recorded to a decoder.
- Run the three detectors over the most recent stretch of the ring.
- Measure the overall audio level, which raises the “too loud” and “too quiet” alerts and feeds the FM voice check (Section 15.12).
15.3 Three detectors, three kinds of sync
Every mLink frame starts with a short, known waveform whose only job is to say "a frame starts here": a preamble, also called a sync. Each region has its own. Because the receiver knows exactly what each preamble looks like, it can search for it with a matched filter.
Picture a transparent strip with the preamble's waveform printed on it. Slide it along the recording and, at each position, multiply the strip by the recording under it point by point and add everything up. Where the recording is just noise, the products are as often negative as positive and mostly cancel. Where the preamble really is under the strip, every product is positive and they pile up. That sum is the detector's score at that position, and a real preamble shows up as a sharp peak. The longer the preamble, the more products pile up, which is why a long preamble can be found under a lot of noise: this is the matched filter's processing gain.
| Emergency | Announce | Bulk | |
|---|---|---|---|
| Listens to | 275โ375 Hz | 150 Hz either side of each announce channel; 135 Hz either side of the bulk-control channel | 1,500โ2,900 Hz |
| Preamble | A rising sweep, 11,520 samples (0.96 s) | Eight QPSK symbols, 1,442 samples (0.12 s) | One OFDM symbol in two identical halves, 352 samples (0.029 s) |
| Checks every | 48 samples (4 ms) | 30 samples (2.5 ms) | Every sample, where a frame is expected |
| When it runs | Always | Always | Only while a heard opener has promised a burst |
15.3.1 The emergency detector
The emergency preamble is a smooth sweep across the whole emergency region (Chapter 12 says why). Matched against a copy of itself it gives a peak only about 20 ms wide, sharp enough to say where an eleven-second frame starts.
The region is only 50 Hz wide, so 12,000 samples a second is far more detail than it needs. The detector removes everything above about 475 Hz, keeps every eighth sample, and narrows that copy to 275โ375 Hz: eight times cheaper, with nothing lost. The band is wider than the region on purpose: a sweep from a rig that is off frequency is shifted, and a narrower band would clip it. When a score passes the tests below, the detector goes back to the full recording and searches again, every other sample within 4 ms either side of the hit. That second pass matters most at the weakest signals: the weaker the signal, the less misalignment the emergency demodulator tolerates, and a whisper of a call decodes only if the start is right to within a few milliseconds.
A rig that is off frequency sends a sweep shifted by the same amount, and a shifted sweep matches an unshifted copy less well. So the detector holds five copies of the sweep, 12 Hz apart and centered on the nominal one, and keeps a separate record of recent noise for each, because the largest of five noise scores is not the noise level of any one of them. A slice fires on the copy that stands furthest above its own bar. The shift of that copy goes to the decoder as a hint, and the decoder looks for the frame's frequency only within 14 Hz of it (Section 15.11).
The copy that fires is not always the right one. A radio whose receive filter cuts the audio steeply near the bottom of the emergency region tilts the noise across it, and a copy shifted away from the frame can then win the contest against its own noise while the frame lies outside the decoder's reach. So the detector also scores every copy at its own place along the sweep it found, and when a copy other than the one that fired matches better there, the frame goes to the decoder a second time with that copy's hint. The first decode is unchanged, so the second can only add frames. On recordings from receivers whose filter leaves the bottom of the passband far down, where as few as one frame in seven decoded from the first hint alone, every frame then decoded; on a flat band it costs about one decode in six more.
At the weakest signals a chance match between noise and the sweep can score as well as the true start. The detector therefore carries up to sixteen tentative starts at once, decodes each, and lets the frame's check decide which was real.
15.3.2 The announce detector
The announce detector watches four channels at once: the three announce channels and the bulk-control channel, which carries the same kind of frame. It turns the newest stretch of the recording into a spectrum once, shares that work across all four, and with one more Fourier transform per channel has the score at every position. It looks at every 30th position for a peak and, when one passes the tests, re-examines every position within 30 samples of it to land on the best one.
The preamble is scored as two halves of 50 ms each, their strengths added, so that a small frequency offset between the rigs, which turns the signal's phase across the preamble, costs little. A larger one turns it right round inside a half: at 20 Hz nothing would be left. So each half is also matched against the preamble shifted 16 Hz up and 16 Hz down, and every position scores the best of the three. Anywhere within 24 Hz either way, one of them is then no more than 8 Hz off, which costs at most 2.4 dB. The noise record behind the bar is kept from the unshifted score alone, and a shifted score must clear the bar by a tenth more: three chances at every position would otherwise let noise through three times as often.
To read a QPSK symbol the decoder has to know the carrier's phase, the exact point in its cycle the carrier is at. The preamble's peak gives that phase as well as the position, and the detector passes both on. Get the position wrong and the phase comes out wrong too: every sample of error turns it by 16.5° on the 550 Hz channel and 37.5° on the 1,250 Hz channel, and at 45° a symbol sits on the edge between two values, so the frame decodes to confident garbage. That is why the detector refines its hit to the single best sample.
15.3.3 The bulk detector
The bulk detector does not run at all unless the station has just decoded an opener announcing a bulk burst. A bulk frame is never valid without an opener in front of it, so not looking means a stray bit of noise can never pretend to be one. The price is plain: a station that missed the opener will not hear the burst behind it. Section 15.9 has the details.
15.4 How loud is "there"? Adaptive thresholds
A score on its own means nothing: the same number might be a clear signal on a quiet night and pure noise at noon on a crackling band. So the emergency and announce detectors compare every score against the scores they have recently seen when nothing was there.
Radar engineers call this CFAR, constant false alarm rate: decide how often you are willing to be fooled by noise, then keep moving the bar so that noise alone clears it about that often. If the band gets noisier the bar rises; if it goes quiet the bar drops, and weaker real signals become findable.
Each detector keeps a rolling memory of its recent noise scores: the last 1,024 scan positions (about four seconds of air) for the emergency detector and the last 4,096 for each channel of the announce detector. From the average of that memory it estimates how widely noise scores spread, and sets the threshold at five times that spread for the emergency detector and four times for the announce detector.
Three pieces of housekeeping keep that memory honest.
- Signal is not noise. While a detector is tracking a frame on a channel, or has just handed one over, the scores from inside that frame are left out. Otherwise a run of back-to-back frames would teach the detector that "noise" looks like signal, and it would miss the next frame in the run.
- One loud moment does not move the bar. A single score more than five times the average is trimmed to five times the average before it is remembered.
- Silence is not noise either. A score of essentially zero comes from digital silence (a sound card not delivering yet, say), not from the band, and is ignored. A memory full of zeros would put the bar at zero.
Until a detector has collected 64 scores it uses a cold-start bar instead, set from the noise level in its region: a slow running average that follows only readings no more than 6 dB above it, so a burst of signal cannot drag it upward.
15.4.1 How weak a signal each detector finds
Measured through the whole receive path, one frame at a time in steady noise, the emergency detector finds every frame down to −19 dB (SNR@3k), 99% at −20 and 94% at −21, where decoding gives out first: 99.5% of frames are read at −19, 86% at −20 and 30% at −21. At the decoder's 90% point, about −19.6 dB, the detector finds 99.8% of frames, and 96% at the 50% point of about −20.6. With a rig 20 Hz off frequency it finds 98.5% at the 90% point. So the limit of a single emergency frame is the decoder, not the search (Section 12.8).
For announce frames the two limits nearly meet. The detector finds 99.7% of frames at −9 dB, 98% at −10, 89% at −11 and 77% at −12, while decoding fades out between −8 and −12 dB (Section 13.9). At the 50% decoding point, about −10.2 dB, it finds 98%.
15.5 The loud neighbor
Each region's threshold is tied to that region's own noise, which can be very low. Suppose a station a few kilometers away is running a bulk transfer at S9+20 while you listen for a faint emergency call. No filter is perfect: a tiny fraction of the bulk signal's energy leaks into the emergency region, and against that region's tiny noise level, multiplied by the matched filter's processing gain, the leak could score like a real preamble.
The dynamic-range guard stops that: every detector also requires its score to clear a second bar, one quarter of the loudness of all the audio, whatever region it is in. A real signal in your region clears that easily with the matched filter's gain behind it. A faint leak from somewhere else does not.
The guard only bites when the signal you want is enormously weaker than the loudest thing on the channel: roughly 37 dB for bulk, 44 dB for an announce frame and 53 dB for an emergency call (computed from the length of each detector's pattern; the longer the pattern, the deeper it reaches). With no loud neighbor it changes nothing.
15.6 Static, carriers and a saturated channel
Real bands are not white noise. A thunderstorm sends sharp crashes across the whole passband, a nearby voice station or a jammer fills an announce channel with something that is not an mLink frame, and a steady carrier whistles at one pitch. Each of these can make a detector fire again and again on nothing, and each false start on an announce channel holds the station's key back (Section 15.7.1). Three guards in the announce detector deal with them, and one more protects the bulk region. None of them changes anything on the air.
- The impulse blanker. In the detector's working copy of the audio, and in the announce decoder's window, never in the recording itself, a run of samples far louder than the noise, no longer than about 4 ms and with quiet audio on both sides, is set to zero. A static crash is exactly that. A real signal is longer than 4 ms and its surroundings are loud too, so it is never blanked.
- The carrier canceller. The receiver keeps a slow average, over about ten seconds, of the spectrum of what it hears. A narrow line standing well above its channel's noise (15 dB or more) is a steady carrier, and it is subtracted from the detector's copy and from the decoder's window. Left in, a carrier raises the noise reference of every position in the channel it sits in and leaves that channel deaf.
- Channel saturation. Some interference cannot be removed. When an announce channel's decodes have failed four times within the last minute, and those failures are at least 80 % of all the decodes it attempted in that minute, the channel is saturated: what it is detecting is noise or something that is not mLink. Its tentative detections then stop holding the station's key, until the failures age out. A busy channel with real, mostly readable frames never reaches this state, because its failures are a small share of its decodes. The live count of each channel's failures is on the "Counters" tab of "Diagnostics", under "Announce channels". When a channel has been saturated for at least half of each of two of the last three minutes, the station tells the operator once, as one of its findings about its own audio (Section 7.8.20), and again only if it comes back after six hours. The hold it lifts ends the way every hold ends, through the release delay in Chapter 19.
Measured on simulated air with static crashes, false starts fell from thousands an hour on each affected announce channel to a handful.
The bulk region has a guard of its own, because there a carrier does more than deafen a detector. Another station's steady carrier, or a narrow signal such as one digital-mode transmission, lands on one or two of the 28 bulk carriers and spoils every stage of the receiver after it. Left in, a carrier only 5 dB stronger than one bulk carrier, a tenth of the frame's power, would stop every frame at the fastest code rate. So the receiver cuts it out. In the frame's spectrum, any narrow region standing 10 dB or more above the spectrum around it is set to zero, together with its skirts. The comparison is made within about 300 Hz either side, so the slow tilt an echo puts across the band is never taken for interference. What is left is a frame with a few carriers missing, which the error correction repairs because the interleaver has spread their bits across the codeword (Section 14.5). The search for a frame's start does the same, but only at frequencies the slow average already knows as steady and no wider than 80 Hz, so a frame's own sync pattern, which stands out for a moment, is never cut. Measured on simulated air, a carrier a hundred times as strong as one bulk carrier, three times the whole frame, costs a quarter of a decibel at the most robust rate and under 1 dB at the fastest, and frames are found as before. With no interferer present, nothing changes.
15.7 Deaf while you talk
mLink is half duplex (Chapter 3): while the station transmits, its receiver hears nothing useful. The receiver handles that in three ways.
- At the moment of keying, every tentative detection is abandoned. A half-recorded frame cannot be finished, and stitching its first half to whatever arrives after the transmission would produce garbage that might even decode as something. Anything that finishes decoding while the station is keyed is thrown away for the same reason.
- The timeline keeps moving. While keyed, the station feeds the ring low-level artificial noise instead of the real audio, so sample positions stay in step with real time.
- Learning is frozen. The filler samples are marked, and each detector skips any stretch that contains them: no scoring, no changes to its noise memory. The filler's level is a guess, not a measurement of the band. A detector that learned from a filler quieter than the band would lower its bar during every transmission and take the first real noise after key-up for a detection.
15.7.1 Holding your own key while a frame comes in
The reverse case is a frame that is arriving when the station wants to transmit. A tentative detection on any of the announce detector's four channels or in the bulk region, or a frame already with a decoder, holds the station's ordinary transmissions back: genuine traffic is about to be decoded. A reply the station owes and a distress call are never held.
A tentative emergency detection holds nothing. Holding the radio for every false alarm of that sensitive detector would cost eleven seconds of silence each time, and a real call repeats and is heard by the other stations in range as well. The rest of the decision to key is in Chapter 19.
15.8 From a hit to a decode
When a score clears both bars, the detector does not decode anything yet. It records a tentative detection for that channel: where the preamble starts, how good the score was, the phase (for announce) and an SNR estimate. Each announce channel has room for one; the emergency detector has room for four.
15.8.1 Upgrading a detection
The detectors re-scan overlapping stretches of the recording every block, so the same preamble is seen several times as it slides through, sometimes only partly the first time. A new peak within one preamble length of the tentative one replaces it if it scores better: that is the same frame, better aligned. A peak somewhere else replaces it only if it is stronger. Two refinements keep this from going wrong on runs of frames.
- Announce frames in a run arrive 681.3 ms apart (Chapter 13). Once the receiver has handed over one frame of a run, a candidate within 2 ms of where the next should start beats any candidate that is not, whatever the scores: the data inside a QPSK frame can occasionally match the preamble almost as well as the real preamble does, and position is the tie-breaker that score cannot be. For the same reason a jump of more than 32 samples within one frame has to score at least 20% better.
- A look-alike has to look like the preamble too. Where an announce detection is already waiting, a peak somewhere else must beat it on score and match the preamble's shape at least three-quarters as well as the waiting one does. On a fading path a stretch of message can score a little higher than a faded preamble, but its shape is poor (about 0.4 against 0.99), and without the shape test it would push the true start out and the frame would be read from the wrong place.
- Emergency frames take eleven seconds to record, and at the weakest signals a chance match between the sweep and the data or the noise can score as well as the true start. So the receiver keeps up to sixteen tentative starts and decodes them all. The same start seen through neighboring copies of the sweep counts as one. A start that falls inside a frame already being carried never pushes that frame out, however well it scores: on a fading channel the sweep may have been caught in a fade and the frame's own data, arriving stronger, matches the sweep better than the sweep itself did. Such a start takes a free place, or, when every place is taken, the place of the weakest start that also lies inside another frame, if it scores better. That matters to a station that stops transmitting part-way into a strong emergency transmission: the data of the frame it heard only in part fires the detector several times, and the next frame's sweep, which falls inside those fires' supposed frames, must still find a place. And when a decoded frame says another follows in the same transmission, the receiver places its next detection directly where that frame must start, exactly 10.88 seconds after this one, without searching, and it keeps doing so through a frame it could not decode and through the station's own short transmission (Section 12.7.1).
15.8.2 Handing the frame to a decoder
On every block, before searching, the receiver checks each tentative detection: has the last sample of that frame arrived? Once it has, the whole frame is copied out of the ring and handed to a decoder worker, a separate thread that does the heavy demodulation and error correction without holding up the listening. A station runs two, so a bulk frame and an announce frame can be decoding at the same time. One of the two may finish a later announce frame before an earlier one (a frame that fails to decode can take longer), so the results of each announce channel are held back and passed on in the order the frames were on the air; the rest of the station, which follows a chain frame by frame, never sees them swapped. After the hand-over the receiver refuses to detect the same frame again as it slides through later searches.
A false start has a cost beyond its wasted decode: while it waits, a weaker real preamble inside its frame cannot replace it, and once it is handed over, the receiver refuses anything starting inside its frame. A real frame that began there would be lost. So when the decoder reports that an announce frame failed its check, the receiver looks again over the recording it still holds, from the end of that frame's preamble to the end of its frame, for the start it refused. A start found there must clear the channel's bar of the moment and the loud-neighbor guard, and match the preamble's shape at least three-quarters as well as the failed one did, the test any rival start meets (Section 15.8.1); then it is handed over like any other, at once if its frame is already all recorded. The look takes about a millisecond.
15.9 Lining up on a bulk burst
A bulk transfer is a string of OFDM frames, each 5.98 seconds long, laid end to end with no gaps (Chapter 14). The bulk detector has to find each frame's start to within a sample or two, and make sure that one missing frame cannot throw off the rest.
15.9.1 The opener arms the search
A bulk transmission has the shape
[presence]
Around a predicted start the detector first asks two cheap questions. Is the bulk region at least 3 dB louder than its usual noise? And does the audio repeat itself half a symbol later, as the bulk preamble does (Section 14.9)? Only then does the matched filter look for the exact start, at the positions the prediction allows. The result must clear the loud-neighbor guard and a bar set from the bulk region's noise level. The strongest match is taken as the frame; the symbol windows are then started from the earliest clear peak within one cyclic prefix before it, so that an echo stronger than the first copy does not waste the prefix (Section 14.4); when the first copy was too faded in the sync symbol to show, the demodulator finds it in the frame and cuts the windows again. The bulk detector keeps no rolling memory of scores, because while a burst is expected nearly everything it sees is signal; its noise level is refreshed from the announce region's at the moment of arming.
15.9.2 Frame 0 first, and it must really be frame 0
Frame 0 is the anchor for every other frame's position, and the rest of the message cannot be checked without it (Chapter 17). So the detector insists on finding it first:
- It searches within 1,400 samples (about 117 ms) either side of the predicted start. That covers the uncertainty in where the opener was found and is narrower than the 150 ms of silence in front of the burst, so the search never reaches back over the opener. Separating the opener from the burst is the silence's only job.
- The best match must also pass a coherence test: how closely does the shape of this stretch of audio match the preamble's shape, ignoring how loud it is, on a scale from 0 to 1? A real, correctly aligned bulk preamble scores about 0.997. Noise, OFDM data, silence, even the right preamble shifted by a fraction of its length, all score 0.5 or less, and so do static crashes. The detector demands at least 0.60, which on slow fading keeps nearly every frame 0 that could be decoded.
- Until frame 0 has been found, the detector looks for no later frame. If a later frame were taken as the anchor, every frame's place in the burst, and so its code rate, would be off by one.
The station does not need the silence as time to get ready. An opener has to be recorded to its last sample and then decoded before the search can be armed, and on a busy station that can take longer than the silence lasts. If the search is armed more than about 0.2 seconds after frame 0 was due to begin, the receiver waits until the whole of frame 0's search window has been recorded and searches it once, straight from the ring, with the same tests except the loudness question.
If frame 0 has still not been found by the time it would have finished arriving, plus 16,384 samples (about 1.4 seconds), the detector stops looking for this burst altogether and nothing of it is decoded. A station that was only overhearing lets it go. The station a directed transfer was addressed to still answers when the burst should have ended, with a dNAK (the reply that lists missing frames) naming every frame; Chapter 18 says what the sender does with it.
15.9.3 Every other frame at an exact stride
When frame 0 is found, its true position replaces the prediction. From then on frame i can only start at that position plus i times the frame length (71,808 samples), and the detector searches only 64 samples (5.3 ms) either side of that spot. The two stations' sound cards run at very slightly different speeds, but over a burst the drift is a handful of samples at most.
The narrow search is what makes a missing frame harmless. If a fade wipes out frame 2, its window contains no preamble and slot 2 stays empty. The receiver never goes looking a few thousand samples away, so frames 3 and 4 are found exactly where they should be, and the sender is asked to repeat only frame 2 (Chapter 18).
Position also tells the decoder the frame's code rate, which follows from its place in the burst (Chapter 17). The receiver works out that place from where the preamble landed relative to frame 0, not by counting frames as they arrive, so a missing frame cannot make it decode the next one at the wrong rate.
15.10 Signal reports: the SNR estimate
Every emergency and announce detection comes with an estimate of how strong the signal was. The matched filter's peak says how strongly the preamble was heard; a noise reference says how strong noise looks through the same kind of measurement. Their ratio, in decibels, rises one-for-one with the real SNR but includes the matched filter's processing gain, so each detector subtracts a fixed correction, set on simulated air with a precisely known SNR.
- Announce frames take their noise reference from two thin slivers of the passband that no mLink signal uses: the gaps between the announce channels, 695โ755 Hz and 1,045โ1,105 Hz. It is updated only while no announce frame is in progress, so a strong signal cannot leak into it and make itself look weaker. It is also the only honest reference for the bulk-control channel, whose own region is full of bulk data whenever anyone is transferring.
- Emergency frames use the detector's own rolling noise memory.
- Bulk frames have no SNR estimate: there is no clean noise reference inside a bulk burst.
When a frame decodes and names its sender, the reading goes into that station's link estimate (Chapter 20).
15.11 Frequency offset
Two rigs set to the same dial frequency are never exactly on the same frequency, and the difference shifts every tone in the audio by a few hertz. The bulk preamble lets the receiver measure that shift. Its two halves are identical when sent, so any rotation of phase between them, as received, can only come from a frequency offset. The measurement is unambiguous up to about 47 Hz either way.
Each modem also copes with an offset while it decodes:
- Bulk measures the offset again from the cyclic prefixes of all its symbols, which is far steadier than one preamble at low signal levels, and takes it out before demodulating, up to 23 Hz either way; its pilots then remove what little remains (Section 14.8.3). When the opener before the frames was heard 5 Hz or more off, the receiver first moves the frames by the opener's offset, both to find frame 0 and to demodulate each frame, so the 23 Hz is counted from there: a transfer gets through as far off as its opener decoded. Without that, frame 0 is in practice not found beyond about 18 Hz.
- Announce hunts for the offset before it decodes. It
tries offsets up to 24 Hz either way, the same reach as the emergency
receiver, together with small shifts of the frame's start, and keeps the one
under which the frame's symbols fit the polar code best; then it follows the
carrier's phase across the frame. The hunt only scores; it accepts nothing, so
the one decode that follows is still the frame's only chance to pass its
check. Finding the frame reaches as far: the detector also matches the
preamble shifted 16 Hz up and down
(Section 15.3.2), and the carrier's
phase it hands over is measured at the offset that fits the preamble best,
searched over 26 Hz either way. With the rigs up to 20 Hz apart, 81 to
89 % of frames get through at −9 dB (93 % with no offset) and
56 % at 24 Hz; at −6 dB, 97 % or more at every offset up to
24 Hz. The second tries, which look for a frame's true start and equalize
an echo, work at the nominal frequency, so on an NVIS path an offset costs
frames: at +12 dB 94 % get through with no offset, 61 to 71 % with
5 to 24 Hz. The price of the
hunt falls on the weakest frames from a rig with no offset at all: below about
−10 dB, noise sometimes fits a wrong offset better than the right one.
Past the hunt's reach there is a second chance. A frame the detector found but the decoder could not read has its offset measured again, from the carrier line that is left when the modulation is taken off. The line is looked for over 64 Hz either way and, when a stronger one stands beyond that, out to about 100 Hz; the frame is then decoded once more at that offset, with its start searched anew. This wide try runs only when the measured offset is past 18 Hz and the line stands clearly above the noise, and only when the search for the frame's start finds a clear peak, so a stretch of plain noise is almost never decoded a second time. The frame's own check stays the only judge of whether it was read. In simulation (white noise, the receiver and decoder as built) frames up to about 90 to 100 Hz off decode, where they stopped near 24 Hz before. At +3 dB, 94 % decode at 70 and 80 Hz off, 60 % at 90 Hz and 21 % at 100 Hz. From 30 to 60 Hz, 73 to 90 % decode at −3 dB, nearly all at 0 dB and up, 15 to 35 % at −6 dB and a few at −9 dB. Between 25 and 29 Hz frames decode but often without a usable offset reading. From 101 to 200 Hz almost nothing is heard. A frame about 350 Hz off lands on the neighboring announce channel and decodes there, reading as an offset 350 Hz smaller than the truth, and so can mislead the correction below.
- Emergency measures the offset before it decodes. Its tones are only 6.25 Hz apart, so even 3 Hz between the rigs would leave every tone between the frequencies the receiver listens on. The receiver starts from the hint the detector hands over, tries offsets within 14 Hz of it (never beyond 24 Hz either way), keeps the one under which the frame looks most like eight steady tones, sharpens it from the way the tones' phase turns, and then decodes once. Given where a frame starts, that recovers every frame up to 20 Hz off even at −18 dB. Finding the start is the harder part: an offset also shifts where the sweep seems to begin and blurs it against the pattern the detector looks for, which is why the detector holds five shifted copies of the sweep. At the decoder's 90 % point, about −19.6 dB, the station finds 99.4 % of frames from a rig 10 Hz off either way and 98.5 % from one 20 Hz off.
Whatever the modem, the offset it settled on is a measurement of how far the sending rig and ours are apart, good to a small fraction of a hertz, and every decoded frame carries it.
15.11.1 When the station itself is off
An offset is a difference between two rigs, so a single reading cannot say whose rig is wrong. Many readings can. The station keeps the offsets of the frames that say who sent them: the PRESENCE in front of every transmission (and the few net frames that carry their sender's callsign), every bulk frame of an exchange whose opener named its sender, and an emergency incident's frames once the incident is complete and its identity begins with a callsign. For each station it keeps the last five such frames heard within fifteen minutes, and takes the middle value as that station's offset, so one odd reading cannot move it.
One station far off frequency is that station's problem, and on its own it never moves anything. But when two or more stations, and more than half of the stations heard in those fifteen minutes, agree to within 6 Hz on an offset of 5 Hz or more, the plain explanation is that the odd one out is us: every signal looks shifted by the same amount because our receiver is. The same oscillator sets our transmit frequency, so the other stations are hearing us off by that amount too. Two, not one, because each band has one standard dial frequency: two stations that agree with each other and not with us mean that we are the one that moved. A band split into two groups of similar size decides nothing. Once the station has judged itself off, it keeps that judgment until the agreed offset falls below 2.5 Hz, so an offset hovering near 5 Hz does not make the verdict flicker.
Say your radio runs 12 Hz low on USB: the dial shows 14.105000 MHz but the radio is really at 14.104988, for receive and transmit alike. A station exactly on frequency sends a 1,000 Hz tone; you hear it at 1,012 Hz, and so does every frame from every accurate station: they all read +12 Hz. The fix is to turn the dial up 12 Hz. On LSB the same radio hears every station 12 Hz low instead, because the sideband turns the audio around, and the fix is still the same 12 Hz up.
Where the station has CAT control of a rig that can report its mode and read and set its frequency, and the operator has ticked "Let mLink correct the dial by a few hertz when other stations agree we are off" (off unless ticked: a dial move is a change to the radio, and mLink changes nothing on a radio the operator has not agreed to), it makes that fix itself. It moves the dial (the VFO) rather than using RIT and XIT (the transmitter's equivalent), because an oscillator that is off is off for both directions, and the dial moves both in one command; RIT alone would let us hear the band centered while we still transmit off it, and few rigs let a computer set an XIT offset at all. It reads the dial back afterwards and counts what the rig actually did, so a rig that tunes in 10 Hz steps is credited with the step it took. It retunes only while it is quiet: not transmitting, not receiving, nothing waiting to go out; and nothing about it is ever sent on the air. Then it adjusts its own memory: offsets heard before the retune are shifted by the amount the dial moved, so the same error is not counted twice, and frames heard in the next 15 seconds are set aside, because one that was on the air across the retune carries a bit of both. After a retune, or a rig that refused one, the station waits ten minutes before trying again.
Without CAT, with the setting off, or when the rig cannot do it (it cannot set its frequency, or it is not on USB or LSB), the station tells the operator instead, in a sentence that gives the size, the agreement and the cure, for example "Your radio seems about 12 Hz low: 4 of the 5 stations heard agree. Turn the dial up 12 Hz (USB)." With the setting off it adds "Or let mLink correct it: turn on automatic correction in Settings > Radio." When it does not know the sideband it gives the direction for both. The alert stays up as long as the verdict holds and is taken back when it no longer does. On FM, a frequency error does not move the audio tones at all, so none of this applies.
15.11.2 How far off the station can be and still correct itself
The correction can only use frames that decode, so its reach is the reach of the announce receiver. In simulation, with two or three other stations on frequency beaconing every ten minutes, a station off by up to about 80 Hz corrects itself at 0 dB and better, up to about 64 Hz at −3 dB, and only up to 24 Hz at −6 and −9 dB. It needs one retune. At 0 dB or better the first retune comes after a median of 7 minutes with two other stations and 5 minutes with three. When the other stations are themselves a couple of hertz off, an error of 5 to 6 Hz can stay uncorrected, by design: the station acts from 5 Hz. Beyond the limit the frames decode less and less: at 100 Hz about nine runs in ten still correct at 0 dB, though after an hour or more, and few at −3 dB; from 101 to 200 Hz nothing is heard, so nothing is corrected; near 350 Hz a frame decoded on the neighboring announce channel makes the station retune by a small, wrong amount and then think itself on frequency.
In hertz the limit is the same on every band, so in parts per million it shrinks as the frequency rises. The error a radio may have, and still be pulled in at 0 dB and better, is 80 Hz divided by the dial frequency:
| Dial | Largest error |
|---|---|
| 3.5 MHz | 22.9 ppm |
| 7 MHz | 11.4 ppm |
| 14 MHz | 5.7 ppm |
| 21 MHz | 3.8 ppm |
| 28 MHz | 2.9 ppm |
On weaker signals the limit is lower: 24 Hz at −6 dB, which is only 0.9 ppm at 28 MHz. What a radio ought to meet is in Section 6.11.
15.11.3 Frames arriving far off frequency
When the offsets are past what the announce hunt covers, the wide try still reads them, and a station that does not have two agreeing stations to judge itself can still be told. When three announce frames heard within thirty minutes, each at least 18 Hz off and all within 6 Hz of one another, show the same offset, the station raises a warning that announce frames are arriving about so many hertz above or below where it listens. A frame counts only when the search for its start also found a clear peak, so noise does not raise it. One radio is off, yours or the sender's, and the station cannot say which; if it is yours, the notice gives the dial move, for the sideband the radio is in, or for both when it does not know. Past about 90 Hz the offset cannot be measured, and the notice says the frames are arriving more than about 64 Hz away, with no figure and so no dial move: set the dial to the band's frequency again. Three frames, because one is a fluke and two can be a transmission's repeat, and thirty minutes because two stations beaconing every ten minutes give only about two frames in ten.
The warning is not raised while the judgment above is already up, which says the same thing. It is taken back at once, with the note "back on frequency", when a station that was heard far off decodes twice within the normal reach. Otherwise it is taken back, with a short note, after thirty minutes in which no such frame came. It is not used on FM.
15.12 What the key-up decision hears
A detector needs most of a preamble, up to a few tenths of a second, before it can say anything. The question the station asks before every voluntary key-up is narrower than “is there sound?”: is an mLink frame under way right now? The receiver answers from its detectors and its decoders only. A detector that has found the front of a frame and is collecting it, or a decode in progress, means yes. A rise in the overall audio level means nothing: a change in noise is not an mLink signal, and the receiver has no long memory of the band to tell the two apart (Section 19.6). The overall level is measured all the same, for the “too loud” and “too quiet” alerts, and on an FM channel for the voice wait described there, which is a courtesy wait of its own and not a part of this question: the last check before keying looks at both.
15.13 What to remember
- The receiver records everything into a 43.7-second ring and runs three independent detectors over every fresh slice; finding one thing never stops it looking for another.
- The bar a detector's score must clear follows the noise (five times its spread for emergency, four for announce), never learns from signal, and is backed by a guard against a loud neighbor's leakage.
- While the station transmits, half-heard frames are dropped and the detectors neither score nor learn.
- Bulk is only searched for after an opener. Frame 0 must be found within about 117 ms of its predicted start and pass a coherence test; every later frame is looked for within 5.3 ms of an exact stride, so a missing frame leaves an empty slot instead of throwing the rest off.
- Emergency and announce detections carry an SNR estimate. Every decoded frame carries the offset its modem measured; when enough other stations agree that we are off (two others are enough), the station moves its own dial or tells the operator which way to turn it, and one station off on its own never moves it. It corrects itself up to about 80 Hz off, and says so when frames keep arriving that far off.
Part IV: Talking on the Air
The Transmission Is the Unit
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
16.1 One press of the key
In mLink a transmission is exactly one push-to-talk (PTT) turn: the radio keys, a run of frames goes out back to back, and the radio unkeys. Nothing about a transmission is spread across two key-ups.
That sounds obvious, but it is a real design decision, and much of the protocol leans on it. The receiver does not treat the passband as a stream of loose frames to be sorted out later. It treats each keyed burst as a unit and reads the middle in the light of the beginning. The rest of this chapter is about that beginning.
16.1.1 How long a transmission is
Transmissions are built from two kinds of frame. Control and short data travel in announce frames: each is on the air for about 660 ms, and the frames of one transmission are separated by a silent gap of about 21 ms, so every extra frame costs about 682 ms of air (Section 13.7). Large data travels in bulk frames of 5.98 s each (Chapter 14).
A short exchange is therefore short. An acknowledgment is one announce frame, about 0.66 s of transmitter time; a request for missing frames is two, about 1.3 s. A bulk transfer opens with two announce frames, pauses for 150 ms, and then sends its bulk frames end to end. One transmission carries at most ten bulk frames, about 60 s; a bigger message goes out as a series of such transmissions (Section 18.7).
16.2 PRESENCE goes first
The first frame of every ordinary mLink transmission is a PRESENCE frame. It is one announce frame. Every PRESENCE says who is transmitting, the station's callsign packed into six bytes (Section 16.6), and carries four flags about what the station can do. What the rest of it says, 28 bits, depends on the kind of PRESENCE, which the type byte names (Section 16.3):
- The beacon kind, the everyday one, says roughly where:
the station's Maidenhead grid locator to six characters, such as
DM12ab, or to four if the operator chooses to say less (Chapter 30). One more bit says whether an operator is at the station (Section 20.3.1). - The answer to a geopoll says the same, and its own kind tells the station that asked that this is the answer (Section 20.5).
- The acknowledgment, the ACK, is a PRESENCE too: the station names itself in the same frame that says "your message arrived complete" (Chapter 18).
- The ask and its answer, the RTS (request to send) and the CTS (clear to send), are PRESENCE kinds as well: "may I send you this much?" before a long message to one station, and the addressee's reply (Section 19.3).
Because every kind of PRESENCE names its station in the same place, a station that hears only that one frame of a transmission still learns who sent it and what that station can do.
A PRESENCE on its own is a complete transmission: that is what a beacon is, a station keying up for one frame just to say "here I am". Everything else the station sends is PRESENCE plus whatever it actually came to say, or, for an acknowledgment, an ask or its answer, that one frame alone.
16.2.1 The gateway flag
The last four bytes of every PRESENCE are one 32-bit number. Its top four bits are flags about the station itself, the same in every kind of PRESENCE; the other 28 hold what the kind says, such as the locator, which packed as one number takes 25 of them (Section B.5).
The one that matters most is the first of them, the gateway flag. A station sets it while it can reach its mail server over the internet: the server is configured, the station is registered with it, and the last successful contact was less than ten minutes ago. A station that is part of a cluster (Chapter 33) also sets it when another member of the cluster can reach the server on its behalf.
Because the flag rides in every PRESENCE, every station within earshot learns who the gateways are at no cost in air time, and a gateway whose internet link drops simply stops setting the bit. What stations do with that knowledge is the business of Chapter 26. The other three flag bits belong to FM (Section 34.4).
16.2.2 No traffic under a placeholder callsign
The station will not transmit without a real callsign. If the configured
callsign is empty, is the placeholder N0CALL, or is not a valid
amateur callsign, the station refuses to send, beacon or report its position,
and the client shows an error until one is set. The one thing allowed out
regardless is a distress call (Chapter 25): a
call for help under the wrong name beats silence.
16.2.3 Where PRESENCE is not the first frame
Three kinds of signal are built differently.
- The emergency region. A distress call there is sent by a different, much slower modem with its own frame format and no PRESENCE (Section 25.3). When other stations repeat a heard distress call on the announce channels, those repeats do open with the repeating station's PRESENCE.
- The geopoll. The question "is anyone inside this area?" is a single frame that carries the area and no callsign, and it is the whole transmission (Section 20.5).
- Four frames of a virtual net. A roll-call check-in, a station's own request to join, a request for the roster and the owner's instruction to net control each carry the sender's full callsign inside the frame and go out as one frame alone (Section 24.2.1). The station is still identified: the callsign is in the frame instead of in front of it.
16.3 The type byte and the frame families
Every frame on an announce channel, and on the bulk-control channel, is the same physical object: eleven bytes, which the announce modem protects with twelve more and sends as one frame (Section 13.5). There is no separate "data frame", "reply frame" or "relay frame" format. A PRESENCE, an acknowledgment and a slice of a chat message are all announce frames; only the meaning of the eleven bytes changes.
The first of the eleven is the type byte, and it says what the other ten mean. It is split into two halves of four bits each:
- the high half is the frame family, a broad group such as "presence" or "relay";
- the low half is the subtype, which picks one frame within the family.
Written in hexadecimal the two halves read straight off the byte:
0x21 is family 2, subtype 1, which is an opener;
0x04 is family 0, subtype 4, the PRESENCE that acknowledges a
transfer. That is how the kind of a PRESENCE costs no data byte: it is the
subtype.
Four bits give room for sixteen families of sixteen frames each. Nine families are in use:
| Family | Name | What it is for | Explained in |
|---|---|---|---|
0x0 | PRESENCE | "It's me": the sender's callsign and flags in every kind, then the beacon's grid and operator bit, the answer to a geopoll, the acknowledgment, or the ask before a long message and its answer. | this chapter; Chapter 20, Chapter 18, Section 19.3 |
0x1 | RELAY | Messages one station holds for another: recruiting a relay, mail custody and pickup, and repeating a heard distress call. | Chapter 21, Chapter 26, Section 25.8 |
0x2 | BULK | Control of every data transfer, large or small: asking for the air by the message's name, announcing it, answering it, repairing it, continuing it, canceling it. Also the one-frame request for internet data. | Chapter 17, Chapter 18, Section 29.4 |
0x3 | SHORTBURST | The data frames of a message small enough to ride in announce frames. The low half of the type byte is the frame's position, not a subtype. | Section 17.2 |
0x4 | APRS (Automatic Packet Reporting System) | A precise position report. | Section 30.2.1 |
0x5 | GEO | The circle that a transfer to an area is aimed at, and the geopoll's question "is anyone inside this circle?". | Section 30.4, Section 20.5 |
0x6 | HELLO | "I recently heard this station": one line of the sender's heard list. | Section 20.7 |
0x7 | NET | Virtual nets: net control's regular heartbeat, the roster, joining, the roll call and its tally, and the owner's instructions. | Section 24.2 |
Families 0x9 to 0xF are unassigned. The BULK
family is named for the bulk transfer it was built around, but it controls
shortbursts too, for a plain reason: the SHORTBURST family spends its
subtype half on the frame's position and has no room left for control
frames.
This chapter stops at the families. What each frame is for, and where every field sits in it, is listed once, in Appendix B.
Two consequences of the fixed eleven bytes run through the whole protocol. A frame that needs fewer bytes is padded with zeros and costs exactly as much air as a full one, so nothing in mLink saves bytes by leaving a field out. And anything that needs more than eleven bytes is split across several announce frames in the same transmission.
16.4 What follows the PRESENCE
After the PRESENCE comes the reason for keying up. Written in the
bracket notation this book uses, a transmission is a
frame chain: the frames in
the order they go out, such as
[presence]
- PRESENCE, always, except in the replies that lead with a CTS in its place (the dNAK and the checkpoint reply) and in the one-frame transmissions below.
- Optional followers: frames that add something without ending the chain. HELLO frames, a position report, an AREA frame naming the circle a message is aimed at, a FOR frame naming the original sender of a relayed message, the manifest of a longburst, the pieces of a repeated distress call and most named-net frames are followers.
- One opener: the frame that says what this transmission is for. An OPENER announces a bulk transfer, an SB-OPENER announces a shortburst, a dNAK answers someone else's transfer, a relay or mail frame asks or answers a question. Data frames, if any, come after the opener.
The ACK has no chain around it: it is a PRESENCE that names its sender and acknowledges in the same frame, so the whole transmission is [ack]. The ask before a long message and its answer are one-frame transmissions in the same way, [rts] and [cts].
Not every chain has an opener: a beacon that carries a few HELLOs, or a position report, is PRESENCE and followers and nothing else. When a transfer does carry followers, they sit between the PRESENCE and the opener in a fixed order. Three chains show the range:
- [ack]: the shortest exchange there is, one frame, "I received your message complete".
- [presence]
[sb-opener] : a shortburst, a 26-byte message carried entirely in announce frames.[sb 0] [sb 1] [sb 2] - [presence]
[hello] : a bulk transfer that happens to carry everything a bulk transfer can: two heard-list lines, a relayed message's original sender, and a target area.[hello] [for] [area] [opener] [bulk 0] [bulk 1]
In practice most transmissions are two or three announce frames before any data starts. The chains seen most often on the air are tabulated in Section B.3.
16.5 Who said this? Binding by timing
Here is the payoff for putting PRESENCE first. Almost none of the frames that follow it carries a callsign. So how does a listener know who sent them?
It knows by timing and position, the same way you know who is talking on a voice net: the voice that just gave its call is the voice that is still talking. mLink calls this temporal binding. For each announce channel it listens to, the receiver remembers the most recent PRESENCE it decoded there and when. A frame that arrives on the same channel shortly afterwards is taken to be from that station.
16.5.1 The freshness window
"Shortly afterwards" has a precise value. The next frame of a chain is due one frame plus one gap later, about 682 ms. The receiver allows twice that, 1.36 s, for decode delay and timing jitter. This is the freshness window, and it is measured from the last frame that kept the chain going, not from the PRESENCE itself. Each follower restarts the clock, so a chain with several followers is just as safe as one with none.
The rules the receiver applies are short:
- A PRESENCE, of any kind, starts a new binding on its channel, replacing whatever was there before.
- A follower keeps the binding and restarts the clock.
- An opener uses up the binding: the receiver credits the opener to the bound station and then clears the channel, so the same PRESENCE can never be credited with a second, unrelated opener later on. The SB-OPENER is the one opener that leaves something behind: it opens a reception on that channel for the shortburst frames that follow it.
- An opener that arrives with no PRESENCE bound on its channel, or after the window has run out, is dropped. The receiver would rather lose a frame than guess who sent it.
16.5.2 Followers must also be on the beat
The window alone would let a stranger in. Suppose station B's transmission ends, and half a second later station F's begins on the same channel, but F's PRESENCE is lost to a fade. F's next frame arrives inside B's window, and would be credited to B.
The receiver therefore checks one more thing for every follower that takes its sender from the binding: the openers and replies of an exchange, the frames of a relay handshake, a mail frame, and the followers that say something about their sender (a HELLO, a position report, a named-net frame, a piece of a repeated distress call). A transmitter sends the frames of a chain at an exact, fixed spacing, and the receiver knows, to the audio sample, where each frame it decodes began. A follower that starts a whole number of frame spacings after the bound station's last frame is credited to that station. One that is off the beat, by more than about 48 samples (4 ms), belongs to somebody else and is left without a sender; a frame with no sender is discarded. The allowance covers how far the receiver's own timing of a frame scatters in noise and fading, and the small drift between two sound cards' clocks. A stranger's frame lands that close to the beat by chance only about once in eighty.
A frame that the receiver can see but not read still counts for timing. If the receiver detects a frame, cannot decode it, and it begins one or two frame spacings after the bound station's last decoded frame, on the beat, it is taken as one more frame of that chain. It renews the window and the channel's reservation, so the chain's next frame still finds the binding alive. It gives nothing else: no sender, no content, no reply, no delivery. Only one such frame in a row is counted; the next frame of the chain has to decode, or the window runs out as usual.
Each of the three announce channels keeps its own binding, and so does the bulk-control channel, which carries the PRESENCE, OPENER and replies of bulk transfers. One channel can be in the middle of receiving a shortburst while another carries a different station's ACK; the two never cross.
16.5.3 Binding the data frames
Shortburst frames follow their SB-OPENER on the same channel, and belong to the reception it opened until that reception closes.
Bulk frames are in a different part of the passband, so they are bound by the clock instead. The opener says how many bulk frames are coming; they start 150 ms after the opener ends and follow one another every 5.98 s. The receiver works out the expected arrival times from the moment it decoded the opener, and a bulk frame that arrives on that schedule belongs to that opener, and so to the station whose PRESENCE the opener was bound to. Its place in the schedule also says which frame of the transfer it is (Section 18.3). How closely the receiver searches around each expected time is in Chapter 15.
16.5.4 The safety net under binding
Timing is a strong clue but not a proof. On a busy channel with stations that cannot all hear each other, a receiver could decode frames from two transmissions and join them. Two checks catch it. Every message carries a two-byte check value computed over the sender's callsign, the receiver's callsign and the message; the receiver recomputes it using the sender it bound by timing, and a message credited to the wrong station fails (Section 18.2). And a station waiting for a reply accepts it only from the station it sent to, on the channel the exchange used (Section 18.4.4).
16.6 Callsigns in six bytes
A callsign is written in a small alphabet: a space for padding, the
digits, the letters, and the two marks callsigns actually use, the stroke
/ of a portable or visiting station and the hyphen
- of a secondary station identifier. That is 39 symbols, so
mLink writes each callsign as a number in base 39, the same idea the FT8
family uses. This is
callsign packing.
The recipe:
- Convert the callsign to capitals.
- Pad with spaces to nine characters.
- Give each character a value: space is 0, the digits
0to9are 1 to 10, the lettersAtoZare 11 to 36,/is 37 and-is 38. - Read the nine values as a nine-digit base-39 number, first character most significant, and store that number in six bytes, most significant byte first.
For example, W1AW becomes W 1 A W followed by
five spaces, values 33, 2, 11, 33, 0, 0, 0, 0, 0, which works out to the
number 176,932,451,189,169, stored as the bytes
A0 EB 4B E7 01 B1. Every station does the same arithmetic, so
every station unpacks the same six bytes back to W1AW.
Why nine? Six bytes hold a little over 281 trillion values, and nine
base-39 characters need about 209 trillion, so nine is the most that fits.
That covers every real callsign with its suffix: VE3XYZ/P,
KH6/W1AW and KX0AAA-7 all go on the air whole and
come back character for character. A received value too large to be nine
characters is not a callsign, and the receiver rejects it.
An SSID is part of the address. On the air K7OTR and K7OTR-7 are two different stations, compared character for character; only the mailserver gives them one mailbox (Section 27.3.2).
16.6.1 Station ID: a callsign in two bytes
A frame that names its own sender has no room for a second whole callsign.
The ask before a long message and its answer
(Section 19.3) name the other
station by its station ID
instead: the same 16-bit CRC (cyclic redundancy check) the message check uses
(Section B.1), computed over the
six packed bytes of its callsign. W1AW, packed as above, has the
station ID 0xE922. Sixteen bits cannot keep every callsign
apart: KX0BBB and KX0QUP share 0xF6B5,
and a station that knows of such a pair sends to either without asking
(Section 19.3.1). A station ID is only a short
reference on the air. It is not the station identification the license
requires, which is the whole callsign every transmission carries
(Section 16.8).
16.7 Addressees that belong to nobody
Every frame that names a destination names it with a six-byte packed
callsign. There is no other kind of address field. To send to more than one
station, mLink uses
reserved addressees:
names that start with the digit 0. No licensed station can
hold one, because no callsign series in the international allocation table
begins with 0. One simple rule, "a leading 0 means not a station", covers
all of them:
| Addressee | Meaning | Where it comes from |
|---|---|---|
0CQCQCQ | Every station that hears this. | The universal amateur general call. |
0CQQTH | Every station, with the attention of those inside a stated area. The area rides in an AREA frame just before the opener in the same transmission (Section 30.4). | QTH, the Q-code for location. |
0 + a net name, e.g. 0MARITIME |
The members of a virtual net (Section 24.7.1). | The net's
own name, up to eight characters after the 0. |
A receiver treats a transfer addressed to any of them as addressed to itself: it receives and keeps the message. Neither the area nor the net is a filter on who may receive; each decides who gets alerted.
Because they are reserved, none of them is ever treated as a real
station: a receiver never adds 0CQCQCQ to its list of heard
stations or to its map of who hears whom. The two-byte message check still
works for them. For a message to everyone, whether to 0CQCQCQ
or to an area, it is computed with 0CQCQCQ standing in as the
receiver; a message to a net is checked against the net's own addressee. Any
listener can reproduce either.
16.7.1 Why there is no broadcast flag
16.8 Station identification
The FCC's station identification rule for amateurs (47 CFR §97.119) asks a station to transmit its callsign at the end of each communication and at least every ten minutes during one, so that listeners know where the signal is coming from. Other administrations have similar rules.
mLink's reading is that PRESENCE satisfies this without any extra machinery. Every ordinary transmission opens with the station's own callsign, so the station identifies every time it keys, and no transmission lasts anywhere near ten minutes. The last transmission of any exchange (an ACK, say) is itself a PRESENCE, so the end of the communication is identified too. The four named-net frames that go out alone carry the callsign inside the frame. The callsign is packed, not spelled out, the same posture FT8, JS8 and other modern digital modes take, and anyone running mLink software decodes it back to the plain callsign.
That is why there is no separate periodic identification and no Morse-code tail: the protocol already says who is transmitting, at the top of every transmission, as a side effect of how it binds its frames. It is also why the station refuses to transmit under a placeholder callsign: sending the wrong identity is exactly what the rule exists to prevent.
16.9 What to remember
- A transmission is one PTT turn. It is the unit the protocol reasons about.
- Every ordinary transmission opens with a PRESENCE: the packed callsign and four flags, then 28 bits its kind names (a grid locator of up to six characters and the operator bit in a beacon; the whole acknowledgment in an ACK; the ask and its answer in an RTS and a CTS). The top bit of the 32-bit field is the gateway flag.
- Every announce frame is eleven bytes. The first is the type byte: family in the high four bits, subtype in the low four. Nine families are in use.
- Frames after the PRESENCE carry no callsign. They are credited to the PRESENCE on the same channel within 1.36 s of the last frame of the chain, and followers must also be on the transmitter's frame spacing; bulk frames are credited through the timing the opener sets up.
- Callsigns are nine base-39 characters in six bytes, suffixes included.
A leading
0marks a reserved addressee:0CQCQCQ,0CQQTH, or0+ a net name. There is no broadcast flag. A station ID is the CRC-16 of the six packed bytes, a short name that two callsigns can share. - Station identification is a side effect: the callsign goes out at the
top of every transmission, and never as
N0CALL.
Three Sizes of Message
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
17.1 Why three sizes
mLink has two modems that can carry a message, and they are good at opposite things. The announce modem (Chapter 13) moves 10 bytes in each frame of about two-thirds of a second, and it still decodes at −9 dB SNR@3k. The bulk modem (Chapter 14) moves 603 to 1,008 bytes in each frame, but a frame always lasts 5.98 seconds however little is in it, and stations only trust it on a link of +3 dB or better (Section 11.8.3).
For a 40-byte chat message, a bulk frame would be nearly all padding. For a 5 kB mail, the announce modem would hold a shared channel for minutes. So there are three ways for a message to travel, and one rule table that picks.
| Shortburst | Longburst | Bulk | |
|---|---|---|---|
| Carries | 1 to 160 bytes | 161 to 601 bytes | 1 to 64,004 bytes |
| Rides on | One announce channel | One announce channel, up to 4 transmissions | The bulk region |
| Frames | 1 to 16 announce frames | 2 to 4 shortbursts | 1 to 64 bulk frames |
| Used on a link of | any strength | under +3 dB, or unknown | +3 dB or better; over 601 bytes also unknown, once an ask is granted |
| Air time | 2.0 to 12.2 s | 15.0 to 47.6 s | 7.5 s for one frame, 5.98 s for each one more |
All three work on the size of the message after it has been compressed and wrapped (Chapter 23). A wordy 300-character chat message may well compress into a shortburst.
17.2 Shortburst
A shortburst is a message sent as a string of ordinary announce frames, in one transmission, on one announce channel:
[presence]
PRESENCE says who is sending (). The shortburst opener names the addressee, or a reserved "everyone" address for a broadcast, and carries the message's 16-bit check, which is also its name on the air (Section 18.2), and the length of the message. Then come the data frames.
17.2.1 What is in the frames
An announce frame holds one type byte and 10 bytes of data. In a shortburst data frame, half of the type byte gives the frame's place in the message, 0 to 15. Four bits of position is why a shortburst is at most 16 frames long.
The opener carries the length of the message (one byte) and the check, so no data frame needs a header. Every frame, frame 0 included, holds 10 bytes of message, and the largest shortburst is 16 × 10 = 160 bytes. The layouts are in Appendix B.
17.2.2 On the air
Frames follow each other every 0.68 seconds. A message of 1 to 10 bytes is three frames on the air, about 2.0 seconds. Every further 10 bytes adds one frame, and a full 160-byte shortburst is 18 frames, about 12.2 seconds. The opener says how long the message is, so the addressee knows from the opener how many frames to expect and when the last one should end, even if the first data frame is lost. A listener that hears the opener keeps off that announce channel for the longest burst, 16 frames (Chapter 19).
17.3 Longburst
Between 161 and 601 bytes there is an awkward gap: too big for one shortburst, and the path may be too weak for bulk. The longburst fills that gap and nothing else.
17.3.1 How it works
A longburst is one message sent as up to four shortbursts, each in its own transmission. The message is cut into pieces of 160 bytes (the last piece gets what is left), and each piece travels as a complete, addressed shortburst with its own opener, its own check over just that piece, and its own acknowledgment.
The first transmission carries one extra frame right after PRESENCE, the longburst manifest. It says three things: the length of the whole message, the check for the whole message, and how many pieces are coming. Because the pieces are always cut at the same 160-byte boundaries, both ends work out from the total length which bytes belong in which piece, and no piece has to say which one it is.
[presence]
Before the first piece the sender asks the addressee whether it can take the longburst now, as it does before a long bulk transfer (Section 19.3). The sender sends the next piece only after the addressee has acknowledged the one before. When the last piece is in, the receiver tests the whole message against the check from the manifest before it delivers anything. A later try of a mail whose pieces all went out with no answer asks with the ASK, which also asks the addressee whether it already has it (Section 18.6.5).
17.3.2 Why it stops at 601 bytes
601 bytes is what one bulk frame carries at its most robust rate. The longburst is held to one bulk frame's worth on purpose: it is the stopgap for a weak link, not a way to move files over the announce channels. A full 601-byte longburst already costs about 48 seconds of sending, against 7.5 seconds for the same bytes as one bulk frame.
A longburst is always addressed to one station, because it leans on that station acknowledging each piece.
17.4 Bulk
A bulk transfer puts the message into the fast modem in the bulk region.
[presence]
PRESENCE and the opener are announce frames sent on the bulk-control channel (Section 10.5.1). The opener names the addressee and gives three numbers: how many bulk frames follow, the highest code rate they will reach, and the message's check. After 150 ms of silence the bulk frames follow back to back, 5.98 seconds each. From the start of PRESENCE to the start of frame 0 is 1.49 seconds, so a one-frame transfer lasts 7.5 seconds and every further frame adds 5.98.
A transfer of two frames or more to one station is asked for first, with one frame each way, before its PRESENCE and opener go out (Section 19.3).
The bytes that travel are the 2-byte check followed by the wrapped message, cut into frames in order. Nothing else is added: a bulk frame has no header of its own (Section 18.3).
17.4.1 The rate ladder
Every bulk frame is one error-correcting codeword of the same length, so every frame takes the same air time (Section 11.4). What can differ is the code rate: how much of the codeword is message and how much is protection. There are three rates. A frame at rate 1/2 carries 603 bytes, at rate 3/4 it carries 907, and at rate 5/6 it carries 1,008 (Appendix A has the table).
Which rate a frame uses is decided by its position in the transfer and by nothing else. This is the rate ladder:
- frame 0 is always rate 1/2,
- frame 1 is rate 3/4,
- frame 2 and every later frame is rate 5/6,
- except that no frame goes above the ceiling the opener announced.
With a ceiling of 5/6 the rates run 1/2, 3/4, 5/6, 5/6, 5/6 and so on. With a ceiling of 3/4 they run 1/2, 3/4, 3/4, 3/4. With a ceiling of 1/2 every frame is 1/2.
From the ceiling and the frame count in the opener a receiver knows, before the first bulk frame arrives, the rate of every frame, how many bytes each can hold and where they belong in the message. Nothing inside a frame says what rate it is.
17.4.2 Who picks the ceiling
On FmLink the receiver picks it, and the rungs there are other signals (Section 34.2.1). On HF, the sender, and it uses only two values for a new transfer. A directed message that needs more than one frame, on a link the sender rates at +3 dB or better or on a link it has not measured, gets a ceiling of 5/6. Either way it asks first, and an answer of "too weak for bulk" stops it before any frame goes out. A message that fits in one frame gets 1/2 (it is frame 0 anyway), and so does every broadcast, which has no single link to judge by. The station tunes the ceiling no finer than that: a link is good enough for bulk or it is not. A ceiling of 3/4 only appears when lost frames are sent again (Section 18.5.2).
17.4.3 Why frame 0 is the most robust
The first frame matters more than any other, for two reasons. It is the frame the receiver fixes its timing on: every later frame is looked for at an exact distance from where frame 0 was found (Section 15.9.2). And its first two bytes are the check for the whole message, without which nothing that follows can be accepted. A receiver that does not find frame 0 decodes nothing of that transmission. So frame 0 always gets the strongest protection the code offers, whatever the ceiling, and the rates climb from there.
The climb costs no air time, only bytes: the first two frames of a transfer carry 506 bytes fewer than they would at 5/6. What happens when frame 0 is lost all the same is in Section 18.5.5.
17.4.4 How big it can get
A transfer is at most 64 frames, which is also the number of frames one reply can name as missing. With a ceiling of 5/6 that is 603 + 907 + 62 × 1,008 = 64,006 bytes, two of them the check: 64,004 bytes of wrapped message, and about six and a half minutes of sending. A single frame at rate 1/2 holds 601 bytes of message.
A transfer longer than 10 frames is sent in segments of 10, each its own transmission, and the addressee confirms what it has after each one (Section 18.7). A broadcast has nobody to confirm anything, so a broadcast is held to one segment at rate 1/2: 10 × 603 bytes less the check, 6,028 bytes of message.
17.5 How the station chooses
When you send, the station's transmission policy looks at a handful of facts and picks one of four answers: shortburst, longburst, bulk, or unsupported (not directly, not now).
17.5.1 What it looks at
- Size: the wrapped message, in bytes.
- Broadcast or not: whether it goes to one station or to a reserved "everyone" address ().
- The link estimate: the station's recent figure for how well the addressee hears it (Chapter 20). It is held against two levels. Below −9 dB, the floor, the station treats the path as too weak to rely on: that is the lowest level at which the announce modem still decodes practically every frame (Section 13.9). At +3 dB or above the link is good. A link with no estimate is not good, and the station never sends bulk frames over a path nobody has measured: a message over 601 bytes on such a link asks the addressee first, and the answer is the measurement (rule 14). A broadcast never has an estimate.
- Is the bulk region taken? Whether another station's transfer has it reserved at this moment.
17.5.2 The rules, in order
The policy is a list checked from the top. The first rule that fits decides, and the station records which one it was.
| # | If the message is… | Send as | Why |
|---|---|---|---|
| 1 | up to 160 bytes, estimate below the floor | Shortburst | It is cheap, and the estimate may be out of date. |
| 2 | 161–601 bytes, to one station, estimate below the floor | Longburst, asked first, one try | A cheap, robust try; if it goes unanswered, the relay search asks for stations that hear the addressee. |
| 3 | anything else with the estimate below the floor | Unsupported | Nothing direct will work. |
| 4 | up to 60 bytes | Shortburst | A 5.98 s bulk frame would be nearly all padding. |
| 5 | up to 160 bytes, link not good or unknown | Shortburst | The announce modem works down to the floor. |
| 6 | up to 160 bytes, bulk region taken | Shortburst | Leave the bulk region to whoever has it. |
| 7 | up to 100 bytes | Shortburst | Close to a bulk frame's air time, tougher, and it leaves the bulk region free. |
| 8 | a broadcast, 161–6,028 bytes | Bulk, ceiling 1/2 | No link to judge by, so the most robust rate throughout. |
| 9 | a broadcast over 6,028 bytes | Unsupported | A broadcast cannot confirm segments; address it or shorten it. |
| 10 | up to 601 bytes, good link | Bulk, one frame at 1/2 | Under a sixth of a longburst's air time. |
| 11 | up to 601 bytes, link not good | Longburst | The gap-filler. |
| 12 | over 601 bytes, good link | Bulk, ceiling 5/6 | Fewer 5.98 s frames. |
| 13 | over 601 bytes of plain mail of the station's own, to one station, link not measured, and the station is a gateway or knows one it can use | Unsupported: the mail system first | Mail keeps the order it has when it is refused: the mailserver first. |
| 14 | over 601 bytes to one station, link not measured | Bulk, ceiling 5/6, asked first | The addressee's answer to the ask says whether it hears the sender well enough for bulk, before any bulk frame goes out. |
| 15 | over 601 bytes, link measured but not good | Unsupported | Too big for the announce channels, too weak a path for bulk. |
Three things about the order are worth noticing. A small message beats a bad estimate (rule 1): an estimate can be minutes old and caught in a fade, and refusing a cheap shortburst because of it would make a bad estimate worse than none. If the addressee really cannot hear, the silence is dealt with in the ordinary way (Section 18.6). The longburst of rule 2 asks first, like every longburst, and once granted it is sent once: if its first piece goes unanswered, the station goes straight to asking for a relay. And a taken bulk region only steers messages that fit a shortburst anyway (rule 6); a bigger one waits its turn.
17.5.3 Broadcasts
With no estimate, a broadcast is treated as an unknown path. Up to 160 bytes it goes as a shortburst (rules 4 and 5). Past that there is no longburst to fall back on, so it goes as bulk at rate 1/2 throughout (rule 8). Stations on weak paths may not hear it; that is the trade a large broadcast makes.
17.5.4 Where shortburst gives way to bulk
On a good link, why not send everything over 60 bytes as bulk? Because one bulk frame costs 7.5 seconds of air whether it carries 1 byte or 601. A shortburst costs 2.0 seconds plus 0.68 seconds for each 10 bytes after the first 10. The two lines meet at 90 bytes, where they are practically a tie: the nine-frame shortburst that 81 to 90 bytes need takes 7.473 seconds against 7.475 for the bulk frame, and the ten frames that 91 bytes need take 8.2.
The station keeps using the shortburst a little past that point, up to 100 bytes (rule 7), where it takes 8.2 seconds, 0.7 more than the bulk frame. For that small cost the message rides the modem that still decodes 11 dB below the level at which bulk is trusted, and it occupies one narrow announce channel instead of the whole bulk region. Past 100 bytes on a good, free link the single bulk frame wins, and the gap grows quickly: a 160-byte shortburst takes 12.2 seconds against bulk's 7.5.
17.5.5 When the answer is "unsupported"
Unsupported means the station will not send the message directly right now, because nothing it could send would work: the path is below the floor, or the message is bigger than a longburst and the path is too weak for bulk (measured so, or found so by the addressee's answer to an ask), or it is a broadcast over 6,028 bytes. It does not have to mean the message goes nowhere.
- Mail to one station is handed to the mail system first. A station that is itself an internet gateway deposits the mail at the mailserver; otherwise, if it has heard a gateway in the last two minutes, it sends the mail to that gateway ().
- Anything else, and mail with no gateway to go to, is marked failed, with the rule that refused it and the message's size before and after compression in the note (Chapter 8).
17.6 Four sends, four answers
- A 40-byte text to a station at +12 dB. Rule 4: a shortburst of four data frames, six frames on the air, 4.1 seconds.
- A 140-byte note to the same station, bulk region free. Too big for rule 7, link good: rule 10, one bulk frame at 1/2, 7.5 seconds against 10.9 as a shortburst.
- A 400-byte report to a station at +2 dB. Above the floor but not good: rule 11, a longburst of three pieces (160, 160 and 80 bytes), 32 seconds of sending once its ask is granted.
- A 3,000-byte mail. To a station at +10 dB: rule 12. With the check it is 3,002 bytes, which fill frames of 603, 907 and 1,008 bytes and leave 484 for a fourth: four frames at 1/2, 3/4, 5/6, 5/6, and 25.4 seconds (1.49 plus four times 5.98), after an ask and its answer of one announce frame each. To the same station at +2 dB: rule 15, unsupported, and the mail goes to a gateway if there is one. To a station not heard from lately, with no gateway to use: rule 14, the same four frames once the station's ask is granted.
17.7 What to remember
- Shortburst: up to 16 announce frames and 160 bytes in one transmission. Longburst: 161 to 601 bytes as up to four acknowledged shortbursts behind a manifest, only for links too weak for bulk.
- Bulk: PRESENCE and opener, 150 ms of silence, then up to 64 frames of 5.98 s. Position sets the rate: 1/2, then 3/4, then 5/6 (603, 907 and 1,008 bytes), never above the ceiling in the opener.
- Frame 0 is always rate 1/2, because the receiver fixes its timing on it and it carries the check.
- The station picks by size, link estimate (floor −9 dB, good from +3 dB, unknown counts as not good, but a message over 601 bytes to one station on an unknown link asks first and lets the answer decide), broadcast or not, and whether the bulk region is taken. Shortburst and bulk cost the same air at 90 bytes; the station switches at 100.
- "Unsupported" means not directly, not now: mail tries a gateway, anything else is marked failed with the reason.
Getting Every Byte There
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
18.1 The promise: all of it, or none of it
On the air some of what is sent will be lost, and there has to be a plan for getting it back. The general name for that plan is ARQ (automatic repeat request): the receiver reports what it did or did not get, and the sender repeats what is needed. mLink's selective version is called dARQ, and it has three habits:
- Check once, at the very end. Each frame has its own error correction (Chapter 11), but "is this the message that station sent to this one?" is asked once, when the whole message is back together.
- Repair, don't repeat. The receiver keeps what it has, and the sender sends only the missing bytes.
- Never shout into silence. If the other station stops answering, a big transfer is not repeated blindly; the message goes looking for another way there.
18.2 The check, and the message's name
Every message carries a two-byte integrity check. It is a CRC (cyclic redundancy check): a short number computed from a block of bytes, so that changing any byte almost certainly changes the number.
18.2.1 What it covers
The unusual part is what goes into it. mLink computes the 16 bits over three things, in this order:
- the sender's callsign, in its packed six-byte form,
- the addressee's callsign, also six bytes, and
- the message itself, as it stood before the station compressed it and put the wrapping bytes of Chapter 23 around it.
For a broadcast to everyone, or to everyone in an area, the "addressee" is the all-stations address 0CQCQCQ; for a virtual net it is the net's own address. Every station knows those, so every station can compute the same value.
Folding in both callsigns turns "are these bytes intact?" into "are these the bytes that station meant for this one?". mLink's data frames carry no sender and no sequence number, and if a frame from somebody else's conversation were ever stitched into a message, the check would come out wrong.
18.2.2 The same two bytes are the message's name
Because the check is computed before compression, the same message gets the same value however it was packed for the trip. So the value doubles as the message's short name on the air. The opening frame of a transfer carries it; the ACK repeats it; so do the frames that ask about a transfer, cancel one, continue one, or ask other stations to relay it (Chapter 21).
Sixteen bits make only 65,536 names, and nothing treats the two bytes as unique on their own. A station reads them together with who is speaking and who was addressed: an overheard message is filed under sender, addressee and check together. Where a mix-up would cost the most, when another station offers to relay "that message", the offer also quotes the length of its copy and a 32-bit fingerprint of it, and the sender compares both.
18.2.3 Where it rides
A bulk transfer's check goes out twice: in the opening frame (the opener), so listeners know which message is coming before any data is decoded; and at the front of the data, where the bytes begin with the two check bytes. A shortburst's check goes out once, in its opener, together with the message length; the data frames carry message bytes only.
A longburst (Section 17.3) has two levels. The whole message's check, its name, rides in the manifest. Each piece also carries a check of its own, over just that piece's bytes as they were sent, so a bad piece is caught and repaired before the next goes out.
18.2.4 Checked last, and only last
A receiving station never tests the message's check frame by frame. It waits until it holds every byte, undoes the wrapping (decompression first), computes the value over sender, addressee and the unwrapped message, and compares it with the two bytes from the front of the data.
- Match: the message is delivered, and if it was addressed to this station, the station owes the sender an ACK.
- Mismatch: the message is thrown away, never delivered and never acknowledged. The addressee stays silent, and the sender's rules for silence take over (Section 18.6).
One damaged message in 65,536 would pass a 16-bit check by luck, but the check is rarely handed damaged bytes at all: every frame has already passed its own error correction, which rejects a frame it cannot fix.
18.3 Bulk frames have no header: position is the header
A bulk data frame has no "frame 7 of 12", no callsign, no length, no rate. Every bit is message, end-of-data filler (Section 11.5) or parity. Both ends work out what a header would have said from three things explained elsewhere:
- Whose frames they are comes from timing: frames that follow a PRESENCE and an opener at the right moments belong to that station's transmission (Chapter 16).
- Which frame is which comes from where it starts. Every bulk frame lasts 5.98 seconds, so once frame 0 is found, frame i can only start i frame-lengths later (Section 15.9).
- Its rate and how many bytes it holds come from its number and the ceiling in the opener (Section 17.4.1).
So the receiver lays out the whole transfer before it arrives: a buffer with a slot for every frame. The last frame is usually only partly full, and its filler marks where the data ends, so the length of the message is never sent as a number.
18.3.1 Why a lost frame changes nothing
Losing a frame does not disturb any other. If frame 3 of 8 fades out, frame 4 still arrives where it was due, decodes at the rate its place implies, and drops its bytes into its own range of the buffer. The gap where frame 3 belongs is simply a gap.
18.3.2 Shortbursts are numbered
The frames of a shortburst do carry their number, 0 to 15, and the opener carries the message length (Section 17.2). The rest of this chapter applies to shortbursts as to bulk, except where it says otherwise.
18.4 The answer: ACK or dNAK
When a directed transfer ends, the addressee answers with one of two replies. The ACK is one announce frame that says who is answering itself; the dNAK is one announce frame behind a CTS that says who is answering, whom, and how much the repair will send (Section 19.3.5). The layouts are in Appendix B.
A long message to one station (two bulk frames or more, or a longburst) has one exchange before any of this: it asks the addressee first, and its data goes on the air only when the answer says go (Section 19.3). The replies below are the ones that come after the data.
18.4.1 When the answer comes
A station cannot hear while it transmits (Section 3.5), so the addressee must not answer before the sender has stopped, and it knows when that will be. For a bulk transfer the opener gave the frame count, so the transmission ends 150 ms plus that many times 5.98 seconds after the opener. The addressee adds half a second for the sender's radio to drop out of transmit and settle, and a further 150 ms of turnaround. Then it decides: complete means ACK, incomplete means dNAK.
A shortburst that arrived whole is acknowledged as soon as its last frame has been decoded; one with frames missing is answered half a second after its computed end.
A reply does not wait for the channel to look clear while the sender can still hear it. The sender is listening for it, so it is keyed at its moment whatever reservations the addressee has noted and whatever else it is hearing (Chapter 19). A reply that is not ready within about 3.2 seconds of the decision to send it (a slow computer) would end after the sender has stopped listening, and the sender may already be sending again. It then waits for the channel like any other transmission: it goes out if the channel is clear, and is dropped if a signal is arriving, because that is often the sender trying again, and that attempt is answered instead.
A copy of a message the station already has, the sender's retry after a lost acknowledgment or a relay's late carry, is acknowledged but not shown again. A message with a time byte is known by its sender, its check and its tick, so a line sent twice on purpose shows twice; one without is known by its bytes for a minute after the last copy. Mailbox control is not held to that minute: each request and each answer is handled, so a second mail check gets its answer. A late copy is put where it was written only when its sender's clock is known to agree with this station's; otherwise it sits where it arrived (Section 23.3.1).
18.4.2 ACK: "got it"
[ack]
The ACK (acknowledgment) says the message arrived whole and passed its check. It is a PRESENCE of its own kind (Section 16.2), so the one frame names the station answering; no PRESENCE goes in front of it. It repeats the check from the opening frame it answers, so the sender knows which transfer is meant. The ACK for a longburst piece also says how many pieces are still to come. For a message sent straight to its addressee, the ACK is what turns it to "sent".
18.4.3 dNAK: "here is what I'm missing"
[cts]
The dNAK, the selective negative acknowledgment, fills its frame exactly:
- a 64-bit map, one bit for each frame of the transmission just received, set where the frame did not arrive;
- for a bulk exchange, a round count: how many transmissions of this exchange the addressee has seen, the first being round 1;
- one bit saying whether the exchange is bulk or shortburst, so stations overhearing the dNAK know how much air the repair will take.
There is no room left for the check, and none is needed: a dNAK taken for the wrong exchange costs a repair nobody wanted, never a false "sent".
A dNAK can name every frame. That happens when the addressee decoded the opener but none of the data, which includes the case where a bulk transfer's frame 0 was lost and nothing after it could be placed (Section 15.9.2). If the opener itself was never decoded, the addressee does not know a transfer was aimed at it and says nothing. A shortburst whose first data frame was lost is different: its opener gave the length, so the addressee knows how many frames to expect and names the lost one like any other.
18.4.4 Where replies are sent
ACKs and dNAKs carry no "to" callsign. What ties a reply to its exchange is where and when it appears, and, for the ACK, the check it repeats. The addressee keys its reply on the channel the opening frame arrived on: the bulk-control channel for a bulk transfer (Section 10.5.1), and for a shortburst, whichever announce channel it used. A reply is never moved to another channel because that one looks busy.
The sender accepts a reply only on its own exchange's channel, only from the station it addressed, and, for an ACK, only with the right check. A station can be the addressee of two transfers at once, and without these rules both senders could take one ACK as their own.
18.4.5 How long the sender waits
When its transmission ends, the sender opens a reply window of 5 seconds: the half second of settling, the 150 ms of turnaround, 1.3 seconds for the longest reply itself (the two frames of a CTS and a dNAK; the one-frame ACK takes 0.66 s), and about 3 seconds for the addressee to finish decoding, build the reply and key its radio. The window is the same for every size of transfer.
The window is not stretched when other stations hold the announce channels reserved. The addressee's reply does not wait for a reservation (see below), so a busy frequency is not what delays it.
18.5 Selective repair: sending only what is missing
18.5.1 The receiver keeps its partial copy
The addressee does not throw away the frames it did get. It keeps a kept partial: the message buffer with every received frame's bytes in place, holes where the missing ones belong, and a note of which byte ranges are still empty. It holds this for 10 minutes, starting the clock again each time a repair round arrives, and then discards it.
18.5.2 The sender gathers only the missing bytes
The sender still has the whole message. From the dNAK's map it works out which byte ranges those frames carried and copies just those ranges, in order, into one new stream. That stream is cut into fresh frames on the same rate ladder as any transfer, starting again at rate 1/2.
The ceiling for the repair is one step more robust than the most robust frame that was lost. If only 5/6 frames were lost, the repair climbs no higher than 3/4. If a 3/4 frame was among them, every repair frame is 1/2. The path could not carry that rate, so the repair asks for less.
[presence]
The repair's opening frame, the RETX-OPENER, has the layout of an opener and carries the same check, but marks what follows as a repair. An addressee holding a kept partial from this sender uses the frames to fill it; a station without one ignores them.
18.5.3 The receiver fills the holes in order
The repair frames were cut from one stream of missing pieces, so their edges do not line up with the original frames. One repair frame may carry the end of one hole and the start of the next. Both ends hold the same map of which byte ranges were gathered and in what order, so the receiver simply writes each repair frame's bytes into the first unfilled hole and, when that is full, carries on into the next.
Only the addressee does this. A third station that overheard part of the message does not use the repair frames to complete its copy: to hold the message, as a future relay must, it has to have heard every frame of the first transmission.
When every hole is full, the receiver checks the message exactly as it would one that arrived in one piece, and on a match delivers it and sends the ordinary ACK.
18.5.4 Round after round
A repair can lose frames too. The addressee then writes in the repair frames that did arrive, works out which byte ranges are still empty, and sends another dNAK. That dNAK's map names frames of the repair, not of the first transmission. The sender kept its map of which original bytes went into each repair frame, so it translates back, gathers what is still missing, and packs it again from rate 1/2.
After the first round the holes stop being whole frames. In the figure, if repair frame r1 were lost, the holes left would be the last 405 bytes of frame 2 and the 500 bytes of frame 4, and the next repair would carry those 905 bytes as two rate-1/2 frames. The dNAK stays a simple map of frames while the repair stays exact to the byte, and nothing that has arrived is ever asked for again.
The round count keeps the two ends in step. If the addressee's count shows it never heard the latest repair at all, the sender sends that repair again exactly as it was, instead of reading the map against the wrong round. It does that once. If the second copy also goes unheard, the message goes to relay.
18.5.5 When a rate-1/2 frame is lost
There is no fixed limit on the number of rounds. What ends them is this rule. Rate 1/2 is the most robust bulk rate, so when a dNAK names a frame that was sent at 1/2, "one step more robust" has nowhere to go:
- The first time in an exchange, the sender repairs anyway, with every frame at rate 1/2. The dNAK shows the addressee can hear the sender, and one lost 1/2 frame is more often a collision or a noise burst than a path that has collapsed.
- The second time, the sender sends no more data and asks other stations to relay the message (Chapter 21).
This is also what happens when frame 0 is lost. Frame 0 is always rate 1/2, and the addressee's dNAK then names every frame. The sender does not repeat the first transmission as it was: it packs the whole message into rate-1/2 frames and sends that as a repair, once.
18.5.6 Shortbursts and longbursts
Shortburst repair is the same idea, simplified. The dNAK names the missing announce frames; the sender sends just their bytes as a new, shorter shortburst behind a repair version of the shortburst opener; the receiver fills its holes. There is only one announce rate, so there is no rate to step down. A repair is sent for every dNAK, but a repair that brings the receiver nothing counts as one of the three retries, as silence does: when the dNAK names every frame of the burst just sent, none of its bytes landed, and with no retry left the sender searches for a relay instead (Chapter 21). A repair that brings some bytes costs nothing, because each one shrinks what is missing. A frame that is lost again on every round therefore ends the exchange. Each piece of a longburst is an ordinary shortburst with its own ACK or dNAK and its own repairs, and the ACK for one piece invites the next.
18.6 When the other end goes quiet
Sometimes the reply window closes with neither an ACK nor a dNAK. Replies ride the announce modem, which decodes far below the level bulk needs, so silence rarely means "the reply was lost". It usually means the addressee never heard the opening frames, is not there, or cannot be reached from here right now, and repeating the data fixes none of those.
18.6.1 An ask that gets no answer
An ask before a long message (Section 19.3) can meet silence too: no CTS (clear to send) in the 3 seconds after the RTS (request to send). The sender asks once more, after a random wait of its own, so the second RTS is due 3 to 16.2 seconds after the first one ended. Two stations that asked each other at the same moment wait in different places, so their second asks do not meet. If that meets silence as well, the message goes on as an unanswered transfer would, which for the station's own message means a search for a relay. When none of it has been on the air, no other station can hold a copy, and that first request already invites stations that hear the addressee without one (Section 21.7.2). The "did you get that?" probe below is not sent after an ask for a message that has never been on the air: the addressee has nothing to answer from. A message the addressee may hold already, one that went out whole before or one carried for another station, is asked for with an ask that names it, the ASK, and its silence takes the same two steps (Section 18.6.5).
18.6.2 Short messages: try again, politely
A shortburst is a few seconds of announce air, so on silence the sender tries again, up to three more times. Before each retry it waits a random time, from nothing up to twice the length of the transmission plus about two and a half seconds, and it sends only when the exchange's announce channel is free and nothing is audible (Chapter 19 says why the wait is random). The same goes for each piece of a longburst. If every retry meets silence, the message goes to relay.
18.6.3 Bulk: never resend into silence
Bulk data is sent again only in answer to a dNAK, and then only the missing part, or after the addressee has granted an ask for it. When the reply window closes in silence, what comes next depends on how the data went out.
A message that asked first (Section 19.3), two bulk frames or more sent whole on the addressee's grant, asks again at once, with the ASK, which names the message (Section 18.6.5). The addressee may simply have missed the opening frames, may have the message with only its ACK lost, or may hold part of it. The ASK is a question: an addressee that has the message says so, one that kept part of it names the missing frames and only those go, and the message goes out again whole only on a grant. An unanswered ASK is asked once more, then the sender asks for a relay. This happens once in each try of the message.
A bulk send that did not ask (a single frame), and a second silence after a whole send that the ASK's grant brought, go down this path:
- Ask once: "did you get that?" The sender sends a
QSL probe, named after the amateur
"QSL?" (do you confirm receipt?):
[presence]
[qsl] . It names the addressee and the message's check and carries no data. The sender then listens for between 8 and 9.5 seconds. - The addressee answers only from what it already holds. If it delivered the message, it sends the ACK again: from its memory of the last minute's deliveries, or, past that, from what it has stored. If it holds a kept partial, it sends its last dNAK again. If it is still waiting for a transfer to end, it gives its verdict now. If it knows nothing of this message, it stays silent: there is no "I have none of it" answer.
- Still silence: ask for a relay. The sender asks any station that holds the message and hears the addressee to carry it the rest of the way (Chapter 21).
18.6.4 "I already have it": the answer from the store
The addressee's memory of recent deliveries lasts a minute. A probe or an ASK that comes later, from a sender that heard no ACK and tried again after a while, is answered from the store: a mail filed from that sender to this station under that check in the last day, or any other message heard from it in the last 15 minutes, counts as held, and the addressee sends the ACK again. For a message carried by another station, "that sender" is the author the FOR in front of the ASK names, with the author's id. The sender takes it like any ACK of the message, marks it sent and sends nothing more of it.
Neither question names the moment a message was written, so the sender does not ask it while that answer could be about another message: when it sent the same station another message under the same check inside that station's memory (the same short line sent twice on purpose, a mail in the last day), it sends neither the probe nor the ASK for it: it asks only for the air and sends the message whole, or goes on to look for a relay, and an ACK to its data marks it sent. The search for a relay still names the message by its check (the addressee answers it from what it holds), and a relay that carries the message still asks, as it has no record of what the author sent before.
The same probe is how the sender of a mail to several stations asks a station that stayed silent in its reply slot; that mail is filed under the broadcast address, and the store answer finds it there when its To or Cc names this station (Section 26.5.3).
18.6.5 When the addressee may have it already: the ASK
The RTS names the addressee by its station ID and names no message (Section 19.3), so its answers are only go, not now and too weak. It cannot be answered "I already have that one". Some asks go to a station that may well have the message:
- The station's own mail that went out whole and got no answer (no ACK, no dNAK, nothing to its ASK). It is set aside and tried again later, usually once the addressee is heard again; the addressee may have it, with only its ACK lost. A longburst (Section 17.3) has gone out whole once its last piece has aired, and its next try starts again at the first piece, so finding the mail already delivered saves the whole series, up to about 48 seconds of sending.
- Every message carried for another station that asks first: a courier's hand-over (Section 26.7.2), a gateway delivering mail from a mailbox (Section 26.9.2), a relay's delivery (Section 21.5), chat as well as mail, and net control's delivery of a member's mail that it overheard or got from a list (Section 24.8), or that its author handed to it once a delivery of it has aired whole with no answer. The addressee may have had it from its author or from another carrier.
- The ask after a whole send that asked first and whose answer met silence (Section 18.6.3).
These sends ask with the ASK
in place of the RTS: [presence]
The addressee answers from what it holds of the message, and only then from its state. The first line that fits decides:
- A transfer of this exchange is still coming in: it gives its verdict now, ACK or dNAK, as for a probe.
- It may not transmit at all just now (it is set to listen only, its transmitter is inhibited, or it is holding its messages for a tune): silence, as to an RTS.
- It has the message, in its memory of recent deliveries or in its store (Section 18.6.4): the ACK, echoing the ASK's check. "I have it." That holds even when it also kept part of an earlier send: it had the whole message another way since, and it drops the kept part.
- It would not grant an RTS now: the answer an RTS would get (Table 19.2), not now or too weak for bulk. No answer that grants air goes out while the addressee knows the air is taken.
- It kept part of an earlier send, filed under the same
author (for a carried message, the one the FOR names; for the asker's own,
none): [cts]
[dnak] , its last map of the missing frames behind a CTS that grants them. "Send these." On FmLink a dNAK names no asker, so there the answer is "send it". - Otherwise: a CTS that grants the count asked. "Send it."
A kept copy filed under another author is another message under the same check: the answer is "send it", and the kept copy goes when the new opening comes. The asker waits for any answer only 3 seconds, as for an RTS, so "I have it" and "send these" key at their moment without listening first only for a little over a second; later than that they listen first, like a new send (Section A.7).
The sender takes the answers as follows:
- I have it: the message is delivered, as on any ACK, and nothing more goes on the air: no data, no ask. A few seconds of announce air save the whole message, many seconds of bulk air.
- Send it: the whole message, on that grant, as after an RTS.
- Send these: when the ASK is the ask after a whole send of the same exchange, the sender still has the record of what it sent, and when the map names no frame past that send's frames, the missing frames go as a repair on that grant. Otherwise the frames a later try would send need not be laid out as the ones the map counts (it is built afresh, and an earlier try may have been framed otherwise), so the sender asks once more with the plain RTS and sends the whole message on its grant; the addressee fills its kept copy from it.
- Not now, too weak, silence: as after an RTS (Section 19.3.3): an unanswered ASK is asked once more, after the ask's own random wait, and then the message goes to a relay search. Two unanswered asks, then the search.
The FOR in front of a carried ASK has its probe bit set. It names the message the ASK is about and nothing more: the addressee notes nothing for the carrier's next transfer (Section 21.5.1), so a carrier answered "I have it" cannot have its next message filed under that author. If the carrier is granted, its data goes out as a new transmission with its own FOR. To the stations that overhear it, the FOR still says that this carrier is now delivering that message: a courier holding the same mail stands back (Section 26.7.3), the author waiting for its relay's RESULT goes on waiting (Section 21.6.1), and a station that asked that gateway for its mail holds its repeated GET; when it answers the gateway's ASK "I have it", its GET is answered.
The plain RTS stays for every other send that asks: a message that has never been on the air, net control's delivery of a mail its author handed to it (or of its own) until one of its deliveries has aired whole with no answer (the member has not had it from anyone), and a body handed to a relay that holds no copy (Section 21.7.2), which goes to the relay, not to the addressee. A bundle asks with the RTS too: the addressee files the mails inside it, not the bundle. A send that does not ask at all does not use the ASK either, since asking would cost more than sending: a shortburst, one bulk frame (two on FmLink), a broadcast, traffic to a net or an area, an emergency. Nor does a longburst piece sent again after silence: one piece, 160 bytes at most, goes with no ask in front of it. On FmLink a longburst does not ask first.
18.6.6 When nobody at all answers
Silence never sends the message again. If the request for a relay gets no offers at all, the sender does not repeat the transfer into the same silence: the ASK or the probe has already asked, and nothing answered. The message waits as deferred (Chapter 22), and the data goes out again only after something is heard: the addressee itself, or a relay that offers to carry it (Section 21.7.1).
When other stations have been heard in the last two minutes, an empty search is also read as a sign of collisions, and the station spaces out its new bulk transfers for a while (Chapter 19).
18.7 Long transfers: segments and checkpoints
A bulk transfer can be 64 frames, about six and a half minutes of air, and a sender should not learn only at the end that the addressee faded out in the first minute. So a transfer longer than 10 frames is split into segments of at most 10 frames (59.8 seconds), each its own transmission.
18.7.1 How the segments are sent
The first transmission opens with the ordinary opener, which announces the total frame count, and carries frames 0 to 9. The ask in front of it (Section 19.3) names only those ten frames; the later segments are not asked for. Each later segment has a continuation frame in place of the opener:
[presence]
The SEG-OPENER says which frame the segment starts at and how many it holds, and repeats the addressee and the check. Each frame still uses the rate its place in the whole transfer implies; for assembly and repair it is one transfer.
18.7.2 "Did you get all that?"
Half a second after each segment but the last has ended, the addressee
sends a checkpoint,
[cts]
- If frames are missing, the sender first sends them again, at their original places and rates, as a short segment of their own. Each frame gets one such early repair; the rest is left to the dNAK rounds at the end.
- If the addressee has been told about fewer frames than the sender has sent, a whole SEG-OPENER was lost, and the sender counts every frame of that segment as missing.
- If no checkpoint arrives within 8 seconds of the segment ending, the sender sends a QSL probe asking for it and waits 8 seconds more. If that too meets silence, it sends no more segments and treats the transfer as one whose reply never came (Section 18.6.3).
After the last segment the addressee answers with the ordinary ACK or dNAK. An addressee that hears a segment and then no continuation waits about 30 seconds before it gives its verdict on what it has.
18.8 Broadcasts get no receipts
Everything above is about messages to one station. A broadcast, whether to everyone, to an area or to a virtual net, gets no ACK and no checkpoint: a dozen stations answering at once would bury each other. That holds for everything sent as a broadcast, a map object as much as a bulletin. Listeners still check a broadcast before delivering it. A broadcast does get one limited repair: listeners who missed frames may ask, after a random wait, for them to be said again, and the sender answers the requests it hears with a single repair. One round and no more (Chapter 19). The one exception to "no ACK" is a mail sent to several stations at once: the stations it names confirm it one after another, in reply slots after it (Section 26.5). A net control that needs to know who received a bulletin asks with a roll call (Chapter 24).
18.9 Calling off a transfer
An operator can cancel a message wherever it is (Section 8.6): waiting its turn, asking, on the air, waiting for the reply, in a search for a relay, handed to a chosen relay, or set aside to try again later. It goes back to the drafts and nothing more is sent for it: its search ends and its retries are dropped. Deleting a waiting row does the same. A message that another station has taken into its keeping (a gateway, net control, a cluster member) cannot be called back; the station says so. A directed transfer on the air can be stopped two ways:
- Graceful. Partway through an announce frame, the station
finishes that frame (at most 0.66 s more), so listeners are not left
holding half a frame; in the bulk frames it stops at once. Then it sends
[presence]
[abort] , an ABORT frame carrying the message's check. Every station that hears it lets go of the reservation the transfer held and drops what it had overheard; the addressee drops what it had received and sends no dNAK. - Hard. The station stops transmitting on the spot, even mid-frame, and sends nothing more. Other stations recover on their own timers: reservations run out when the transfer would have ended, and the addressee answers a sender that has stopped listening.
A message canceled while it is still asking (Section 19.3) has put none of its data on the air, so no ABORT is sent: the reservations its ask made run out by themselves. If the destination's grant arrives after the cancel, the station answers it with the ABORT, so the stations holding the air for the grant let it go.
A message canceled after the station asked for a relay (Chapter 21) gets the same ABORT, sent after the REQUEST (if the REQUEST is still waiting to go out, it goes first, so every listener hears the question before it is withdrawn). A station that hears it withdraws what it had promised for that message: an offer, a SELECT it was keeping, the body it was waiting to be handed, net control's wait to keep the mail (or a mail it was keeping without having said so), a gateway's wait to take it to the mailserver. Without it, net control or a gateway would keep a mail the operator had canceled and deliver it later. A relay already carrying the body finishes; its result is ignored. A message only set aside has nobody acting on it, so nothing is sent. A graceful cancel never cuts an emergency transmission that is on its way out.
18.10 What each kind of message is promised
How hard mLink works to deliver a message depends on what it is (Section 3.1), who it is for, and where it has got to. Chat and mail follow the same direct rules above; they part company over how long the station keeps trying and who may hold them while the addressee is away.
| Case | Delivery promised? | Who holds it while it waits | For how long | The sender sees |
|---|---|---|---|---|
| Chat message to one station (a net makes no difference) | Yes, for a while: the station keeps working until the addressee acknowledges it or the line's lifetime runs out. It arrives whole and checked, or it is not delivered. | The sender's own station, or a relay that has taken the body. Net control does not hold chat for a member. | One message lifetime: 15 minutes, or the contact horizon if longer, up to 150 minutes (Section 22.4). When it runs out the station gives up (Section 22.6). | Pending, airing, then sent when the addressee acknowledges; deferred with a note while it waits; expired, with a note, when it gave up. Expired does not mean it did not arrive; "Chat" grays the line and offers "Send as mail", which opens a mail to the same station for you to review and send. |
| Chat to everyone, to an area or to a net; mail to an area or to a net | No. A broadcast gets no ACK; a listener that missed frames may ask once for them to be said again. In a Safety Critical net, net control also repeats a member's text of up to 400 bytes (Section 24.9.9), which helps but is not a promise. | Nobody. Every station that decoded it keeps its own copy. | Nothing waits: it is sent once. | Sent as soon as the transmission has gone out. Sent does not mean anyone received it. |
| Mail to one station, or a pickup broadcast of mail for several or for outside addresses, not yet at a mailserver | Yes, in the same sense, and mail never expires. | The sender's station until the recipient acknowledges, a gateway deposits it or net control takes it. Stations that overheard it, relays and couriers may carry it a step, but responsibility moves only on an acknowledgment. | No end. | Deferred with the note "no pickup: waiting for a gateway" or a relay note; sent when the recipient acknowledges; deposited when a gateway or the station itself leaves it at the mailserver. |
| Mail that has reached a mailserver | Yes. The mailserver holds it until the recipient's station fetches it, by internet or through any gateway that hears that station. | The mailserver. Delivered mail is kept too, marked as fetched. | Until fetched; nothing is deleted unless the mailserver's operator sets a retention period. | Deposited. That says the mailserver has it, not that the recipient has. |
| Mail between two members of a Virtual Net, the recipient off the air | Yes. Net control takes custody and delivers when it next hears the member. | Net control, with a second station named as backup on its held list. If a gateway is heard first, net control also leaves a copy at the mailserver and goes on holding. | No end. One delivery try per hearing of the member. | Held; then sent when net control delivers it, or deposited if it is left at the mailserver (Section 24.8). |
Three rules sit under the table. Only an acknowledgment moves responsibility from one station to the next: the recipient, a gateway that deposited the mail, or net control that took it. Delivered means the recipient's own station acknowledged it, and nothing short of that is called delivered. A directed mail that is waiting is never dropped for having waited, and a chat message is given up on once its lifetime has run out and marked expired; the only other ending is failed, with a stated reason (Section 8.3).
18.11 What to remember
- Every message carries a 16-bit check over sender, addressee and the message before compression, and the same two bytes are its name on the air. It is checked once, after the wrapping is undone; a mismatch is never delivered and never acknowledged.
- The addressee answers on the channel the transfer opened on (for bulk: 0.5 s plus 150 ms after the transmission ends): ACK if complete, dNAK with a map of missing frames if not. The sender listens for 5 seconds.
- The receiver keeps what it got, and the sender packs only the missing bytes, from rate 1/2 up to a ceiling one step more robust than the most robust frame lost. A lost 1/2 frame, frame 0 included, gets one repair; a second sends the message to relay.
- Shortbursts retry three times after random waits. Bulk is never resent into silence: for a message that asked first, the ASK, asked twice at most, once a try; for any other, one probe; then a relay; if no station offers, the message waits until the addressee or a relay is heard. An unanswered ask is asked once more, then goes to relay.
- A send whose addressee may have the message already, our own mail that went out whole with no answer or a message carried for another station, asks with the ASK, which names it. The addressee answers from what it holds, its store included (a mail filed in the last day, another message heard in the last 15 minutes): "I have it", "send these" or "send it", or as to an RTS.
- Transfers over 10 frames go in segments with a checkpoint after each. Broadcasts get no ACK, only one round of "say again".
Sharing the Channel
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
19.1 Five pieces of air
A station that is transmitting cannot hear (Section 3.5), but a station that is listening decodes the whole passband at once (Section 15.3). Two stations can hold two conversations on two announce channels while a third sends a file in the bulk region, and your station hears all of it. The rules in this chapter let several conversations run side by side without two of them landing on the same piece of spectrum at the same moment.
There are five pieces to share: the three announce channels, the bulk region, and the bulk-control channel at the center of the bulk region (Section 10.5.1). The emergency region is not shared this way; distress traffic has it to itself (Chapter 25).
19.2 Defer: honoring what you heard
Before a station sends anything substantial, it announces it. A bulk
transfer opens with [presence]
A station that hears an opener meant for someone else writes down a "busy until" time for that piece of spectrum and starts nothing of its own there until the time has passed. mLink calls this defer. Wi-Fi (IEEE 802.11) calls the same idea the NAV (network allocation vector), or virtual carrier sense: instead of listening for a carrier, you believe what the other stations announced about their plans.
For most traffic no round trip is involved: nobody says "go ahead", and a heard opener is the reservation. A long message to one station is the exception. It asks first, and the addressee's answer reserves the air around the addressee as well (Section 19.3).
19.2.1 One busy-until time per piece of spectrum
A station keeps four busy-until times: one for each of the three announce channels, and one for the bulk region as a whole. There is only one bulk modem per channel, so two bulk transfers at once would always collide.
The bulk-control channel has no time of its own. It carries only the announce-type frames of bulk exchanges, so the bulk region's time governs it: a new bulk opener waits for the bulk region to be free, and the replies that follow on the bulk-control channel belong to the exchange that holds the region.
Each reservation is therefore narrow. A shortburst heard on one announce channel keeps a station off that channel and nowhere else. A bulk transfer keeps it out of the bulk region, yet it may still send a short message on a free announce channel. The few holds that stop the whole station are called out where they appear below.
Two rules keep the bookkeeping safe. A new reservation can only move a busy-until time later, so two overlapping reservations leave the later end standing. And a busy-until time simply runs out: once the clock passes it, the spectrum is free again with no further message. The one frame that releases a reservation early is the ABORT a station sends when it calls off a transfer (Chapter 18).
19.2.2 What each heard frame reserves
| Heard | Reserves | For |
|---|---|---|
| Bulk opener for N frames (also the opener of a repair burst) | The bulk region | 0.15 s + N ร 5.98 s + 0.5 s, counting at most the first 10 frames |
| SEG-OPENER (the next segment of a long transfer) | The bulk region | 0.15 s + that segment's frames ร 5.98 s + 0.5 s |
| Shortburst opener | The announce channel it came on | 10.7 s: fifteen more frames plus 0.5 s, the most a shortburst can still need |
| A shortburst data frame on a channel with no reservation (the opener was missed) | That announce channel | The frames a full-length shortburst would still have to send, plus 0.5 s |
| A beacon-kind PRESENCE, the one that opens a transmission | The announce channel it came on; on the bulk-control channel, the bulk region | 2.5 s: three more frames plus 0.5 s. Each further frame of the chain that decodes moves the end to 1.9 s after that frame. |
| A frame of an emergency rebroadcast, its acknowledgment or its all-clear (these chains say on every frame which frame they are and how many there are) | The announce channel it came on | To the chain's known end: the frames still to come plus one more frame time, plus 0.5 s, and never less than 1.9 s. A station that loses the rest of the chain to a fade still stays off that channel until the chain is over. |
| A beacon-kind PRESENCE on the bulk-control channel, at a station that is idle | All three announce channels and the bulk region | 3 s, long enough for the opener behind it to say who the transfer is for |
| An RTS (request to send), the ask before a long message, for someone else | The announce channel it came on; on the bulk-control channel, the bulk region | 7.02 s, whatever it asks for: the sender's wait for an answer, then time for its opener |
| An ASK, the ask that names its message, for someone else, with or without its PRESENCE heard | The same | As for an RTS (Section 19.3.4) |
| A CTS (clear to send) that grants an ask | The same | For a bulk grant of N frames, 6.66 s + N ร 5.98 s: the transfer and the reply after it. For a longburst, 17.43 s: its first piece |
| A CTS that says "not now" or "too weak for bulk" | Nothing | No transfer follows it |
| An ACK | Nothing (the longburst ACK below excepted) | It is the whole of its transmission: no frame of its chain is still to come |
| A dNAK or checkpoint, behind its CTS | The announce channel it came on; on the bulk-control channel, the bulk region | What its CTS says, reckoned as for a CTS that grants, from the end of the reply: the repair or the next segment it invites |
| A longburst ACK that says more pieces are coming | The announce channel it came on | 14.9 s: the next piece, a full shortburst, and its answer |
| An ABORT | Frees the channel it came on and the bulk region | At once |
A worked example: a five-frame bulk transfer reserves the bulk region for 0.15 + 5 ร 5.98 + 0.5 = 30.57 seconds from the moment its opener is decoded. The 0.15 seconds is the silent gap between the opener and the first bulk frame; the half second at the end covers the sender's radio dropping out of transmit.
A long transfer goes out in segments of at most ten frames, each its own transmission (Chapter 18). The opener announces the total but reserves only the first segment, 60.5 seconds at most; each later SEG-OPENER reserves its own. A station that hears only the opening does not lock itself out for more than six minutes on the strength of a transfer that may stop after the first minute.
For a shortburst opener a listener reserves the channel for the longest possible shortburst, whatever length the opener names: ten seconds at most, on one announce channel out of three.
A virtual net's roll call reserves its announce channel in the same way, for as long as the roll call runs (Chapter 24).
19.2.3 Stations you cannot hear
Defer only works for stations you can hear. On HF, with skip zones and one-way fades, two stations often hear the same third station perfectly well and not each other. Radio engineers call this the hidden station problem (in Wi-Fi, the "hidden node"), and it is the main way reservations fail.
mLink uses the replies to cover part of it. If you cannot hear station A but can hear station B, you still hear B's dNAK asking A for a repair, and B's checkpoint asking A for the next segment of a long message. Both open with a "clear to send" frame, the same one Wi-Fi uses, which names A and says how much A will send, so you reserve that time even though you will never hear A's opener (Section 19.3.5). mLink sends the same frame before a long message to one station (Section 19.3). A longburst works the same way: the addressee's ACK for one piece says more are coming, so a station that cannot hear the sender still keeps that announce channel clear for the next piece.
19.3 Asking first: RTS and CTS
A long message to one station does not open with its opener. The sender first asks the addressee, in one frame, whether it can take the message now, and the addressee answers in one frame. Wi-Fi has the same pair under the same names: RTS (request to send) and CTS (clear to send); these are frames on the air, not the serial-port lines of the same names that can key a radio (Section 6.8). They do two jobs. For the price of two short frames the sender learns that the addressee is there and free before it spends up to a minute of bulk air on it. And the stations around the addressee, including those that cannot hear the sender, hear from the addressee itself how long the air will be taken (Section 19.2.3).
19.3.1 Which sends ask
A send asks when it goes to one station and is long: a bulk transfer of two frames or more, or a longburst (Chapter 17). That holds for every such send: the station's own messages, a relay carrying someone else's, net control delivering a member's mail. A shortburst and a single bulk frame go straight out. A broadcast, or a message to a net or an area, never asks, because nobody answers it. On FmLink only a bulk transfer of more than two frames asks (Chapter 34). When the addressee may hold the message already, because it went out whole before with no answer or because the station carries it for someone else, the ask is the ASK in place of the RTS: it names the message, so the addressee can answer "I have it" (Section 18.6.5). Everything below about the RTS holds for it too.
The ask is [rts], one frame of the PRESENCE kind (Section 16.2). It names the sender with its own callsign, the addressee by its station ID, a two-byte stand-in for its callsign (Section 16.6.1), and how much the first transmission will carry: its bulk frames, at most the ten of the first segment (Section 18.7), or the longburst's pieces. A bulk ask goes where its opener would go: on the bulk-control channel, once the bulk region is free and the station's turn after the last reservation has come. A longburst's ask goes on the announce channel its first piece will use. Either way the ask is the start of a new message: it waits its turn as one, and takes the last check before keying (Section 19.6.1).
A station ID has 16 bits, so now and then two callsigns share one (KX0BBB and KX0QUP do). A station that knows two stations with the addressee's ID, from its heard list or its links map, does not ask when it sends to either of them: it could not tell their answers apart, so it sends as though there were no ask. A station that does not know may be answered by both at once. It accepts only a CTS that carries its addressee's own callsign, and if the two answers destroy each other, the ask ends as an unanswered one does.
19.3.2 The answer
The answer is [cts], one frame from the addressee on the channel the ask came on. It is an owed reply: it goes out at its moment, whatever the addressee hears or has reserved (Section 18.4.1). It names the addressee with its own callsign, repeats the sender's station ID, the count and its kind, and says how the addressee hears the sender, in the four steps the ACK uses (Table B.9). The count says which of three answers it is:
- Go: the count asked for, repeated.
- Too weak for bulk: a count of 0, to a bulk ask, from an addressee that hears the sender below +3 dB, the level bulk needs (Section 17.5.1).
- Not now: any other count of 0. The addressee heard the ask and is busy.
The addressee decides from its own state; the first line that fits gives the answer.
| If the addressee | It answers |
|---|---|
| may not transmit just now: it is set to listen only, its transmitter is inhibited, or it is holding its messages for a tune | Nothing; to the sender that is silence |
| was asked for bulk frames and hears the sender below +3 dB | Too weak for bulk |
| is itself asking the sender | Go if its own station ID is the higher, otherwise not now (Section 19.3.6) |
| is receiving a transfer for itself, is busy with an exchange of its own, is searching for a relay, or is a member of a net that is calling the roll | Not now |
| granted this same sender a moment ago, and that grant's reservation still runs with no opener heard | Go, again: the sender evidently missed the first CTS |
| already has the air the ask needs reserved (the bulk region for a bulk ask, that announce channel for a longburst), by a reservation it heard, its own grant to another station, or a bulk transfer it is listening to | Not now |
| none of these | Go |
19.3.3 What the sender does with the answer
The answer's "how I heard you" is taken as the addressee's own report of the link, which a station prefers to its own figure when it rates a link (Section 20.6.1). Then:
- Go. The sender keys exactly the transmission it asked about, and must start it within two seconds of decoding the CTS. If it cannot, it does not send late on that answer. When it has heard a reservation the addressee has not, it asks again as soon as that reservation ends, after a random wait of up to about 13 seconds. When the last check before keying finds a signal starting, or the two seconds have passed, it asks again after the same random wait. An old answer never carries a transmission. When the station misses the start itself three times for one message (its computer could not get the transmission ready in time), it stops asking for now: the message is set aside with that reason, the operator is told, and it is tried again later, on the same growing gap a "not now" gets.
- Too weak for bulk. With that report filed, the link counts as measured, and too weak for bulk. The station chooses how to send the message again (Section 17.5.2), and a message of two bulk frames or more then has no direct way to that station for now (Section 17.5.5). A message the station carries for someone else goes the way an unanswered ask does.
- Not now. The exchange ends at once, so the station's queue moves on to its next message, and this one is set aside until the addressee is heard again or its retry gap has run: one minute, doubling with each further "not now" up to 32 (Section 22.6.1). Then it asks again. "Not now" never starts a search for a relay: the addressee is there, only busy. A relay carrying someone else's message instead reports it failed to the station it carries for, whose own retries take over (Section 21.6), and net control keeps a member's mail for its next try (Section 24.8).
- No answer within 3 seconds (shorter than the reply window, since a CTS has no long burst to decode before it): one more ask, then a relay search (Section 18.6.1).
Granted at the first try, a send's opener therefore starts at most 5.66 seconds after its RTS did: 0.66 seconds of RTS, the 3-second wait and the two seconds of grace. After an ASK, one frame longer than an RTS on HF and two with its FOR, the opener starts at most 6.34 seconds after it, or 7.02. The station's own time limits that count from an opener, such as net control's room to deliver a held mail before its next heartbeat, allow for that ask.
19.3.4 Who keeps off what
Both frames reserve air at the stations that hear them, on the channel they came on; on the bulk-control channel that means the bulk region (Table 19.1):
- An RTS reserves for 7.02 seconds from its decode, whatever it asks for. That is the 3 seconds the sender waits for its answer, then 4.02 seconds in which a sender answered at the last moment gets its opener on the air: two seconds to key and 2.02 seconds of PRESENCE, a RELAY/FOR line when it is passing on another station's message, and the opener. A transmission sent on a CTS carries nothing else before its frames. The stations that hear the RTS are the ones around the sender. Their reservation is not cut short when they hear no CTS, because a station cannot tell "nobody answered" from "an answer I cannot hear".
- A CTS that grants reserves for the transmission it grants, from its decode. For bulk that is 6.66 seconds plus 5.98 seconds for each frame granted: the 4.02 seconds to the sender's opener, the 0.15-second gap before the first frame, the frames, half a second for the sender's radio to drop out, and 1.99 seconds for the addressee's reply. For a longburst it is 17.43 seconds, the first piece and its reply only; each piece's ACK reserves the next. The stations that hear the CTS are the ones around the addressee, and among them are the stations the sender cannot reach, for which the CTS is the only warning. A station that hears a granting CTS also sends nothing addressed to the station that granted while the reservation runs: that station is about to receive.
- A CTS of "not now" or "too weak for bulk" reserves nothing.
- An ASK (Section 18.6.5) reserves exactly as an RTS does: it asks for the same air. Its "I have it" answer is an ACK naming the asker, which ends the reservation as the final ACK of any exchange does. A station that decodes the ASK but missed the PRESENCE in front of it does not know who asks: it still keeps off, for the whole time, since no ACK can be matched to an asker it does not know, and if it is the addressee itself it does not answer.
The addressee keeps to its own answer. It reserves for itself what its CTS reserves for its neighbors, until its final ACK to the sender ends the exchange, and it holds all of its own voluntary traffic, on every channel, for 4.02 seconds after its CTS ends (the latest the sender's opener can come), so that the sender's opener finds it listening.
19.3.5 The CTS in front of a reply
Every reply that invites more data from the other station opens with a
CTS in place of its PRESENCE: the dNAK that asks for a repair,
[cts]
- before a dNAK for a bulk transfer, the frames of the repair's first transmission. The addressee packs the missing parts again the way the sender will, from the burst it holds, and counts at most one segment of ten frames;
- before a checkpoint, the frames of the sender's next transmission: the next segment, or the repair of the longest run of missing frames if that is longer;
- before a dNAK for a shortburst or one longburst piece, one piece.
The stations that hear the reply keep off for what its CTS says, as for a CTS that grants, counted from the end of the reply, or until they hear the addressee's final ACK to that station: the ACK names it by the low 8 bits of its station ID (Appendix B), so a station that cannot hear the sender still knows the exchange is over. The addressee keeps to it too: it reserves the same air for itself until its final ACK, and holds its own voluntary traffic, on every channel, for 4.02 seconds after the reply ends. The sender acts on a dNAK or checkpoint only when its CTS names the sender's own station ID, so the addressee's reply to another station on the same channel is not taken for its own.
The reply is the sender's go, as a CTS that grants is. When the go finds the air reserved at the sender's end, by a transfer the addressee does not know of, the sender does not key into it, and once it ends does not send late on the old reply: it sends one "did you get that?" probe (Section 18.6), and the addressee answers with a fresh reply and a fresh CTS. There is at most one such probe for each transmission. On FmLink the replies keep their PRESENCE (Chapter 34).
19.3.6 Crossing asks
Two stations can ask each other at the same moment, each before hearing the other. The station with the lower station ID sends first. The one with the higher ID grants the other's ask and sets its own aside, to ask again once that transfer is over; the one with the lower ID answers "not now" and goes on waiting for its own answer, which the other station grants. Two stations that share an ID compare their packed callsigns instead, so exactly one side grants.
19.4 Picking a channel
A station with a shortburst or a chain of announce frames to send chooses one of the three announce channels at random from the ones that are free. A channel is free when nobody's reservation on it is still running and the station is not in the middle of hearing a chain of frames on it. A queued message is released only once at least one announce channel is free.
Random, and not "always the lowest free channel", matters when several stations are ready at once: two of them often land on different channels and both get through.
That is the rule for messages, for relay and mail housekeeping frames, for most named-net frames, and for the periodic beacon. The exceptions:
- Bulk openers go on the bulk-control channel, and only once the bulk region is free. Their repairs, segment openers and "did you get that?" probes follow them there, and the addressee's replies come back on the same channel.
- Replies (ACK, dNAK, checkpoint) go on the channel the exchange opened on, because that is how the sender tells whose reply it is (Chapter 18). A reply is never held back for lack of a free channel, and it ignores reservations.
- Announcements a station chooses to start pick a free announce channel at random and wait until one is free: a position report (the automatic one and one sent by hand), a beacon the operator asks for, a geopoll, net control's heartbeat in a virtual net and a member's repeat of it, and a request for internet data and the answer to it.
- Answers to a geopoll use the channel their own callsign selects (Section 20.4).
- A frame whose time has come with no channel free takes the channel whose reservation ends soonest. Queued messages never get that far; they wait in the queue for a free channel.
The periodic beacon is more careful than a message in one further way: it also avoids an announce channel where the receiver detected an mLink-shaped signal in the last 1.5 seconds but could not decode it. Someone is keying there, even if this station cannot read them. If no channel passes, the beacon waits.
19.5 Who goes first
A station often has more than one thing it could send. The transmitter itself knows three grades of traffic. Distress traffic and owed replies key even while the receiver is in the middle of a frame; everything else waits for the receiver to finish. On top of that, each kind of voluntary traffic has its own conditions, and together they give a clear order.
| Traffic | What it waits for |
|---|---|
| 1. A distress call, or the acknowledgment of one, in the emergency region | Only for a transmission of its own that is already going out. It ignores reservations and keys even while the receiver is busy. |
| 2. Owed replies: ACK, dNAK, checkpoint, the CTS that answers an ask, the "did you get that?" probe, a check-in in a roll-call turn that belongs to this station | Only its own moment in the exchange. It ignores reservations and keys even while other signals are arriving. |
| 3. The next step of an exchange already under way: a repair burst, the next segment or longburst piece, a retry, handing a message to a chosen relay | The receiver to be idle. New messages wait until the exchange is settled. |
| 4. New messages: your own and ones you relay | The station not to be receiving a transfer addressed to it; a free announce channel; quiet air; and, for anything larger than a shortburst, a free bulk region, its turn after a reservation ends, and the pacing described below. Messages go in the order they were queued, except that a short one passes a large one that is held. A long message to one station goes first as its ask, which waits the same way (Section 19.3). |
| 5. Automatic traffic: beacons, position reports, geopolls | Everything in row 4, plus a longer random wait after any activity. It may wait minutes. |
Row 1 is a transmit priority and nothing more. A distress call does not cut off a transmission the station already has on the air, and it does not silence other stations. What it does change is the station's own routine traffic: while its distress call is active, its queued messages and beacons wait, so that the station is listening between repeats for the acknowledgment (Chapter 25).
19.5.1 Replies beat new traffic by construction
When a bulk transfer ends, its addressee replies about two thirds of a second after the sender stops (Chapter 18). Every station waiting to start a new bulk transfer must wait at least 2 seconds after the reservation ends, plus a random amount. The reply is therefore on the air and decoded before any newcomer's earliest moment, and the reply's own frames extend the reservation again.
The same courtesy runs the other way. When the addressee acknowledges one longburst piece and more are coming, it holds all of its own voluntary traffic for 3 seconds, on every channel, so the sender it just invited can get the next transmission started. After a CTS, whether it grants an ask or opens a dNAK or checkpoint, it holds for 4.02 seconds from the end of that transmission (Section 19.3.4, Section 19.3.5).
19.5.2 Crossing calls
Now and then two stations call each other at almost the same moment. Each keyed before hearing the other, so each is waiting for a reply that will never come, and left alone they would give up together and try again together. mLink breaks the tie by listening while it waits. A station waiting for a reply that hears a call addressed to it takes the call and answers it. Its own transfer is set aside and tried again, after a random delay, once the incoming exchange is finished. Two asks that cross are settled by station ID instead (Section 19.3.6).
19.6 Listening before talking
Reservations cover traffic whose opener was heard. They do nothing about a station that keys up just as you do. So a station also listens to the air itself before it starts anything voluntary, whether a message, a relay offer or a beacon. It will not start while the receiver is collecting or decoding a frame on an announce channel, the bulk-control channel or the bulk region (Section 15.7.1), or finished one less than 0.6 seconds ago. The gap between one frame of a chain and the next is shorter than that, so a chain in progress keeps the station held.
While a send waits, the station waits only for mLink transmissions it actually hears. Noise on the channel does not hold it, however loud: the open squelch of an FM radio, a carrier that is not mLink and a voice all leave the send free to go. The level of the audio is not a reason to wait, because a station cannot tell a new signal from a change in noise without a long memory of the band, and a wrong guess would delay sends for nothing. The cost is that an mLink front less than about 0.3 seconds old, which no detector has recognized yet, is not heard at this point. The check just before keying, below, looks again for exactly that.
An FM channel adds one courtesy wait, and only where the radio’s squelch works. It is a wait for a voice, not a reading of the air, and the station does not count it as the channel being busy. A closed squelch gives silence between transmissions, so audio 20 dB above that silence, which the station measures for itself, for longer than one block (0.28 seconds) is somebody transmitting, mLink or not: a voice, or another station’s data. The station holds its voluntary sends (a message, a relay offer, a beacon, a retry) and the check before keying for as long as that lasts, and for one block after, but never for more than 30 seconds at a time. When the wait ends, each station takes its own random delay before it sends, as after every other wait. The station starts doing this only after it has seen the squelch close once. If the audio never falls to silence for 2 minutes, the squelch looks permanently open: the station warns the operator once (“the radio’s squelch seems open; set it so the radio is quiet when nobody transmits”) and stops listening this way until silence returns. A radio whose rig file says its receive audio is not gated by the squelch (the audio is hiss whatever the squelch setting) is never listened to this way. A distress call, the replies a station owes, a roll-call turn and a net’s own line never wait for it. HF is unchanged.
19.6.1 The last check before keying
The decision to send is made a fraction of a second before the transmitter keys, because the audio has to be prepared first, and a signal that started in between would go unnoticed. So for the opening transmission of a message (first attempt or retry) and for a relay offer, the transmitter looks again at the very moment it is about to key: just before keying, the station checks once more that no mLink signal has started, that is, whether the receiver has found the start of a frame, or is decoding one. The level of the audio does not count here either. On an FM channel the check also asks the FM voice wait (above): a voice heard on the channel refuses the transmission the same way. If a signal has started, the transmission is not sent. A message goes back to the head of the queue, a retry waits again, and a relay offer picks a new time.
Owed replies and distress traffic skip all of this. A reply is timed to land in a moment the exchange already owns, and holding it back because of noise would only make the sender give up on a transfer that worked.
19.6.2 The race that cannot be closed
Even with all that listening, a small window stays open. Two stations that decide to key within a fraction of a second of each other (the time a new front takes to be recognized, plus the time for a transmitter to come up) cannot yet hear each other. Add hidden stations, which no amount of listening reveals, and collisions on a busy channel are a fact of life. mLink accepts that. It keeps the window small, makes sure stations that collided once do not collide again the same way (Section 19.8), and relies on Chapter 18 to recover what a collision destroys.
19.7 How long to listen to someone else's transfer
Listening has a price. Every mLink station tries to decode the directed bulk transfers it overhears, so that it holds a copy if the sender later asks for a relay (Chapter 21), and a station that is collecting a frame will not key. Left at that, every bulk transfer would silence every station within earshot for its whole length, about 25 seconds for four frames, as if only one station could talk at a time.
mLink settles it by asking what the overhearing station's relationship to the traffic is, which it knows the moment the opener is decoded.
- The transfer is for you. You receive it, and your own new messages wait.
- The transfer belongs to a net you can hear. A station that hears a virtual net, whether member, net control or bystander, keeps listening to the net's transfers for their whole length and holds its own messages and beacons until they end. The members are each other's relays (Chapter 24).
- Anyone else's transfer. Here the first-frame rule applies. The station listens, holding its own messages and beacons, until it knows whether it can read this transfer at all: about eight seconds after the opener, time for the first 5.98-second bulk frame to arrive and be decoded, with a margin. If the first frame decoded, the station keeps listening and holding to the end; a copy it can read is worth keeping. If the first frame failed to decode, or the receiver never found it, the station stops overhearing. It switches its bulk detector off for this transfer and lets its own announce-band traffic go, after the same random wait every station takes when the air clears.
Stopping is not the same as stepping on the transfer. The reservation the opener made still stands, so the station stays out of the bulk region; what it may use is an announce channel. Two more courtesies go with it. The station does not call either party of the transfer while it is on the air: the sender is deaf, and a call to the addressee would pull it into a reply in the middle of receiving. Messages to anyone else, and broadcasts, go ahead. A second, unknown signal starting in that time is caught only by the decoders and by reservations, and by the last check before keying.
Letting every bystander talk during every transfer would throw away the copies that relays depend on; holding everyone for every transfer is the one-talker channel described above. Giving up only what a station could not have used costs nothing.
19.7.1 A chain from a station of a net you hear
The same question is asked of a chain of announce frames (Chapter 16). Its PRESENCE names the sender, but says neither how many frames follow nor whom they are for, so the sender is all a station can judge by.
- A stranger's chain holds nothing beyond the reservation of the announce channel it is on (Table 19.1). The station may start something on another channel while it runs.
- A chain from a station of a net the station hears, its net control or a member on its roster, is listened to whole, by members, net control and bystanders alike. The station starts nothing voluntary on any announce channel or in the bulk region until that chain's reservation has run out: 2.5 seconds after the PRESENCE, moved to 1.9 seconds after each further frame that keeps the chain going (a heartbeat or another net frame, a heard-list advert, an area, a position report, a relayed distress call). A frame that answers or asks something, such as an ACK, a dNAK or a relay or mail control frame, is the last of its chain, so the wait ends as soon as it decodes. A bulk opener hands over to the rule for bulk transfers above.
Everything the station chooses to send waits: messages, beacons and heartbeats, net frames, relay offers and requests, mail and internet-data traffic, retries. Owed replies, distress traffic and a roll-call answer in the slot net control gave it do not wait. A transmission that was already prepared and waiting for clear air when the chain's first frame decoded is held back at the transmitter as well. Every station that heard the chain reaches its end at the same moment, so none of them keys on it: each goes after its own random wait (Section 19.8).
19.8 The random wait
The most dangerous moment on a shared channel is the moment it goes quiet. Every station that was waiting for the same reservation sees it end at the same instant, because they all worked it out from the same opener. If each keyed at once they would collide, wait out the same time limit, and collide again. The waiting itself would put them in step.
So wherever a station acts on a moment that other stations share, it first waits a random back-off: it picks a random time within a set limit and stays quiet until that time has passed. mLink's version has two twists:
- The limit grows with the crowd. Most limits are a fixed step multiplied by the number of stations heard in the last 30 minutes, counted between a lower and an upper bound, so a busy net spreads its stations over a wider span than a quiet one.
- Each wait is picked fresh. The time is worked out from the station's own callsign mixed with something about the event (the moment the reservation ended, the message's check value, the time the retry was set). Two stations that happen to land close together once are very unlikely to do so at the next event.
The first station to key is heard by the others, whose own waits have not yet run out; they decode its opener, record its reservation, and wait again. A pile-up becomes a queue.
19.8.1 Where the random waits are
In the table, the random part is the most the wait can be; the station picks a time anywhere from zero up to it. N is the number of stations heard in the last 30 minutes, held between the two bounds shown.
| Before | Fixed part | Random part, up to | Longest |
|---|---|---|---|
| A queued message, when the air or a hold on the station has cleared within the last 2 s, or when it is handed over on a channel quiet for longer | 0.15 s | 0.45 s ร N (4 to 12) | 1.95 s on a small net, 5.55 s with twelve or more |
| A new bulk transfer, after a bulk reservation it heard has ended | 2 s | 1.5 s ร N (6 to 12) | 11 s to 20 s |
| A beacon, a position report, a geopoll, a heartbeat: after any activity on the channel | 0.2 s | 1.5 s ร N (6 to 12) | 9.2 s to 18.2 s; a VOX-keyed station waits one full span longer |
| A retry of your own transfer (no reply came, or it was set aside for a crossing call) | 0, 1 or 2 places, each as long as the transmission plus 1.05 s | 0.45 s | Two places plus 0.45 s |
| Your next message after an exchange ends: the station that received the ACK | None | 0.4 s | 0.4 s |
| The same, for the station that sent the ACK | 2.6 s | 0.4 s | 3.0 s |
| Asking a broadcaster to say again | 1 s, then 0 to N−1 places of 2.25 s (N 4 to 8); after a mail whose opener says k reply slots follow, k × 1.2 s more | 0.45 s | 17.2 s; 26.8 s after a mail with 8 slots |
| A response whose moment arrives while the air is busy | 0.25 s | 0.45 s ร N (4 to 12) | 5.65 s, then it looks again |
Some notes on the rows. In the first, a change from busy to quiet counts for 2 seconds. A message handed over after a longer quiet takes the same wait of its own, because stations given messages at the same moment (an exercise, a shared prompt) would otherwise key together. A message handed over while the station is busy with an exchange of its own does not take it when that exchange ends. In the third, every decoded frame, every undecoded detection and the station's own transmissions restart the clock, and stations keyed by VOX (on FM only, Section 34.4; HF is never keyed by VOX), whose transmitters are slower to come up, are placed behind all the others, but only while a fast station has been heard in the last 10 minutes. The places in the fourth are long enough that a later station hears the earlier one's whole transmission before its own turn. And the station that sent an ACK waits long enough to hear the other one start.
Two more sets of slots are described with the things they answer: those for answers to a geopoll (Section 20.4), and those for relay offers (Chapter 21).
19.8.2 Slowing down when the channel is jammed
Random waits spread stations out; they do not reduce how much everyone is trying to send. Under heavy load, collisions cause retries, relay searches and repairs, which are more transmissions, which cause more collisions. Left alone, that feedback can jam a busy channel.
So each station watches for one piece of evidence that it is part of the problem: a relay search for one of its own messages came back with no answers at all (Chapter 18), although it has heard some other station within the last two minutes. On a lively channel that almost always means nobody decoded its opener, which means a collision. Each time it happens, the station spaces out the large sends it starts: 15 seconds between them at first, doubling with each further piece of evidence, up to 10 minutes. Each large transfer that completes halves the spacing, and so does every minute without new evidence. Halved below 15 seconds, the spacing is gone.
Only traffic the station chooses to start, and only what is too big for a shortburst, is paced: new bulk and longburst transfers, and fresh attempts at ones that were held or set aside. Short messages are never held behind a paced transfer, and replies, repairs inside a running exchange, distress traffic and beacons are never paced at all.
19.9 Broadcasts: "say again"
A directed message that meets a collision has an addressee who will say what went wrong (Chapter 18). A broadcast has none, and a dozen listeners all sending dNAKs at the same instant would destroy each other. Yet a broadcast can lose a frame at one listener to a local collision while everyone else gets it cleanly. mLink handles this with a single, delayed say-again round:
- A listener that received a broadcast incompletely keeps its partial copy, as it would for a directed transfer.
- It waits one second, then a random number of places 2.25 seconds
apart, then up to 0.45 seconds more (the say-again row of
Table 19.4). Then, if the
air is quiet, it sends a request shaped like a dNAK,
[cts]
[dnak] , on the broadcast's channel, naming the frames it is missing. Its CTS names the broadcast's sender and the frames the repair would take, and the stations around the listener keep off for as long as such a repair lasts; it is not a go, as the sender repairs only at the end of its 22 seconds. The request is ordinary voluntary traffic, not an owed reply. - A listener that hears someone else's request covering all of its own missing frames stays quiet: the repair will carry its frames anyway.
- The sender collects requests for 22 seconds after the broadcast ends. It then sends one repair, as a broadcast, holding every frame anyone asked for; a bulk repair is packed again at rate 1/2 like any repair. Each listener fills in the parts it needs.
A broadcast to everyone (0CQCQCQ) may be a mail to several stations, which the stations it names confirm in reply slots right after it (Section 26.5). Its opener says how many slots follow, so a listener holding only part of the mail knows: it waits 1.2 seconds more before step 2 for each slot, and the sender's 22 seconds of collecting start once the last slot is over. A broadcast whose opener says no slots follow adds no wait at all.
If two requests collided at the sender, both listeners would wait forever. So each listener asks once more, about 35 seconds after its first request and at a freshly picked place, unless the repair has arrived in the meantime; and a sender that heard no requests in its 22 seconds keeps listening for another 60 before it concludes everyone got the broadcast.
There is only one repair round. It covers a broadcast sent as one bulk or one shortburst transmission, not a longburst sent in pieces, and it needs the listener to have decoded the opener. A listener still missing frames after the repair drops its partial copy.
19.10 What to remember
- Defer (Wi-Fi's NAV): a heard opener reserves one piece of spectrum, an announce channel or the bulk region, for as long as the transfer can last plus half a second. A bulk opener reserves 0.15 s + N ร 5.98 s + 0.5 s, for at most ten frames.
- A long message to one station (two bulk frames or more, or a longburst) asks first: [rts], then the addressee's [cts] says go, not now, or too weak for bulk. A heard RTS reserves its channel for 7.02 s around the sender; a granting CTS reserves for the whole grant around the addressee, where the sender's hidden stations are. An ASK, the ask that names its message, reserves as an RTS does.
- Messages and the periodic beacon pick a free announce channel at random; bulk housekeeping uses the bulk-control channel; replies go back on their exchange's channel; position reports, geopolls, heartbeats and internet-data requests pick any free announce channel as well.
- Precedence: distress, owed replies, the exchange already under way, new messages, automatic traffic. Only the first two key while the receiver is busy.
- Voluntary traffic waits for any mLink frame it hears, ignores plain noise while it waits, and checks the level once as it keys. A tenth of a second, and hidden stations, remain.
- The first-frame rule: a station stops overhearing a stranger's bulk transfer about eight seconds after the opener if nothing of it has decoded, and then uses the announce channels only, never calling the two stations involved. A chain from a station of a net it hears, it listens to whole.
- Every shared moment gets a random wait whose limit grows with the number of stations heard. Large sends are spaced 15 seconds to 10 minutes apart while a station's own relay searches come back empty.
Finding Each Other
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
20.1 Three sources of knowledge
mLink has no net control to keep a log of who is on frequency (Section 1.4), yet much of what a station does depends on knowing who is around and how well it hears them. So every station builds its own picture of the neighborhood, from three sources:
- What it hears first-hand. Every transmission opens with a PRESENCE frame naming the station that is keying (Section 16.2). Each one your station decodes goes into its heard list, with the strength it arrived at.
- What it hears second-hand. Stations add a short "here is who I have been hearing" note to transmissions they were making anyway. Your station collects those notes into a map of who hears whom.
- A little deliberate speech. A station that has been quiet for a while sends a short beacon, and one that has just come up and hears nobody sends beacons more often until somebody turns up.
20.2 Coming up on frequency
mLink calls the start-up process convergence: the station arriving at the conclusion "this is a live mLink channel and I am part of it". It has up to four stages. None of them changes what the station can receive (it decodes everything from the first second) or stops the operator sending a message. They only decide when the station volunteers a beacon of its own.
20.2.1 Stage 1: listening
For the first twenty seconds after start-up the station sends no beacons. A newly started station has no idea whether the frequency it was tuned to is quiet, busy with another mode, or in the middle of somebody's contact, and a short spell of listening is how a careful operator would treat a strange frequency too. If somebody transmits in that time, the moment your station decodes a frame from another station it goes straight to the last stage. (Whether the station may transmit at all is a separate matter: see Section 7.3.4.)
20.2.2 Stage 2: alone, beaconing often
If the twenty seconds pass and nothing has been heard, the station starts to announce itself. It sends an ordinary beacon, a PRESENCE of the beacon kind, the same frame as the routine beacon of a settled station (Section 20.3), on a free announce channel. Nothing answers it. The station learns of other stations the way every station does, from their own beacons.
The first beacon waits a random extra time of up to 16 seconds. A group of stations switched on together, at the start of an exercise or when power comes back, would otherwise all finish listening at the same instant and key on top of each other. After that a beacon goes out about every 90 seconds, each interval made up to 20 percent longer or shorter at random so that two stations do not fall into step.
20.2.3 Stage 3: alone for a long time
If twenty minutes have passed since start-up and the station has still heard nobody, it backs off to the routine beacon interval (Section 20.3.2). At that moment, once, it gives the operator a "no other station heard" notice: check the antenna, interference, frequency and modulation. It does not give up. A station on a quiet frequency may simply be the first to arrive, and its routine beacons are what the second station finds.
The operator can cut the listening stage short and have the first beacon
sent as soon as the air is free: the beacon_now command, which
the client offers once the operator confirms this is the mLink frequency. In
any later stage the request just sends one beacon.
20.2.4 Stage 4: converged
The instant the station decodes a valid frame from another station (a PRESENCE, a message opener, a relay frame) it is converged, whatever stage it was in. From here on it sends a beacon only when it has been quiet for a while.
20.3 Beacons
A beacon is a transmission that is a PRESENCE frame and little else: no message, no request, only "this is me, here".
20.3.1 Operator present
Every beacon-kind PRESENCE carries one bit about the station behind it: set, a person is at the station; clear, it is running unattended. A station starts with the bit set: the operator is taken to be at the radio unless they say otherwise, and the choice is saved, so it holds across restarts. It costs no air time: the bit sits in the space the PRESENCE already has after the grid locator (Section B.5). The same bit rides on the PRESENCE at the front of every data transmission. It is a courtesy to other operators; nothing in the protocol acts on it.
20.3.2 How often a converged station beacons
The rule is simple: a station beacons only when it has been silent for a long time. The beacon timer restarts every time the station keys a transmission that opens with its PRESENCE. A station passing traffic every few minutes therefore never sends a separate beacon; its traffic is its beacon.
How long "a long time" is depends on how crowded the net is. The base interval is ten minutes. Once a minute the station counts the stations it has heard recently (the "on the net" window in Section 20.9). With up to ten stations heard, the interval stays at ten minutes. Beyond that it grows by ten minutes for each further ten stations: 20 minutes with eleven to twenty heard, 30 with twenty-one to thirty, and so on up to an hour with more than fifty. Each interval also varies at random by up to 20 percent either way.
There is one exception. If the station has heard no traffic (any frame that is not a beacon or an answer to one) for ten minutes, it takes the band to have gone quiet and beacons at least every twenty minutes however many neighbors it has. That only changes anything on a frequency with more than twenty stations. A quiet band is when stations most need to find each other again, and when an extra beacon costs nobody anything. The rule looks only at traffic, so the extra beacons it causes cannot make the band look busy.
A beacon that comes due is a voluntary transmission and waits its turn like one: for the station to be idle, a free announce channel, quiet air, and the random wait after any activity (Section 19.8.1). Nothing is lost by waiting. A routine beacon that comes due while the air is busy does not go out in the first seconds after the air clears: at the moment it would have gone (after the usual random wait) it picks a new random time up to a quarter of its own interval later (up to 2.5 minutes at the ten-minute pace) and goes out then. If the air is busy again at that time, it goes out after the usual random wait. The first beacon after start-up keeps its own wait.
A beacon the operator asks for by hand waits the same way as a beacon that comes due on quiet air and goes out once, however long that takes. A station set to listen only, or inhibited at launch, never beacons, and neither does one with no callsign set (Section 16.2.2).
20.4 Answering a question
The one automatic answer in the PRESENCE family is the answer to a geopoll (next section). When one station asks, everyone inside the area wants to answer, and they all heard the question at the same instant. If they all answered at once nobody would decode anything.
mLink spreads these reactive beacons out in both time and frequency:
- Time is divided into slots 750 milliseconds apart, a little more than one announce frame. There are nine, the first starting 200 ms after the question was decoded.
- Each answer goes on one of the three announce channels.
- Each station's slot and channel follow from its own callsign, so it always answers in the same place and two different callsigns usually land in different ones. That gives 27 positions.
- Geopoll answers use a single block of nine slots, so the last one starts about six seconds after the poll, and only stations inside the area answer.
There is also a limit on how many answers go out. While a station waits for its slot it counts the other answers it hears, on any channel. If three other stations have already answered, it stays quiet: the asker knows the channel is alive, and a fourth answer adds air time without adding information. A station in the middle of an exchange when its slot arrives answers once the exchange is over, and one whose receiver is busy with a frame waits a short random time and looks again. Answers are always a single frame.
20.5 Who is over there? Geopoll
A geopoll is the reverse of a beacon. Instead of "here I am", it asks "is anyone in this area?" The operator gives an area, a center (a latitude and longitude, or a grid square) and a radius in kilometers, and the station sends one frame that carries that circle. It is a GEO-family frame, like the AREA frame that aims a message at a circle: it carries the circle and no callsign, and it goes out alone with no PRESENCE in front, so a geopoll does not say who is asking (Section B.6). It is sent on any free announce channel once the air is clear, and has no time limit: if the band is busy for five minutes, the poll goes out in five minutes. Only one such request waits at a time; a newer one replaces it.
Every idle station that decodes the poll tests its own configured grid square against the circle. If the center of its square is inside, it answers in its slot with a PRESENCE of the geopoll-answer kind, carrying its callsign and grid as usual. A station with no grid square set never answers, because it cannot place itself.
The kind of the answer matters to the station that asked. An ordinary beacon heard a few seconds after a poll might be a coincidence; a geopoll answer means that station heard the poll. Answers go into the asker's heard list like any other PRESENCE.
A geopoll only asks who is present. Sending a message to everyone in an area is a different thing (Chapter 30).
20.6 The heard list
The other half of finding each other is remembering what was heard. Each station keeps a heard list: one record per station it has decoded first-hand.
A record is created or refreshed by every PRESENCE the station decodes, of any kind: the one at the front of a transmission, a beacon, a geopoll answer, an ACK. The four named-net frames that travel alone with the sender's callsign inside refresh it the same way (Chapter 24). A record holds:
- the callsign and grid square, and a rough position worked from the grid when nothing better is known;
- when the station was first and last heard, and how many frames have been heard from it;
- the signal-to-noise ratio of the latest frame, the best and worst seen, and the link estimate described below;
- whether it was showing the gateway flag.
Only first-hand decodes create records. Hearing somebody else mention a station, in a HELLO, a relay request or a message, never does.
The station forgets a record when it has decoded nothing from that station for three of its current beacon intervals, and never sooner than one hour: one hour with up to twenty stations heard, up to three hours on the most crowded frequency. Whatever shorter age limit a screen applies is a matter of display (Chapter 7).
20.6.1 The link estimate
Each decoded announce frame comes with a measured SNR (Section 15.10), on the SNR@3k scale like every figure in this book. HF signals flutter: one frame can arrive 6 dB down in a fade and the next 6 dB up. If the station decided things on the latest reading alone, a single fade could flip it from "send this as bulk data" to "this link is too weak" and back a minute later.
So alongside the latest reading it keeps a link estimate for each station: a running average in which the newest reading counts for 40 percent and everything older shares the other 60 percent, each earlier reading fading by the same factor again. The first reading starts the estimate as it stands. After that a single odd reading can move it at most 40 percent of the way, and three readings that agree carry nearly 80 percent of the weight.
Three rules decide what goes into the estimate and when it may be used.
- Readings taken around bulk traffic are left out. While the station has the bulk region marked as reserved (Section 19.2), and for eight seconds after that reservation ends, a decoded frame still counts as "heard" but its SNR is not added. The receiver's noise measurement takes a moment to settle after a long stretch of wideband data, and the reply frames that follow a transfer land in exactly that time; measured then, a strong station looks many dB weaker than it is.
- Five minutes is the limit. The estimate may be used only if the station was last decoded within the past five minutes. Older than that, the station is treated as having no estimate at all.
- The other station's own report wins. When your station is about to send to another, what matters is how well they hear you. If that station has said so in a HELLO (below), and the report describes hearing you within the past five minutes, the report is used. Otherwise your station uses its own estimate of how well it hears them, on the assumption that a path works about the same both ways. On HF that assumption often fails, which is why the report is preferred.
The figure that comes out is what a station grades a link on: when it chooses how to send (Chapter 17), and when it offers to relay (Chapter 21).
20.6.2 Gateways heard
A station that can reach its mail server says so with the gateway flag in its PRESENCE (Section 16.2.1). The heard list records the flag with the time it was last seen, and HELLO frames and relay offers pass it on second-hand, so a station can learn of a gateway it cannot hear itself. Hearing a gateway's PRESENCE is also the cue for mail that is waiting for one to try again (Chapter 26).
20.7 HELLO: sharing who you hear
The heard list tells a station who it hears. It says nothing about who they hear. For that, stations share notes in HELLO frames.
One HELLO is one sentence: "I recently heard this station." The "I" is whoever sent the PRESENCE at the front of the transmission, so the HELLO does not repeat it. It names the station heard and gives how many minutes ago it was last heard, the SNR in whole dB (the sender's link estimate for that station, or its latest reading if there is no estimate yet), whether that station was showing the gateway flag, and the class of the link, strong or weak. The layout is in Section B.11.
Strong means the SNR being reported is +3 dB or better, the level from which a station trusts a link with bulk data. So "strong" is more than "loud"; it means "I would send you bulk over this link". Weak means heard, but good only for the short, rugged traffic of the announce channels.
A station that is one radio of a cluster (Chapter 33) also speaks for the cluster's other radios. One HELLO in each transmission that carries any may name a station that only another of the cluster's radios hears, on another band for instance, marked as such. A listener keeps that as "reachable through this station", not as "on this frequency": it does not count toward who can hear whom here, but it tells a sender that a relay through the cluster can work.
20.7.1 HELLO never keys the radio by itself
A station never transmits just to send HELLOs. They ride only on transmissions that are happening anyway:
- up to two at the start of a new shortburst or bulk
transfer, right after the PRESENCE:
[presence]
[hello] . A longburst, a repair, a reply, and a bulk transfer sent on a CTS (Section 19.3) carry none;[hello] [opener] [bulk 0]โฆ - up to three on the periodic beacon, on the automatic position beacon (Chapter 30), and on net control's heartbeat in a virtual net (Chapter 24).
At most one transmission a minute carries any. Each HELLO adds two thirds of a second, so the cost is at most two seconds of air time a minute, however busy the operator is. Answers never carry one.
Only stations heard within the "on the net" window are advertised, so HELLOs describe the net as it is now. The station works through that list in rotation, starting each time where it stopped, so successive transmissions advertise different stations. On a directed transfer it skips the destination: the opener right behind names that station and tells every listener "I can hear this one".
20.8 The links map
Every HELLO your station decodes, and can tie to the PRESENCE in front of it, becomes one row of its links map: "reporter hears subject, strong or weak, at so many dB, so many minutes ago". A newer HELLO about the same pair replaces the row.
Three other frames also say something about who hears whom:
- A relay OFFER. A station volunteering to relay states its measured SNR to the destination (Chapter 21). That is as good as a HELLO and is recorded as one.
- An overheard opener. When station A opens a directed transfer to station B, A is plainly claiming it can hear B. Everyone who decodes the opener records "A hears B": strong for a bulk opener, because A would not have chosen bulk on a weak link, and weak for a shortburst opener, because short messages go at any strength. Openers of broadcasts record nothing.
- A relay RESULT that reports delivery. Relay and destination have plainly heard each other, so a row is recorded each way. This is the one source that reaches stations on the far side of a gap, who could never overhear the relay and the destination talking.
The last two are marked as inferred, because nobody measured anything. An inferred sighting refreshes a row's age and can raise it from weak to strong. It never turns a strong row weak and never replaces an SNR that someone measured.
The links map is strictly second-hand knowledge. It never creates or changes a heard-list record. A row that has not been refreshed for two hours is dropped, so stations that have left do not linger as ghost lines.
20.8.1 What the map is used for
The map feeds two things. One is the report already described: a row in which another station says how well it hears you grades your link to it, in preference to your own estimate. Only measured rows count for that, never inferred ones. The other is the operator's picture of the net: which stations can reach which, and where the gaps are.
Choosing a relay does not consult the map. A station volunteers only on the strength of its own first-hand hearing of the destination (Chapter 21).
20.9 How recent is "recently"?
Many parts of mLink ask "have we heard that station recently?", and they do not all mean the same thing by it.
| Question | Window | Why that long |
|---|---|---|
| Is my link figure still good enough to choose how to send, or to offer a relay? | 5 min since the station was last decoded (or, for its own report, since it last heard you) | Long enough to span a few exchanges, short enough that a change in the band is noticed. |
| May I volunteer to relay to this destination? May a deferred message try it directly again? | 2 min since last decoded | A promise to carry someone's message should rest on fresh evidence. |
| How many stations should a random wait be spread over? | 30 min since last decoded | Counts the stations that might be waiting for the same moment. |
| Is this station on the net? (the count behind the beacon interval; which stations HELLOs advertise) | 30 min, or 2ยฝ beacon intervals when that is longer; always inside the time a heard-list record lasts | Sized to span a quiet station's own beacon interval with room for a missed beacon, so that members of a big net stay in the count between beacons. |
| How long is a heard-list record kept? | 1 h since last decoded | A fixed limit. A station heard again after that simply gets a new record. |
| How long is a links-map row kept? | 2 h since last refreshed | Longer than the slowest beacon, so live links are not dropped; short enough that departed stations disappear. |
One more interval is built on the beacon interval: how long a promise to act "next time I hear that station" must stay alive. That is the contact horizon, two and a half beacon intervals (Chapter 22).
20.10 What to remember
- A new station sends no beacon for twenty seconds, then beacons about every 90 s, and after twenty minutes alone slows to the routine interval and tells the operator once. It is converged the instant it decodes any other station.
- A converged station beacons only after its own silence: every 10 minutes with up to ten stations heard, ten minutes more for each further ten, up to an hour, and at least every 20 minutes when the band carries no traffic.
- Answers to a geopoll go in a slot and on a channel fixed by the answering station's callsign, and are held back once three others have answered.
- The heard list is first-hand only and forgets a station after three beacon intervals of silence, never less than an hour. Its link estimate weights the newest SNR reading at 40 percent, leaves out readings taken around bulk traffic, is good for five minutes, and gives way to the other station's own report of how it hears you.
- HELLO frames ride only on transmissions already happening: two on a new transfer, three on a beacon, on at most one transmission a minute. With relay offers, overheard openers and delivery reports they build the links map, whose rows last two hours.
Relay: Recruiting a Helper
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
The relay setting is on the Settings screen (Chapter 7), and the notes a relayed message shows in the outbox are listed in Chapter 8.
21.1 Why relay, and why this way
Two stations 400 km apart may have no usable HF path at the hour you want to send, and two FM stations may have a hill between them, while a third station hears both perfectly. Voice operators solve this all the time: "I can hear him, I'll pass it along."
mLink's relay does the same thing, and differs from classic packet digipeating in three ways:
- Nobody plans a route. There is no routing table and no path for the sender to spell out. The sender asks "can anyone help?" and the stations that can, say so.
- Relaying happens only when it is needed. A message goes direct first. Only when the direct attempt has met silence does the sender ask for help (Section 18.6 says exactly when). Stations never repeat traffic on their own initiative.
- The helper often already has the message. Every mLink station keeps a copy of each message it overhears in full, including ones addressed to somebody else. A station that heard the original transmission already holds a copy, so the sender does not have to send it all again just to hand it over. A long message whose ask went unanswered never went on the air at all (Section 19.3); for it the sender asks for a station that hears the destination and hands it the message (Section 21.7.2).
The handshake uses five frames of the RELAY family: REQUEST, OFFER, SELECT, FOR and RESULT. Each is one announce frame behind a PRESENCE that names the station sending it; their byte layouts are in Section B.10. They name the message by its 16-bit check value (Section 18.2.2), called the message's id in this chapter. We follow one message with three stations:
- A, the originator, who wrote the message;
- X, the destination, which A cannot reach;
- C, a station that hears both.
21.2 Step 1: REQUEST
A search only makes sense when some other station is there to answer it. A station that has listened for a whole liveness window (30 minutes, longer when the beacons have been slowed for a busy channel: Section 20.3.2) and decoded no frame from anyone but the destination is alone: it sends no REQUEST. The message is set aside at once, as an empty search would set it aside, with the note "callsign did not answer. No other station has been heard for 30 min, so there is nobody to ask to pass it on. Kept; it goes out when callsign or another station is heard." When the destination itself is being heard, the note adds that it is heard here but does not answer and may not hear you. Only stations this one's own radio decodes count; a station that has just started has not listened for a whole window and searches as always. A station that is there but never transmits is not asked until it is heard.
The originator sends [presence]
A REQUEST is something the station chooses to say, not a reply another station is waiting for, so it goes out on a free announce channel and waits its turn like any other new transmission (Chapter 19). The station remembers which of the three announce channels it used, because its SELECT will go out on the same one. Then it listens for OFFERs for up to 24 seconds, counted from the moment its REQUEST went on the air, so time the REQUEST spent waiting for its turn is not taken from the search.
The destination may hear the REQUEST for its own message even when the message itself did not get through, or when it did and its ACK was lost. It answers at once, on the channel the REQUEST came in on, ahead of any OFFER: if it holds the message it sends its ACK again, and the originator counts the message delivered; if it does not, it sends its PRESENCE, once. It answers only when it is idle, and never when it is listen-only or its transmitter is inhibited. Decoding the REQUEST already shows that the link carries an announce frame; a message larger than a shortburst asks before it is sent, and the destination's answer to that says whether the link is good enough.
A station that is searching still listens. If a transmission addressed to it arrives, or the station it is searching for is heard, the search ends at once: the call is answered as usual, and the message it was looking for a carrier for is not failed but set aside, to be sent direct again as soon as the destination is heard. If the destination's own ACK for that message arrives late, the message is counted as delivered and the search is over. The search gives way to the destination once per step of the retry wait below: when the direct try that follows fails as well, the destination hears this station but this station does not get through, so the next search runs to its end and takes the offers it gets.
A client can also ask the station to run this search for a stored message, naming the destination and the id. The search is the same, except that the station has no copy of its own to compare OFFERs against.
21.3 Step 2: OFFER
21.3.1 Who may volunteer
Every station that decodes the REQUEST asks itself three questions:
- Do I hold the message? That means a complete, checked copy with this id, from this requester, to this destination. The REQUEST's PRESENCE names the requester and the REQUEST names the destination, so two unrelated messages that happen to share an id are not confused unless they also share both callsigns.
- Can I hear the destination? The station must have decoded the destination within about the last half hour; the window grows when the stations on the frequency beacon less often (Section 20.9). A station whose last hearing of the destination is older than two minutes still answers, but stands four places further back in line (Section 21.3.4) and drops its OFFER as soon as it hears one other. A station whose own transmission to that destination went unanswered (a carry or a message of its own; a destination that asked it to say again did hear it) does not answer for it until the destination says it has heard the station since: in a HELLO advert, or by answering the station directly. Hearing the destination proves nothing here: on a one-way path the station hears it all the time. Only a destination that has never named the station and has said nothing since is judged by whether the station has heard it again; it may simply have been away.
- Does my relay setting allow it? See Section 21.9.
A station that passes all three still checks one more thing before it speaks: its link estimate toward the destination (Chapter 20) must be at least โ9 dB. Below that figure its own sending rules refuse any directed transmission (Section 17.5.5), and an offer it would then refuse to honor would leave the originator waiting for nothing.
21.3.2 What an OFFER says
An OFFER fills its frame. Besides the message id it carries:
- the volunteer's link estimate to the destination, in whole decibels;
- a flag saying whether the destination was a mail gateway when the volunteer last heard it (Section 16.2.1);
- a flag saying "I do not hold the message; send it to me first" (see Section 21.7.2);
- the exact length of the copy the volunteer holds, and a 32-bit fingerprint of its contents.
The last two are for the originator, the one station that certainly knows the real message. It ignores any OFFER whose length or fingerprint does not match its own copy. The fingerprint is a different kind of sum from the 16-bit check, so two messages that share an id will almost never share it too.
Everyone else listening learns from an OFFER as well: it goes into their links map as a HELLO would (Chapter 20).
21.3.3 Spreading the answers out
A REQUEST is heard by many stations at the same instant. If every volunteer keyed at once, the originator would hear none of them. So each waits for a slot:
- There are nine slots, starting two seconds apart: 1.6 seconds each, which is longer than the 1.3 seconds an OFFER takes to send, plus room for a random extra delay of up to 0.4 seconds. A volunteer in the first slot answers almost at once. The latest possible OFFER starts 16.4 seconds after the REQUEST, which is why the originator listens for 24.
- A volunteer's slot and its extra delay are worked out from its own callsign, the message id, and the number of times it has already answered this requester about this message. Two stations that land in the same slot for one search will almost certainly land in different ones the next time the originator asks.
- OFFERs go on one of the two announce channels the REQUEST did not use. The REQUEST's channel is left clear for the SELECT, so a late OFFER cannot cover the decision.
- If a volunteer's slot comes up while it is receiving or the channel is busy, it waits a short random time and looks again. Once the originator's 24-second search is over, nobody could choose the OFFER any more, so the volunteer drops it instead of sending it late.
With only a few stations able to help, that is all there is to it: the slot does not depend on signal strength, and the originator compares whatever offers arrive.
21.3.4 When many could help
Nine slots on two channels are plenty for three helpers and far too few for thirty. On a busy frequency, or in a large net, dozens of stations may hold the message and hear the destination. If they all drew a slot by chance, several would share each one and cover each other, and the originator might decode none of them. So a station that believes five or more could answer, itself included, does not draw by chance. It works out its own place in line.
- It starts in first place.
- It drops one place for every station that it knows hears the destination better than it does. It knows this from the hearing reports other stations send (Chapter 20) and from every OFFER it has overheard, since an OFFER states its sender's link to the destination. In a virtual net, on an equal signal the member with the lower member number is ahead.
- For the stations it hears and has no such report about, it cannot know. It draws its own place among them, from its callsign and the message id, as if they were all standing in the same line.
The place decides when it answers:
| Place in line | Answers |
|---|---|
| 1 and 2 | In the first slot, on different announce channels, so the two do not cover each other. |
| 3 and 4 | In the second slot, two seconds later, having listened to the first. |
| 5 and 6 | In the fourth slot, six seconds after the REQUEST. The third slot is left empty: that is when the originator's SELECT is on the air. |
| 7 to 16 | Two to a slot in the five slots after that, the last starting 16 seconds after the REQUEST. |
| 17 and later | Not at all, for this REQUEST. The station sets nothing aside for it and is free to answer the next one. An OFFER it is already waiting to send for an earlier REQUEST stays as it was and goes out in its own slot. |
A station waiting for its slot counts the OFFERs it hears for the same request. When it has heard two, it drops its own unsent: two offers are enough for the originator to choose from, and a third would only take air time. It also drops its offer when it hears the SELECT, as every volunteer does.
A station that has been selected is not distracted by further asks (Section 21.4 says what it does while it waits for the SELECT). From the SELECT until the relay is over, it answers no REQUEST for any other message, from anyone, the station that selected it included. While the body is on its way to the destination, a repeat REQUEST for the very message it is carrying does not stop it either: a sender whose wait for the RESULT ran out while a long message was still going out would otherwise cancel the transfer it is waiting for. A selected station that has not yet been given the body, or not yet started carrying it, answers a repeat ask for the same message afresh: the sender asking again is the sign that its hand-over never came.
The usual result is that the two best-placed stations answer and nobody else transmits. The later slots are there for the case where the best two did not hear the REQUEST: then the next in line speak, and the message still finds its relay in the same search. Where the volunteers cannot hear one another, none of them can count the others' OFFERs, so about two answer in each slot until the SELECT is heard. Once one relay to a destination has taken place, everyone who overheard the offers knows who hears that destination and how well, and the next search is ranked by signal instead of by chance.
Sixteen places are a limit on purpose. On a full frequency a hundred stations may each believe they could help, and a rule that gave every one of them a turn would put most of them in the same last slot, where they would cover each other and the originator would decode nobody. With sixteen places, at most two stations are meant to key in any slot, whatever the size of the crowd.
The price is paid when few can help. Take a destination that only three stations among a hundred can hear. Each of the three hears a hundred others, knows nothing about what they hear, and will usually draw a place past the sixteenth, so the first REQUEST may pass in silence. The repeats put that right. A station that has heard a REQUEST for a message go by with no OFFER, no SELECT and no RESULT knows that the crowd it feared did not answer. On the next REQUEST for the same message it draws its place from half as many, on the one after from a quarter, and so on down to the number of places there are. Within two or three requests the few that can help are answering. When many can help, somebody is heard on the first REQUEST and nothing widens.
One thing does change the slots: a virtual net. While a net is active on the frequency (Chapter 24), only eight of the nine slots are used, in two halves. A net member, or net control, volunteering for a message to or from a station on its own net's roster answers in the first four, so its OFFER starts within 6.4 seconds. Every other volunteer answers in the next four, between 8 and 14.4 seconds. The net's own stations are heard first, and a bystander who hears the SELECT in the meantime stands down. When many could help, each half ranks itself separately: members among the members in the first, second and fourth slots, everyone else among the others in the fifth, sixth and eighth. Each half therefore has six places, two to a slot, and a station that works out a seventh place or later stays silent for that REQUEST, opening up on the repeats in the same way.
21.4 Step 3: SELECT
When the first acceptable OFFER arrives, the originator starts a two-second clock to see whether a better one follows. When the clock runs out it chooses:
- A volunteer the destination itself says it hears beats one it has said nothing about, and both beat one it seems not to hear. The originator goes by the destination's HELLO adverts (Section 20.7). A volunteer the destination named as heard within five minutes of that advert counts as heard, however long ago the advert itself went out: a destination names each station only now and then. Otherwise, if the destination sent a HELLO advert in the last five minutes, the volunteer seems not to be heard: that advert left it out, or named it as last heard longer ago than five minutes. A destination with no HELLO advert in the last five minutes says nothing either way, whatever an older advert said; an acknowledgment or an OFFER from it names one station and is not a list of whom it hears. A volunteer that already failed to deliver to that destination for this originator also goes to the back, unless the destination has said since that it hears it.
- Then a volunteer that already holds the message beats one that would need it sent first.
- Among equals, the highest link estimate to the destination wins.
It then sends [presence]
An OFFER is a promise, so the volunteer protects it. For 5.2 seconds after its OFFER goes out, which is the two seconds the originator spends collecting plus a slot length each for the OFFER and the SELECT, the volunteer holds back its own outgoing traffic so that it is listening when the SELECT comes. In that time it does not answer a different station's REQUEST for a different message; a new REQUEST for the same message, or from the same requester, still gets a fresh answer. Once it is selected, the stricter rule under Section 21.3.4 applies until the relay is over.
21.5 Step 4: FOR, and the message itself
The chosen station now delivers the message as an ordinary transfer from itself to the destination. It chooses shortburst or bulk afresh, from the size of the message and its own link to the destination (Section 17.5.2), not from how the originator sent it. ACKs and repairs work on this hop as on any other. What was sent stays what it was: a relayed mail arrives as mail.
The one addition is a FOR frame, naming the originator and the original message id. It rides in the same transmission, right in front of the opener:
[presence]
The opening frame itself also carries a "carried for another station" flag (Table B.11). The FOR is a single frame and can be lost; a station that hears the flag knows the transmitter is not the author even then, so it never files the message, or hands it to a mailserver, in the helper's name.
If the SELECT arrives while the helper is receiving something else, or waiting for the answer to a transfer of its own, it holds the SELECT for up to 20 seconds and acts as soon as it is free. It also will not start while all three announce channels are reserved. If 20 seconds pass without a chance, it lets the job go, and the originator's own waiting (below) covers the rest.
21.5.1 At the destination
When the destination decodes a FOR, it makes a note: "the next message from this station is really from A, with this id". The note lasts 30 seconds, and is stretched when the helper's opening frame arrives so that it covers the whole transfer and a round of repair. A FOR with its probe bit set, in front of an ASK (Section 18.6.5), makes no note: nothing follows it to be filed, and the helper's data, if it is asked for, comes with a FOR of its own. The transfer also keeps the author and id the FOR named, from its opening frame on, in every mode, so a FOR heard meanwhile for another transfer, or a note that ran out, does not change who it is filed under. A transfer that arrived with holes is kept, and keeps that author and id, so a repair that completes it minutes later, which carries no FOR, is still filed as from A. When the helper sends the whole message again and the destination puts the two tries together, a kept part that has no author (the FOR in front of the first try was missed) takes the one the second try's FOR named. A longburst keeps what its first chunk's opening named through the later chunks, which carry no FOR, to the whole message.
The transfer is checked like any other, with the check the helper computed for its own hop. Once it passes, the destination files the message as from A, under A's original id, and uses the note once. It also works out what the id should be for A, itself and those contents, and logs a warning if the two differ. Last, it records that A can be reached through C. A client can list these learned routes; the station does not use them to choose a path.
21.6 Step 5: RESULT
When the destination acknowledges the transfer, or the helper's attempt fails for good, the helper tells the originator with [presence]
The RESULT goes out once, straight away. A lost RESULT leaves the originator's outbox saying "awaiting confirmation" for a message that did arrive, which is a wrong label and not a lost message; repeating every RESULT to guard against that would add air time to every relay on the net. Only if the helper cannot send the RESULT at all, for example because its operator switched it to listen only in the middle of the relay, does it store it. It then sends it the next time it hears the originator, and keeps it for up to one message lifetime (Section 22.4).
The originator accepts a RESULT only from the station it selected, and only with the right id:
- Delivered: the outbox row becomes sent.
- Failed: a failed relay says something about that path, not about the message. The row becomes deferred and the message goes back to looking for a way through (Section 21.7.1). It is marked failed only if its lifetime had already run out when the report came in.
21.6.1 How long the originator waits
The RESULT is not repeated on its own, but it can be asked for again. A helper remembers the messages it has delivered and seen acknowledged. If the originator, still showing "awaiting confirmation", sends another REQUEST for one of them, the helper does not offer and does not carry the message a second time. It answers with the RESULT, in one of the first two answer slots, and any station waiting to offer for that REQUEST stands down when it hears it. The helper gives this answer once for each delivery: two messages with exactly the same words have the same id, and a helper that kept answering "delivered" would report a new one as delivered without sending it. For the same reason the originator believes the answer only for a message it handed to that very station.
The originator, for its part, keeps quiet while the RESULT is due. A station that is transmitting hears nothing, on any channel, and an originator that started its own routine traffic the moment the helper's last data frame ended would talk over the destination's acknowledgment and the RESULT that follows it. So from the moment it hears its helper begin delivering, the originator holds its own routine transmissions: queued messages, its beacons, and net upkeep if it is net control. The hold ends when the RESULT is heard, or 6.8 seconds after the last frame of the delivery it decoded: five seconds for the destination's reply, 1.3 for the RESULT frame, and half a second of margin. A distress call is never held, nor is a reply the station owes somebody, nor its turn in a roll call.
After its SELECT, the originator waits up to 60 seconds for the RESULT, and once it hears its helper open the transmission to the recipient the wait grows to cover that whole transmission, its acknowledgment and one reply round (a ten-frame transmission gives about 136 seconds). But A can usually hear C, which is why C could be chosen, so A often overhears the relay happening: the FOR frame naming A, and each opening frame C sends to the destination, repair rounds included. Every time A hears one of those, the 60 seconds start again. It does not give up on a helper it can hear working.
If 60 seconds pass with no RESULT and no sign of progress, the message is not marked failed. The row becomes deferred, with the note "relay handed off; awaiting confirmation on next contact", and the station keeps a record on disk of which helper it is waiting on. A RESULT from that helper still settles the message, however late it comes. Meanwhile the station keeps trying, as described next.
21.7 When nobody volunteers
Sometimes the 24 seconds close with no OFFER at all. Nobody may hold a copy, or the stations that do may not hear the destination right now. Silence does not send the message again (Section 18.6.6): the row becomes deferred with the note "no relay volunteered yet; asking again after a growing wait".
For mail there is one more helper, and only on a repeat REQUEST. When a first REQUEST for the station's own mail has found nobody who can reach the destination, the repeats carry a second flag: "a station connected to the mailserver may ask for a copy". A gateway that neither holds the mail nor hears the destination may then answer with an OFFER marked "send it to me first", claiming the worst possible link, so that any station which really hears the destination is chosen ahead of it. Gateways answer in the later slots, ranked among themselves for the six places there. If one is chosen it is handed the mail, leaves it at the mailserver for the recipient to collect, and announces that it has taken it; the originator's row then reads "handed to callsign, which left it at the mailserver for pickup". A member of a station cluster with no internet of its own counts as such a gateway while a live member of its cluster has a working connection (Section 33.4): it passes the mail across to that member to deposit, and announces that it has taken it only once the deposit is confirmed. Gateways stay silent on a first REQUEST, so station-to-station delivery is always tried first. The flag is never set for encrypted mail, nor for mail from a station that is not registered at the mailserver.
21.7.1 Seeking: asking again later
A deferred message waits for the neighborhood to change. Nothing happens until the station has heard some station since it set the message aside, and until the message's retry gap has passed; the gaps grow from one minute to thirty-two (Section 22.6.1). The destination itself cuts the gap short: the moment the station decodes any frame from it, every message set aside for that destination is due, and if that try fails as well, the next gap runs to its end before another hearing can cut it short. Then:
- If the station has heard the destination itself in the last two minutes, it sends the message directly again, as though it were new: it chooses how to send, waits for the answer and, if there is none, asks for a relay.
- Otherwise it sends a fresh REQUEST, if any station other than the destination has been heard in the liveness window; if none has, the message waits for the next station heard.
A message set aside because its destination answered an ask with "not now" (Section 19.3.3) waits the same way, with one difference: its try is always a direct one, a fresh ask of the destination, and never a REQUEST.
Several stations whose searches came up empty would otherwise come due together at every step of the wait. So a station that hears another station's REQUEST for the same destination lets its own next ask go for that round: one search on the air serves them all.
Even a retry that is due does not go out at that instant. Every station that set the message aside after the same silent search comes due at the same moment, and every one of them would key together. So each station first waits a random time of its own, from none up to about 6 seconds on a small net and about 13.5 seconds when eight or more stations have been heard in the last 30 minutes, and counts it down only while the channel is clear. The same wait comes before a deferred message's direct re-send and before its fresh REQUEST, and after a stand-down like the one above. Only then does the station send.
The same two moves apply to a message that was handed to a helper whose RESULT never came. Should that helper deliver late after all, the destination recognizes the second copy as one it already has.
21.7.2 HANDOFF: when nobody holds a copy
A REQUEST sent straight after a direct attempt invites only stations that hold the message, provided a complete copy went on the air. If only part of it aired (a message sent in several parts stops after the first when the destination does not answer), or none of it did (a long message whose ask the destination never answered, Section 18.6.1), no bystander can hold it, and the first REQUEST already carries the wider invitation described next. A REQUEST sent later, from the deferred state, always sets the flag that widens the invitation: "nobody seems to hold this; a station that hears the destination may offer without a copy". A station that has heard the destination within the same half-hour window, passes the โ9 dB test and is set to allow bulk may then answer with an OFFER marked "send it to me first". Such an OFFER carries no length and no fingerprint.
If the originator selects such a station, it waits 2.5 seconds after its SELECT and then sends the message to it as an ordinary directed transfer with a HANDOFF frame in front, in the place a FOR would take. The HANDOFF names the real destination and the message id. The receiving station does not show the message to its operator. It stores it exactly as though it had overheard it, and then carries on as a normal relay: FOR, transfer, RESULT. The originator's 60-second wait for the RESULT starts when the helper acknowledges the hand-over.
A station selected this way waits 90 seconds for the hand-over to begin before it gives up its promise. If the hand-over fails, the originator treats the relay as failed, defers the message, and asks again later.
21.8 More than one hop, and other helpers
Nothing in the handshake is limited to one hop. If the helper's own transfer to the destination meets silence, the helper asks for a relay as it would for a message of its own, and waits for that second helper's RESULT. If the destination answers the helper's ask with "not now" (Section 19.3.3), the helper does not search and does not keep the message waiting: it sends a RESULT of failed, and the originator, which still holds the message, tries again on its own retry gaps. Whatever comes of it, delivered, failed or no offer at all, the first helper reports it to the original requester with a RESULT of its own and is done; it does not go on seeking for somebody else's message. Every station remembers the true author of a relayed message it overheard, so a FOR frame two hops down the line still names the original author and the original id. A helper's request for its own hop invites only stations that already hold the message: a station without it would have no way to be given it.
Three other kinds of helper can answer a REQUEST:
- A member of a station cluster. A cluster member that holds the message but cannot hear the destination may volunteer if another member's radio heard the destination within two minutes. It passes the message across the cluster's network link and that member transmits it. Such an OFFER claims 3 dB less than the other member's real figure, so that a direct volunteer with an equally good link wins (Chapter 33).
- Net control of a Virtual Net. For mail between two members of its net, net control keeps a mail that nobody else can carry and delivers it the next time it hears the member (Section 24.8). Net control never offers to carry a mail it keeps. When a relay that is carrying that same mail asks for help with its own hop of it, net control stays silent: the mail is already in its care.
- A mail gateway. A gateway that holds a copy of a mail can answer by saying it has put the mail in the recipient's mailbox on the mailserver. It waits three to four seconds first, and stands back if it hears a radio relay selected or another gateway's answer in that time. Among five or more gateways each takes a place in line, two answer per slot, and those past the sixth place stay silent (Chapter 26). A gateway that answers this way does not also offer to carry the mail by radio. A cluster member counts as a gateway when another member of its cluster has a working connection to the mailserver.
21.9 The operator's relay setting
Each station has a relay setting with four positions. A new station starts at allow bulk. Every launch of mLink also starts inhibited: the station keys nothing and offers to carry nothing until the operator turns the taskbar's Inhibit switch to allow transmitting (Section 7.3.4). The inhibit is not one of these positions and never changes the one saved here.
Listen only is the strong one. A listen-only station transmits nothing except a distress call its own operator declares: no beacons, no traffic of its own, and none of the frames in this chapter. It still hears, records and shows everything. The setting is looked at again right before each relay frame would go out, so switching to it in the middle of a relay takes effect at once. What that does to a message of the station's own depends on the moment:
- A message handed to the station for sending while it is set to listen only is marked failed.
- So is a message whose direct attempt has met silence at a moment when the station may not send the REQUEST.
- If the REQUEST has already gone out and the setting changes before the SELECT, the message is deferred instead, and the station asks again once it may transmit.
Relay off sends the station's own traffic normally but carries nobody else's. It never answers a REQUEST with an OFFER and never takes on mail as a courier.
Announce only carries only small messages. It volunteers only when the copy it holds is 160 bytes or less, the most one shortburst carries, and is not mail. It never volunteers without a copy, whose size it cannot know, and takes on no courier duty.
Allow bulk carries everything: short messages, bulk transfers, relaying without a copy, and mail courier duty.
The level is looked at when the REQUEST is heard and again when the OFFER would go out, so lowering it takes effect for the next OFFER. The two middle levels do not affect the repeating of a heard distress call, which has a switch of its own (Chapter 25).
21.10 What to remember
- The helper often already has the message, because every station keeps what it overhears. It volunteers only if it holds a copy from that requester to that destination, heard the destination within about half an hour (one heard more than two minutes ago stands further back), and has a link to it of at least โ9 dB. A long message whose ask went unanswered did not go on the air, so its first REQUEST also invites stations that hear the destination without a copy.
- REQUEST (destination and id), then OFFERs in nine slots two seconds apart on the other two announce channels (when five or more could answer, each ranks itself, two answer per slot, normally only the best two speak, and a station past the last place stays silent until a repeat), then a SELECT two seconds after the first good OFFER, then FOR and the message in one transmission, then one RESULT.
- The originator checks each OFFER's length and fingerprint against its own copy, prefers a station the destination says it hears and puts last one it seems not to hear or that failed to deliver there, then prefers a station that holds the message, and then takes the best link to the destination.
- The destination files the message under its original author. The originator holds its routine transmissions while the RESULT is due, waits 60 seconds for it, and starts again each time it hears the helper at work. A helper asked again for a message it has delivered answers with the RESULT and does not carry it twice.
- No offer, or no RESULT, means deferred. Later requests also invite stations that hear the destination but hold nothing; the originator sends such a station the message behind a HANDOFF frame.
Patience: How mLink Thinks About Time
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
What each outbox state and note means for the operator is in Chapter 8.
22.1 Why not just use a timeout?
Most networking software is built on timeouts: send something, start a stopwatch, and if no answer arrives before it runs out, assume the message was lost and send it again. On a wired network, where an answer comes back in milliseconds, that works well.
On a shared radio channel the answer has to win a turn on the channel like everything else. If the channel is busy, the answer is late, not lost. A stopwatch cannot tell late from lost, so it resends. The resend adds traffic to a channel that was already busy, so other stations' answers get later still, so their stopwatches run out and they resend. The more crowded the channel, the more of its time goes to copies of messages that were already on their way. That is how a busy net seizes up, and the name for it is congestion collapse.
22.2 Opportunistic and lazy
mLink's answer fits in three words: opportunistic and lazy.
- Opportunistic means a station acts because something happened, not because a clock ran out. It hears the destination again, so it tries the message again. It hears a gateway, so it offers the mail that was waiting for one. It hears somebody new, so it asks again whether anyone can relay.
- Lazy means that where a deadline does exist, it is a generous backstop, sized to run out only when nothing else happened first. When it does run out it rarely means "failed". Usually it means "stop waiting actively and set this aside until something changes".
22.3 Three kinds of waiting
Every wait in the station belongs to one of three kinds, and the kind decides how its number is chosen and what it means when it runs out.
| Kind | The question it answers | How it is set | Examples |
|---|---|---|---|
| Turnaround | When may I key? When is the other station ready to hear me? | Worked out from air time; exact; never shown to the operator | The pause before a reply (Section 18.4.1) |
| Reclamation | How long is this remembered fact still worth believing? | Generous; too long does no harm | "Heard recently" before offering to relay; how long a link measurement is trusted (Chapter 20) |
| Lifetime | How long do I keep working on this before I set it aside? | Generous, and restarted by evidence that someone is still working on it | The wait for a relay's RESULT (Section 21.6.1); the message lifetime below |
The kinds are kept apart because they go wrong in different ways. A turnaround that is too short makes a station key over the reply it is waiting for, so these are exact. A reclamation that is too long does little harm. A lifetime that is too short makes a station declare defeat while the answer was merely stuck behind other traffic, so a lifetime never pronounces failure by running out. It sets the message aside to be tried again.
22.4 The message lifetime
The longest wait is the message lifetime. For a message that has to ask for a relay it starts with the first REQUEST. It is used in four places:
- A deferred message whose lifetime runs out gets a new note in the outbox, such as "still seeking a relay; will keep trying", and a new lifetime. A chat message is the exception: it is marked expired and not tried again.
- A relay that reports failed sends the message back to waiting if lifetime is left, and marks it failed if none is.
- A relay that could not send its RESULT keeps it for one lifetime, in case it hears the originator again.
- A courier carrying someone else's mail toward a gateway (Chapter 26) keeps the job for one lifetime.
The lifetime is 15 minutes, or the contact horizon if that is longer; on the air the horizon is always the longer, at least 25 minutes.
22.4.1 The contact horizon
Several of these waits are promises of the form "I will deal with this the next time I hear that station". Such a promise is only worth something if it lasts until the next time can come around. On a big net a quiet station beacons only about once an hour (Chapter 20), and a 15-minute promise to act on next contact with it would lapse before contact could happen.
So the station works out a contact horizon: two and a half times its own current beacon interval. A quiet station's next beacon can be a whole interval away, later by its random variation, and later again when busy air moved it (Section 20.3.2); the rest is margin for the busy air itself. It is the same span as the "on the net" window, so a station that is still counted as present is still waited for. The beacon interval is ten minutes with up to ten stations heard and stretches in steps to an hour on a very crowded frequency, so the horizon runs from 25 minutes to 150. A lifetime is never shorter than the horizon.
22.5 Deferred is not failed
When a lifetime-kind wait runs out, the message becomes deferred, not failed. An empty search for a relay, a relay that was chosen and then never reported, a relay that reported failure, an addressee that answered "not now" (Section 19.3.3), mail on its way to the mailserver over the internet: all of these are deferred. The station still holds the message and is still working on it. A chat message whose whole lifetime has run out is the one exception: it is expired, as above.
Failed means the station has stopped. It is used when the station may not transmit (it is set to listen only, or the transmitter refuses), when the message cannot be built or is too big to send at all, and when the sending rules find no way to send it to that station (Section 17.5.5). Time passing does not, by itself, make a message failed.
22.6 Mail never expires
No clock ends a deferred mail. When its lifetime runs out, the station changes the note, starts another lifetime and carries on. This holds for every directed message that has reached the point of asking for a relay, and for mail waiting for a gateway, except one kind: a chat message. A mail that is waiting is never dropped for having waited. Setting it aside again and again does not stretch the lifetime: it is counted from the first request, so every later try carries what is left of the same lifetime.
A chat message gives up. Chat is short live talk, and an answer that comes an hour late is no longer part of the conversation. When the lifetime of a directed chat message runs out for the first time, the station stops trying: the outbox row becomes expired, with the note "chat message not delivered: no answer within its lifetime; not retried". Expired is not failed and not delivered: the message may well have arrived and only the acknowledgment was lost. "Chat" grays an expired message and offers "Send as mail", which opens the composer addressed to the same station with the same text, for you to review and send; the station never turns a chat message into mail by itself. The lifetime is the ordinary one above, 15 minutes or the contact horizon if longer; no separate chat timer exists.
A station with a working radio will sooner or later hear the destination, a helper or a gateway, and waiting costs nothing on the air: while the station hears nobody, a deferred message makes it transmit nothing at all.
Deferred messages are tried oldest first, even when newer traffic is queued behind them.
22.6.1 Retry gaps
Patience does not mean pestering. Two conditions must both hold before a deferred message is tried again:
- Something has been heard. The station must have heard some station since it set the message aside. If it has heard nobody, nothing has changed and trying again would be pointless.
- The gap has passed. After the first time a message is set aside, the station waits at least one minute. After the second, two; then four, eight and sixteen; and from then on thirty-two minutes. The count belongs to the message, so one stubborn message does not slow the others.
One thing ends a gap early: a frame decoded from the destination itself makes the message due at once, at most once per gap (Section 21.7.1). A message that has waited all afternoon therefore asks about twice an hour, not twice a minute. What a retry consists of, a direct send if the destination has been heard and otherwise a new request for a relay, is in Section 21.7.1. Mail waiting for a gateway uses the same doubling gaps between its tries. The separate slowing of new bulk transfers on a channel that shows collisions is in Chapter 19.
22.7 Across a restart
What comes back after the station program is stopped, or crashes, depends on how far each message had got:
- A message that was waiting to go or on the air comes back as a draft, with a note saying which. So does a mail whose deposit at the mailserver was under way. The station does not send drafts by itself; you decide. A station that came back from a power cut and at once re-sent a backlog could flood the channel.
- A deferred message stays deferred. The record of what it is waiting for, a relay's RESULT or a new search, is on disk.
- A RESULT that a relay could not send is on disk too.
- A distress call that was being repeated starts again without the operator entering anything (Chapter 25).
Anything the station held only in memory is gone: a relay search in progress, a partly received message, a promise to relay for someone.
22.8 Whose clock?
Every wait in this chapter is measured by one station, on its own clock, from things it observed itself: the end of its own transmission, the moment it decoded a frame, the last time it heard a callsign. None of them compares one station's clock with another's, so two stations whose clocks disagree by an hour relay for each other just the same. The few clock times that do go on the air are counted as Section 23.6 describes.
22.9 What to remember
- A stopwatch cannot tell "late" from "lost" on a shared channel, and retrying on a stopwatch makes a busy net busier. mLink acts on what it hears and keeps deadlines as generous backstops.
- Three kinds of wait: turnaround (exact), reclamation (how long a fact stays believable), lifetime (how long to keep working before setting a message aside).
- The message lifetime is 15 minutes or the contact horizon, two and a half beacon intervals (25 to 150 minutes), whichever is longer.
- Running out of time makes a message deferred, never failed, and a deferred mail never expires. A deferred message is retried, oldest first, when some station has been heard and its gap of 1, 2, 4, 8, 16 or 32 minutes has passed. A chat message is the exception: when its lifetime first runs out it is marked expired and not tried again.
- After a restart, queued messages come back as drafts, deferred ones stay deferred, and a distress call resumes.
Inside a Payload
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
23.1 The layers, from the outside in
A message is a letter in a set of envelopes. The outermost belongs to the transport: the frames, the error correction and the two-byte integrity check, which travels in front of the data (Section 18.2.3). Inside that, every size of message looks the same.
The sending station builds the layers in one place, in this order:
- it computes the integrity check over the message exactly as the client handed it over, before anything is added or squeezed (Section 18.2.1);
- it puts the kind byte in front of the message, unless the message is a chat line, which sends none;
- it compresses kind byte and message together, and keeps the result only if it is smaller;
- for the kinds that carry one, it puts the time byte in front (Section 23.3);
- it puts the envelope byte in front.
The receiving station undoes them in the opposite order, also in one place, for every kind of delivery: read the envelope byte and the time byte, decompress, take off the kind byte, verify the check over what is left, and hand the content to whichever part of the station handles that kind. Anything added at that one place, such as a new dictionary, reaches every kind of message at once.
23.2 The envelope byte
The first byte of every message is its envelope byte. It answers one question: how were the following bytes packed? It says nothing about what they are for.
| Bits | Name | Meaning |
|---|---|---|
| 0 | compressed | 0 = sent as it is; 1 = compressed with zstd. |
| 1 | reserved | Sent as 0; ignored on receipt. |
| 2 | text | 1 = a chat line. The message has no kind byte: what follows is the text itself. Set for chat and for nothing else; a net bulletin keeps its kind byte and leaves this bit clear. |
| 3 | time | 1 = one time byte follows the envelope byte, in the clear, outside the compressed part (Section 23.3). |
| 4 | free | Sent as 0; ignored on receipt. |
| 5–6 | dictionary | Which shared compression dictionary was used: 0 = none; 1 = the operator-text dictionary; 2 and 3 are unassigned. It means something only when the compressed bit is set. |
| 7 | extension | Always 0. A receiver that sees it set drops the message. |
So a chat message that compressed well with the text dictionary carries
compressed = 1, text = 1, time = 1, dictionary = 1: the byte
0x2D, then the time byte. A weather report that went out as it was, in the clear,
carries 0x00.
23.2.1 Room to grow, and failing loudly
Three bits are held back. Bits 1 and 4 are simply spare. Bit 7 is the extension bit: if mLink ever needs more bits, a set bit 7 will mean "a second envelope byte follows". A station today does not know what that byte would say, so it refuses the whole message instead of guessing.
The same rule covers the dictionary field. If a message names a dictionary the receiver does not have, decoding through another would produce plausible-looking nonsense, so the receiver drops the message and logs why. An operator sees a delivery that did not happen, never a mail full of scrambled words.
23.2.2 What protects the two wrapping bytes
The integrity check covers the message, not the envelope byte or the kind byte in front of it. Those two rely on the error correction that carried them, which rejects a frame it cannot repair (Chapter 11). Most damage to the envelope byte would show anyway: a wrong compressed or dictionary bit makes decompression fail or yield different bytes, and then the check does not match. A message that fails to unwrap is dropped and not acknowledged, like one that fails its check.
23.3 The time byte
A chat line, a data message, an applet message, a net bulletin and a set of map objects carry one more byte right after the envelope byte, saying when the sender wrote them. It is the low byte of a count of four-second ticks since the mLink epoch (2020-04-20 UTC), so it tells one moment from another within a window of 256 ticks, 17 minutes 4 seconds. Mail and net standing orders carry a full date inside the mail instead (Section 26.2); mailbox control, the net roster, bundles and internet answers carry none.
- The sender takes the tick once, when the message is first made ready for the air, and keeps it with the message. A retry, a message put back in the queue before it was keyed and a relay's repeat all carry the same byte, so the byte names the message, not the airing.
- Two messages from one station never share a tick: when the clock's tick is already used, the station takes the next one.
- A station whose clock reads earlier than the date its software was built sends no time byte, because a wrong time is worse than none.
- A relay repeats the byte it received, and sends none for a message that arrived without one.
- The byte is outside the integrity check, which does not change. On a shortburst each frame's own check protects it; in a bulk transfer it rests on the frame's error correction, as the envelope byte does.
23.3.1 What the receiver does with it
The receiver reads the byte against its own clock: the message was written at the latest tick that ends in that byte and is not more than 8 ticks (32 seconds) ahead of the receiver's clock. The few ticks of slack take in a sender whose clock runs a little ahead, or one that moved to the next tick because it had just used this one. That reading is only as good as both clocks, and field stations' clocks are often off by seconds or minutes, so the receiver trusts it only where it helps and cannot mislead.
- Where a line sits. A line is put where it was written only when two things hold: it arrived 30 seconds or more after it was written (a retry, a line set aside and aired later, a relay's carry), and the sending station's clock is known to agree with this one. Every other line sits where it arrived. A station's clock is taken to agree when at least two of its own fresh stamps heard in the last hour read within 10 seconds of this station's clock, and no newer pair of its stamps reads off. What a stamp reads is the difference between the two clocks, plus the line's time on the air and its wait to go out (from 2 to about 12 seconds, more for each retry), plus up to 4 seconds of the tick's rounding. So the rule holds three promises. A line that arrives within 30 seconds of its stamp always sits where it arrived: a quick reply from a station whose clock is a few seconds off sits below the line it answers. No line from a station is put where it was written until two of its stamps have read within 10 seconds of this station's clock, so a station whose clock is more than 10 seconds behind never agrees, and its slow lines do not climb above the lines they answer; and when this station's own clock is off, the stamps of good clocks read off, nothing agrees, and every line sits where it arrived. And agreement is taken back when the sender's clock goes wrong: two of its newer stamps that read off by about the same amount (within a minute of each other), heard at least 2 minutes apart with no agreeing stamp between them, end it. Until then its late lines are still put by their stamps; from the line that completes that pair on, its lines sit where they arrive, until two fresh stamps of it agree again. Lines that were set aside together and go out in one flush arrive seconds apart, so they do not take agreement back, and they are put where they were written. The receiver decides once, as the line arrives, and keeps the answer: a line put where it was written carries that written time and a small mark that says when it arrived (the screens are in Section 7.5.5); every client and applet gets the same. When this station's clock is set or checked, what it knew of other clocks is forgotten, and lines sit where they arrive until stations are seen to agree again. A line that sits where it arrived, heard or your own, never sits earlier than the newest line already placed that way, across a restart too: after the clock is set back, new lines still follow the older ones until the clock catches up (a clock that read more than an hour ahead is not followed). This is a yes or no about agreement: nothing here corrects any clock.
- A retry or a new message. The same sender, the same integrity check and the same tick is a retry: it is acknowledged and not shown again, however late it comes, for 16 minutes after the first copy was heard. Anything else is a new message: the same short line sent twice on purpose has the next tick, so both show. After a restart the station takes back from its store the messages it heard in the last 16 minutes, each for what was left of its 16 minutes.
- A message with no time byte (mail, the net roster, bundles, internet answers, and anything from a station whose clock reads before its build date) cannot tell a retry from a second send. The same bytes from the same sender within a minute of the last copy are taken for a retry: acknowledged, and not delivered again. Mailbox control is the exception: every copy is handled, because its requests are asked again on purpose (a registration after a refusal, a second mail check, a fetch) and so are the identical answers to them, and handling one twice does no harm. A gateway that just delivered a mail remembers it for 5 minutes, so a repeated mail check that comes before the mail server has the mail marked delivered neither airs it again nor lists it as unread.
- Map objects. A set of map objects replaces the one the station keeps only when it is not older. Sets from a station whose clock agrees are compared by when they were written, whether or not they came late (lateness is about where a line is shown, not about which set is newer), so a late copy of an earlier set leaves the newer picture alone. Sets from a station whose clock is not known to agree are taken in the order they arrive, and there a late copy of an earlier set does replace a newer one. A deletion is judged and kept the same way, with its time, for one window of the byte (17 minutes 4 seconds, after which no stamp can name an earlier time): a set older than the deletion does not bring the object back, one that is not older does (its author made it again), and a deletion older than the set the station keeps does not remove it. A mailed set the operator imports is judged by when its mail arrived.
- A small time signal. Every first copy heard straight from its author was stamped a tick or two before it arrived, so the station compares the stamps it hears with its own clock and tells the operator when several stations agree that it is off (Section G.5.4).
One byte cannot tell 12:00 from 12:17. A line delivered more than 17 minutes after it was first aired, from a station whose clock agrees, is placed up to 17 minutes later than it was written. A retry heard more than 16 minutes after the first copy shows twice, and so can one heard sooner on a very busy channel: the station remembers at most 256 messages, so with more than about one message every 4 seconds it forgets sooner. Both are rare.
23.4 The payload kind byte
Once any compression is undone, the first byte of what remains is the payload kind. Where the envelope says how, the kind says what, and the station hands the rest to the part of itself that knows that format.
| Value | Kind | What the content is |
|---|---|---|
| 0x00 | reserved | Never sent. A message that shows it is dropped. |
| 0x01 | text | A chat message: what you type into Chat. It sends no kind byte; the envelope's text bit stands for it. |
| 0x02 | opaque data | Arbitrary bytes a client program asked the station to send, delivered untouched. |
| 0x03 | internet response | The answer to a request for internet data, such as a weather report (Chapter 29). |
| 0x04 | Subject, recipients, body, attachments (Chapter 26). | |
| 0x06 | map overlay | Map objects: points, lines, areas (Chapter 30). |
| 0x07 | mailbox control | Mailbox requests to a gateway out of direct range, sent as a message so that they can be relayed, and a gateway's list of waiting mail: each is one operation, named by the first byte. |
| 0x09 | mail bundle | Several whole mails for the same destination in one transmission. |
| 0x0A | net roster | A virtual net's whole roster, or net control's list of the mail it keeps for members who are off the air (Section 24.8), sent by a member to a station that asked for it (Chapter 24). The first byte says which: 1 the roster, 2 the held-mail list. |
| 0x0B | net bulletin | Text to a virtual net that every member must have. It is kept and shown as text. It keeps its kind byte. |
| 0x0C | net standing orders | One mail holding a virtual net's standing orders. It has its own kind so that none of the ways ordinary mail is passed along acts on it. |
| 0x10 | applet message | A message from an applet to the same applet at other stations, such as a Checkers move. The client hands it to that applet and never shows it as chat (Section E.10; layout in Section B.17). |
The values 0x05, 0x08 and 0x0D are unassigned, and so are 0x0E and 0x0F and everything from 0x11 to 0xFF. A station that receives a kind it does not know logs it and discards the content. The bytes arrived correctly, so the transfer is still acknowledged, but nothing unreadable is put in front of the operator.
23.4.1 Why two bytes and not one
The envelope is about transport: whether to decompress, whether a time byte follows, whether this is a chat line. It has to be readable before anything else is done. The kind is about the application: which part of the station gets the content. Keeping them apart leaves the envelope its spare bits and gives the kind 256 values of its own. The most common message, a chat line, saves the kind byte altogether.
23.5 Compression
A byte that never has to be transmitted is the cheapest byte there is, so every message gets a chance to be made smaller before it goes out. mLink compresses with zstd (Zstandard), a widely used, openly published compressor, run at its strongest setting. That costs a fraction of a second of computing on the sending side, which is nothing next to the seconds of transmitting it saves, and the receiving side decompresses just as fast whatever setting the sender used.
23.5.1 Compressed only if smaller
A compressed stream carries a few bytes of its own bookkeeping, so a very short message, or one that is already dense like a photograph, can come out larger. So the sending station tries and compares:
- the content as it is;
- the content compressed with plain zstd;
- for chat messages, mail, net bulletins and standing orders only, the content compressed with the shared text dictionary (below).
It sends the smallest. A compressed form wins only if it is strictly smaller than what it would replace, and the envelope byte records the choice.
23.5.2 The shared text dictionary
A compressor learns the patterns of a message from the message itself, and a typical radio message, a few dozen to a few hundred bytes, is over before there is anything to learn. A compression dictionary gives both ends a head start. It is a block of typical content prepared in advance and built into every station, so the compressor can say "the next 30 characters are the same as this stretch of the dictionary" from the very first byte.
mLink has one dictionary today. It is 8,192 bytes, made from about 420 sample amateur messages: net check-ins, contact exchanges, formal traffic in the National Traffic System style, position, status and welfare reports, search-and-rescue updates and short mail bodies.
The difference is large. A 257-character net check-in (callsign, grid, power, antenna, a welfare report, weather, "73") comes to about 195 bytes with plain zstd and to about 115 with the dictionary, well under half its typed size. A 35-character "QSL, see you on the net tonight. 73" does not get smaller either way, so it goes out as it is. A mail that is mostly an attachment gains nothing from a text dictionary, and then plain zstd or the plain bytes win the comparison: the dictionary can never make a message larger.
23.5.3 Size limits
- How a message is sent is decided after wrapping. Whether it goes as a shortburst or a bulk transfer, or fits at all, is judged from its wrapped size (Section 17.5.2).
- A receiver will not expand a message past 1 MiB. Decompression stops, and the message is dropped, if the content would come to more than 1,048,576 bytes. That is the same limit a station applies to a message handed to it for sending, so anything a sender accepts a receiver will open, and it keeps a small damaged or hostile stream from growing into a very large one.
23.6 The mLink time epoch
Some fields carry a time: when a weather observation was made, or "mail since this moment" in a mailbox check. Every such time on the air is counted from one fixed instant, the mLink epoch: 2020-04-20 00:00:00 UTC. Most fields count whole seconds in 32 bits.
Most computer systems count from 1 January 1970. Counting from 2020 buys two things. A 32-bit count of seconds lasts about 136 years, so it runs out in about 2156 instead of 2106, with no extra bytes on the air. And the numbers are small today, near 200 million late in 2026 against 1.79 billion, which leaves room for narrower fields where a time only needs a short range.
A time before the epoch is sent as the epoch itself. The epoch lives only on the air, and in the signed requests a station sends to the mailserver (Chapter 27). In the station's database and logs, and in everything it tells its client programs, times are ordinary Unix milliseconds. The station converts when it builds or reads a field, so no operator and no client program has to know the epoch exists.
23.7 The rule: payload details ride with the payload
Look over the announce frames (Section B.2) and a pattern shows. Every one is about who, when or what happened to a transfer. None says what a message is about or how it was packed. A chat message, a mail, a map object and a weather report travel the same way: an opening frame such as an opener (Section B.8), some data frames, an ACK. What tells them apart is inside the message. That is a rule, and it has three reasons.
- The frame space is small. There are sixteen families of announce frame with sixteen subtypes each, and the family that controls transfers already uses twelve of its sixteen. A subtype spent on "weather report" is room the protocol cannot get back.
- Everything in a message gets the protocol's services. A new kind of data carried as a message is acknowledged, repaired, relayed and compressed without any change to the frames. A new announce frame gets none of that unless someone builds it again.
- The protocol stays simple. A station that does not understand a payload kind still receives, checks and acknowledges the message; it just cannot use the content. A station that does not understand an announce frame drops it, and the exchange around it stalls.
The test for something new is simple. If stations need it to decide who gets the bytes, when to transmit or what to repair, it belongs in an announce frame. If it only describes what the bytes are or how to read them, it belongs with the bytes: in the envelope byte if any kind of payload might want it, in the kind byte or the content if not.
23.8 What to remember
- Every message starts with an envelope byte (how it is packed), then a time byte on the kinds that carry one, then a kind byte (what it is), which a chat line leaves out. The kind byte sits inside the compressed part; the time byte does not.
- A message is compressed with zstd only if that makes it strictly smaller; text and mail also try a built-in 8 KiB dictionary of typical amateur traffic.
- An unknown dictionary and a set extension bit are refused, never guessed at. A receiver expands nothing past 64 KiB.
- Times on the air count from 2020-04-20 UTC; everything off the air uses ordinary Unix time.
- Details about a payload ride with the payload. Announce frames carry only addressing, timing and the state of a transfer.
Virtual Nets
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
The Nets window and its buttons are in Chapter 7. This chapter is about what the stations do.
24.1 What a virtual net is, and why have one
mLink's ordinary channel has no net control and needs none
(Chapter 1). A
virtual net is an optional
layer on top. An operator opens a net under a name, such as
TETON or MARITIME, and their station becomes the
net's net control. Other
operators ask to join and are given member numbers. The net can then do
three things a crowd of peers cannot: know who is present, by a roll call in
which every member answers in its own numbered slot; get a bulletin to
everyone and know it arrived; and put its own traffic first when help is
asked for.
The layer is opt-in in both directions. A station that never opens or joins a net works exactly as it would with no net on the frequency. Members still send ordinary messages to each other by callsign, and net control is not in that path: if it disappears, only the roll call and the bulletins wait for a new one. Net control carries no authority either. It keeps time, keeps the list and calls the roll; it cannot stop anyone transmitting, and any station may open a net under any name. There is no net without a name: every net has a name and a net control, and a station never becomes net control of a net nobody named.
Any number of virtual nets may share a frequency as long as their names
differ. Two nets that both call themselves TETON are treated as
one net that has to sort itself out
(Section 24.10).
24.1.1 Who is who
A station's part in a virtual net is worked out from what it has heard and done. It is never a separate setting.
| Part | Who | What it does for the net |
|---|---|---|
| owner | The station that opened the net, was handed it, or took it over | Its net is the one that continues when a split heals. It ranks the alternates and sets the period and the net type. Usually it also runs the net. |
| net control | The station running the net: the owner, a member the owner asked to run it, or a stand-in | Sends the heartbeat every cycle, keeps the roster, calls roll calls, sends bulletins. |
| stand-in | A member that took over as net control while the owner was out of earshot | Everything net control does; gives the net back when it hears the owner. |
| alternate | One of up to three members the owner has ranked | Goes first, in rank order, when the net needs a stand-in. |
| member | A station that holds a member number | Answers roll calls, passes along joiners net control cannot hear, can take over as net control. |
| bystander | A station that hears a virtual net but is not in it | Nothing. It keeps off the announce channel a roll call is using and lets the members answer first when help is asked for. |
Any station that decodes a virtual net's heartbeat starts following that net as a bystander. A station follows one virtual net at a time. A station set to listen only follows the net and sends nothing.
24.2 The net's frames
What a virtual net sends for its own upkeep is ordinary 11-byte announce frames of one family, NET (Section 16.3), thirteen in all. Net control sends the HEARTBEAT and the CLOSING, the ROSTER entry, the ROLL and four kinds of TALLY. A member, or a station that wants to be one, sends the CHECKIN, the JOIN, the JOIN THROUGH (asking for somebody else) and the ROSTER REQUEST. The owner sends the INSTRUCT when another station runs its net. The bit layouts are in Section B.14.
None of these frames is acknowledged with a frame of its own. A station knows its request worked when it sees the result: a joiner is in when it hears itself on the roster.
24.2.1 Frames that travel alone
Nine of the thirteen ride behind the sender's PRESENCE (Section 16.5). Four do not: the CHECKIN, a station's own JOIN, the ROSTER REQUEST and the INSTRUCT carry the sender's full callsign inside the frame and go out as one frame with nothing in front of it. The reason is air time: in a roll call every member sends the same short answer in turn, and with the callsign inside each answer is one frame of 0.66 s instead of two. The callsign in the frame is the station's identification (Section 16.8).
24.2.2 Name, key and tag
Only the heartbeat carries the net's full name. The other frames identify the net in one of two shorter ways:
- The key is 32 bits made from the name: the packed name itself for up to six characters, a fold of it for seven or eight. The ROLL and the two JOIN frames carry it, because they make a station act on the name alone: a ROLL makes members key up, and a JOIN makes net control list somebody. A JOIN also carries the member number it asks for, folded into the key's top seven bits, so only its low 25 bits are compared there. A name that differs only in its last characters is never taken for this one. A few dozen other names of up to six characters do match it, always, though nearly all are strings nobody would choose; a JOIN from such a net would put a member on the roster that never answers the roll call, until net control drops it for silence.
- The net tag is five bits, a fixed fold of the name that every station works out the same way. The ROSTER entry, the ROLL, the CHECKIN, the tallies, the ROSTER REQUEST and the INSTRUCT carry it.
Five bits give 32 values, so two nets on one frequency can easily share a tag. That is fine, because the tag only narrows a frame down; something else always decides whether the frame is acted on. A check-in counts only when its callsign is on the station's own roster under the number the frame claims. A tally and a roster entry count only from the station's own net control. A roster request is answered only when the asker is on the answering member's roster. An INSTRUCT is obeyed only from the owner.
24.3 Opening, naming and joining
24.3.1 Net names
A net name is one to eight letters and digits, upper-cased. A message to
a net is addressed to 0 followed by its name
(Section 16.7), so eight is the
most that fits a nine-character addressee, and the names
CQCQCQ and CQQTH are refused because they would
spell the all-stations and area addressees.
24.3.2 Opening a net
The station that opens a net becomes its owner, its net control and member 1, and sends its first heartbeat as soon as the rules for a beacon allow. There is no check that the name is unused: if a net of that name is already on the frequency, the two settle it between themselves.
The opener chooses two things, and both ride in every heartbeat. The cycle period is how often the heartbeat goes out: 300 s unless the opener picks another value from 150 to 600 s in steps of 30 s. Every wait in this chapter that is counted in cycles is timed by each station from the period it hears in the heartbeat. The net type is Casual or Safety Critical (Section 24.9.9).
24.3.3 Joining
A station asked to join a net waits until it hears that net's heartbeat, then sends one JOIN frame, alone, with its own callsign and the net's key. Net control lists the joiner and answers with the joiner's roster entry on its own within seconds, after its roll call if one is running; the entry rides net control's later heartbeats too.
If the entry does not come, the joiner asks again, more slowly each time: one cycle after the first JOIN, two cycles after the second, and so on. One try comes early: a joiner that has heard no entry for itself 13 seconds after net control was free to answer (13 seconds after the JOIN, or after the roll call when the JOIN went out during one) asks once more then, after its usual random delay. That try counts as the second. After six unanswered JOINs it stops and tells its operator. A standing join is remembered across restarts and starts the six tries again whenever the net is heard.
Each of these gaps, and further on each gap between re-sendings of an INSTRUCT, a member's bulletin and the owner's standing orders, also carries a random extra of up to 9 s on a small net and 18 s on a large one, so that members sent back to ask by one frame do not all key in the same instant a cycle later.
A member can ask for you. A member that decodes a JOIN
from a station not on the roster keeps a note of it, and if the joiner is still not listed one cycle later (net
control did not hear it) the member passes the request along as
[presence]
JOIN and JOIN THROUGH carry the same three things: the joiner's callsign, the net's key, and the member number the joiner asks for (none, for a newcomer); the frame type says whether net control heard the joiner directly. A station listed from a JOIN THROUGH is marked heard through another member, and the mark comes off if its own JOIN gets through later. A joiner that hears its request passed along waits one cycle from that moment before it sends another JOIN.
Joining a net you cannot hear. A station in net control's skip zone never hears the heartbeat. When its operator asks it to join anyway, it listens for one cycle and then sends its JOIN regardless, on the same thinning schedule, for a member to pass along. In a Safety Critical net that member then speaks for it; in a Casual net it is listed but hears nothing back.
24.4 The roster and member numbers
The roster is net control's list of members. Each entry is a callsign, a member number and a few marks: listed on another member's word (heard through), did not answer the last roll call, has left the net, is the net's owner, is the owner's first, second or third alternate.
Numbers are handed out in order: the opener is 1, and each new member gets one more than the highest number on the roster, unless its JOIN asks for a number it already held under a stand-in (see Section 24.9.3). They are never reused: a member who leaves keeps its number, marked as left, and gets it back on return. The limit is 127, because a member number is seven bits and zero means "no number"; a joiner beyond that is not listed.
24.4.1 How the roster reaches the members
Up to three ROSTER frames ride behind each heartbeat, in the same transmission. A new or changed entry goes out with the next heartbeat, then the entries follow in rotation, so a newly listed member normally hears its own entry at the next heartbeat and a net of a dozen goes round in about five. Each time the rotation starts a new round, up to two alternates' entries lead it, in rank order, so the stations that may stand in are known first; they never take all three places. A full net of 127 would take 43 heartbeats, which is why a member has two faster ways to fill in its copy, described below.
Every change to the roster moves its edition on by one. The edition counts from 1 to 15 and starts again at 1; the heartbeat, every ROSTER frame and the ROLL carry it. Stations only ask whether two editions are the same: a heartbeat whose edition differs from a member's copy says changed entries are still to come round. Because the edition starts again after 15 changes, an entry heard 15 editions ago carries the same edition as a current one. So each member also counts, at home, every change of edition it hears in net control's entries, and two entries of one edition are the same only if that count has not moved between them: a goodbye a member heard first-hand gives way to net control's later entry for that station, even 15 editions on. The count is never sent. A member's edition only moves forward. An entry heard from net control itself always carries the edition net control holds now, so it moves the member on however many changes it missed. An entry another member says again carries the edition of that member's own copy: from it, a step of one to seven editions is news, and an entry of an edition the member has already passed is old news and is not taken, and neither is a roster copy of such an edition. The heartbeat also carries the highest member number on the roster, so a member whose copy holds fewer rows can see it is short. A listed station that sends JOIN again has not heard its own entry yet, and net control moves that entry to the front of the rotation.
The owner's entry rides in the rotation marked as the owner's, whichever station sends the roster, so that every copy says whose net this is. A stand-in's claim carries no roster entries (it is sent before the station is net control); its own entry leads its first full heartbeat after the claim and then rides in the rotation like any member's. A member that never heard the stand-in listed keeps its own number from the claim on, and learns the stand-in's number from that first full heartbeat.
Net control keeps its roster across a restart. It comes back listening: for two cycles it sends nothing as net control. If it hears nobody running the net in that time, it takes the seat again under the term it held, with the edition moved on by one. If the members seated someone else meanwhile, it follows that station and asks to be listed as a member; an owner takes its net back only when its operator says so (Section 24.9.3). A member does not keep its copy: it comes back with its net, its number and the owner's callsign, and collects the rows again from the air.
24.4.2 Rows learned from a roll call
A check-in carries a callsign and a member number, which is one roster row. A member following a roll call of its own net adds a row when it decoded the ROLL, the check-in is in a numbered slot inside the range called, it has no row under that number or for that callsign, and the frame arrived when that number's slot says it should. The timing is the evidence the tag alone is not. Net control never learns rows this way; its list is the original.
24.4.3 Asking a member for the whole roster
A station that wants the whole list at once sends one ROSTER REQUEST frame, alone: its callsign, the net tag, the number of the member asked (zero for "any member"), and whether it wants the roster, the standing orders (Section 24.7.3), or both.
Asked of "any member", the members who heard the request line up by member number, lowest first, since the longest-serving member is likeliest to hold a complete copy. Each place in line is three seconds, long enough for those further back to decode the opening frames of an answer, and a member that hears another member begin a transmission to the asker stands down. There are eight places; members further back share the last, and a member whose path to the asker is too weak for a bulk transfer (below +3 dB SNR@3k, or unmeasured) goes behind all eight. A member whose place comes up while the channel is busy or a roll call is running looks again shortly. A member asked by number answers straight away.
The answer is the whole roster as one ordinary directed, acknowledged message with its own payload kind (Chapter 23): the net's name, the edition, the owner's callsign and one eight-byte row per member, about 110 bytes for a dozen members and a kilobyte for 127.
The asker adds the rows it lacks. A row it already holds is replaced only when the copy is of the same edition as the entries the asker last heard from net control, because an entry heard from net control outranks another member's copy of it; for the same reason a number it holds under a different callsign stays. Its own row is never taken from a copy.
If no answer comes, the station asks again by itself, three times at most: 90 s after the first request and 180 s after the second, giving up 360 s after the third.
24.5 The heartbeat and net control's cycle
The heartbeat is net control's cycle frame. Once every cycle period, give or take up to a fifth, net control sends
[presence]
on any free announce channel: the heartbeat, up to three roster entries and up to three HELLO frames (Section 20.7.1), a little over five seconds of air at most. It goes out under the rules of any beacon: the station is idle, an announce channel is free, no roll call is running, and the beacon's random wait has passed (Section 19.8.1). It also restarts the station's ordinary beacon timer. The spread in the period keeps two stations that send heartbeats for one net without hearing each other from landing on top of each other cycle after cycle.
One heartbeat frame carries the net's full name, its cycle period and its type; the roster edition and the highest member number; and:
- the term, a count of net controls round a circle of sixteen values: a station that takes over uses one more than the term it last heard;
- the live count: the members net control has heard lately, plus itself (Section 24.10.1);
- whether this net control is a stand-in, and whether it runs the net by the owner's wish;
- the member number of the owner's first alternate, "who is in charge if I disappear";
- whether this is net control's heartbeat said again by a member (Section 24.9.8).
A closing heartbeat has the same shape. It says whether the whole net is closing or only net control is stepping down, and in place of the first alternate it names the member the seat is handed to.
24.6 Roll call, check-ins and the tally
In an mLink roll call, net control sends one frame and every member answers in its own numbered slot, one after another.
24.6.1 The call and the slots
Net control sends [presence]
A slot is 1.2 seconds, always, and is carried on no frame: 0.66 s of check-in and a margin for each member timing the slots from its own decode of the ROLL. The first slot starts 0.4 s after the ROLL is decoded, member n's slot starts (n − first) slots later, and the member keys its check-in exactly at the start of its slot. Net control, which cannot decode its own frame, counts from the moment its transmitter reports the ROLL sent.
Only two things keep a member out of its slot: an exchange of its own that is still under way, or a distress exchange (Chapter 25). A member held up that way may still start up to half a second into the slot. Later than that the frame would run into the next slot, so it lets this one go and gets a second try in the tail.
24.6.2 The check-in
A check-in is one CHECKIN frame, alone, in the member's slot. It carries the sender's callsign; the net tag and which roll call it answers; the sender's member number (zero means "I hold no number yet: list me"); how many slots come after this one, 0 to 30 exactly and 31 for "31 or more"; one other member's number that this station heard; and six marks:
- an operator is present; has traffic for the net; needs help reaching someone;
- this is the station's last check-in: it is leaving;
- has the bulletin, in a receipt roll only (Section 24.7.2);
- out of turn: this check-in is not in the sender's own numbered slot.
Vouching up front. In its numbered slot, a member puts in the heard field the number of the last member it heard check in before it. Net control then counts that member as present even if it missed the check-in itself, and marks it heard through. A frame net control lost in a one-second fade is repaired by the very next check-in, and the roll call often needs no tail at all.
Finding your slot without the ROLL. A member that missed the ROLL places the roll call from a check-in whose callsign is on its own roster under that same number and which is not out of turn. The sender's slot began about 0.9 s before the decode finished, so its own slot is (its number minus the sender's) slots later, and the last slot is the sender's plus the count that comes after. If its own slot has gone by, it waits for the tail.
24.6.3 The tally and the tail
Half a second after the last slot, net control sends a TALLY behind its PRESENCE: who was called and not accounted for. A member is accounted for if net control heard its check-in or another member named it.
One frame has 64 bits for the answer and a net can hold 127 members, so there are four kinds of tally:
- Missing list. Up to nine missing numbers; an empty list means nobody is missing. This is the tally of nearly every roll call.
- Heard list. If more than nine are missing but nine or fewer were heard, the heard numbers; every other number called is missing. It is used only when every number in the range belongs to a member still in the net.
- Low map and high map. Otherwise one bit per member
number, set for a missing one: numbers 1 to 64 in the low map and 65 to 127
in the high map. A map is sent only if somebody is missing on its side. When
both are needed they go as
[presence]
[low map] , and the first says one more follows.[high map]
Every tally also carries the net tag, the roll call it belongs to, a final mark and the length of the tail that follows. With nothing missing, the TALLY is final and the roll call is over. Otherwise there is a tail in two parts:
- Second tries. One slot for each member named missing, in number order. A missed check-in is nearly always a fade, so the station most likely to fix it is the missing member itself a few seconds later. Its second check-in is marked out of turn.
- Vouch slots. Then one slot for every number called, in order. A member that decoded a missing member's check-in itself, and has not heard anybody else speak for it, says so in its slot: one check-in, out of turn, with the missing number in the heard field.
Net control also counts a listed member as present when, during a drill that does not end the roll call, it decoded that member's own rebroadcast of the drill call. The member was busy sending it when its second try came due. Net control does this only in its own roll call and never delays the rebroadcast for it.
After the tail net control sends the final TALLY, and the "did not answer the last roll call" marks on every station's roster follow it.
A member that placed the roll call from a check-in does not know which number was called first, so it can take its second try but cannot place a vouch slot or read a heard-list tally.
24.6.4 Joining while a roll call runs
A station that has asked to join does not wait for the roll call to end. It has no number, so the roll call does not hold it: like any bystander it keeps off the one announce channel the roll call runs on and sends its JOIN on one of the other two, through the same random delay as any frame it chooses to send. Several joiners that heard the same ROLL each draw their own moment, so they do not all key together when the channel clears.
Net control hears the JOIN on the other channel while it listens to the check-ins and lists the joiner at once. It is a member of its own roll call, so it says nothing else until the roll call is over; the joiner learns its number from net control's answer or its next heartbeat after that. A JOIN that net control misses (it was sending the ROLL or a TALLY at that moment) is asked again soon after the roll call (Section 24.3.3).
On FM there is only one announce channel and only one station can be heard at a time, so a joiner keeps off the air until the roll call is done, net control's final TALLY included, and then sends its JOIN (Chapter 34).
24.6.5 The hold
The stations that hear a roll call stand back from it. How far depends on who they are.
A member, net control included, holds all its routine traffic on every channel from the moment it decodes the ROLL: new messages, beacons, JOINs and other voluntary frames wait. Replies to exchanges under way and anything to do with distress are not held. From the ROLL the hold covers the numbered slots, the tally and the longest tail this roll call could have, two more slots per number called; a TALLY with numbers missing says how long the tail really is. The hold ends at the final TALLY, or when the time runs out. A member that placed the roll call from a check-in holds too.
Everyone else (a bystander of this net, a station in another net or in none) keeps off the one announce channel the roll call runs on, by treating it as reserved (Section 19.2), and carries on as usual on the other two and in the bulk region. Such a station need not have heard the ROLL. Every check-in says how many slots come after it, so a station that decodes any check-in, of any net, keeps that channel clear until those slots and the tally behind them are over, and each later check-in corrects the estimate. A TALLY with numbers missing keeps it clear through the tail.
A roll call of a twelve-station net (net control and eleven members) with nobody missing takes about 17 seconds from the first frame to the end of the final TALLY. One member missing adds a tail of twelve slots and a second TALLY, about 17 seconds. A member that decodes that ROLL and nothing after it holds for about 45 seconds.
Distress beats the roll call: a station that hears a distress call, or raises one, abandons the roll call and drops the hold at once. A drill does not: the roll call goes on, and a decoded emergency frame holds a member's turn only for as long as the burst lasts, which the roll call's clock waits out. A turn lost that way counts as missed and is given again in the tail. And outside roll calls, everyone who follows a net listens to a bulk transfer to or from one of its members for its whole length (Section 19.7).
24.7 Messages and bulletins to the net
24.7.1 A chat message to the net
Any station can address a message to 0 followed by the net
name, for example 0TETON. It is a
reserved addressee, so
the message is sent as a broadcast: one transmission, no ACK
(Section 18.8). Every station
that decodes it keeps it. What differs is who is alerted. A message from a
member or from net control alerts net control and every member. A message
from outside the net is usually a question for net control, so only net
control is alerted, and told the sender is not a member. Stations not in the
net keep either kind quietly.
A member that catches only part of a message to the net asks for the missing piece with the usual say-again for broadcasts (Section 19.9). A bystander does not ask for missing pieces of a broadcast from a member of the net it overhears.
24.7.2 The bulletin and the receipt roll
Some traffic every member must have, such as a change of frequency. For that, net control sends a bulletin of up to 200 characters, in two steps:
- Net control sends the text as a message to the net, under a payload kind of its own so that every station shows it as a bulletin.
- Once that has gone out, net control calls a receipt roll: a roll call of every member whose ROLL carries a bulletin tag, eight bits made from the bulletin's message id (Section 18.2.2) and never zero. Each member answers in its slot as usual and sets "has the bulletin" if it holds a message from net control to this net whose id gives the same tag; members remember the ids of the last eight such messages. A "got it" left over from an earlier bulletin therefore cannot be mistaken for the new one.
If anyone lacks the bulletin (a member that did not check in counts as lacking it), net control sends it once more and calls one more receipt roll. A member that said "has the bulletin" the first time keeps that credit. Then net control tells its operator the result: every member has it, or the callsigns of those still lacking it, who can be reached by directed mail. One bulletin is in progress at a time. If net control loses the seat, the bulletin cannot be sent, or distress interrupts its roll call, the operator is told it was not confirmed.
The receipt rides in the check-in a member would send anyway, and a receipt roll is a real roll call in every other way, so the net pays for one round of slots and not for a dozen ACKs keyed in the same second.
A member's bulletin. Any member can send a bulletin: its station sends the text to the net marked as one. Net control's station takes it up without its operator doing anything. It sends the text again as its own bulletin, with the member's callsign in square brackets in front, and runs the receipt roll on that. If another bulletin is still being confirmed, net control does not take the second one up and its operator is told. The member's station listens for net control's sending of its bulletin. If that does not come within one cycle it sends the bulletin again, and a third time two cycles after that; four cycles later it tells its operator. Net control takes a given bulletin up only once.
24.7.3 Standing orders
A bulletin is news. A net's standing orders are the opposite: what every member is to know and do for as long as the net runs, such as how to check in and what to do after losing the net. A station that joins late must get them.
Standing orders are therefore mail (Chapter 26): one mail addressed to the net that carries a "standing orders" mark, a subject of up to 60 characters and a text of up to 1,000. Every member that takes them files them with its other mail. On the air they travel under a payload kind of their own, so that none of the machinery that carries ordinary mail for other stations acts on them, and the mail server plays no part. Only the net's owner or the station running the net may post them. The post goes to the net once, as a message to the net, and a later post replaces the one before.
What is current. Every ROSTER frame carries eight bits that name the current standing orders, or zero when the net has none. The value is computed from the mail itself, so every station holding the mail computes the same one, and a station learns that standing orders exist from the same frame that tells it it is listed. A net control that knows a different copy was current under the net control before it names none.
Who is believed. A member takes a copy as the net's standing orders in two cases only: the owner or its net control sent it, or another member sent it and it is the very copy net control names. Anything else is refused and not kept. Like every net frame this rests on the sender's callsign; nothing is signed.
Getting a copy. A member that missed the post, holds an older copy, or joined afterwards sees a value in the roster entries that is not the value of what it holds. Every such member learns it from the same frame at the same instant, so none of them asks at that instant. Each:
- waits one minute, because a post on its way usually arrives by then. A station listed within the last two cycles that holds no copy has nothing on its way and skips the minute;
- picks a random time: one of four to eight slots (more when more stations have been heard lately), a little under two seconds apart, counted only while the channel is quiet;
- sends one ROSTER REQUEST marked "standing orders".
The members that hold the current copy answer as they answer a request for the roster (Section 24.4.3): they line up by member number, the first sends the mail to the asker as one directed, acknowledged message, and the others stand down when they hear it start. An unanswered request is repeated on the roster request's schedule, each time after a fresh random time, so two stations that picked the same slot key together once and then come apart.
One request is normally enough for everybody. A member that lacks the copy and hears another member ask before its own slot comes does not ask: it waits, overhears the copy sent to the asker and keeps it. Only if a minute passes and no copy has come does it start over with its own wait and slot. A station that has just taken a new post ignores roster entries naming a different copy for two cycles, because net control's entries may trail the post.
An owner that is not running the net. Members that hear its post take it at once, but the net as a whole learns of it from net control's roster entries, so net control has to take it up. The owner's station watches those entries and sends its post again if they do not name it: after one cycle, then two cycles later. Four cycles after the third sending it tells its operator.
24.8 Mail held for a member who is off the air
A mail between two members of a net often goes to a station that is not on the air: switched off, out of range, gone for the day. Outside a net the sender's station holds that mail in its outbox, and the sender's station keeps asking the frequency for a relay for as long as it stays on. In a Virtual Net, net control keeps the mail instead and hands it over the next time it hears the member. The sender may switch off.
24.8.1 When net control takes custody
The sender's station does nothing new. Its direct transfer goes unanswered, it sends a relay REQUEST as for any directed message (Chapter 21), and nobody who hears the member offers. Net control steps in only when all of these hold:
- it is seated as net control of a Virtual Net, and the sender and the recipient are both on its roster;
- the mail has one recipient, no Cc and no outside address;
- net control has not heard the recipient in the last two minutes;
- the station asking is the mail's author, not a relay asking for help with its own hop of someone else's mail;
- net control is not itself a working gateway: a gateway leaves the mail at the mailserver by its own rule, and that comes first (Section 26.6.5);
- its relay setting is allow bulk (Section 21.9).
When it already has the mail. Every station keeps what it
overhears, so net control usually heard the direct attempt. After decoding
the REQUEST it waits until the last relay OFFER could have been heard:
18.5 seconds, plus 0, 0.5 or 1 second more, chosen from its own
callsign and the mail's id. That puts its answer after every station that can
reach the member and still inside the sender's search, so the sender hears it
before giving up. If in that time it hears any OFFER, a SELECT or a RESULT for
the mail, or another station's TAKEN, it says nothing: a relay or a gateway
is taking care of it. It still records the mail as held, quietly, in case
the relay never reaches the member. If that relay then tells the sender, in
its RESULT, that it failed, net control says after all that it keeps the
mail, with the TAKEN below; it waits for clear air to do so, and stays
silent if another station's TAKEN for the mail comes first. Otherwise it sends
[presence]
Keeping wins over carrying. A net control that keeps a mail never also offers to carry it as a relay, even when it heard the member recently enough to be an ordinary helper; and when a relay that is carrying the same mail asks for help with its own hop, net control stays silent.
When it does not. A later REQUEST invites stations that hold no copy, and a REQUEST for mail sent in the clear carries a bit saying so. On such a REQUEST net control offers "send it to me first", claiming no link to the recipient, in the late slots, so that any station that can reach the member is chosen first. If the sender chooses it, the mail comes across behind a HANDOFF frame (Section 21.7.2) and net control answers with TAKEN "held". A message that turns out not to be one it keeps is carried on as any helper would carry it, and net control offers for that message no more.
At the sender. The TAKEN closes the matter. The outbox row reads held, with the note "held by net control" and its callsign (Chapter 8). The station asks the frequency for that mail no more, chooses no relay for it, and never sends it again by itself; a fresh send is the operator's decision. A sender that missed the TAKEN asks again later, and net control answers again, no sooner than 15 seconds after its last TAKEN for that mail. A TAKEN "held" settles the row whenever it comes: during a search, while a fresh attempt is still waiting its turn or on the air, or after the station has given up for now. An attempt not yet sent is canceled; one already on the air finishes, and its end starts nothing new.
Net control's own mail to a member who is off the air is kept the same way without anything going on the air: the row reads held at once. The same holds for a station's own mail that another net control was keeping: when the station takes the job and the list it takes names that mail, it keeps the mail as its own, and sends it again itself if it later gives the job away.
24.8.2 The "mail held" list
Net control tells its net what it is keeping with a short net document, the "mail held" list: for each mail the member's callsign, the original sender's callsign and the mail's id, and once for the whole list the member named as second custodian (Section 24.8.5). It holds at most ten entries, 154 bytes in all, so it always fits one short transfer (Section B.14). Over ten, net control still keeps every mail; the list names the oldest ten.
The list works like the standing orders (Section 24.7.3). Eight bits folded from it, or zero when nothing is held, ride in every ROLL frame. Net control sends the list to the net whenever an entry is added or cleared, through its ordinary send queue and after any TAKEN of its own has gone, so the sender hears the TAKEN first. A mail kept quietly, behind a relay, is named only by the next ROLL. A member whose copy does not match the list net control last named, in a ROLL or by sending the list itself, asks for the list exactly as it asks for stale standing orders, with the same wait and the same random slot, and believes a copy on the same terms: from net control or the owner, or from another member when it is the copy net control named. The list net control sends is the one it holds, so a member that takes it asks no more, even when the job has moved to that station since the last roll call. Each member keeps the entries with its own records.
24.8.3 Delivery
Only the station in the seat delivers. A held mail becomes due each time net control hears its member: a check-in at the roll call, or any transmission, since every one starts with the sender's PRESENCE. How long ago that hearing was does not matter; each hearing allows one try. A try that fails uses the hearing up, so the next try waits for the member to be heard again, and a delivery that succeeds is its own proof the member was there. A hearing from before the hold does not count: it is how net control knew the member was gone.
Net control delivers in the quiet part of the cycle: not during a roll call or its hold. It sends the oldest mail first, one at a time, as an ordinary directed transfer, and not when the transfer, the ask in front of it (Section 19.3) and its acknowledgment would run into its next heartbeat. The transfer carries a FOR frame naming the original sender and the mail's id (Section 21.5), so the member files the mail under the person who wrote it. For a mail net control overheard or got from a list, the member may have it already, from its author or another holder, so the ask is the ASK, which names the mail (Section 18.6.5). For a mail its author handed to net control the first delivery asks with the plain RTS (only while it runs the net: a station that holds the mail after its seat went asks with the ASK, since the new net control may have delivered it first); once a delivery has aired it whole with no answer, which net control notes on the held entry, every later delivery asks with the ASK, since the member's ACK may have been lost. When the member acknowledges, net control sends TAKEN "delivered direct", and the sender's row, if it hears it, becomes sent. A delivery that is not acknowledged, or whose ask the member answers "not now", leaves the mail held. It never starts a relay search; the next chance is the member's next check-in or the next time net control hears it.
An entry clears only when the mail is delivered: by net control itself; by a courier whose TAKEN says "delivered direct"; by a relay whose RESULT reports delivery for a request net control heard; or when net control overhears another station's delivery fronted by FOR and the member's acknowledgment of it, such as a gateway handing over the copy from the member's mailbox. Held mail never expires (Section 22.4).
24.8.4 Leaving a copy at the mailserver
If a station with internet has been heard in the last two minutes and the member has not, net control hands each held mail that is not yet at the mailserver to a gateway, the way a courier does (Section 26.7.2). The gateway's TAKEN "deposited" marks the entry as also at the mailserver, and the sender's row becomes deposited. The entry stays on the list. The member can now collect the mail through any gateway anywhere, and net control still delivers it directly if the member checks in first. After such a direct delivery net control sends a short mailbox-control message, "delivered" (Section 26.10), to the gateway it deposited with, or to the gateway heard most recently, once one has been heard in the last two minutes; that gateway marks the member's copy delivered so it is not offered again. If the gateway does not answer, net control tries again one minute later, then after two, four, eight, sixteen and from then on thirty-two minutes, each time only once it has heard a gateway since the last try.
A net control that is a member of a station cluster (Chapter 33) and has no internet of its own still keeps the mail when another member of its cluster does. It also leaves a copy at the mailserver through that member at once, as any cluster member takes custody (Section 33.7), and the sender's search ends with the mail deposited. Net control cannot see from there whether the member has collected it, so the entry stays until net control delivers the mail itself, or sees it delivered in one of the ways above. If the member gets both copies, it files the mail once.
24.8.5 When net control changes
Net control keeps every held mail at two stations, not one. The list names a second custodian: alternate 1 when the owner has named one, and otherwise the member net control has heard most recently. The same member stays custodian from one change of the list to the next while net control keeps hearing it within two minutes; one not heard that long is replaced at the next change. The custodian is part of the list, so a new one means the list goes out again.
A member that takes the list and finds its own callsign as custodian fetches every listed mail it does not already hold, one at a time. It waits as for the standing orders, then sends a REQUEST in its fetch form, naming one mail by its original sender and id, with itself as the destination (Table B.22). Any station holding a copy, net control included, offers in its usual slot; the custodian chooses one, which delivers the mail behind a FOR naming the original sender, so the custodian files it under the person who wrote it. No RESULT follows: the custodian's own acknowledgment ends the exchange. When one mail has arrived it asks for the next. If nobody offers, it does not ask again by the clock: the next change of the list, or the next time it hears net control or the mail's sender, is its next chance.
A member that stands in for net control (Section 24.9) already holds the list, so the entries become its own. Its ROLL frames carry the same eight bits, and it delivers each mail from its own copy: overheard when the mail was sent, or fetched as custodian. After its first roll call in the seat it fetches, the same way, any listed mail it still lacks. When the owner takes its seat back from the station it gave the seat to, that station sends it the list as it stands now. The owner takes that list in place of its older records only when it is the first list from that station since the owner took the seat back, it is that station's list as net control (it names a second custodian, or it is empty), that station showed, while the owner followed it, that it held the owner's mail (a list it posted named mail the owner had kept), and the list is not full. Then a copy of that station's list that the new list no longer names was delivered meanwhile, and is cleared, so it is not delivered a second time. Any other list a seated station is handed is added to what it holds and clears nothing: it is only part of the truth, and a mail delivered meanwhile may then be delivered once more. Either way, a copy the list names becomes the seated station's own, and mail a seated station holds as its own is never cleared by another station's list.
Any net control that gives its seat to another station of the net hands it the list the same way, as one directed message, and keeps every mail it holds until the net control it follows shows that it holds that mail: the list that station posts, or the list its ROLL names, names it. Until then the old seat goes on delivering the mail when it hears the member (its PRESENCE or a check-in), and the mail reaches its member from whichever of the two hears the member first; the member files it once. Neither the acknowledgment of the hand-back nor a member saying the new station's heartbeat again ends this. The acknowledgment is the radio's, not the list's: a station that gave the job on, or restarted, before the list reached it takes the list as a member would, refuses it, and nothing on the air says so. The repeat says who runs the net, not that the list arrived. Each mail is let go on its own: when the list names some of what the old seat holds, it stops holding those and keeps the rest. The list the old seat built while it ran the net is its own, not the new net control's, so it no longer counts as the list a ROLL names, even when the ROLL carries the same eight bits: the old seat asks for the new net control's list as any member does.
The old seat offers what it still holds once to each net control it follows: to the one it gave way to, and again when it follows another. A list carries the oldest ten mails, so a seat that holds more sends the next ten to the same station once that station's list has named the first ten (or they were delivered). Net control's own list also names only its oldest ten, so the later mails are named as it delivers the earlier ones, and the old seat holds them until then. It makes no offer to a net control whose full list names none of its mail, which could not show that it holds it; it offers once that list is no longer full. An offer that fails on the air or is refused is not sent to that station again: the old seat goes on holding and delivering the mail itself. One its own station could not queue is tried again a second later. What it holds is kept on disk: after a restart it still holds it, and offers it to the net control it follows. A station that ran the net when it stopped, and finds another running it when it is back, holds the copies it kept as net control as its own, as if it had seen its seat go. A seat that holds nothing when it gives way sends the owner an empty list (the owner drops what it kept), and sends nothing to any other station, where an empty list would clear nothing. Held mail is kept for one net: a station that later runs or joins another net lists, offers and delivers only that net's mail.
When a net splits, two stations may each think they are net control. Both may keep the same mail and send TAKEN "held", and both may deliver it. The member files it once and discards the second copy, because a mail is known by its author and its id.
24.9 When net control goes quiet
When net control fades out or goes off the air, the net does not end: a member takes over, and the name, the roster and the member numbers stay as they were.
24.9.1 Noticing the silence
A member considers net control gone when it has heard nothing from it for three and a half cycles: 17.5 minutes at the normal period. A heartbeat, a heartbeat said again by a member, a ROLL or a TALLY all count as hearing it. So does a heartbeat whose sender went unheard (the frame naming the sender was lost, for example under traffic net control cannot hear): if it is this net's and carries the term the member follows, it is net control's, since a replacement claims with the next term. The wait is that long because the station running a net is also the busiest station in it: its heartbeat waits its turn behind the net's own traffic and can come more than a cycle late. A shorter wait would have members trying for the seat of a net control that was there all along.
Only members take over. A member also holds back if it has heard another member's check-in within the same three and a half cycles: other members are answering roll calls, so net control is alive and merely a hidden station to this member.
24.9.2 Who takes over
The members do not vote on the air. Each works out, from the HELLO reports in its links map (Section 20.8), how widely it is heard by other stations; its own claims about itself do not count. To be considered at all, a member must itself report at least two stations it hears, and at least one of those must report hearing it. A station that cannot hear, or cannot be heard, never takes the seat, whatever is said below about who goes first.
The member that ranks itself first claims first; each lower rank waits three more seconds, plus a random amount of up to about two. A claim is simply a heartbeat with the next term and the cycle period the net was running on. Being a heartbeat, it also takes the random wait every beacon takes, up to between 9 and 18 seconds, so the order is a tendency and not a schedule. What makes it work is that a member that hears a claim before its own has gone out drops its own and follows the new net control. Two claims at nearly the same moment are settled like any two net controls (Section 24.10).
Once seated, a net control stays until it goes silent, steps down or gives way under those rules. A better-placed member does not replace it: the scores move with propagation.
24.9.3 The owner and the stand-in
Every member remembers the callsign of the net's owner. A member that takes over while the owner it knows has merely gone quiet does not become the owner. It becomes a stand-in: it runs the net exactly as net control does, and every heartbeat it sends says so, in one bit of a frame that is sent anyway.
It matters because of the shape HF gives a net. A net seldom loses its net control for good; it loses half its members for an evening. The skip changes, the far half hears three and a half cycles of silence and seats one of its own, and the net carries on in two pieces. When the band comes back the two pieces are one net, and the original should simply continue, whichever half is bigger:
- The owner never gives the net up to a stand-in. Three seconds after hearing the stand-in's heartbeat it schedules a heartbeat of its own, so that nearby members hear it soon.
- A stand-in that hears the owner's heartbeat gives way at once, follows the owner, and hands its roster back (Section 24.10.2).
- A member following a stand-in switches to the owner as soon as it hears it. A member following the owner ignores a stand-in's heartbeat for as long as the owner is still being heard, and says the owner's heartbeat again, so that a stand-in that cannot hear the owner hears it through the member.
- The stand-in going quiet is the acknowledgment. If the member hears the stand-in send another heartbeat after the repeat went out, the stand-in never heard it (it was sending, or the repeat was lost), and the member says the owner's heartbeat again, each time it hears the stand-in, for as long as it still hears the owner. A stand-in the owner chose itself keeps the net against a repeat, so it is not repeated at.
The numbers come through intact. Everyone listed before the split is still on the owner's roster under the same number. A station that joined the stand-in's half during the split holds a provisional number, because the owner's half may have given the same one to someone else. When the owner returns, the station keeps answering to that number and asks the owner to list it under that number; the stand-in asks the same for each member it listed. The owner gives the number asked when no entry on its roster holds it, a member that has left included, and it is at most fifteen above the highest number there; otherwise it gives the station the next free one. Fifteen is one hand-over transmission, so the numbers survive even when the owner hears the hand-over out of order; the limit stops a stray number from adding silent turns to every roll call. Only if the owner's roster says the station has gone does it drop the number, and then it joins as a newcomer does.
A station becomes the owner by opening the net, by being handed it in a plain goodbye from the owner, by taking the seat after the owner has stepped down, or by its operator's decision to take over a net it stands in for. A station that has only ever followed a stand-in and never learned whose net it is stands in too if it takes the seat. Across a restart an owner comes back as the owner, but it does not take the net back by itself: it listens first, and if a stand-in is running the net it follows the stand-in, still the owner, until its operator takes the net back (Section 24.9.5). A stand-in comes back standing in.
A restart that heard nobody. Two cycles of listening can still miss a stand-in: its heartbeats may be lost, or keyed while the owner was not listening. So an owner that heard nobody and takes the seat again marks its heartbeats as restored. A stand-in that hears a restored heartbeat keeps the seat and answers with a heartbeat of its own a few seconds later; the owner hears that, gives way and follows the stand-in, still the owner, as if it had heard it during the listen. Members choose the same way, so they stay with the stand-in. The mark comes off as soon as a member shows it follows the owner (the same signs a stand-in watches for, below); from then on the owner's seat is an ordinary owner's. A recall never carries the mark, so the operator can always take the net back. While its heartbeats carry the mark, an owner that sees no such sign for three and a half cycles calls the roll once and stops, as a stand-in nobody follows does: its members may be following a stand-in it cannot hear. The mark stays with the owner until a member shows it follows it: if the owner takes the seat again later, after that stop or after giving way to a stand-in, its heartbeats carry the mark again.
Taking over for good. If the owner is gone for good, the stand-in's operator can make the net theirs. Nothing on the air changes except the stand-in mark. If the old owner comes back after that, the net stays with the station that took it over, and the old owner rejoins as a member. Both can tell from the air: the new owner is on the old owner's roster and its heartbeats carry a newer term, which only a station seated later can have. This is the one use the term has in a virtual net.
A stand-in nobody follows. A stand-in can end up running a net for nobody: the members it took the seat for went back to the owner, or the net closed where it could not hear. Hearing the members proves nothing, because they stay on the air for their own traffic. So a stand-in watches for signs that someone follows it: a check-in in its roll call, a JOIN or a request for the roster, a member saying its heartbeat again, or anything at all from a member that has checked in with it. With no such sign for three and a half cycles it calls the roll once. If nobody checks in, it stops sending heartbeats and stays in the net as an ordinary member. It does not claim the seat again until a station asks into the net (a JOIN), or until it hears a net control itself and follows it. A member's check-in to another station's roll call does not count: that member follows the other station.
24.9.4 Alternates
The owner can choose who stands in for it by ranking up to three members as alternates. The first alternate's number rides in every heartbeat and all three ranks ride in the roster entries, so choosing them costs no extra air. When net control goes quiet, alternate 1 claims first, alternate 2 three seconds later, then 3, and every other member waits as many three-second steps as there are alternates before its own claim. An alternate's claim skips the beacon's random wait, though it still needs a clear channel. An alternate the owner chose claims even if what it has heard of the others would not otherwise make it a candidate; it learns who is there by calling a roll.
Each member counts the silence from the last heartbeat it heard itself, so a member that missed one more heartbeat than the alternate can still claim first. The member running the net then hands it to the best-ranked alternate that answers its roll call, with the goodbye that names a successor. Only the owner, or a station the owner has asked to run the net, can rank or drop alternates.
24.9.5 Letting another station run the net
Net control is a job, done best by the station that hears the most members, and that is not always the station whose operator opened the net: a net opened from a valley is better run from the hilltop. So the owner can hand the job to a member and stay the owner. On the air this is the goodbye that names a successor (Section 24.9.10), with one mark added to the closing heartbeat: "by the owner's wish". Because of it:
- nobody forgets the owner, as they would after a plain goodbye;
- the member named takes the seat as a stand-in, and every heartbeat it sends carries both the stand-in mark and "by the owner's wish";
- the owner does not take the seat back when it hears those heartbeats. It is an ordinary member of its own net, under the number it had.
A station running the net this way can rank alternates and change the period and the net type, which an ordinary stand-in cannot. No alternate replaces it while it is on the air, and if a member that cannot hear it claims as an ordinary stand-in, the owner's choice keeps the seat whatever the two member counts are. If it goes quiet, the members choose as always, and whoever is seated then is an ordinary stand-in.
The owner's instructions. The owner keeps its powers from where it sits. Removing a member, ranking an alternate, changing the period or the net type, handing the job to a different member and closing the net each go to the station running the net as one INSTRUCT frame, alone: the owner's callsign, the net tag, what is to be done, and the member number or value it applies to. The same frame can ask the station running the net to mail the owner the net's state (Section 24.9.7); that answer is the mail itself. That station acts only for the owner it knows, and schedules a heartbeat three seconds later so the owner sees the result. There is no reply frame. If the change does not show in the heartbeats and roster entries, the owner's station sends the frame again after one cycle and a third time two cycles after that; four cycles later it tells its operator.
The owner and the seat. If the owner stops hearing the station that runs its net, that station may still be running it perfectly well for everyone else. After the usual silence the owner may claim the seat, as any member may, but it claims as a stand-in, and gives way if the station it handed the job to turns out to be there. Only its operator's decision to take the job back makes the owner claim as the owner, and the station running the net then gives way as a stand-in does when its owner returns. A station running the net by the owner's wish gives it back on a heartbeat of the owner's own seat that carries a term no older than its own; that is the form the owner's taking back has. It may hear that heartbeat straight from the owner, or said again by a member: a station sending its own heartbeat cannot hear the owner's at the same moment, and an owner that cannot hear the station running its net cannot time its heartbeat around it, so the member that hears both carries the owner's word to it. An older heartbeat of the owner's that a member says again does not move it: it keeps the seat and sends a heartbeat of its own.
24.9.6 Is this a good seat?
A station cannot tell by itself that it is a poor place to run a net from, but a roll call shows it. After each roll call it ran, net control's station tells its operator how many of the members called it heard itself, how many it counted only on another member's word, and how many nobody heard.
It also finds, from the members' HELLO reports (Section 20.7), the member that reports hearing the most other members. When at least three members were called, fewer than half were heard from the seat, and that member hears more of the net than this station does, the operator gets one notice naming it. The comparison counts who each station hears, not who hears it: a station with a big signal and a noisy receiver is heard by everyone and hears almost nobody. The report itself goes nowhere on the air. A seat that hears a minority of its net for long enough is replaced by the member that hears the most of it, with no word from anyone (Section 24.9.7).
24.9.7 When a member hears the net better
A stand-in net control that hears nobody stops by itself, but the owner's own seat does not, a seat that hears a few members never does, and an unattended one (a base station on a mast) never acts on the report above. The net can see what that seat cannot. Every heartbeat carries its sender's count: the members it heard over the last 3.5 cycles, plus itself. So every member sees net control say how much of the net it hears, and every member knows how much it hears itself.
When net control's count is under half the stations in the net in four of its heartbeats running, a member whose own count, less one, is over half the stations in the net and over net control's count claims the job (the one it leaves out stands for net control itself, which a claimant usually hears, as it reads net control's heartbeats, and which no seat counts as heard): a stand-in's claim with the "by the owner's wish" mark, which here means "by the net's choice". It claims in the quiet gap after net control's heartbeat: three seconds after it, and three seconds more for each member fewer than all that it hears (at most four places), so the member that hears the most claims first. A roll call or a busy frequency can still hold that member back until a second one has claimed; it then keeps its own claim against one that hears fewer, and once both claims are on the air the count decides between them, as it does between any two stations the owner chose. There is no vote frame. Each member that hears a claim checks the same figures for itself: net control's last count, a minority, and the claim's count, a majority (the claimant has already waited for the four). If they hold, it follows the new station; if it missed them, it stays with net control and follows the new station once net control gives way. A member whose own copy of the roster is short, or behind net control's edition, counts the net differently and takes no part in the choice: it neither claims nor follows a claim, and follows the new station once net control gives way.
The old net control gives way when it hears the claim, or when a member that follows the new station says the new station's heartbeat again, which is how a seat that cannot hear the new station learns of it. It checks its own figures, not the member's word. The owner keeps the net. If the old net control was the owner, it is now a member of its own net, with its number and its copy of the roster, and its operator is told why. Its recall takes the job back as it takes it from any station the owner chose, and the owner's word then stands: a station that saw the recall neither claims against the owner's seat at that term, however little it hears, nor follows such a claim, until the owner hands the job on again. A station that joins later cannot know of the recall; if it claims, the members that saw the recall do not follow it: they say the owner's heartbeat again to it. The new station then gives way to the owner's own heartbeat, as long as no member has said the new station's heartbeat again, which is how a member that follows a seat shows it. In the same way, a station running the net as the net's choice gives the job back as soon as the owner's own heartbeat shows a count that is no longer under half the net: that seat hears its net again. Giving the job back this way is not a recall: the owner's operator did nothing, and if the owner later hears too little of its net again, the net may choose again. A station that restarts while it runs the net as the net's choice comes back as the net's choice, not as a station the owner chose.
The owner's seat and the net's choice may both run the net side by side and hear each other's own heartbeats while both counts are under half the net: the owner back in hearing of its members after a busy spell, say, when the net has gone quiet. Then the one that hears more of the net keeps the job, and on an equal count the owner keeps it. Each compares the count in the other's heartbeat with the count in its own last one, as they were sent, so each seat reads the same answer: the owner gives the job to the station that hears more and stays a member of its own net, still the owner, and is told so; the net's choice gives it back to an owner that hears at least as much. A member that hears both follows the same answer when it can check it for itself: it follows the station that hears more away from the owner only if it, too, saw the owner's last count under half the net, holds the whole roster and knows of no recall by the owner, and otherwise stays with the owner; one that follows the net's choice follows the owner back on an equal or higher count. The seat that gives way sends its list on as above, and the job moves once: the owner never claims as the net's choice, and the net's choice does not claim again against the same seat at the same term. Heard only through a member, the two seats change nothing, as for any repeat. Without this, each seat would keep against the other and answer every heartbeat of the other with one of its own for as long as both stay quiet. A member that claims and is followed by nobody (a station everyone fails to hear) stops as any stand-in nobody follows does, and does not claim again against the same seat at the same term. The owner never claims this way: its recall is its own word.
The owner keeps watch. An owner off the seat still runs its net through the station that runs it (Section 24.9.5). That station mails the owner the net's state in plain words: who runs the net and why, the cycle and type, the roster with the alternates and who left, the last roll call (heard, heard through a member, missing), and the mail held for members. It sends one a cycle after the job comes to it by the owner's wish or as the net's choice (not at once: the members are busy saying heartbeats again just then), after a roll call whose result changed (at most once an hour) while it holds the job that way, and whenever the owner asks. A station that only stands in for an owner that went quiet mails nothing until that owner asks. It is an ordinary mail, so it reaches an owner the station cannot hear by the usual relays, gateways and mailserver. An owner that hears net control only through a member asks that member for the whole roster, once, as a member of a Safety Critical net does (Section 24.9.8). The mail the old seat held for members stays in its care until the list it handed on has reached the station that runs the net (Section 24.8.5); until then the old seat goes on delivering it when it hears a member.
24.9.8 Members who cannot hear net control
A member that cannot hear net control must not conclude that the net has lost it. Besides the check-in rule above, three things keep one net from becoming two.
After a hand-over, wait. A member that hears a goodbye naming another member as the next net control does not try for the seat itself, even if it never hears that member. It waits the usual three and a half cycles and two more, and any sign in that time that the net is being run settles the matter: a heartbeat, a heartbeat said again by a member, a roll call, a check-in, a tally.
The old net control says the new one's first heartbeat
again. The station that handed the seat over listens for its
successor's first heartbeat and repeats it once, as
[presence]
A wrong claim is corrected by the members who hear both. If a member that cannot hear net control claims the seat, net control may never hear the claim, and nothing would ever tell the claimant it had lost. So each member that follows a live net control and decodes the claim gets ready to say net control's heartbeat again for the claimant. They do not all speak: they stand in a line by member number, three seconds apart, after first leaving three seconds for net control to answer for itself. The wait is counted only while the channel is quiet, so the order holds. The first one speaks; the rest decode its heartbeat and stand down. The claimant then gives way under the rules for two net controls and ends up a member again under the number it had.
Two things keep it from trying again straight away. For as long as it still hears the member it reaches net control through, it does not try at all: the members who do hear net control will deal with a real vacancy. And when the net control it gave way to runs the net by the owner's wish, each time it gives way doubles the silence it waits for before its next attempt, up to sixteen times the usual.
24.9.9 Casual and Safety Critical nets
A net has a type, chosen when it is opened and carried as one bit in every heartbeat. A Casual net is the default: an evening round-table on a busy band, where nothing is said twice. A Safety Critical net is for when every member has to be reached and the frequency is the net's to use: a search, a storm watch. The owner, or a station running the net by the owner's wish, can change the type while the net runs. The rest of this section happens only in a Safety Critical net. One more difference is in the mail chapter: a member of a Safety Critical net that has internet asks over the air for every mail whose recipient it has not heard, as well as leaving a copy at the mailserver (Section 26.4.2).
One member speaks for each station that cannot hear net control. A station gets such a member in one of two ways, each of which already has a single speaker: the member passed the station's JOIN along, or it corrected the station's claim to the seat. A member speaks for at most four stations. For each of them it:
- says net control's heartbeat again once every cycle, with the station's own roster entry behind it. The first three times it adds net control's entry and its own, so that a station with no roster at all learns whose net this is, who speaks for it, and that it is listed. Several members doing this take turns by member number, three seconds apart, counting only while the channel is quiet;
- says again what the station sends to the net, so that net control hears it, and what net control sends to the net, so that the station hears it.
The station takes roster entries, and the value that names the standing orders, on that member's word, and asks it once for the whole roster. At a roll call it places its slot from a check-in it can hear and answers there; the member hears the answer and names it in a check-in of its own.
A member stops speaking for a station when it has not heard it for half an hour, when the station leaves, or when the net stops being Safety Critical. A station taken on by passing its JOIN along is also let go as soon as net control lists it plainly, and whenever the net gets a new net control, because it may hear the new one. If it cannot, it will claim the seat sooner or later, be corrected, and be taken on again; one taken on that way is kept.
Net control repeats what members say. Every chat message to the net of up to 400 bytes that net control copies from a member, it sends once more itself, with the first sender's callsign in square brackets in front. Two members that cannot hear each other but both hear net control get each other's traffic this way. Each station keeps track of the messages it holds and the ones it has said again, so nobody is alerted twice and nobody repeats twice. A message to the net is thus sent twice, and three times when a station that cannot hear net control is involved, which is air time a Casual net on a shared frequency should not spend.
24.9.10 Stepping down, and the named successor
A net control that is leaving says so with one goodbye,
[presence]
Stepping down is not leaving. The entry in the goodbye puts the departing station on every member's copy of the roster, and so on the next net control's, under the number it had. If its entry has not come round one cycle after it hears the new net control, it sends a JOIN like any returning member.
An owner that steps down gives the net away: the next station to take the seat is the owner. After a stand-in steps down the owner is who it was, and the next member seated stands in too.
Net control can also name its successor: the closing heartbeat carries that member's number. The roster entry goes ahead of the heartbeat on purpose, because the members count their five seconds from the closing heartbeat and a frame after it would eat into the successor's head start. When the five seconds are up the named member claims first, with no rank wait, no random delay and no beacon wait, even when what it has heard of the others would not otherwise make it a candidate, and even right after a roll call: the goodbye clears the members' memory of the roll call heard before it, which would otherwise make them hold their claims for the whole silence. Every other member waits one extra three-second step, hears the successor first and follows it. The naming lapses after three and a half cycles, the time a vacancy takes, or as soon as any net control is heard. A successor named by the owner without the "by the owner's wish" mark becomes the owner.
24.9.11 Closing the net
Net control's operator can close the net, and so can the owner through an
INSTRUCT. Closing sends [presence]
A station that hears the closing heartbeat only as a member's repeat of it (the acknowledgment below) closes too. A station following the net forgets it. A stand-in running the net, which may have taken the seat while net control was closing and so never heard the close itself, closes the net in turn with a closing heartbeat of its own, so that the members who hear only the stand-in close as well. A closing heartbeat sent straight by a station other than net control counts only when it comes from the owner. A station that follows the owner at a newer term than the close carried ignores it: that close is older than the net it follows.
A closed net cannot be stood in for. A station that closed a net, or obeyed its close, follows no stand-in's heartbeat of that net afterwards, however long ago the close was; instead it says the closing heartbeat again, as in the acknowledgment below, so that the stand-in hears it and closes. This lasts until the station hears the net run by its owner again, or until its operator opens or joins a net, this one included: joining is the operator saying they are in the net now. The net runs by its owner again when the station hears the owner's own heartbeat (one not marked as standing in, at any term: a net opened again after a restart, or by another station, may start at any term), when a member says such a heartbeat again with a newer term than the close carried, or when the owner lists the station in the net. A restart ends it too.
24.9.12 Knowing the goodbye was heard
A closing heartbeat that closes the net or steps down without naming anyone is acknowledged: the first member in number order sends it again, the others stay quiet, and net control counts that repeat as the answer. A hand-over is acknowledged by the named member's claim. With neither within thirteen seconds net control sends the goodbye again, once more after a cycle, and then tells its operator that nobody acknowledged it.
24.10 Two net controls under one name
Two net controls under one name happen in two ways. The common one on HF
is a net that propagation split. The rarer one is two operators out of each
other's earshot each opening TETON: two owners, two different
nets. Each net control that hears the other applies the same tests in the
same order, so exactly one gives way:
- Between two stand-ins, one that runs the net by the owner's wish keeps the seat.
- Between an owner and a stand-in, the owner keeps the seat.
- Between two owners of the same net (one took it over while the other was away), the one that took it over keeps the seat.
- Otherwise the live count decides.
24.10.1 The bigger live net keeps the seat
A net control's live count, the number in its heartbeat, is the members on its roster it has heard within the last three and a half cycles, plus itself. When both net controls own their nets, or both are ordinary stand-ins, the one with the higher live count keeps the seat. If the counts are equal, the alphabetically lower callsign keeps it. The term is not consulted. Both sides read the same two numbers and the same two callsigns, so both reach the same answer, and the one that keeps the seat schedules an heartbeat three seconds later so that nearby members hear it soon. If the frequency is busy at that moment, that heartbeat is not forgotten: it goes out at the next clear moment, unless the regular heartbeat falls due first and carries the same news.
When the other owner is not on its roster, a net control knows two different nets have met, and tells its operator which net keeps the name. Renaming a net, or agreeing which net to run, is the operators' call.
Members apply the same tests to a rival heartbeat for their own net, comparing its live count with the one their own net control last announced. A rival that would win is followed at once. One that would lose is ignored while their own net control is still being heard, and remembered: if their own net control then goes silent for three and a half cycles, they follow the rival.
24.10.2 Handing over the roster
A net control that gives way, by these rules or to its returning owner, first drops whatever it still meant to send as net control: a goodbye that has not gone out yet, and any extra heartbeat it had scheduled. The net is not closed; it goes on under the station that kept the seat, and an old order cannot air if this station is seated again later.
The net control that gives way sends the winner everyone on its roster who has not left:
[presence]
Each frame is a JOIN THROUGH with one member's callsign. One transmission carries up to fifteen, the most a chain with no opener holds (Section B.3); a longer roster goes out as further chains five seconds apart. The former net control also sends a JOIN for itself. It takes the winner's roster entry for a handed-over member as the acknowledgment; members still not listed one cycle (and a random delay of its own) after the last chain are handed over again, then once more after the same wait, and then its operator is told.
Each JOIN THROUGH asks for the number that member holds on the roster of the net control that gives way. The winner lists the handed-over members as heard through. Its own members' numbers stand; a handed-over member gets the number it asked for where the winner's roster has no entry under it, and the next free number otherwise. Each member of the losing net sees that its net is run by a station that was not on its roster, which tells it this is a merge and not an ordinary change of net control. It drops its old number and roster and waits one cycle before sending a JOIN of its own, so the hand-over can list it first. Until the winner lists it again, which takes a second or two, the station's net display goes on showing it as a member with the number it had. That is display only: on the air the station uses no number in the meantime.
A stand-in handing back to the owner sends the same chain with a different outcome. Members listed before the split are already on the owner's roster and keep their numbers. Those the stand-in listed during the split keep the stand-in's numbers where the owner has not given them to anyone else, and get fresh ones where it has. A member the owner dropped for silence during a long split gets its old number back.
24.11 Leaving, and dropping off after silence
There is no separate frame for leaving. A member says goodbye with a check-in that carries the "last check-in" mark.
Outside a roll call it sends one CHECKIN at the next free moment, marked "last check-in" and "out of turn", and forgets the net without waiting for confirmation. Net control accepts a check-in from a listed member outside a roll call for exactly this purpose: it marks the entry as left, keeps the number for a possible return, and sends the changed entry behind its next heartbeat. Members that decode the goodbye mark the row on their own copies straight away. During a roll call the goodbye rides in the member's own check-in, in its numbered slot; the member then forgets the net but goes on holding its routine traffic until the roll call is over. If its slot has gone by, the goodbye goes out after the roll call.
Knowing the leave was heard. The changed entry, marked left, is the acknowledgment: the departed station's operator is told the leave was acknowledged. If net control missed the goodbye (it was transmitting, or out of reach), its roster still lists the member. The departed station keeps a note of the net it left, and a listing of itself heard from that net is answered with the goodbye again, never taken as being back in; net control airs the entry marked left once more each time it hears the goodbye again. The note also covers a station whose request to join was already on the air when its operator changed their mind. It stays after the acknowledgment, because after a split the other half's net control may still list the station, and it is kept across a restart. It ends when the operator joins or opens a net, or when nothing of the station's own has been heard from that net for two hours.
Stations also just disappear. Once a cycle, net control looks for members listed more than two hours ago that have shown no sign of life for two hours: it has not heard them, and no check-in has come from them or named them. A member that net control never hears directly but that the others vouch for at every roll call therefore stays. The silent ones are marked as left, numbers kept. A stand-in never drops the owner this way. Net control's operator can also remove a member sooner.
A member that hears its own entry come round marked as left, although it never said goodbye, takes it at its word: it stops answering roll calls and becomes a bystander, and its operator is told. A standing join for that net is canceled too, so the station does not ask straight back in; the operator can join again by hand, and gets the old number back.
24.12 Members first
Three cooperative jobs spread their answers over time slots so that they do not collide: offering to relay (Chapter 21), carrying someone else's mail as a courier, and answering "who has mail for me?" (Chapter 26).
While a virtual net is alive on the frequency, each of those sets of slots is cut in two. A station helping its own net's traffic takes one of the early half; every other helper takes one of the late half. Nothing else about the timing changes. For a relay OFFER, which ordinarily has nine slots, a member helping a member answers in one of the first four and anyone else in one of the next four; the ninth goes unused. The station that asked chooses about two seconds after the first OFFER arrives, and volunteers still waiting stand down when they hear its choice, so in practice a member's offer is the one chosen.
Inside each half, a large net does not crowd the slots. When five or more stations could answer, each works out its own place in line and normally only the best two speak (Section 21.3.4). A member ranks itself among the members, and on an equal signal the lower member number is ahead.
"Its own net's traffic" means the message is addressed to this station, or this station is in the net and the message's sender or addressee is a member or net control. Everything else, including a bystander helping the net, is late. "Alive" means the station has heard its net's heartbeat, or another virtual net's heartbeat, within the last three and a half cycles.
The result is members first, not "members only": a bystander that is the only station able to help still answers, just later. Distress traffic is never affected by net membership.
24.13 What to remember
- A virtual net is an optional layer on a peer-to-peer channel. It has an owner, whose net it is, and a net control, who runs it; they are usually the same station and need not be.
- Net control sends a heartbeat once a cycle with up to three roster entries behind it. Members are numbered in joining order, up to 127, and keep their numbers.
- A roll call is one ROLL, one single-frame check-in per member in constant 1.2-second slots, a TALLY, a tail of second tries and vouches, a final TALLY. Members hold routine traffic meanwhile; everyone else, a joiner included, keeps off that one announce channel.
- A bulletin is followed by a receipt roll and one re-send. Standing orders are one mail every member keeps; every roster entry names the current copy.
- After three and a half cycles of silence a member takes over as a stand-in, and the owner gets the net back when the two hear each other. Two different nets under one name go to the one that hears more of its members, then the lower callsign, never the term.
Part V: Services Built on the Protocol
Emergency: The SOS Service
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
The screens for declaring, hearing and acknowledging an emergency are described in Chapter 7. This chapter is about what the station does.
25.1 The rule that outranks every other rule
Everything else in mLink is engineering, tuned for the typical case. The emergency service has three rules that are not open to that kind of trade.
- Never make emergency decoding worse. No change anywhere in the station may cost the emergency receiver even a marginal amount of sensitivity, whatever it buys elsewhere and however rarely the loss would bite.
- Nothing blocks an emergency send. There is no form to complete, no field that must be valid and no confirmation that must be understood. The client may warn ("no position, rescuers cannot locate you directly") but it never refuses. The station asks one thing only: that the call is marked real or drill, which the clients always do; nothing else is ever refused. A drill is practice, not a distress call, and it is refused while the station's own real call is repeating, so that it cannot end the real call (Section 25.4).
- Every field is optional. Position, the nature of the trouble, how many people, who you are: each has a "not provided" value, and a call with nothing filled in is still a complete distress alert.
25.1.1 Sign-in and roles
Rule 2 reaches the station's access control (Chapter 9). Five commands count as emergency commands: declaring an emergency, canceling one, acknowledging one, reading the lists of emergency codes, and listing the stations in distress. All five need only the lowest role, operator. And they still run for a session that an administrator's decision would otherwise close: an operator whose account was suspended or removed while they were signed in (the session then ends at their next ordinary command), and a walk-up guest who was signed in when guest access was switched off.
The exemption covers a session that already exists. On a station with walk-up access switched off, a stranger who walks up afterwards cannot sign in at all, and so cannot send anything, a distress call included.
25.2 What "comes first" means on the air
The emergency service has its own slice of the passband, the emergency region (Section 10.3). The regions do not overlap in frequency, so the receiver listens to all of them at once, and nothing else the station does switches emergency decoding off. The one limit is physical: a radio cannot hear while it transmits (Section 3.5).
On the transmit side, "emergency comes first" means these things and no others.
- A distress pass does not wait for the channel. It is not held by other stations' reservations, it does not wait for the receiver to finish a frame it is collecting, and it skips the last listen before keying (Section 19.5). The acknowledgment sent in the emergency region is treated the same way.
- Sending a distress call cuts off your own transmission. If the station is in the middle of transmitting anything else when the operator sends, that transmission stops at once and the first pass goes out in its place, a fraction of a second later. The message that was cut goes to Drafts with the note "interrupted by emergency broadcast"; it is not sent again unless the operator sends it. The station it was going to recovers as it does from any transmission that stops part way (Section 18.9). Only the operator's own send does this. A repeat pass waits for the transmitter, and emergency traffic already going out (an earlier pass, a repeated call, an acknowledgment) is never cut.
- The listen-only setting does not apply; the Inhibit switch does. A station whose relay setting is listen only still transmits its own distress call. A station that is inhibited, as every start is until the operator lifts it, holds the call too, and mLink asks before lifting the inhibit: the client puts up "Station is inhibited from transmitting. Check radio. Disable inhibit and transmit?", sends the call at once on yes, and says that nothing was sent on no (Section 7.3.4). The same question comes before an all-clear of your own call and before an acknowledgment of someone else's, worded for what is waiting. The Inhibit holds the repeats of a call that is already armed too, never silently: switching Inhibit on while your call is repeating asks "A distress call is repeating. Inhibit stops it from going out. Inhibit anyway?". On yes the call stays armed and the Emergency window shows it as held; nothing goes out until the inhibit is lifted, and the next pass then goes out on the call's usual schedule. Switching Inhibit on while your all-clear is still being sent, or while your acknowledgment of someone's call is armed, asks the same way, worded for what would stop. A call that was armed before a restart comes back held, because every start is inhibited, and the client asks "A distress call from before the restart is waiting. Station is inhibited from transmitting. Check radio. Disable inhibit and transmit?" when it connects; on cancel the call stays armed and held, and the Emergency window offers the same question again. A released pre-release build that is out of date is listen-only for everything, a distress call included (Section 7.8.15).
- An active SOS quiets your own routine traffic. The gap between passes belongs to the station that may be answering you. Your station holds its queued messages and skips its routine PRESENCE beacons and position reports until the SOS is canceled or acknowledged. Nothing is dropped. Replies you owe to another station still go out.
- A heard emergency does not stop other people's traffic, but a decoded one holds yours for a moment. A station that has decoded an emergency frame (not one that merely saw something on the air) does not start routine traffic of its own until the last frame of that pass has gone by: queued messages, beacons and announces, retries, relay re-asks, mail queries, position reports, and its turns in a net's roll call. Replies it owes to another station, exchanges already under way and its own distress traffic (the rebroadcast and the acknowledgment) are not held. When the hold ends, each station waits its own random time before sending, so they do not all start together.
25.3 What an emergency message carries
The emergency region has its own slow modem, NB8FSK, which delivers one emergency frame of 11 bytes in 10.88 seconds (Chapter 12). An emergency message is 1 to 15 of those frames sent back to back in one transmission. Every frame starts with two header bytes: which frame this is and how many the message has, a drill flag, and the incident number that ties the frames of one message together. The other nine bytes are content. The layouts are in Section B.16; here is what the fields mean.
25.3.1 Frame 0: the whole emergency in nine bytes
Frame 0 is the only frame that must exist, and it is complete without the others. It packs what a rescue coordinator acts on into 72 bits:
- Position, in steps of about 10 and 20 meters, with two companions: where it came from (a GPS fix, entered by hand or picked from a map, dead-reckoned or last known, or no position at all) and how far to trust it, in classes from about 10 m to worse than 10 km. A GPS fix and "somewhere in this grid square" look the same as numbers; the accuracy class tells the rescuer how wide to search.
- Environment and nature, two short code lists described below.
- Severity: unknown, Mayday (immediate threat to life), Pan-Pan (urgent, no immediate threat) or advisory.
- People involved and mobility, as classes, not counts (three or four people; five to nine; can move, needs help, cannot move). A rescuer sends the same boat for five people as for seven; an exact count goes in the text.
- Incident age: fresh (under about 15 minutes), recent (under an hour), sustained (under six hours) or prolonged.
The operator does not set the incident age. The station works it out from the time since the declaration before every pass, so a listener who first hears the call three hours in learns straight away that this is a survival situation, not a fresh accident.
25.3.2 Environment and nature
mLink asks two questions where many distress systems have one flat list, because a dispatcher decides two things. Which team to send depends on where the casualty is: on water, in wilderness, on a mountain, on a road, in an aircraft, in a building or underground. What that team must bring, and how fast depends on what is wrong: illness, injury, exposure, entrapment, fire, hazardous material, lost or stranded, violence, or disabled and adrift.
The station daemon owns these lists and hands them to any client that asks, so every screen uses the same words. A sending station puts "not provided" in place of any code that is not on its list, and tells the client which fields it changed, so a call is never refused for a bad code. A receiver, in turn, takes a code outside the lists as a sign that the frame is noise and not a call, since no real sender produces one (Section 12.7.2).
25.3.3 The text frames: who you are and what is happening
Every frame after frame 0 carries thirteen characters of text, from one
fixed set of 45: the space, the digits, the letters A to Z, and
. , - / ? : + #. Lower-case letters are sent as capitals. Any
other character is left out, never replaced and never a reason to refuse; the
station tells the client how many it left out. Thirteen characters from that
set fit exactly in nine bytes.
The text is two fields, identity and detail, sent as one run of characters: the identity, a separator, the detail, then padding to fill the last frame. The separator is a 46th value that stands for no printable character, and the padding is the same value. An identity with no detail carries no separator, so a 13-character identity takes one text frame, not two.
Fourteen text frames give room for 182 characters: identity, separator and detail together. Identity is free text (a callsign, a vessel name, a person's name); nothing checks that it looks like a callsign. If the text is too long, the identity is kept whole, up to 181 characters, and the end of the detail is cut off.
25.3.4 How an incident is recognized everywhere
Two numbers name an incident across the network. The first is the 7-bit incident number in every frame header. The station keeps a counter that survives restarts and adds one for every declaration, so a station that reboots does not reuse a number listeners may still remember. A station's first call starts the counter at a random value, so two stations' first calls do not share a number and get collected as one.
The second is a 16-bit check value computed over the decoded content: frame 0 with the incident age treated as "fresh", then the identity and detail text. The sender and every station that decodes the call arrive at the same value, and leaving the age out means it does not change as the call ages. The pair (incident number, check value) is what an acknowledgment must match to stop the call, and how every station recognizes a repeat of an incident it already knows. For a drill the check value also covers the drill flag, so an acknowledgment of a drill can never stop a real call, nor the other way round.
25.3.5 Drills
A practice call is sent as a drill: the operator ticks Drill before sending (Section 7.5.12), and the box clears itself after every send. Every frame of a drill carries the drill flag, so a station that hears only the second and third frames already knows it is practice. A drill runs the whole real chain, from repeats to rebroadcast, acknowledgment, all clear and the hand-off to a dispatcher, so practice exercises everything. It never sets off the alarm: a heard drill arrives as an ordinary notice, not a critical one, and it does not end a net's roll call. Everywhere a drill is shown, on every station it reaches, the words DRILL DRILL DRILL - NOT A REAL EMERGENCY come first, ahead of anything else about it: on the screen, in the notification, in the station's log, and at the start of the subject and the body of the mail a gateway leaves for a dispatcher. A drill and a real call are never collected into one message, even if their incident numbers match.
25.3.6 Never a guess: real, drill, or unconfirmed
Sending a helicopter for a drill is as wrong as treating a real call as practice, so a station never assumes either. Whether a call is real or a drill comes from one place only: the drill flag in the checked header of the frames it heard, or, at the station that sends it, the operator's own choice. Every request to send a distress call says which it is, and the station refuses one that does not rather than pick for it; the client always says. From there the answer is copied at every step, the rebroadcast, the acknowledgment, the all clear, the stored record and what the client is told, and nowhere is there a value it falls back to when it is missing.
Each step also checks it. Because the check value of a drill covers the drill flag (Section 25.3.4), a copy whose flag was lost or added on the way, by a fault in some station's software, no longer matches its own incident: a station that holds the content can tell, and a station that heard the call one way and then hears a pass, a rebroadcast, an acknowledgment or an all clear of it saying the other thing knows the two disagree. It does not choose between them. It shows, in place of either word, EMERGENCY STATUS UNCONFIRMED - CONFIRM WITH THE SENDING STATION BEFORE ACTING, stores the call that way, writes the disagreement to its log as a fault, and, if it is a gateway that already passed the call on, tells the dispatcher in a second mail headed the same way. Until a person has confirmed, the station treats the call exactly as a real one: the critical alarm, the end of a roll call, its rebroadcast. An acknowledgment or an all clear that disagrees with the call it names counts for nothing, so a call is never marked as handled, or as over, by someone who believed something else about it.
25.4 An active distress call
Declaring an emergency does not send one message. It starts the SOS beacon: the station builds the frames, transmits the first pass at once, and keeps repeating the same frames until one of three things happens:
- the operator cancels it;
- the operator declares again, which replaces it with a new incident under a new number;
- an acknowledgment for exactly this incident is heard.
A drill never replaces a real call. While the station's own real call is repeating, it refuses a drill and says why: declaring the drill would end the real call without anyone being told it is over. End the real call first, with an all clear or a stop. A real call still replaces a drill, and declaring a real call again (an update) replaces the real one.
The beacon never gives up by itself. The call is written to the station's database before the first pass, so a station that loses power or restarts while the SOS is active starts repeating again without anyone re-entering anything, with the incident age still counted from the original declaration.
Repetition gives every frame more than one chance to get through the noise (Section 12.8). And a neighbor that was transmitting during one pass heard none of it; it will hear a later one.
25.4.1 When the next pass goes out
The schedule has two rules, and the later of the two wins.
- A repeat rule: the next pass is due 75 seconds after the current pass was keyed, plus a random 0 to 15 seconds.
- A listening rule: after the station stops transmitting (anything at all, not only the SOS), it listens for at least 15 seconds, plus a fresh random 0 to 15 seconds, before the next pass may key.
The random parts keep two stations in distress from falling into step and colliding on every pass. The listening rule exists for the acknowledgment described below: the answer to an SOS is one eleven-second frame that must fit in the gap between passes.
For a short call the repeat rule decides: a one-frame call takes about 11 seconds, repeats every 75 to 90, and leaves 64 to 79 seconds of listening. For a long call the listening rule decides: an eight-frame call is about 87 seconds of air, so its gap is 15 to 30 seconds, and the longest call, 15 frames, repeats about every 178 to 193 seconds.
25.4.2 Stopping the call: all clear, or stop
An operator has two ways to end a call. Stop without telling anyone stops the passes and clears the stored call. Nothing is transmitted to say so. Other stations notice only that the passes have stopped, and their rebroadcasts stop too, because a station rebroadcasts again only while it keeps hearing the call; but the call stays in their lists, still counted as open.
All clear stops the passes and then tells everyone the emergency is over (Section 25.7). It is the right button when the trouble is over, because people who were sent to help can be called off.
25.5 Hearing an SOS
A decoded emergency frame must pass two cheap checks before the station acts on it, so that noise which happens to look like a frame cannot raise an alarm (Section 12.7.2). Those checks ask only whether a real sender could have produced the frame, never whether what it says is sensible: a strange position, a nature of "not provided" or an empty identity all pass.
25.5.1 Putting the message together
Frames are collected by incident number and drill flag, in any order and across passes, and an unfinished message is kept for as long as it takes. The station follows up to six incidents at once; a seventh takes the place of the one that has been quiet the longest, so a new distress call is never turned away because a table is full.
A complete message is reported exactly once. Later passes are recognized as repeats, and each one tells the station that the incident is still active, which matters for rebroadcasting and acknowledging.
A weak call that repeats can still be read. When a station cannot decode a frame from one pass, it adds that frame up with the same frame from the sender's other passes, heard within the last five minutes, and tries again on the sum. The operator has nothing new to do and sees nothing new: the message appears once, when it is complete, exactly as if a single pass had been clean (Section 12.8.1).
25.5.2 What a completed incident sets off
A newly completed incident, heard directly or through another station's rebroadcast, is stored in the station's message log with every decoded field, so a station with no client connected still holds it. It raises a critical notification on every connected client that spells out the incident in one line, including which station passed it on, if any (a drill raises an ordinary notice instead, Section 25.3.5). A gateway also hands it to the mail server, as described at the end of this chapter, and a directly heard incident is queued for rebroadcast.
If what the station hears is its own distress call coming back through another station's rebroadcast, nothing is stored; the operator is told that the call was heard and rebroadcast, and by whom.
25.5.3 What the operator hears
Each client also sounds the call, on the speaker its operator chose for alerts (never the radio's sound device; the screens are in Section 7.8.4). The sound follows the same three answers as the screen. A real call, and one shown as EMERGENCY STATUS UNCONFIRMED, get the urgent sound: two pitches alternating, repeated every four seconds until the operator has opened that call in this client, that is, selected it in the Emergency window's "Heard" tab while working the client. The station's own call, declared from another seat, counts too; it is opened on the "Declare" tab. An acknowledgment on the air does not stop the sound, because it says that someone has answered, not that this operator has seen the call. The sender's all clear does stop it, and a call heard again after its all clear sounds again. A drill gets one steady note, once, and never the urgent sound. A call first seen as a drill that turns out to be unconfirmed sounds as urgent again.
The operator can lower the emergency sound to 30 % of the client's master volume but cannot turn it off. Until a speaker is chosen the client plays nothing and says so once; the call is still on every screen. A real or unconfirmed call the client first learns about from the station's history when it connects sounds like any other while it is still open, however old it is: nobody at this client has seen it yet. A call its sender has cleared makes no sound, and neither does a drill heard more than 15 minutes earlier. Nothing is played while the station on the same computer is transmitting; the sound waits for the end of the transmission. The sound is made by the client after it has drawn the call, so it never delays the call's display or any emergency control.
25.6 Acknowledgment: how the repeats stop
The beacon keeps going until somebody takes responsibility. In mLink terms that somebody is an Authoritative Station. That is not a special kind of station and not a setting: it is whichever operator passed the emergency to the people who can respond (the coast guard, a sheriff's dispatcher, a search team) and says so on the air. Any signed-in operator may acknowledge an incident the station holds, adding a line of contact text (agency, reference number, phone).
The station records the acknowledgment at once, drops any rebroadcast of that incident it had waiting, and sends the acknowledgment two ways.
25.6.1 The announce-band acknowledgment
The first copy is a short chain in the announce region: the station's PRESENCE, then frames carrying the incident number, the check value and up to 118 bytes of contact text. It is sent once, as voluntary traffic, when the station is idle and an announce channel is free.
Every station that hears it records who acknowledged and the contact text, drops any rebroadcast it had waiting, and never rebroadcasts that incident again. If the station in distress hears it, and the number and check value match its own call, the beacon stops and the operator is shown who acknowledged and how to reach them.
25.6.2 The emergency-region acknowledgment
The announce region needs about −9 dB, but the SOS can be heard at about −19 dB. In between, you can hear the distressed station perfectly well but it cannot hear your announce traffic at all. So the acknowledgment is also sent on the distressed station's own terms: as an emergency frame, decodable as deep as the SOS itself.
It is sent as a single frame 0. It carries the incident number and check value it answers, and two bits that mark it as an acknowledgment, so a receiver can never mistake it for a new distress call. Its own header carries the answered incident number with every bit flipped, so it cannot be confused with the frames of the call it answers. It carries no contact text, although the format has room for text frames: several frames might not fit in the distressed station's listening gap, and one frame always does.
This frame is not sent at the moment the operator acknowledges, because the distressed station is probably in the middle of a pass and deaf. The acknowledging station waits for the end of the next pass it hears:
- if it decodes the pass's last frame, it keys at once, as the distressed station stops transmitting and starts listening;
- if it decodes only an earlier frame, it works out from the frame number when the pass will end (frames follow each other every 10.88 seconds) and keys 0.4 seconds after that.
It answers again at the end of later passes, no more than once a minute, for as long as it keeps hearing them. If a second operator acknowledged the same incident, whichever station hears the other's emergency-region acknowledgment first stands down, so the distressed station is answered by one voice and not a chorus.
A station in distress that hears only this frame stops its beacon just the same. It cannot name who answered, so the operator is told that "an Authoritative Station" acknowledged.
25.7 The all clear: telling everyone it is over
When a station's emergency is over, its operator can say so. The station stops its passes and sends an all clear, so that every station that heard the call, and every dispatcher a gateway told, learns that nobody needs to come. Only the station in distress can send one, and only for its own most recent call; there is no way to clear somebody else's. The station remembers that call after the passes have stopped, even after a restart, so the all clear can still be sent after an acknowledgment or a plain stop.
25.7.1 What goes on the air
The all clear is a single emergency frame 0, the same size as the acknowledgment and in the same layout: the incident number and check value of the call it ends, a layout code of 2 (Section B.16), and every other bit zero. Its drill bit copies the call's, so an all clear of a drill is itself a drill. Its own header carries the incident number plus 64 (wrapping at 128), a number that is neither the call's nor the acknowledgment's, so it cannot be mistaken for frames of either. It uses the same modem, so it is heard as deep as the call was, and a frame that is not exactly one frame long, or that has a stray bit set, is thrown away like any other malformed emergency frame.
The first pass goes out at once, as soon as anything the station is already sending has finished. Two more follow on the same spacing as the call's passes: 75 seconds plus a random 0 to 15 after the previous one was queued, and never sooner than 15 seconds plus a random 0 to 15 after the station last stopped transmitting (Section 25.4.1). Three passes in all, then it stops by itself. If the operator declares a new emergency meanwhile, the new call replaces any all clear still being sent. Nothing about an all clear is resumed after a restart.
25.7.2 What a station does when it hears one
An all clear only ever sets a mark; it never deletes anything. A station that holds the call it names, with the same incident number, the same check value and the same drill flag:
- marks the call cleared and keeps it in its list and its message log, with the time the all clear was heard. A real all clear never closes a drill, and a drill's never closes a real call;
- drops a rebroadcast of that call that it had planned but not yet sent, and does not plan another while the call is cleared;
- stops answering the call's passes with an emergency-region acknowledgment, and starts again if the call is heard again;
- tells its operator ("ALL CLEAR (said by the station)"); the client shows the call in green;
- if it is a gateway that put the call in the SOS mailbox, files a follow-up there, ALL CLEAR SOS ..., worded the same at every gateway so the copies merge, so a dispatcher can call off whoever was sent.
A net control station does not take its abandoned roll call up again: the all clear tells it the emergency is over, and the net control decides whether and when to call the roll.
25.7.3 Passing the all clear on
Stations that pass calls on also pass the all clear on, so a station that only heard the call through a rebroadcast, and may never hear the caller at all, still learns it is over. It follows the same rules as the call's own rebroadcast (Section 25.8): only a station that decoded the call, and now the all clear, directly in the emergency region sends it; only if the station's rebroadcast duty is on and it is not listen-only; after the same hold-off; and it stands down if another station's rebroadcast of the same all clear is heard first. A rebroadcast all clear is never rebroadcast again, and each station sends it once for each all clear. An acknowledgment of the call does not stop it, because help being on its way is exactly when people most need to hear the call is off.
The rebroadcast is one announce-region chain, the station's own PRESENCE and one frame (Section B.10.1), carrying the incident number, the drill flag and the check value. An alert always wins the air: while any rebroadcast of a call is waiting, the station holds the all clear back, and sends it after.
25.8 Other stations pass it on
The emergency region is slow and deep; the announce region is fast and heard by everyone near a station. A station that decodes a distress call directly therefore repeats it in the announce region, so that everyone within reach of that station learns of it too, including stations with a poor path to the person in distress.
The rebroadcast is one chain: the station's own PRESENCE, then up to 15 EMERG frames (Section B.10.1). They carry the incident number, the check value, the nine bytes of frame 0, and as much text as fits, packed as in the emergency region, which leaves room for 156 characters. Identity is kept whole; detail may be cut short. The check value is carried as first computed, never worked out again, so a copy with shortened detail still names the same incident. Receivers show the incident as heard "via" the rebroadcasting station.
Rebroadcasting is on by default and has its own setting, which takes the technician role to change. A station with it switched off, or set to listen only, still hears, stores and reports every incident to its own operator. The relay policy levels (Section 21.9) do not affect it.
25.8.1 Not everyone at once
If ten stations hear the same SOS, ten rebroadcasts would be nine too many, and ten stations keying at the same instant would destroy each other. So each station waits a hold-off that differs from station to station, and drops its own rebroadcast if it hears someone else's, or an acknowledgment, first.
The hold-off is at least 5 seconds. On top of that the station takes one of a set of slots 1.5 seconds apart, plus up to 0.45 seconds within the slot. Both come from scrambling the station's callsign together with the incident's check value and the time of the incident's last rebroadcast, so neighbors land at different times without any coordination, and two that share a slot once are unlikely to do so again. There are 8 slots, growing to 16 with the number of stations heard in the last half hour, so the wait runs from 5 seconds to about 16 on a quiet band and to about 28 on a busy one. A slot is longer than it takes to send and decode an announce frame, so a station in a later slot hears the earlier rebroadcast in time to drop its own.
When its moment comes, the station must be idle, hear no signal, and have an announce channel free. If not, it waits a quarter of a second plus a short random time and looks again, so that stations held up by the same busy channel do not all key on its first quiet instant.
Three more rules keep the flood in check:
- Only a station that heard the call directly rebroadcasts it. A rebroadcast is never rebroadcast again.
- While the distressed station keeps repeating, the incident may be rebroadcast again, but not within five minutes of the last rebroadcast the station sent or heard.
- Once an acknowledgment has been heard, nobody rebroadcasts that incident again.
25.9 From the air to a dispatcher
Hearing an SOS helps only if a person who can start a rescue finds out. Many mLink stations are also gateways to a mail server (Chapter 27), and those stations hand every incident they hear to it.
When a station completes a new incident, direct or through a rebroadcast, and its own link to the mail server is up (enabled, registered, and in contact within the last ten minutes), it writes the incident up as an ordinary mail and deposits it at the server. The subject reads like SOS Immediate threat to life (Mayday): Medical (illness) / Water / marine; the body lists every field of the alert, the identity and the detail, then the incident number and check value and a note on how to reply. Depositing costs no air time and never delays alerting or rebroadcasting.
The server files the mail in a reserved SOS mailbox, so nothing is lost even if nobody is watching yet, and copies it to everyone subscribed to the reserved sos mailing list. Subscribing to that list is how an administrator or trained dispatcher volunteers to receive incidents.
Acknowledgments follow the same path. A gateway that deposited an incident and later hears it acknowledged, or whose own operator acknowledges it, deposits a follow-up, ACKNOWLEDGED SOS ..., naming who acknowledged and their contact text.
An all clear follows the same path. A gateway that deposited an incident and later hears it cleared deposits a follow-up, ALL CLEAR SOS ..., saying the station reports its emergency over and that anything dispatched for it can be called off. If the call is heard again afterwards, the follow-up says nothing new: the call is open again, and the next acknowledgment or all clear is a new follow-up.
If the station in distress is itself a working gateway, it deposits its own incident as soon as the beacon starts, alongside the radio call, and tries again at each pass until a deposit has been handed off. Its mail is the one any gateway that hears it would write, so the copies merge.
25.9.1 Two-way SOS
The incident mail is addressed to the SOS mailbox and, if the identity is a valid callsign, also to that callsign. That second address is the return path. A dispatcher who replies to all puts an answer in the distressed station's mailbox at the mail server, and ordinary mail delivery carries it over the radio from there: any gateway that hears the station offers it the waiting mail (Chapter 26). The station answers with ordinary mail.
This is why a callsign is the best identity to give. A name or a vessel description still reaches the dispatcher, but it cannot be addressed, so replies have nowhere to go.
25.10 On an FM channel
Everything above is the HF service. On an FM channel (Chapter 34) there is no emergency region, so the same call is sent another way, and only the way it is sent and repeated changes. The alert and the text are the same frames, but the text stops at 26 characters, so a call is three frames: frame 0 and two text frames. All three go out in one short FM signal of 0.35 seconds. That signal is sent at once on declaring, then repeated in bursts of 8, a random 5.0 to 9.5 seconds apart, with a random pause of 60 to 90 seconds between bursts (240 to 270 after twenty minutes), until it is acknowledged, an all clear is sent, or the operator stops it (Section 34.3). It does not stop by itself. The all clear on FM is the same short signal with the all-clear frame: sent at once and repeated 7 more times at the same random 5.0 to 9.5 seconds (longer when the station had to answer someone or was receiving a frame), 8 in all, then it stops; there is no pause and no second burst, because these signals are so short. The station's own routine traffic waits until it has gone out (Section 34.3.1).
What a receiver does with the call does not change: the same checks, the same incident number, display, acknowledgment, rebroadcast in the ordinary FM frames, hand-over to a gateway, and all clear. A receiver holds its own traffic after decoding a call only for the signal's own 0.35 seconds, because the whole call has already arrived, where the HF hold lasts until the call's last frame has passed. The acknowledgment is the same single frame in the same kind of signal, sent a random moment after the caller's repeat ends. On a repeater channel stations do not pass a call on.
25.11 What to remember
- Three rules are absolute: nothing may make emergency decoding worse, nothing blocks an emergency send, and every field is optional. An empty call is still a valid distress call.
- An SOS is a beacon, not a single message: it repeats until canceled, replaced or acknowledged, survives a restart, and always leaves at least 15 seconds of listening after each pass so an answer can get in.
- Real or drill is never assumed: it comes from the checked drill flag, every step copies and checks it, and copies that disagree are shown as EMERGENCY STATUS UNCONFIRMED and handled as a real call. A drill is shown under DRILL DRILL DRILL - NOT A REAL EMERGENCY everywhere it goes.
- Frame 0 alone is a complete alert; text frames add identity and detail, thirteen characters each. Incidents are recognized everywhere by their number plus a check value over the content.
- An operator ends a call with All clear, which tells everyone it is over (one emergency-region frame, three passes, passed on in the announce region and followed up by gateways), or with Stop without telling anyone, which tells no one. An all clear only marks the call; a call heard again after it is open again.
- Acknowledging sends two copies: one with contact text in the announce region, and a single emergency-region frame keyed the instant the distressed station's pass ends, so the answer reaches as deep as the call.
- On an FM channel the call is one 0.35 second signal with 26 characters of text, sent at once and repeated in bursts until acknowledged, cleared or stopped.
- Stations that hear a call directly rebroadcast it in the announce region after a hold-off and stand down if someone else does it first; gateways deposit it in the SOS mailbox, and a callsign identity lets a dispatcher reply.
Mail Over the Air
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
The windows for writing, sending and collecting mail are described in Chapter 7; the states a mail passes through in the Sent list are in Chapter 8.
26.1 Mail is built from what is already there
A mail is an ordinary message with a particular payload shape. It travels by the same transfers, the same acknowledgments and the same relay handshake as anything else. On top of that sit four announce frames that exist only for mail (TAKEN, QRY, AVAIL and GET), three small payloads for mailbox business, and a server on the internet, the mailserver (Chapter 27), that holds mail for stations that are not on the air right now.
The design goal fits in one phrase: lazy on the air. Never key the radio for something the internet, another station, or plain patience can do instead. No station opens a "session" with anything.
26.2 What a mail is made of
A mail is the payload of an ordinary message whose kind byte says "this is mail" (Section 23.4), so it is compressed like any other payload. In the order they are packed, a mail holds:
- a version number and a byte of flags saying which of the optional parts below are present;
- the date the mail was written, four bytes counted in seconds from the mLink epoch (Section 23.6), which travels with the mail through every store, bundle and hand-off, so the operator reads the time it was written, not the time it arrived; a mail that enters from a gateway carries the date of the message it came from;
- the recipients: up to 16 To callsigns and up to 16 Cc callsigns, six bytes each (Section 16.6);
- optionally up to 8 outside addresses of up to 63 bytes each, for recipients that are not callsigns: a mailing list or an internet email address;
- optionally an in reply to: the two-byte message id of the mail being answered, enough for a client to show a thread;
- optionally a sender name of up to 31 bytes, such as "Tyler D.";
- optionally a subject of up to 255 bytes;
- optionally an author and a position, up to 31 bytes each, saying which operator at a station with several operators wrote it (Chapter 9);
- the body, up to 1,048,575 bytes (the length uses 20 bits: two bytes plus the top half of the first byte), which may be empty;
- optionally up to 16 attachments, each with a file name, a one-byte type and its length;
- optionally, and always last, a two-byte sender tag.
A part that is absent costs nothing. One flag is not a part at all: it marks the mail as the standing orders of the virtual net it is addressed to (Chapter 24). The sender tag is added by a station that is registered at a mailserver. No station on the air can check it; it lets the server refuse a mail that some other station hands in under your callsign (Section 27.5.1).
26.2.1 Two kinds of "to"
There are two addresses on every mail, and keeping them apart is the key to the whole chapter.
The first is the on-air addressee: the station the transmission is aimed at, the one whose acknowledgment the sender waits for. It rides in the transfer's opening frames, not in the mail. The second is the list of recipients: the To and Cc callsigns inside the mail, the people the mail is for.
Usually the two agree. But they are allowed to differ, and mLink uses the difference as a signal. A transmission aimed at a gateway, carrying a mail whose recipients do not include that gateway, means "please carry this onward". A transmission aimed at nobody in particular, the all-stations address 0CQCQCQ (Section 16.7), carrying a mail whose recipients are real callsigns means "anyone: can you get this to the mailserver?" No marker byte says so; the mismatch between the two addresses is the request.
Outside addresses get no special treatment on the air. Only the mailserver acts on them, when the mail reaches it.
26.2.2 Attachments
The type codes cover plain text, JPEG, PNG, WAV, Opus, MP4, PDF, JSON, HTML, a generic "binary", and one type of mLink's own: a batch of map objects that the recipient can put on their own map (Chapter 30). A receiver treats a type code it does not know as plain binary.
26.2.3 How big a mail can be
The format allows an attachment of four gigabytes. The air does not. A mail must fit in one transfer after it has been compressed and wrapped: 64,004 bytes to a single station (Section 17.4.4), and 6,028 bytes when it is sent to everyone, because a broadcast gets no checkpoints and so may not run past one segment (Section 17.5.3). A mail for several stations that is larger than that is not refused: it goes to a gateway instead (Section 26.4.6). Text shrinks a good deal on the way; a picture or a PDF barely shrinks at all, because it is compressed already. A mail too big for one transfer is refused when you press Send, with its size after compression and the most one transmission carries; the compose window shows the same numbers as you type.
26.3 Where mail lives on a station
A station keeps every mail it decodes, but it files as its own only the mail that is for it: a mail whose To or Cc names this station (any SSID of its callsign), a mail to everyone, and a mail that came from its own mailbox at the mailserver, where mailing-list mail arrives, often naming nothing but internet addresses. A mail whose lists name other stations and not this one is carried, not filed (a net's name or a mailbox name in the lists is not a station, and beside other stations' callsigns it does not make the mail this station's): a mail overheard between two other stations, a mail to several stations that leaves this one out, or a mail handed to this station as a gateway to deposit. A carried mail stays in the store, in case somebody later needs a station that holds it, and a gateway still deposits it and a courier still carries it; but it is not shown in the Inbox and the operator is not told of it as new mail. The mail window lists it under "Carried for others" (Chapter 7). Beside the fields it keeps the exact packed bytes that came off the air. When the station later carries somebody's mail onward, it sends those bytes unchanged, so every copy of a mail everywhere is byte-for-byte identical. The same author with identical bytes is one mail, however many ways it arrived. Nothing is removed automatically; the station has a command to delete mail older than a given date, and the operator decides when to use it.
26.4 How a mail finds its way out
A station works down a short list of ways out. The rule of the list: prefer the way that uses less air and fewer other stations, and fall back only when the better way is not there.
26.4.1 By internet, on request
An operator whose station is registered at a mailserver can ask for a mail to go by internet. The station hands it straight to the server; nothing is keyed, and the mail is marked deposited when the server accepts it, or failed if the server cannot be reached or says no. A radio-only recipient still gets the mail over the air later, from whichever gateway hears them (Section 26.9), so a mail sent this way still has to fit a radio transfer to arrive.
26.4.2 When your own station reaches the mailserver
A station that is registered, has the mailserver's address set and has reached the server recently uses it for its own mail, whether or not it serves other stations (Section 26.6.1). It asks one question before it sends a mail by radio: has the recipient been heard in the last two minutes? If so, the mail goes over the air as below. If not, there is no point keying up for a station that is probably not listening, so the station deposits the mail at the mailserver at once and airs nothing. The mail shows as deferred while the deposit is under way and deposited when the server has it.
There is one exception: mail for a station in your own net. A net exists so that its members reach each other, so here the station does both. It leaves a copy at the mailserver, and it also asks the frequency for a station to carry the mail over the air, as any relay search does (Chapter 21), asking again after a growing wait until the mail is delivered or its lifetime ends. The row reads "copy left at the mailserver; asking the net to carry it over the air". "In your own net" means any of three things: the recipient is on the roster of a net you are a member of; a member of that net has said within the last 30 minutes that one of its other radios hears the recipient (Section 20.7); or your net is Safety Critical, in which case every recipient you have not heard counts. When the mail arrives over the air the station tells the mailserver its copy was delivered, so the recipient is not offered it again. If nobody carries it before the lifetime ends, the row rests as deposited.
Should that deposit fail, the mail goes back in line and is sent by radio exactly as a station without internet would send it; the station does not try the server a second time for that mail. A deposit cut short by a restart leaves the mail as a draft (Section 22.7).
Such a station's own pickup broadcast (below) goes the same way: it deposits the mail itself and airs nothing. Mail addressed to a virtual net or to an area on the map is not a pickup and is sent over the air as usual.
26.4.3 Straight to the recipient
With one recipient, the transmission is aimed at that recipient and sent like any other directed message: the station picks how to send it from the size and its estimate of the link (Section 17.5.2), sends, and waits for the acknowledgment. The acknowledgment is the proof of delivery; the mail is sent.
26.4.4 When the direct transfer goes unanswered
If the recipient never answers, the station asks for a relay, as it would for any directed message (Chapter 21). Mail adds one more kind of helper to that search: a gateway that overheard the mail. What it does is described under overheard mail; the outcome is a mail marked deposited, and a search that ended in success. A long mail whose ask the recipient never answered was never on the air (Section 19.3), so no gateway can have overheard it. Its help comes from a station that hears the recipient and is handed the mail (Section 21.7.2), or, on the repeat requests, from a gateway that asks for a copy (Section 21.7).
In a Virtual Net there is one more rung. When nobody who hears the recipient answers and both stations are on the net's roster, net control keeps the mail for the recipient and delivers it the next time it hears them; the mail is marked held (Section 24.8).
26.4.5 When the link is too weak to try
Sometimes the sending rules say a direct transfer of this size cannot work at all (Section 17.5.5). For mail that is not the end. The station tries, in this order:
- If it is itself a working gateway, it deposits the mail. No air. If the server refuses or cannot be reached, the mail is failed.
- Otherwise, if it has heard a gateway within the last two minutes, it aims the mail at that gateway instead of at the recipient, choosing the most recently heard one. The gateway sees a mail not addressed to it, recognizes the request, and deposits it.
- If neither is possible, the mail is failed, with the size and the rule that refused it in the note. It does not sit in a queue pretending.
26.4.6 The pickup broadcast
A mail for several recipients, or one addressed to 0CQCQCQ, goes out as a pickup broadcast. The station decides this from the To and Cc lists: a mail that names two stations or more goes to everyone even when the program sending it named one of them as the addressee, as a Reply All does (To the sender, Cc the rest). It goes to one station alone when that is the one station it names and the program asked for it, or when the program names a station the lists do not hold, to carry it. A pickup broadcast is a transmission aimed at everyone, carrying a mail whose recipients are real callsigns or outside addresses. It means "anyone who can: take this to the mailserver". It must fit the broadcast limit of 6,028 bytes, or 480 on FmLink (Chapter 34).
A bigger mail that names several stations goes once, aimed at a gateway heard in the last two minutes (the one with the best link), which deposits it at the mailserver for them. Its row says "sent to gateway N7XYZ for deposit", and the gateway's TAKEN then makes it deposited. The stations it names did not hear it, so there are no reply slots. If no gateway has been heard, the mail waits with the note "too large to send to everyone at once; held until a gateway is heard to deposit it", and goes when one is heard. A mail that big that names one station or none is refused, as any message to everyone past the limit is: send it to that station.
The broadcast airs and the mail shows as sent, which for a broadcast means only that it went out. If its lists name several stations, those stations first confirm it in turn, once the radio has keyed that very transmission: a transmission the radio refused or withdrew opens no slots (Section 26.5). The station then listens for somebody to claim it. The sections after that say who can.
26.5 Replies in turn: a mail to several stations
A pickup broadcast whose To and Cc lists name two stations or more is also a mail to those stations, and the ones on the air confirm it one after another, in short reply slots that follow the broadcast, each with the ordinary one-frame ACK (Section 18.4.2). The mail airs once, to everyone, and the sender learns who has it without sending it to anyone twice. A pickup broadcast that names a single station is what it always was, a request for a gateway to carry it: no slot. Only a mail aired alone to everyone gets slots: not a mail to a Virtual Net or an area, not one that names only outside addresses, not the mails in a bundle. The mail's opener says how many slots follow (Table B.11), so every station that heard the opener knows how long they run, whether it decoded the mail, part of it or none of it; any other broadcast's opener says none.
26.5.1 Who answers, and in what order
The places are the station callsigns of To, as written, then those of Cc; 0CQCQCQ, a net's name, a mailbox name and an outside address take none. When you send the mail, your own callsign is taken out of the lists (you have the mail), and a callsign written twice keeps only its first place, so no slot is left for a station that would never answer it. Only the first eight places get a slot. A station named further down still files the mail as its own but does not confirm it on the air; the mailserver and the couriers reach it. So when you send the mail, or a saved draft, the station puts each list in order: the stations it has heard inside the window for being on the net (Section 20.9) first, the most recently heard first, and the others after them in the order you typed. To stays ahead of Cc. From then on that order is part of the mail's bytes, the same in every copy and every later airing.
26.5.2 The slots
A slot is 1.2 seconds, as in a roll call (Section 24.6.1). Slot 0 begins where a receiver would answer a transfer aimed at it (Section 18.4.1): 0.65 seconds after a bulk transfer's air ends, half a second after a shortburst's computed end. Slot n starts n × 1.2 s later, so a mail with k slots has them over 0.65 + k × 1.2 seconds after a bulk transfer's air. On FmLink a mail to everyone too long for one shortburst goes as a longburst; the slots follow the last piece, so only that piece's opener says the count, and the earlier pieces' openers say none.
A named station keys its ACK at the start of its slot without listening first, as a roll-call check-in does. Held up by something of its own, it may still key up to half a second into the slot; any later, its 0.66 s frame would run into the next slot, so it stays silent. So does a station that has declared its own emergency, whose acknowledgment is then two frames long, and, on FmLink, one whose leader tone (Section 34.2.2) makes its one-frame transmission longer than 0.7 s: with no leader it takes 0.35 s and fits, with the default 0.8 s VOX leader it does not. A silent station is asked later.
Every station that heard the mail's opener, named or not, whether it decoded the mail, received only part of it, or did not receive the transfer at all (it cannot take bulk, or was already receiving another), holds its own traffic until the last slot ends, a gateway's TAKEN and a courier's first try included, and then each kind of traffic goes on its own random wait (Section 19.8), so they do not all key at the same instant. The sender keeps off the air through its slots too. A station that put the whole mail together without hearing its opener counts the slots from the mail's lists; on HF it has the mail only after every slot has passed, so it never keys in one and answers the sender's ask instead.
26.5.3 After the slots: asking the silent ones
An ACK for the mail from a named station confirms that station, in its slot or at any time later. Next comes the say-again round (Section 19.9). While it is open the sender holds back its own next broadcast to everyone, so that a new broadcast cannot take the place of the mail's repair: until the round ends, 22 seconds after the last slot (32.25 seconds after a bulk mail's air with eight slots), or, if a station asked for a repair, until the repair has gone, and at the latest 22 seconds after that. When every station the mail names has confirmed it and nobody has asked for a repair, the wait ends there, a few seconds after the mail, since no station needs the repair. Its transmissions to one station go meanwhile. A listener that missed part of the mail lets the slots its opener named go by before its usual wait, and the sender starts collecting the asks when the last slot is over; after a broadcast whose opener names no slots, neither waits.
Then the sender asks each named station still unconfirmed, one at a time, with the QSL probe, [presence]
26.5.4 When it is done, and when it goes again
A mail that every station it names has confirmed is done: no wait for a gateway, no second airing, and the row reads as delivered. That needs eight named stations or fewer, since a station past the eighth cannot confirm on the air. A mail a gateway has taken is done as well: its row reads as deposited, with a note such as "taken by N7XYZ; confirmed: W1AW". Otherwise the mail waits for a gateway like any pickup (Section 26.8) and then goes again, the same bytes. It goes to everyone when a station it names that is still unconfirmed has been heard inside the window for being on the net: the slots run again, a station confirmed before stays confirmed, a station that has the mail by now confirms again in its slot, and a gateway that hears it deposits it. When none of them has been heard, it goes to the gateway alone, as a transfer aimed at it, which deposits it at the mailserver for them; and if the station cannot pick a gateway to send it to then, the mail stays waiting for the next one heard rather than going to everyone for nobody. It goes again only while some named station is unconfirmed and no TAKEN has been heard.
26.6 Custody: who is holding your mail
Custody is responsibility. A station that takes custody of a mail is saying: "I have stored it somewhere safe, and it is my problem now, not yours." In mLink the only safe place that counts is the mailserver, and the only station that can claim custody is one that has just put the mail there.
26.6.1 Gateways
A gateway is a station, registered at a mailserver and recently in contact with it, that does mail work for other stations. That work comes in two parts, each switched on by its own setting, and a station may do either, both or neither:
- Deposit mail we overhear. Mail the station hears on the air for others goes to the mailserver: a pickup broadcast (Section 26.6.2), a transfer between two other stations (Section 26.6.5), and a mail it holds when the sender asks for a relay. A station that deposits only this way does it quietly: it does not show the gateway flag, so nobody aims mail at it or asks it for theirs.
- Offer to check and serve mail to stations we overhear. The station shows the gateway flag in every PRESENCE it sends (Section 16.2.1), and every station that hears it notes the flag in its heard list. It checks the mailboxes of the stations it hears and offers them their mail (Section 26.9), answers their own checks, delivers, takes mail a station hands it, and does mailbox business for them, registration included (Section 26.10).
A station's own mail needs neither setting: it uses the mailserver whenever it is registered and the address is set. A gateway needs no special hardware and no special license, only a working internet connection. Whatever a gateway offers a station is the mail addressed to that station's callsign exactly (Section 27.3.2).
The proof is kept fresh by the station itself: it looks in its own mailbox every five minutes, and also 15 seconds before each of its own beacons, and brings in whatever is there. The look before a beacon is why a station with its own internet connection is not offered its mail over the air: by the time another gateway hears the beacon and looks, the mailbox is empty. If a request to the server gets no answer at all, the gateway stops showing the flag at once and tries again a minute later. A server that answers with a refusal is plainly still there, so a refusal does not stop the flag.
26.6.2 The custody rule
A gateway takes custody of a mail when all of these hold:
- it received the mail as a pickup broadcast, with "Deposit mail we overhear" on, or in a transmission aimed at the gateway itself, with either setting on;
- the gateway is not one of the mail's recipients (mail for you is yours to keep, not to forward);
- the mail has somewhere to go: at least one To, Cc or outside address;
- it has not already heard the same mail claimed.
It then deposits the mail at the mailserver, and only after the server confirms does it send [presence]
- deposited: the mailserver accepted it just now. The sender's mail becomes deposited.
- already held: the mailserver had it before. Still "got it"; also deposited.
- delivered direct: a courier handed it straight to its only recipient, who acknowledged it. The sender's mail becomes sent.
- held: net control of a Virtual Net keeps it for a member who is off the air. It does not mean the mail is at the mailserver. The sender's mail becomes held (Section 24.8).
After a mail to several stations the TAKEN also waits: until the last reply slot is over, and then the gateway's own random wait (Section 26.5), so that it never lands on a station's confirmation. A gateway never announces custody it does not have. If the deposit fails, it stays silent, and the mail stays in play for someone else. A sender accepts a TAKEN naming its mail at any time, even long after it stopped listening for one.
26.6.3 When several gateways hear the same broadcast
Each waits a random time of up to four seconds before depositing. The first to finish sends TAKEN; the others hear it while they wait and drop the job. If two deposit anyway, no harm is done: the mailserver recognizes the identical bytes and stores the mail once, and the second TAKEN says "already held".
26.6.4 When the sender missed the TAKEN
A TAKEN can be lost, and the sender will then send the mail again. A gateway that hears a mail it knows to be at the mailserver does not ignore the repeat; it answers "already held". It gives that answer at most once in 15 seconds for one mail. Because the repeat reaches every gateway at once, each waits a short random turn of its own before answering, so the first answer is heard by the others and they stay quiet. When the repeat is a mail to several stations, that turn starts only once its reply slots are over and the gateway's own wait after them has run. Where many gateways are in earshot, a repeat REQUEST is answered by place in line, as the first was.
26.6.5 Overheard mail
A gateway with "Deposit mail we overhear" on also overhears mail aimed at other stations. It deposits that too, with no TAKEN: the transfer in progress has its own proof of delivery, the recipient's acknowledgment. The quiet deposit costs no air, and the mailserver discards duplicates. Two kinds of mail are left alone. A gateway does not deposit mail it fetched from the mailserver and delivered itself. And it does not deposit mail it overhears from another gateway unless a RELAY or FOR frame names the true author: without that, the deposit would go in under the delivering gateway's name and the mailserver would refuse it.
It pays off when the direct transfer fails. The sender's REQUEST for a relay names the mail, and a gateway that holds that mail can help without any path to the recipient. It waits three to four seconds, and if in that time it hears neither a SELECT choosing a radio relay for the mail nor another station's TAKEN, it deposits the mail again and sends TAKEN. A gateway that is going to answer this way does not also offer to carry the mail by radio, even when it hears the recipient: one station gives one answer. A gateway that hears five or more other gateways does not rely on that short wait, because dozens of gateways may hold the same mail. It takes a place in line among the gateways it has heard in the last half hour, by the rule relay volunteers use (Section 21.3.4): places one and two answer about three seconds after the REQUEST, on different announce channels, three and four at about five seconds, five and six at about nine. A gateway past the sixth place still leaves its copy at the mailserver and says nothing on the air. A gateway waiting to answer drops its answer the moment it hears another gateway's TAKEN for the same mail. If a REQUEST goes by with no answer heard, each gateway draws its place from half as many on the next one, down to six, so a few gateways among many still answer within a request or two. The sender's station counts its search as answered and marks the mail deposited. The mailserver behaves like a relay with endless patience: it hands the mail over whenever the recipient next turns up.
26.7 Couriers: carrying mail toward the internet
Now suppose nobody who heard a pickup broadcast is a gateway. The mail is in their stores, but nobody can deposit it. A station that hears a pickup broadcast and cannot deposit it becomes a courier: it holds the mail and moves it one step closer to the mailserver, or to its recipient, when a chance comes along.
26.7.1 Who becomes one, and the wait
A courier announces nothing when it takes the job. It already has the mail in its store; it makes a note: this mail, this author, still needs a way out. A station keeps up to eight such jobs at a time.
Four kinds of station never make the note: a station that deposits the mail it overhears (the custody rule covers it), a station set to listen only, a station whose relay setting is below allow bulk (Section 21.9), and any station when the sender of the broadcast was itself showing the gateway flag, because the courier would only be carrying the mail back to where it came from.
A courier waits at least 24 seconds before doing anything, because a gateway that heard the broadcast directly can take about that long, on a busy channel, to deposit and get its TAKEN on the air. On top of that comes a wait of its own: one of 8 turns on a quiet net and of up to 16 on a busy one, the turns six seconds apart, plus up to three seconds more. Its first chance therefore comes between 24 seconds and a little over a minute after the broadcast on a quiet net, and up to two minutes after it on a busy one. Two couriers holding the same mail reach their first chance at different moments, and the later one sees what the earlier one did. After a mail to several stations, the first chance also never comes before the reply slots and the courier's own wait after them are over, though the 24 seconds normally outlast them anyway. A TAKEN heard at any point ends the job.
26.7.2 Handing it on
Once its wait is over, a courier checks about once a second whether it has a way forward:
- If the mail has exactly one recipient, no Cc and no outside address, and the courier has heard that recipient in the last two minutes, it sends the mail straight to them. Delivery beats custody. When the recipient acknowledges, the courier sends TAKEN with the "delivered direct" status.
- Otherwise, if a gateway is on its heard list as on the net (Section 20.9), it sends the mail to the most recently heard one. The gateway applies the custody rule, deposits, and sends TAKEN.
- Otherwise it keeps waiting, and transmits nothing to say so.
Either way the transfer carries a FOR frame at the front naming the mail's true author and its id, the same frame a relay uses (Section 21.5), so the mail is filed under the person who wrote it and not under the courier. A transfer long enough to ask first asks with the ASK, behind a FOR with its probe bit set: the station asked may have the mail already, and then answers "I have it" and nothing more is sent (Section 18.6.5). A courier holds off for two seconds after hearing a gateway's PRESENCE, since that gateway is still transmitting and cannot hear anything yet, and while any announce channel is reserved (Section 19.2).
Net control of a Virtual Net uses the same hand-off for mail it keeps for an absent member (Section 24.8.4), aimed at gateways only, since it delivers to its members itself. The gateway deposits and says TAKEN "deposited"; net control keeps its own copy and still delivers it if the member checks in first, and then tells the gateway with a "delivered" message (Section 26.10) so the mailbox copy is closed.
After a gateway acknowledges the transfer, the courier allows 30 seconds for the TAKEN. If none comes, or the transfer came to nothing, it tries again a minute later. It keeps the job for one message lifetime (Section 22.4) and then forgets it. That is the courier giving up, not the mail: the sender's station still owns the mail and keeps trying.
26.7.3 A crowd of couriers
Picture a pickup broadcast heard by ten stations, none of them gateways, and then a gateway coming into range. Three habits stop all ten sending the same mail to it.
- Spread out. The random waits above mean the couriers do not all move at once.
- Stand back when another courier is already carrying it. A courier that hears a FOR frame naming the mail cancels its own attempt, even one already queued or on the air, and waits a minute or more before it looks again. If the other courier succeeds, a TAKEN ends the job. If it fails silently, the job reopens.
- Stop the moment it is done. When a TAKEN for the mail is heard, every courier drops the job wherever it stands. A copy waiting in the send queue is removed; one on the air is cut off cleanly (Section 18.9).
26.7.4 Carrying the news back
The gateway's TAKEN reaches the stations that hear the gateway. But the sender may have been heard only by the courier, and may never hear that TAKEN. The courier whose finished transfer the TAKEN answers therefore repeats it once, toward the sender.
Only that one courier does it, and lazily. It skips the repeat if the links map says the sender hears the gateway directly (Section 20.8). Otherwise it waits three seconds plus 0.7 seconds for every decibel by which its link estimate for the sender falls short of +18 dB, plus up to six seconds more that differ from station to station. A courier that has not heard the sender in the last half hour counts as hearing it worst and waits about 23 to 29 seconds. If another TAKEN for the same mail is heard first, the repeat is canceled.
Each courier only ever moves the mail closer: from a holder to a gateway, or from a holder to the recipient. Nobody plans a route.
26.8 When nobody took it: waiting for a gateway
After a pickup broadcast airs, the sender listens for a TAKEN for ten minutes. If none arrives, the mail becomes deferred with the note "no pickup: waiting for a gateway". Nothing is transmitted while it waits, and no clock ends the wait (Section 22.6).
The cue to try again is an event: hearing any PRESENCE that shows the gateway flag. The station then waits two seconds, waits for all three announce channels to be free of reservations, and sends its waiting mail again. A mail whose lists name several stations goes as it first went, to everyone, so that its reply slots run again and any gateway that hears it deposits it (Section 26.5.4); one that every named station has confirmed does not wait here at all. Any other pickup, one that names a single station or only outside addresses, is aimed this time at the gateway just heard: a transfer aimed at one station gets an acknowledgment and repair of lost frames, and the gateway's custody rule takes it from there. Several such mails go together (Section 26.12). If the link to that gateway is too weak for a transfer of that size, the mail is broadcast again instead.
A mail that has been tried and failed does not go again on every gateway heard. It waits the same doubling gaps as any deferred message, one minute to thirty-two (Section 22.6.1). A gateway heard while a mail is inside its gap is remembered, and the mail goes as soon as the gap ends, provided the gateway has been heard within the last two minutes. The station also holds these sends back while it is slowing its large transfers on a crowded channel (Section 19.8.2).
26.9 Receiving mail without asking
To receive mail held at the mailserver, a station normally does nothing at all. It does not need to be registered, to have internet, or to ask.
26.9.1 A gateway hears you
Every transmission starts with a PRESENCE. A gateway that serves the stations it hears, on hearing one, from any station and for any reason, asks the mailserver over the internet whether that station's mailbox holds anything unread. If it does, the gateway sends [presence]
Three limits keep this polite. A gateway looks in any one station's mailbox at most once in fifteen minutes. When it has told a station of waiting mail and the station has not asked for it, the gateway waits longer before saying the same thing again: 15 minutes after the first time, 30 after the second, and 60 after the third and every later one. The wait goes back to 15 minutes when the station asks this gateway for its mail or about its mailbox, or when the number or size of the mails waiting changes. A station heard asking a different gateway for its mail has plainly been told already, so every other gateway counts that as a telling of its own and stays quiet for its first wait of 15 minutes. That quiet is given once for each gateway the station asks. It never offers to a station that shows the gateway flag, because that station fetches its own mail over the internet. And when several gateways hear the same station, each waits a turn of its own within the first ten seconds or so, and a gateway that hears another's AVAIL for that station, or hears the station ask another gateway, drops its own, including one still waiting for its turn.
26.9.2 Offer, request, delivery
A station that hears an unasked AVAIL for itself, showing mail waiting, and that cannot reach the mailserver itself, answers by itself with [presence]
A GET gets no acknowledgment of its own. If nothing arrives within 12 seconds the station sends it again, up to three times in all, and it holds the repeat back while a delivery from that gateway is visibly under way. If the gateway still has not answered, the station asks again two minutes later and then at doubling gaps, for as long as that gateway's AVAIL is less than ten minutes old. On the gateway's side, a repeated GET while the same mail is already queued or on the air for that station does not start a second copy.
26.9.3 Asking instead of waiting
A station can also ask. It sends a mailbox query, [presence]
The query can ask for a list as well. The AVAIL then says a list follows, and the gateway sends one to three short messages, each a mailbox listing (one more operation of the mailbox control payload) naming up to five waiting mails, oldest first: the author, the size, the mail's id and the first 14 bytes of its subject. Nothing is delivered until the operator chooses. Without the list, the station answers the AVAIL with a GET for everything.
If no gateway answers within 30 seconds, the station looks for a gateway that told it about waiting mail in the last ten minutes, and if there is one, sends that gateway a GET.
26.10 Mailbox business that travels as a message
The four mail frames reach only the stations that hear them directly. For business with a gateway out of direct range there is a mailbox control payload (Section 23.4): a few bytes sent as an ordinary directed message, so that the relay handshake can carry it. It has eight uses.
- Fetch one. It names a mail from a listing by its author and its id, and asks the gateway to deliver exactly that mail.
- A relayed query and its answer. A station whose QRY nobody answered may send the same question as a message to the gateway it heard most recently in the last two minutes. This is off unless the operator switches it on, because it spends a third station's air time on routine traffic. The gateway answers with the count and size, as a message, and starts delivering without waiting for a GET.
- Registering, and the server's answer. A station with no internet sends its public key to a gateway, which registers it at the mailserver and sends back the server's public key (Section 27.3.1), or says why not: the mailbox belongs to a different key, or the gateway could reach no mail server. The operator need not know a gateway's callsign. The station asks the gateway it heard in the last two minutes; if it has heard none, it waits, through a restart if need be, and asks the first station it hears whose PRESENCE carries the gateway flag. The request goes out like any other directed message, so asking adds no new timing on the air.
- Which lists exist, and the answer. The answer names up to eight mailing lists with the number of subscribers of each.
- Delivered. Net control names a mail it has delivered directly to a member, by its author, its id and the member, and the gateway marks the member's mailbox copy delivered (Section 24.8.4). A gateway that overhears a delivery and the member's acknowledgment does the same by itself, with nothing sent.
26.10.1 Mailing lists over the air
Lists live at the mailserver (Section 27.6.1), and a station without internet uses them with nothing but mail. To post, it sends a mail with the list's address as an outside address. To join or leave, it sends a mail to the list's address whose subject or body is the single word "subscribe" or "unsubscribe". Either goes out as a pickup broadcast, a gateway deposits it, and the server acts on it; the confirmation comes back as mail. Since a default server accepts a carried mail only when it can check the sender tag, this works for a station that has registered, which it can do over the air.
26.11 How a pickup is named
A mail on the air is named by its two-byte message id (Section 18.2.2), and two bytes are too few to name a mail alone. So every mail frame or payload that names a mail carries the author's callsign beside the id: TAKEN, the FOR on a delivery, the fetch-one request. In storage a mail is looked up by the pair.
One wrinkle is particular to mail. The id depends on the on-air addressee, so the same mail aimed at a gateway and sent as a broadcast would have two different ids. For pickup and custody mLink always uses the broadcast form, computed as if the mail had been sent to 0CQCQCQ, whichever way a copy traveled. The sender, the courier and the gateway all compute the same number without anyone transmitting it. The one exception is a gateway answering a REQUEST for a relay: its TAKEN quotes the id the REQUEST used.
26.12 Bundles
Every transfer starts with opening frames, and those are the part most likely to collide with somebody else. So when a station is about to send a mail, it looks at what else is queued. Any other mail for the same station joins the same transmission as a bundle: up to eight mails, each kept byte-for-byte as it would have been sent alone. When the destination shows the gateway flag, waiting pickup broadcasts that name one station or only outside addresses join too, since the gateway would deposit them anyway. Several such pickups can also go out together as one broadcast. A mail to several stations is never bundled: it airs alone, because the ACKs in its reply slots name one transmission (Section 26.5). Compression works across the whole bundle, so mails with similar headers shrink further together.
A bundle holds at most 48,000 bytes of mail before compression when aimed at one station, and 5,600 bytes as a broadcast, which keeps it inside the broadcast limit. Each mail inside keeps its own id, worked out by both ends in the broadcast form, so custody, TAKEN and the spotting of duplicates work on each mail separately, and each keeps its own entry in the sender's outbox. Encrypted mail and mail addressed to an area are never bundled.
26.13 What to remember
- A mail has two addresses: the station the transmission is aimed at, and the recipients inside the mail. A mismatch between them is how a mail asks to be carried onward.
- A gateway's work is two settings: deposit the mail it overhears, and check and serve mail for the stations it hears. A station's own mail needs neither.
- The station picks the way out. A station that reaches the mailserver deposits mail for a station it has not heard in two minutes and airs nothing. Otherwise: direct to the recipient, then a relay or a gateway that overheard it, and for several recipients a pickup broadcast.
- Custody is claimed with one TAKEN frame, and only after the mailserver has confirmed the deposit. Couriers stay silent until they act, stand back when another is carrying the same mail, and stop the moment it is taken.
- A mail to several stations airs once, to everyone. The first eight stations it names confirm it in 1.2-second reply slots, in list order; its opener says how many slots follow, and every station that heard the opener keeps off the air until they end. The sender asks the silent ones once each, and a mail every named station has confirmed is done.
- A station receives without asking: a gateway that hears its PRESENCE checks the mailserver and sends AVAIL; the station answers with one GET.
- A mail fits one transfer: 64,004 bytes wrapped to one station, 6,028 as a broadcast. Several mails for one station travel as a bundle.
The Mailserver
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
The windows where an operator sets up, registers and uses the mailserver are described in Chapter 7.
27.1 A mailbox server with no radio
The mailserver, called the CMS (central mail server) in the station's log, never touches audio, never transmits, and never reads a station's database. Stations reach it in exactly one way: a gateway, a station with a working internet connection, sends it a request on its own behalf or on behalf of a radio-only station it has heard. When gateways do that is the subject of Chapter 26.
The program is deliberately plain. It keeps everything in one database file, listens on the local machine only (port 8380 unless told otherwise), speaks unencrypted HTTP and handles one connection at a time. The public address and its TLS certificate belong to an ordinary reverse proxy in front of it. Everything a station asks goes to one address as a small JSON document naming a command, and every request is complete in itself: there is no session to open or keep alive.
27.2 What it stores
27.2.1 The mail exactly as it flew
The mailserver stores each mail as the exact packed bytes that go over the air, the same bytes a station keeps in its own store. It unpacks a mail only to read what it needs: the recipients, to know which mailboxes get a copy, and the subject and size, to show in a listing. A gateway that later fetches the mail gets those same bytes back and sends them unchanged. There is one mail format in mLink, not a radio format and a server format with translation in between.
27.2.2 Mailboxes appear on their own
There is one mailbox per base callsign, shared by every form of that callsign: its SSIDs, its portable forms and its prefixed forms (Section 27.3.2). It comes into existence the first time a mail arrives for that callsign. The owner does not have to have registered, or even to have heard of the mailserver. Mail simply waits. Registration matters for other things: asking the server anything at all, and letting other stations hand in mail the owner wrote (Section 27.5.1). Reserved addresses such as 0CQCQCQ are never mailboxes; the server skips them when handing out copies.
27.2.3 A mail only moves forward
Each stored mail has one of three states, and it only ever moves forward:
- Deposited: waiting for its recipient. This is what "unread" means in a listing.
- Fetched: the recipient has it, either because their own station collected it over the internet or because a gateway delivered it over the air and reported the delivery.
- Archived: the owner's station has confirmed that it holds its own copy. A station that collects its mail over the internet does this as soon as the mail is safely stored. Archived mail drops out of the ordinary listing.
Collecting mail never deletes it, and nothing deposited or fetched is ever removed automatically. The server's operator may choose to delete archived mail after a number of days, in an hourly sweep; the default is to keep everything.
Each mail also records whether it came from the internet, from a radio gateway or from the server itself.
27.2.4 How the server tells mails apart
The server identifies a mail by its own row number and by a fingerprint of its bytes (a SHA-256 hash). A mailbox can hold a given fingerprint only once. That one rule makes every deposit safe to repeat: if five gateways overhear the same broadcast and all deposit it, the mailbox ends up with one copy, and the later depositors are told they were not first.
The server also stores the mail's two-byte on-air message id (Section 18.2.2), because gateways quote it, but never relies on it to tell two mails apart.
27.3 Mail login: the mailkey
A station that wants to ask the mailserver anything registers once. From then on it proves who it is with a mailkey: a 32-byte secret that only that station and the server hold. A secret cannot be sent over amateur radio in the clear, and it may not be sent encrypted either (Section 28.1). So the mailkey is never sent at all. Both ends work it out.
27.3.1 Registering without sending a secret
The first time it needs one, a station creates a key pair on the standard P-256 curve: a private key that never leaves the station's computer, and a matching 65-byte public key. The mailserver has a key pair too. Registration swaps the two public keys and nothing else:
- The station sends its callsign and its public key.
- The server records the callsign against that public key, and answers with its own public key and a key number.
- Each side combines its own private key with the other side's public key, by the ECDH method, and runs the result through a standard key-derivation step (HKDF-SHA256) together with a fixed label, the mailbox's callsign (the base callsign, with any SSID, suffix or prefix taken off) and the key number. Both arrive at the same 32 bytes. That is the mailkey.
The station keeps its key pair, the key number and the mailkey in its own database. The server keeps the station's public key and the mailkey.
Because nothing secret crosses in either direction, registration also works over the air. A station with no internet sends its public key to a gateway as a mailbox-control message of 66 bytes; the gateway registers it at the server and sends back a status, the key number and the server's public key, 71 bytes (Section 26.10). The gateway holds neither private key and can compute nothing from what it carries. A dishonest gateway that swapped in a wrong server key would leave the station with a mailkey the server does not share: a registration that does not work, not a stolen identity.
A registration request also carries a proof that it comes from the most recent mLink. Every release has its own registration token inside it, and the request holds the release's name, the time and a keyed hash (HMAC-SHA256) of the callsign, the public key and the time under that token. The mailserver accepts a registration only from the latest published release, with that release's token, and only when the time in the request is within ten minutes of its own clock. A gateway that registers a station for the air adds its own proof, so a station on an older release can still register through a current gateway. The proof is a speed bump, not a lock: the token is inside every copy of the program, so a determined person can copy it. It keeps casual scripts and old programs from registering callsigns in bulk, and it asks nothing of the operator. Each mailserver also takes at most five registration attempts a day from one internet address (a gateway that registers stations off the air gets fifty a day) and a fixed number of registrations in all each day.
The server program also accepts a registration by callsign and password, and then makes up a random key and returns it in its reply. That path is for tools and administrators on the internet. No mLink station registers that way, and no password is ever part of an exchange over the air (Section 28.4).
When a registration does not take, the station says what happened in plain words: no mail server answered at the address it was given (with the web server's status, such as HTTP 404), it could not connect at all, or the mail server refused and why. Two refusals are specific to the proof: "update mLink to register" means the program is not the latest release, and a message about the clock means the station's time differs from the server's by more than ten minutes. The key pair the station made stays its own; only the server's acceptance is missing.
27.3.2 One mailbox for a base callsign
Every form of a callsign reads and writes the mailbox of its base callsign, under the base callsign's keys. The server takes off an SSID, the suffix of a dash and a few characters that marks one of an operator's stations (K7OTR-1, K7OTR-7); a portable or other suffix after a slash (K7OTR/P, K7OTR/M, K7OTR/MM, K7OTR/QRP, K7OTR/AE); and a prefix before a slash (W1/K7OTR, KH6/W1AW). Of the parts on either side of a slash, the base is the one that is a callsign by itself; when both are, the one that ends in a letter wins, because a prefix such as KH6 or W1 ends in a digit. So K7OTR-1, K7OTR-7, K7OTR/P and W1/K7OTR all use K7OTR's mailbox, and a mail to two of them is one copy.
The mail itself keeps every callsign exactly as it was sent. Each copy in a mailbox records the callsign or callsigns on the mail that named that mailbox, so a mail to K7OTR-7 is held as "addressed to K7OTR-7", and a mail to K7OTR-7 with a copy to K7OTR as "addressed to K7OTR-7 K7OTR". Mail is offered over the air by addressed SSID and owned by the base callsign. When a gateway or a net control station asks the server about a station it hears, it names that station's callsign exactly, and the server lists, counts and hands over only the mail addressed to that callsign: K7OTR-7 is offered the mail for K7OTR-7, not the mail for K7OTR-1. The owner's own request, made by any of its stations with the mailbox's key, lists the whole mailbox, and each mail says which station it was for; a station that collects a mail meant for another of its SSIDs files it under that SSID. The mailbox and everything that controls it, its keys, its sign-in codes, its password and the approval of another key, belong to the base callsign.
Registration follows the same rule. The first registration of the base callsign, from any of its forms, owns the mailbox. Another form that registers with the same public key joins that mailbox and works out the same mailkey. A different public key for the same base callsign is refused, as below.
27.3.3 When someone else claims your callsign
The first registration for a callsign claims its mailbox. After that, an attempt to register the same callsign, or another SSID of it, with a different public key, or with a wrong password, gets nothing. The refusal names the mailbox and says its key belongs to a different station. The server adds one to a conflict counter for the mailbox, records the attempt, keeps the refused public key as a request against the mailbox (one per key; asking again only updates it), and puts a notice titled "Mailbox ownership conflict" into the real owner's mailbox. The notice names the station that asked and says what the owner can do: if it was their own station, approve it in the mail portal's Stations tab or give it a code (Section 27.3.4); if not, refuse it there, and nothing more is needed. Only one such notice is outstanding at a time, so repeated attempts do not flood the box; other notices from the server waiting unread do not hold it back. Registering the same public key again changes nothing. A mailbox that was registered with a password, and has had a station added since, refuses a registration with the right password too: the refusal says so, the station joins with a code or an approval like any other, and a notice titled "Password registration refused" tells the mailbox, because whoever knows that password need not be its owner.
For a real dispute, or a station that was lost or stolen, the server's administrator has two commands on the server itself: one lists every mailbox with unresolved conflicts, and one evicts a mailbox's stations. Eviction gives the mailbox a new password, which the administrator hands to the owner to register their station again. In the same step everything a station could have handed on stops working: every station key of the mailbox, any unused code for adding a station (Section 27.3.4), its sign-in links and its five written-down codes (Section 27.3.5), and the portal password; every request still waiting against the mailbox is marked refused. Anyone signed in to the mail portal for that mailbox is signed out at the next thing they do there. The administrator can keep the portal password when the owner only lost a station and nobody else knows or set it. Once the owner's station is registered again over the internet, it gets five new written-down codes, and the owner signs in with one of those or a code from the station and sets a new password.
27.3.4 More than one station
A home station and a field laptop under one callsign each have their own key pair and therefore their own mailkey. Since a second public key for a claimed callsign is refused, the owner vouches for the new station in one of three ways:
- A code from a station already in the mailbox. The station makes it from its own mailkey, the way it makes a sign-in code but over a label of its own, so the two kinds never stand in for each other. Nothing is sent to make it. The server accepts it for about fifteen minutes after the minute it was made, and one minute early.
- A code from the mail portal. The owner makes one in the Stations tab. It is random, kept only as a hash, works for 15 minutes, and making a new one retires the old one. Five wrong codes against it retire it too.
- Approving the request the refused key left, in the same tab. This is the way for a station that registers over the air through a gateway: once approved, it asks again and is accepted.
A code is eight characters, 40 bits, works once, and is typed at the new station when it registers over the internet; it rides only that request and never goes over the air. The server counts wrong codes for each mailbox and the address they come from: after five from one address in ten minutes it tries no more from there for that mailbox, and after a hundred from all addresses in a day it tries none until the day is out. Approving a request still works then. A mailbox holds at most eight station keys. Each key added puts a "Station key added" notice in the mailbox, and the owner's own mail checks carry the number of keys, so a key added without the owner knowing shows at their station.
The owner can also remove a station key in the Stations tab, never the last one. The key is kept as revoked, so its number is never used again, and that station can no longer sign a request, pick up or send the mailbox's mail, or make a code. It can join again later like a new station: its next registration waits as a request to approve, or it brings a code. A "Station key removed" notice goes to the mailbox. Removing a key ends nothing else: sign-ins to the portal already made, sign-in links and the written-down codes belong to the mailbox, not to one station, so a lost or stolen station is a case for the administrator's eviction. Making a code, approving a station and removing a key each need a portal sign-in from the last fifteen minutes, so a session left open on a shared computer cannot change the mailbox's stations.
27.3.5 Signing in to the mail portal
The mail portal is a web interface served at the mail server's address by a separate program, which asks the mail server to check every sign-in. Signed in, the operator reads and writes the mailbox's mail, sets a password and looks after the mailbox's stations (Section 7.5.4 shows the pages). At their own station an operator signs in with a link; elsewhere there are three ways, each with their callsign.
- A link the station fetches. "Open the portal" in the client has the station ask the mail server, in an ordinary signed request (Section 27.3.8), for a one-time sign-in link, and the client opens it in the browser. The link carries 256 random bits made by the server; the server keeps only their SHA-256 hash, with the mailbox and the callsign of the station that asked, and the station keeps the link only until the client takes it. Opening the page signs nobody in: it shows the mailbox and the callsign and one "Sign in" button, so a link checker or a preview that opens the address uses nothing up. The button signs in once, within ten minutes of the link being made. A mailbox has at most four links live at once; a fifth ends the oldest. The link never goes over the air, so a station without internet has none, and its operator uses one of the ways below.
- A code the station makes. The operator's own station makes a one-time code from the mailbox's mailkey: eight characters, the first 40 bits of an HMAC-SHA256 keyed with the mailkey over a fixed label of its own, the mailbox's callsign and the current minute. The server holds the same mailkey, so it can make the same code and compare. A code is accepted for 24 hours (and one minute early, for a clock that runs fast), works once, and is checked against every key of the mailbox, so any form of the callsign can make it.
- One of five written-down codes. When a station registers over the internet, the server gives the mailbox five one-time sign-in codes in the same eight-character form, for the operator to copy down. Each works once and does not run out until it is used. Asking for codes again from a station that is online makes five new ones and retires all five old ones. A mailbox that already has unused codes, made earlier or by another station of the same mailbox, keeps them when a station registers. The server keeps only a salted SHA-256 hash of each code, and the codes are never sent over the air.
- A password. Once signed in with a code, the operator can set a password of 10 to 63 characters, and from then on sign in with it without the client. The server keeps it only as a PBKDF2-HMAC-SHA256 hash with a salt of its own, the same scheme a station uses for its own passwords. An operator who forgets it signs in with a code and sets a new one; with no code at hand, the mail server's administrator can remove the password.
Forty bits, or a password, could be guessed only by trying, so the server counts wrong codes and wrong passwords together, for each mailbox and the address they come from: after five from one address in ten minutes it refuses that address's codes and passwords for the mailbox until the ten minutes are up, and after a hundred from all addresses in a day it refuses them from everyone for the rest of the day. A link cannot be guessed, so no count applies to it and neither refusal stops it: a stranger who fills those counts cannot keep the operator at their own station out of the portal. An administrator signs in with a code made on the server itself, which works once, within an hour, and is kept only as a hash. The check is open only to the portal program, which proves itself with a secret it shares with the mail server.
An operator's sign-in lasts until 30 minutes pass without a page, eight hours in all, signing out, or a restart of the mail server, whichever comes first. A mailbox can be signed in from four browsers at once; a fifth sign-in ends the one used longest ago.
27.3.6 Remembered administrator browsers
An administrator who ticks "Remember this browser" at sign-in comes back signed in, without a new code, for 30 days from that sign-in; then the server asks for a code again. The browser holds a random value, and the server keeps only its SHA-256 hash with the address and browser it was last used from. Every time the browser comes back, the server takes the value, opens a session and hands out a new value in its place, and a browser has one session at a time. A copied value therefore works only until the real browser comes back: the real browser then shows a value already used, and the server forgets the browser, the copy's session with it. Signing out forgets the browser. The overview lists an administrator's remembered browsers, with where each was last used, and forgets one or all of them; forgetting all also ends every session of that administrator, including ones opened with a code alone. The same can be done on the server's command line, for a lost computer.
27.3.7 Reading and writing mail in the portal
Reading changes nothing. A station is offered, and picks up, the mail the server holds as new; listing a mail, opening it or downloading an attachment in the portal leaves it that way, so mail read on the web still reaches the station afterwards. Only two actions change what the server offers the station. "Do not deliver" archives the mail: it stays on the server to read and is never offered to the station again, and there is no undoing it. "Delete" removes the mail from the server for good, and the same mail handed in again is not stored again. A copy a gateway already fetched to carry over the air is out of the server's reach either way.
A mail written in the portal is built in the same format a station writes and tagged with the mailbox's own key, then handed on exactly as a station's own internet send is, so mLink stations, internet email, Winlink and mailing lists get it under the same rules and limits. It must fit one transmission, as every mail a station sends must, because it may reach its addressee over the air. The sender keeps a copy in the mailbox's Sent folder, archived so the station is not offered it. A mailbox sends at most 100 mails a day from the portal.
27.3.8 Signed requests
Every request other than registration carries three extra fields: the station's callsign, the time in seconds since the mLink epoch (Section 23.6), and an 8-byte keyed check. The check is the first 8 bytes of an HMAC-SHA256, keyed with the mailkey, over a fixed label, the callsign, the time and a hash of the request's body. The server works the check out again with each mailkey it holds for that callsign and accepts the request if one matches.
It refuses a request whose time is more than ten minutes from its own clock (the default; the server's operator can change it), any exact repeat of a request it has accepted, and any request older than one it has already accepted from the same callsign. Together those stop someone replaying a recorded request. Every request also carries a number of its own, so that two otherwise identical requests in the same second do not look like a replay. The check proves who is asking and hides nothing: the request itself is readable.
27.4 Open pickup: anyone may carry anyone's mail
Any registered station may list and fetch any station's mailbox, not just its own. That is the open-pickup model, and it is what makes receiving without asking work (Section 26.9): a gateway that hears a station asks "what is waiting for this callsign?" under its own mailkey, fetches the mail, and delivers it over the air. The answer holds only the mail addressed to that exact callsign (Section 27.3.2). Three rules keep this sensible:
- Looking does not count as delivery. When a gateway fetches someone else's mail, the mail stays deposited.
- Delivery is reported, and the reporter is recorded. After the recipient acknowledges the mail over the air, the gateway tells the server so, and the mail moves to fetched. Any registered station may make that report, and the server's journal records which one did. Everything is attributable, which is what amateur nets have always relied on.
- Managing a mailbox is the owner's job. Archiving mail and filing it into folders are allowed only on your own mailbox.
27.5 Mail coming in
Mail enters a mailbox in one of five ways.
27.5.1 A gateway deposits mail it carried
This is the everyday case. The gateway sends the mail's bytes, the author's callsign and the mail's on-air id. Its own callsign is proved by the signed request; the author's is only claimed.
That claim is checked with the sender tag, the two bytes a registered station puts at the end of every mail it writes. The tag is the first two bytes of an HMAC-SHA256, keyed with the author's mailkey, over every byte of the mail before it, under a different fixed label from the one signed requests use, so that neither can be passed off as the other. The server tries the claimed author's mailkeys against it:
- The tag matches. Only a holder of that mailkey could have made it, so the claim is proved and the mail is accepted.
- The author is registered here and the tag matches none of their keys. Refused, always. The failure adds one to that callsign's conflict counter and is journaled. The refusal names the callsign and how many keys were tried, because the usual innocent cause is a gateway naming the station that handed it the mail and not the mail's author.
- The mail has no tag, or its author is not registered here so the tag cannot be checked. Refused by default. A server started with a permissive setting accepts these; that setting is for bringing up a new net before its stations have registered.
So mail from an unregistered station still reaches anyone it can reach over the air, but on a default server no gateway can carry it into a mailbox.
A gateway deposits only mail whose author it knows. It never deposits a mail it fetched from the mailserver and delivered itself, and it never deposits a mail it overheard another gateway delivering, unless it also heard the frame naming that mail's author: the delivering gateway is not the author, and naming it would only earn a refusal.
27.5.2 Why two bytes are enough
A real digital signature would cost 64 bytes, which is 40 % of the 160 bytes a shortburst holds (Section 17.2). Two bytes are 1.3 %. mLink chose air time.
Two bytes work because of how the tag can be attacked. Nobody can compute a tag without the mailkey, so there is nothing to work out at leisure from recorded traffic. A forger can only guess, and each guess means handing the server a deposit: one chance in 65,536 for each key the author has. The server limits the guessing where it is aimed. Once five deposits naming one author have failed that author's tag within ten minutes of the first failure, every further deposit naming that author is refused until those ten minutes are up, whichever station posts it, and the refusal comes before any key is tried. The count is kept on the author, not on the depositing station: a gateway that carries a forged mail it heard on the air is not the forger. The price is that someone posting bad tags under your callsign can hold up mail that other stations carry in for you; mail you send over the internet yourself is not affected.
27.5.3 A station sends directly over the internet
A registered station with internet can hand a mail it wrote straight to the server. No tag check is needed: the author is the station making the signed request.
27.5.4 A distress call is heard
A gateway that completes an on-air distress call writes it up as a mail and deposits it (Section 25.9). The server files it in the reserved SOS mailbox, the permanent record, and gives a copy to every station subscribed to the reserved mailing list "sos". Every gateway that hears the same call writes the same bytes, so the fingerprint rule merges their deposits into one. A distress deposit is never refused for a missing sender tag.
27.5.5 Internet email arrives
If its operator sets it up, the mailserver collects incoming internet email from an ordinary email provider's mailbox, every 60 seconds by default. It does this as a POP3 client (POP3 is the standard way to download mail from a mailbox); it is not a server that mail programs can connect to. The addressing is either CALLSIGN@ the operator's domain, sent through a catch-all, or mailbox+CALLSIGN@, which works on any provider that keeps the part after the plus sign. Each email becomes an mLink mail in that callsign's mailbox, from the special sender EMAIL, with the email address as the sender name. The server keeps the subject and the first plain-text part, up to 60,000 bytes. Email to anything that is not a valid callsign is thrown away. The server does not speak encrypted POP3 itself; it expects a small local tunnel program to handle that.
27.5.6 The server writes to you
The server sends its own notices as sender MLINKMAIL: ownership conflicts, a refused registration with the mailbox's password, a station key added to or removed from the mailbox, and confirmations of mailing-list subscriptions.
27.6 Where a mail goes
When a mail arrives by any of these routes, the server gives a copy to each recipient.
- Every To and Cc callsign gets a copy in its own mailbox.
- An outside address at the mailing-list domain (
lists.mlink.orgunless the operator changes it) is a mailing list. - Any other outside address is internet email. It joins a queue for sending out.
The server reports back how many of the copies were new. That is what lets a gateway say on the air either "deposited" or "already held".
27.6.1 Mailing lists
A list is named by its topic, the part before the @: letters, digits, dots, dashes and underscores, up to 32 characters, case ignored. A topic comes into existence with its first subscriber.
A mail to a list whose subject or body is exactly "subscribe" or "unsubscribe" is a command from its sender: the server updates the list and mails back a confirmation, and nobody else sees it. Anything else is a post, and every subscriber except the author gets a copy. A registered station with internet can also join, leave and ask for the list of topics with a signed request. How a station without internet does the same is in Section 26.10.1.
27.6.2 Email out
If the operator configures one, the mailserver hands queued internet email to an outgoing mail relay, acting as an SMTP client (SMTP is the standard way to send mail). The relay is usually a mail program on the same host. The mail goes out from CALLSIGN@mlink.org by default, carrying the subject and body text; attachments are not sent on. The queue is checked every 15 seconds. A failed attempt is retried after 30 seconds, then after doubling delays up to eight hours, and a mail is marked failed after ten attempts.
27.7 Mail going out to stations
A station reads a mailbox in two steps: a check, which lists what is there (sender, the station it was addressed to, subject, size, state, id and folder), and a fetch, which returns one mail's bytes. A station that is registered and has the mail server's address set checks its own mailbox every five minutes, whether or not it serves other stations, fetches what is unread, and confirms each mail once it is stored. A mail that also arrived over the air appears once.
Folders exist on both sides. The server keeps an inbox for each mailbox and lets the owner file mail elsewhere; when an operator files a mail on a registered station, the station asks the server to file its copy the same way, naming the mail by its fingerprint.
27.8 Chat channels
The mailserver also hosts simple chat rooms for stations with internet. A channel is named like a mailing-list topic and comes into existence with its first line. A line may be up to 512 bytes; a channel keeps its most recent 500 lines, and a station collects new lines 50 at a time. Posting and reading both need registration. Chat is not mail: nothing is per-recipient, and nothing is kept once it has scrolled out of the 500.
27.9 The journal
Every change the server makes to mail and accounts (a registration, a deposit, a state change, a folder move, a list subscription, a failed tag, an email sent) also adds a line to a journal, in the same database transaction, so the two can never disagree. Journal lines hold references and facts (which mailbox, which mail, which station did it), not copies of mail or keys. It is the audit trail behind open pickup. Chat messages are not journaled.
27.10 Staying up: the warm standby
A mailserver can run with a warm standby: a second copy of the program on another host, kept up to date and ready to take over. The primary is started with a shared secret, which switches on two private addresses: one that reports the journal's latest line number, and one that returns a consistent copy of the whole database. The standby is started pointing at the primary with the same secret. Every 10 seconds by default it asks for the line number, and when that has moved on it downloads a fresh copy and swaps it in. The whole database is copied because the journal holds no mail and no keys and so could not rebuild them.
A standby refuses all normal requests with "service unavailable", so stations cannot write to two servers at once. To promote it, the operator restarts it without the standby setting. The server's own key pair lives in the database, so the promoted standby has the same one, and every station's mailkey keeps working without anyone registering again.
27.11 What to remember
- The mailserver has no radio. It keeps a mailbox per callsign, created on first arrival, holding each mail as the exact bytes that flew, and it never deletes mail that has not been picked up.
- A station proves who it is with a mailkey that both ends work out from swapped public keys. Nothing secret is sent, so a station can register over the air.
- A mailbox is the base callsign, with every SSID, suffix and prefix taken off: every form of the callsign reads and writes it, the first registration owns it, the same key from another form joins it, and a different key is refused and kept as a request. Each mail keeps the station it was addressed to, and is offered over the air only to that station.
- An operator signs in to the mail portal with a link or a code the station makes, one of five written-down codes, or a password set in the portal. There they read and send mail and add, approve and remove the mailbox's stations.
- Every request is signed with eight bytes of a keyed check and the time; every mail a registered station writes ends in a two-byte sender tag that only the server can check.
- Open pickup: any registered station may check and fetch any mailbox, so any gateway can deliver anyone's mail. Deliveries are reported, and the journal records who reported them.
- Today's mailserver is bare-bones: one server, one hand-promoted standby, no management tools beyond SQLite's own. Stronger security, sharding, automatic duplication and management tools are planned and not yet built.
Security Under Part 97
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
28.1 The rule, and where mLink stands
In the United States, amateur radio is governed by Part 97 of the FCC rules. Section 97.113(a)(4) prohibits "messages encoded for the purpose of obscuring their meaning", and other countries' licenses carry similar conditions. The test is simple: anyone with the right, openly available tools must be able to read what you send.
Security features meet that test in two very different ways.
- Authentication proves who sent something, or that it was not altered, while leaving the content fully readable. A signature at the bottom of a letter does not hide the letter.
- Encryption hides the content. That is what the rule forbids on amateur frequencies. mLink does not encrypt any message it sends.
Everything mLink does to a message is readable by anyone running mLink: the frame formats are in this book (Appendix B).
28.2 Authentication: mail login
The authentication mLink uses on the air belongs to mail, and its home is Section 27.3. In brief: a station and the mailserver each work out the same secret from public keys they have swapped, so the secret is never transmitted; the station uses it to sign its requests to the server, and to put two bytes at the end of each mail it writes so that the server can tell that mail from a forgery. None of this hides anything, which is why all of it is usable on amateur frequencies.
28.3 Nothing is hidden
Chat, data, mail and every other kind of message go on the air as plain or compressed bytes that any copy of mLink can read. Compression is an openly published method with a dictionary built into every copy of the software (Section 23.5), and the sender, the addressee, the length and the 16-bit check ride in the transmission itself. Because everything is readable, a relay, a gateway, a courier and the mailserver can each carry and file mail by reading it.
28.4 No password ever goes on the air
A password is short and guessable. If any proof of knowing one were sent by radio, a listener could record the proof and try every likely password against it at leisure, and the cure, encrypting the proof, is what the rule forbids. So no mLink exchange over the air contains a password or anything computed from one. What goes on the air in its place is a public key, when a station registers at a mailserver, and after that the two-byte tag on each mail (Section 27.3.1). The names and passwords operators use to sign in to a station stay between the client and that station (Chapter 9).
28.5 Why distress messages are never signed
A distress call (Chapter 25) has no envelope byte: it is a fixed format that every station can read.
The same holds when a gateway writes a call up as mail for the mailserver (Section 25.9). The write-up carries no gateway name, no clock time and no sender tag, so that every gateway hearing the same call writes exactly the same bytes and the server stores them once. A tag or signature inside it would be the gateway's, not the distressed station's, and it would differ from gateway to gateway, turning one incident into several. Who carried the call is still known, because the gateway's request to the server is signed. And the server never refuses a distress deposit for want of a tag.
28.6 What to remember
- Part 97 forbids hiding what a message says. Proving who sent it, with the content still readable, is a different thing and is allowed.
- mLink hides no message: everything on the air is readable by anyone running mLink, and the frame formats are in this book.
- No password, and nothing computed from one, is ever sent by radio.
- Distress calls are never signed, and never refused for lack of authentication.
Sharing the Internet Over the Air
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
The Internet data window and the map's weather menu are described in Chapter 7. This chapter is about how the data is described, asked for and carried.
29.1 The idea
A station in a field camp, on a boat or in a disaster area often has a radio and a laptop and nothing else, while a few hundred kilometers away another station has working internet. mLink lets the second fetch small, well-defined pieces of data for the first. Weather is the one data type the network carries today. The design keeps three things apart:
- a source is where data can come from and how to read it;
- a query is what you want: "the weather here, once" or "keep the weather there up to date";
- the cache is what you already have: the latest result for each source and set of parameters.
29.2 Sources: what a station knows how to fetch
An internet source is a capability, not a request. It describes one web service the station knows how to use: a web address with named blanks to fill in (a weather-station code, or a latitude and longitude), any request headers the service expects, and, for each field mLink wants, the path to that value in the service's JSON reply. It also names the kind of data the result is, a default refresh interval, an enabled switch and, for services that need one, an API key. The key stays on the station and is never sent on the air.
Two weather sources come built in, both enabled. One reads the latest observation from a US National Weather Service observing station, given that station's code, and refreshes every 10 minutes by default. The other reads current weather from wttr.in for any latitude and longitude, and refreshes every 30 minutes.
The list of sources lives in the station's database. An operator can add sources or change a built-in one; an edited built-in source is marked as the operator's own, so a later software update can add new sources without overwriting the change.
29.3 Queries and the cache
An internet query is a record that says "I want this data". It names a source and its parameters, and makes two choices. How often: one-off (fetch once, then stop; the record stays for reference) or tracked (fetch again every refresh interval until it is removed or disabled). How: from this station's own internet, or by asking over the air and waiting for another station to answer.
A third kind is never created by an operator: a peer-served query, which the station makes for itself when it hears another station ask for data and can answer (Section 29.5).
Queries are kept in the station's database, so tracked queries carry on after a restart. Each records where its latest data came from (this station's own internet, or a peer over the air), when, and whether the last attempt succeeded.
Results go into the cache, one entry per source and set of parameters. An entry outlives the queries that filled it: stale data is still useful data, especially in the field. Entries that no enabled query uses and that are more than seven days old are cleared out when the station starts.
29.4 Asking over the air: the INET-REQ frame
When a query is set to ask over the air, the station sends one short transmission: its PRESENCE, saying who is asking, followed by one INET-REQ frame (Table B.20).
[presence]
The request has no addressee. It is a question to anyone in earshot who can answer, and it says four things: the kind of data wanted (weather at a position is the only kind today), a session number, a freshness hint, and the parameters for that kind, which for weather are a latitude and longitude good to a meter or two.
29.4.1 The session number and the freshness hint
The answer comes back some seconds later as a separate transmission, and the session number ties the two together. The asker picks it at random from 1 to 254, stores it on the query, and looks for it in every answer that arrives. Each request gets a new one, so an answer to an older request, arriving after the station has asked again, does not match and is set aside.
The freshness hint is the asker's way of saying how old an answer may be and still be useful; it is 30 minutes unless the query says otherwise. It is a hint, not a contract: an answering station today fetches fresh data every time.
Asking is a transmission the station chose to make, not a reply someone is waiting for, so it goes at normal priority (Section 19.5). A tracked query sends a fresh request, with a fresh session number, at each refresh interval, so the data keeps arriving for as long as someone in range can supply it.
29.5 Who answers
Every station that hears an INET-REQ considers it. What happens next depends on what the hearing station has.
- An enabled source for that kind of data. It makes a peer-served query with the requested position, preferring the latitude-and-longitude weather source since that is what the request carries, and fetches the data from its own internet. If the fetch succeeds, it gets ready to answer.
- A source, but the fetch fails, for example because the internet is down just now. It says nothing.
- No enabled source for that kind. It says nothing. A station that cannot help stays quiet and leaves the air to one that can.
Several connected stations may hear the same request, and one answer is enough. So a station with an answer ready does not send it at once. It waits 0.3 seconds plus a random time of up to about 7 to 10 seconds (longer when more stations have been heard lately), and if the station is busy or hears a signal when that time comes, it waits a little longer. A station that hears another station's answer to the same asker and session while it is waiting drops its own.
The asker gives each request an answer window of 20 seconds. If nothing arrives, a one-off query asks once more with a new session number, and after a second silence it is marked "no station answered". A tracked query is left alone: it asks again at its next refresh anyway.
A station set to listen only neither asks nor answers.
29.6 The answer: an ordinary short message
The answer is not a special frame. It is an ordinary message addressed to the asker, sent as a shortburst (Section 17.2):
[presence]
What makes it an answer is inside the payload. Its kind byte says internet response (Section 23.4), and the first two bytes of the body repeat the kind of data and the session number from the request. The weather record follows. The answer is sent once; if it is lost, the asker's second request or a tracked query's next one brings another.
29.6.1 The weather record
The weather travels as a packed binary record of 18 bytes, not as the JSON the web service returned, which runs to hundreds or thousands of bytes.
| Bytes | Field | Encoding |
|---|---|---|
| 1 | format version | Currently 2. |
| 1 | forecast count | How many hourly forecast entries follow the observation; answers today carry none. |
| 2 | temperature | Signed, in tenths of a degree Celsius. |
| 2 | pressure | Tenths of a hectopascal (millibar). |
| 1 | wind speed | Whole knots. |
| 1 | wind direction | The full circle in 256 steps, about 1.4 degrees each. |
| 4 | time | Seconds since the mLink epoch (Section 23.6), stamped when the answer is built. |
| 6 | grid | The six-character Maidenhead locator of the place the source reported for. |
The answering station converts whatever units its source used (pascals or millibars, meters per second or kilometers per hour) into this one format, so the asker never needs to know which web service answered. With the envelope byte, the kind byte, the data kind and the session, the whole payload is 22 bytes. A record that small and that dense does not get smaller with compression, so it goes out as it is.
On arrival the asker decodes the record, stores it in its cache as if it had fetched it itself, marks the query as answered by a peer, and gives the clients a map marker at the requested position.
29.7 The background worker
A web request is slow by radio standards: a bad one can hang for tens of seconds while a server times out. Meanwhile the station has to keep listening, decoding and keying the transmitter on time. So all internet work is kept away from the radio side of the station (Chapter 31).
- One background worker does all the slow work. Every web fetch, and every other job that waits on the network (talking to the mail server, or downloading the Winlink form library when the operator asks for it), is handed to a single worker and run there, one after another. Every request names itself to the website as mLink, with a link to the project.
- The station's database is never held during a fetch. The worker takes the database only for the brief moments it needs to read a source or store a result, so the radio side never stalls behind a slow website.
- Every fetch has a time limit: 10 seconds to connect and 30 seconds in total.
- Unchanged data is not downloaded twice. Where a service supports it, the station tells the server which version it already has, and the server can answer "not changed".
Tracked queries schedule themselves on the same worker: when a fetch finishes, the next one is booked for one refresh interval later.
29.8 What to remember
- A source is a capability (a web service and how to read it); a query is what you want (one-off or tracked, from your own internet or over the air); the cache keeps the latest result.
- An off-grid station asks with
[presence]
[inet_req] : one question to anyone in earshot, carrying the kind of data, a session number, a freshness hint and a position. - Stations that can fetch the data wait a random time, and the first one answers with an ordinary directed short message; the rest stand down when they hear it. A station with no source, or whose fetch fails, stays quiet.
- A weather answer is an 18-byte record, 22 bytes of payload in all.
- All internet work runs on one background worker, with time limits, and never holds up listening, decoding or transmitting.
Position, Maps and Tactical Overlays
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
The World Map window, its tools and its menus are described in Chapter 7. This chapter is about what goes over the air and what the station keeps.
30.1 Your station's position
30.1.1 Grid squares and how precise they are
Amateur radio names places with the
Maidenhead grid locator,
such as DM43. Each pair of characters divides the previous area
again: two letters name a field of 20° of longitude by 10° of
latitude, two digits a square of 2° by 1° (roughly 170 by
110 km at mid latitudes), and two more letters a subsquare of 5 by
2.5 minutes of arc, a few kilometers across.
The World Map draws the grid when its grid layer is on (the button with a square of lines in the map's left sidebar): the fields always, the squares once they are wide enough to read, and the subsquares when zoomed in to a town, each cell named in its lower left corner. Right-click a place and choose "Set my position here" to make it your station's position and its six-character grid square.
Every PRESENCE frame carries the sender's locator to six characters (Section B.5): a subsquare, about 5 by 7 km at mid latitudes. It costs nothing extra and it is on every transmission but a one-frame acknowledgment, so every station heard has a place on the map: the center of its subsquare. An operator who would rather not say that much can set the station to send four characters, which puts it only within a square of roughly 170 by 110 km. A station that has declared an emergency sends six whatever the setting, and its acknowledgments keep the PRESENCE in front that carries them. The map keeps whatever precision was heard last. The frames in this chapter are finer still. An area can be given as a six-character locator; a position report, a map object and a weather request carry latitude and longitude to about 1 to 2 meters; a distress call carries them to about 10 to 20 meters, with a statement of how far to trust them (Section 25.3.1).
The grid square you configure also answers two questions other stations ask: "is anyone in this area?" (the geopoll, Section 20.5) and "am I inside the area this message was aimed at?" (later in this chapter). Both use the center of that square. A station with no grid square set never claims to be anywhere.
30.1.2 A precise position, typed or from GPS
The station also keeps a precise position for itself, separate from the grid square. An operator can type one in, or a GPS receiver can keep it current.
mLink does not talk to GPS hardware itself. It reads fixes from gpsd, the standard Linux GPS service, over its network interface (by default on the same computer, TCP port 2947), or over a local socket when the address is given as a socket name. The station daemon connects, asks gpsd to stream position reports, and uses any 2D or 3D fix. A vehicle standing still would otherwise cause a disk write every second, so the daemon stores a new position at most every 10 seconds, or sooner when the station has moved more than 25 meters. If gpsd is not running yet, the daemon tries again after 5 seconds, doubling the wait up to a minute, so the order in which things start at boot does not matter.
On an Android phone there is no gpsd. The app answers the station daemon in gpsd's own language over a local connection that only this app can use, from the phone's location (the GPS receiver, else the network), so the same path carries the fix. Android asks the operator for location the first time "Use this phone's GPS" is ticked; the precise or the approximate choice both work, the approximate one with less accuracy. The phone is asked for a fix every 5 seconds while the box is ticked and not at all when it is not. The fixes keep coming with the screen off. If location is not allowed, or the phone has no fix, the station behaves as it does without GPS: it keeps the last position it had, and an emergency send is never held back for one.
The precise position moves your own marker on every connected client's map and feeds the automatic position reports below. It does not change the grid square in your PRESENCE; that stays the one you configured.
30.2 Position reports
Radio amateurs have tracked vehicles and hikers for decades with APRS, the Automatic Packet Reporting System: a station sends its position now and then, and everyone's map shows it moving. mLink has the same idea as an announce frame of its own, the position report, and borrows the name for it.
30.2.1 The position report frame
A position report is one announce frame
(Section B.12). It holds a latitude and
longitude, a course in 2-degree steps and a speed in km/h (both optional), and
one printable character that listeners use as the map symbol,
* unless the sender chooses another.
The frame carries no callsign. It is credited to the station whose PRESENCE
came just before it on the same announce channel
(Section 16.5), so a report goes
out as [presence]
Reports are sent once and never acknowledged; the next one will be along soon. Each station that hears one moves the sender's marker to the reported spot and adds the point to that sender's track history, which the map shows as a trail.
30.2.2 Sending reports
A report goes out in one of two ways.
- Once, on request. The client asks the daemon to send one report and gives it the position, and a course and speed if it has them.
- Automatically. The daemon sends a report on a set interval whether or not a client is connected, which is what a vehicle or a backpack station wants. The daemon accepts any interval from 30 seconds to one day and raises anything shorter to 30 seconds; the client's settings offer 2, 5, 10 and 30 minutes. The first report goes out one full interval after the beacon is switched on, and each interval is varied by up to 20 % either way so that two trackers on the same setting do not keep colliding.
The automatic report uses the precise position if the station has one, and otherwise the center of its grid square. It reports the station as stationary (no course or speed), and up to three of the station's HELLO frames may ride behind it (Section 20.7.1).
A position report is routine traffic. It goes on any free announce channel and waits until one is free, with the same random wait as a beacon (Section 19.4). One that comes due while the air is busy moves to a new random time within a quarter of its interval, as a beacon does (Section 20.3.2). A station set to listen only sends none, and none go out while the station's own SOS is active (Section 25.2); the SOS frames carry the position anyway.
30.3 The tactical overlay
A position report says where one station is. A search, an event or a wildfire response also needs to say where things are: the area already searched, the route of a march, the command post, the last known position of a missing hiker. The tactical overlay is a shared set of such map objects. A station sends them, and they appear on the map of every station that receives them, labeled with the sender's callsign.
30.3.1 What an object can be
There are four shapes. A point may have a radius, which makes it a circle, and one or two wider rings at twice and three times that radius. A line and an area (a closed polygon) have up to 24 corners. A vector is a bearing and a range from a point. Every object has a color, a symbol, a label of up to 39 characters and a comment of up to 120, and positions are stored to a meter or two.
An object can also carry a course and speed. The map then shows where the object would be by now, joined to its last reported spot by a dotted line, the way APRS maps show dead reckoning. The projection stops at 24 hours.
30.3.2 How objects travel
Map objects do not have an announce frame of their own. A batch of 1 to 64 objects is packed into a compact payload of its own payload kind (Section 23.4) and sent like any other message, so it gets the right size of transmission for its length and a chance at compression without anything new on the air.
Unless the sender names a station, the batch is a broadcast to everyone. A broadcast is not acknowledged: listeners who missed part of it may ask once for it to be said again, and that is all (Section 18.8). A broadcast also has a size limit, and a batch larger than that cannot go to everyone in one piece (Section 17.4.4).
An object goes on the air only when the operator sends it. Until then it is a draft that only that operator's map has; after an edit it is "changed" and the other stations keep the version they heard. The station never sends an object again by itself: a broadcast that someone missed is repaired by the operator sending again, not by a timer. The screens are in Section 7.6.5.
Every object is named by two things: the callsign of the station that sent it and a number that station gave it. Sending an object again under the same number replaces the old version wherever the new one is heard; that is how moving an area or renaming a point updates other maps. Withdrawing an object sends a short record for that number, called a tombstone, and every station that receives it deletes the object.
The station daemon stores the objects it receives, and its own sent ones, so a client that connects later, or reconnects after a restart, sees the same picture.
30.3.3 Named groups
Any object can carry a group name of up to 23 characters, such as SAR Bravo or Water stations. The group travels with the object, so every receiving map can show one group and hide the rest. A batch in which no object has a group is sent in the shorter form without the field.
30.3.4 The overlay file
Sometimes the right way to hand over a map picture is to mail it: to a team
leader at another site, or to the next shift. The client can attach all of a
station's objects, or one group, to a mail as a file with the extension
.mlov. The file holds exactly the bytes of a broadcast batch. When
the recipient imports it, the objects are stored under the mail sender's
callsign, as if that station had been heard sending them. Mail delivery is
covered in Chapter 26.
30.3.5 Search and rescue helpers
The client builds the shapes a search coordinator reaches for most. They are ordinary objects, sent like any other; nothing on the air knows they are special.
A datum is the starting point of a search, usually the last known position. Dropping one makes a point with a radius of one nautical mile (1,852 m) and rings at two and three times that. The map labels the three circles 50 %, 75 % and 95 %, the usual rule of thumb for how likely the subject is to be within each distance.
A search pattern is a line laid out from a datum:
- an expanding square, an outward square spiral with a chosen spacing between tracks;
- a sector search, two triangles through the datum, the second turned 60° from the first, with a chosen radius;
- a ladder, parallel runs back and forth of a chosen length, a quarter of that length apart.
Each takes the heading of its first run. The square and the ladder take a number of straight segments from 6 to 23, the most one line object can hold.
30.4 Reaching stations in an area
Sometimes you do not know who you want to reach, only where. "Anyone near the river crossing, the bridge is out." For that mLink has the area CQ: a message addressed to a circle on the map.
The circle travels in an AREA frame, placed in the chain just before the
frame that opens the transfer:
[presence]0CQQTH, the
reserved addressee for
an area (Section 16.7).
What happens on receipt is the important part:
- Every station that hears the message receives and keeps it, inside the circle or not. It is radio; you cannot un-hear it, and the message may well matter to someone just outside the line.
- A station inside the circle also raises a notification: "Area CQ from callsign, you are inside the addressed area." A station is inside when the center of its configured grid square is within the radius. A station with no grid square set is never told it is inside.
The AREA frame applies only to the next broadcast that completes within 30 seconds, and is used up by it, so a stale circle cannot attach itself to some later, unrelated message.
30.5 The offline map
The map every client shows is a vector map, not a set of downloaded picture tiles. The coastlines, borders, lakes, rivers and city names come from the public-domain Natural Earth data set and ship with the client, so the map works with no internet connection at all, which is the situation mLink is built for. It uses a plain equirectangular projection (latitude and longitude as straight horizontal and vertical lines), which stretches east-west distances toward the poles but is adequate at the scale radio works on; the scale bar corrects for the stretch at the map's center. For the United States the client also ships a base layer from OpenStreetMap: motorways, trunk and primary roads, every town, the coast, the main lakes and rivers. It is enough to find your way between towns with no pack installed. Streets, water and sea marks for a state or province come in a map pack, kept on the computer and got from the map itself (Section 7.6.6); where a pack is installed, its own roads and towns replace the base layer's.
30.6 What to remember
- Every beacon-kind PRESENCE carries a grid locator, six characters unless the operator chooses four, so every station heard has a place on the map; a typed position or a GPS fix through gpsd gives your own station a precise one.
- A position report is one announce frame credited to the PRESENCE before it, sent on any free announce channel, once on request or automatically every 30 seconds to a day.
- Map objects travel as ordinary messages, by default as an unacknowledged broadcast. Each is named by its sender's callsign plus a number; re-sending replaces it and a tombstone removes it.
- An area CQ is kept by everyone who hears it; the circle only decides who is alerted. Attention, not a gate.
Part VI: The Station Software
Inside the Station Daemon
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
31.1 One program, a few busy threads
The station daemon is
called mlinkd ( places it among the three programs).
One daemon drives one radio. It runs on Linux, Windows, macOS and the
BSDs; which computers, and what each can do, is in
Section 5.1.3. Operators never touch it directly; they talk
to it through a client ().
Inside, the daemon is split into a handful of threads, each with one job, handing work to each other through queues. The split follows one idea: nothing slow may ever stand in the way of something that must be on time. The sound card delivers a fresh block of 512 samples every 43 milliseconds whether or not anything else is ready; a command to a rig can take a fifth of a second to be answered; a query to an internet server can take several seconds. Each of those lives on its own thread so none of them can stall the others.
| Thread | Its one job |
|---|---|
| Event loop | Takes messages off a queue one at a time and acts on them. Every decision about the air is made here. |
| Timer | Posts a tick to the event loop every 100 ms, so deadlines fire on time. |
| Command thread | Receives requests over the network, from clients and from other members of a cluster, checks who is asking, runs them one at a time and answers. |
| Audio thread | Reads and writes the sound device, runs the receiver's detectors on every incoming block, and runs the key-up and key-down sequence. |
| Decoder workers (two) | Turn a detected stretch of audio into bytes (Section 15.8). |
| Encoder thread | Turns a planned transmission into audio samples, ahead of time. |
| Rig thread | Owns the serial port to the radio: keying, frequency, mode. |
| Network worker | Everything that waits on the internet or the local network: the mailserver, internet sources, the other members of a cluster. One job at a time, so a slow server holds up only the next network job, never the radio. |
| Stream pump | Packages live audio and spectrum for clients that asked to see them, ten times a second. |
| Device watcher | Re-reads the list of sound devices while a client is showing it, and reports when one is plugged in or removed. |
| GPS thread | Optional. Reads position fixes from a GPS service (Section 30.1.2). |
The program that lets web browsers in is not a thread at all but a separate process ().
31.2 The event loop: one line of decisions
Everything that could change what the station does next arrives at the event loop as a message in one queue: "a frame was decoded", "a timer tick", "an operator wants to send this", "an emergency was armed". The loop takes one message, deals with it completely, and takes the next. It never works on two at once.
That single line is deliberate. The protocol juggles reservations, reply windows, retries, relays and the emergency service; if two threads could change that state at once, the station would sooner or later make two contradictory decisions in the same instant. With one line, the question "what did the station know when it decided?" always has one answer.
The loop waits at most 100 ms for a message, and the timer's tick arrives every 100 ms. Deadlines that matter to the protocol (the end of an incoming transfer, the window for an expected reply) are checked on every tick; housekeeping in the database runs about once a second.
31.3 Three parts: the MAC, the record keeper, the sweeps
Inside the event loop, work is divided by one rule that explains most of the station's behavior:
- The MAC decides, and it does the radio talking. Only the MAC (the medium access control layer, the part of any radio network that decides who talks when) chooses whether a transmission goes out, on which channel, and when. Every frame that reaches the air has been through it. Its rules are the subject of .
- The station manager is a pure record keeper. It stores stations heard, messages, mail, the outbox, links, relay work and settings in the database. Ask it a question and it answers; it never decides to do something on its own.
- The sweeps read the records, spot a reason to act, and ask the MAC. Small routines run on the loop's tick: one looks for relay work that can be tried again, one for mail waiting on a gateway, one for mail the station could carry onward, one for beacons that are due. A sweep never keys the radio itself; the MAC still checks that the channel is free, that nothing more important is waiting, and that the station is allowed to transmit (Section 21.9).
31.4 Render the whole transmission, then key
Receiving runs all the time on the audio thread and the decoder workers; Chapter 15 follows a block of audio from the sound card to a decoded frame. Transmitting goes the other way, and it is built around one rule: everything in a transmission (Section 16.1) is decided and turned into sound before the radio keys.
- The MAC builds a plan. Which frames, in which order, on which channel, at which bulk rate.
- The encoder thread renders the whole transmission. Every frame is encoded, modulated and laid end to end into one continuous audio buffer, with the ends faded as describes. Up to 16 transmissions can wait to be rendered.
- The audio thread keys the radio. A rendered buffer of ordinary traffic waits while the station is in the middle of hearing a frame (Section 15.7.1) and then gets one last listen (Section 19.6.1). The audio thread then asks the rig thread to key and sends 60 ms of silence while the radio's transmit chain settles. If the rig has reported by then that it did not key, the transmission is dropped before any signal is sent. Otherwise the buffer plays from start to finish.
- The audio thread lets go. After the buffer ends come 40 ms of silence, then the unkey, then receiving again.
Rendering first and keying second means the radio is keyed for exactly as long as the transmission needs, and the rendering is done while the station is still listening, so it costs no time on the channel. What the receiver does while the station's own signal is going out is in .
31.5 The database is the station
Everything the station must remember lives in one SQLite database file. The rule is short: if a fact must survive a restart, it is in the database; if it need not, it is a live event and nothing more. What is kept there:
- the station's settings, including passwords (as one-way hashes, never as the passwords themselves);
- every station heard, with signal reports, position and status;
- every message heard, as a log in the order it arrived;
- the outbox: every message the station has been asked to send and where it is in its life (Chapter 8);
- mail and attachments;
- the links map of who hears whom, relay routes and relay work in progress;
- position reports, notes, friends, beacon schedules, the contact log, map objects and data fetched from internet sources;
- encryption keys and other stations' certificates;
- cluster membership and the cluster journal ().
Because the records are on disk, stopping and starting the daemon loses very little; what a restart does with messages that were on their way out is in Section 22.7.
31.5.1 Where the file lives
Unless told otherwise the file is mlink.db in one per-user
data folder: ~/.local/share/mlink/ on Linux and the BSDs (or
$XDG_DATA_HOME/mlink/ if that variable is set),
~/Library/Application Support/mlink/ on macOS, and
%APPDATA%\mlink\ on Windows. The daemon creates
the folder the first time it runs. Setting the environment variable
MLINK_DATA_DIR names a different folder, and the
--db flag names a different file outright.
Every way of starting the daemon finds the same file: started by the client (which passes no database path), started from the packaged application, or run by hand in a terminal. A daemon pointed at a different file is a brand-new station with an empty mailbox.
One database serves one daemon. At start-up the daemon takes a lock beside the file; a second daemon started on the same database stops with a message naming the file and leaves the first one alone.
31.6 Settings, flags and what sticks
The daemon keeps its configuration in the database. Changes made from the client are applied at once and saved, so they are still in force after a restart. Running the daemon with no flags always means "use what is saved".
Four of the command-line flags name station settings, and for those a
flag given on the command line wins, and is saved. Start the daemon once
with --callsign W1AW and W1AW is stored; start it next time with
no flags and it is still W1AW. Such a flag overwrites what was saved every
time it is given, so a start-up script that passes an old value keeps undoing
changes made from the client. The remaining flags describe this one run and
are not remembered.
| Flag | What it sets | Saved |
|---|---|---|
--callsign CALL | Station callsign. A fresh station has the placeholder N0CALL and sends no ordinary traffic under it (Section 16.2.2). | yes |
--grid GRID | Maidenhead locator. | yes |
--password PASS | The station password clients
must present, up to 63 characters (default mLink). Stored as a
hash. | yes |
--audio BACKEND | Sound system: auto,
null, and the computer's own: alsa or
pipewire on Linux, wasapi on Windows,
coreaudio on macOS. Any other name, or one this computer does
not have, is refused and the daemon does not start. | yes |
--transmit-at-start | Start un-inhibited. Without it every launch starts inhibited, as listen only, until the operator allows transmitting (Section 7.3.4). For test harnesses and for unattended stations whose owner accepts that they key at once. | no |
--port N | Network port for clients (default 8488). | no |
--no-telemetry | Pre-release builds only. Turn field telemetry off. Problem reports from a station without it go unanswered; the update check and the listen-only rule still apply (Section 7.8.15). | yes |
--telemetry | Turn field telemetry back on. | yes |
--telemetry-ok | Say the telemetry notice has been read, so uploading starts. For stations run without the desktop client. | yes |
--feedback TEXT|FILE | Pre-release builds only. Send feedback to the project: a text file (64 KiB at most) or the text itself. The text is cleaned, shown exactly as it will be sent, and sent only after you type yes. The station then runs as usual. | no |
--yes | With --feedback: send without asking, for scripts. | no |
--local-only | Accept clients from this computer only, the web client included. | no |
--ws PORT | Port for the web client (default 8489; 0 turns it off). | no |
--web-lan | Serve the web client to the whole local
network, not just this computer. Ignored, with a message, when
--local-only is also given. | no |
--web-root DIR | Where the web client's files are.
By default a folder named web next to the daemon
program. | no |
--db PATH | The database file. | no |
--log-file PATH | Write the daemon's log file
to PATH instead of mlinkd.log beside the database
(Section 31.10.1). | no |
--no-log-file | Write no log file. | no |
--loopback ADDR:PORT, --node N | Connect to the simulated air used for testing, as station number N, and not to a radio (Chapter 35). | no |
--help, -h | Print the list and stop. |
An unknown flag, or a flag missing its value, stops the daemon with an error and is never ignored: a typing mistake should not quietly start a station with defaults. In a cluster, a password given on the command line holds only until the member next catches up with the others (Section 33.8.1).
31.7 Sound systems
The daemon reaches the radio's audio through an interchangeable audio backend. Which ones a daemon has depends on the computer it was built for:
- ALSA, the basic Linux sound layer, always built in on Linux.
- PipeWire, the sound server on most current Linux desktops, built in only when the daemon is compiled with PipeWire support; the packaged application is.
- WASAPI, Windows' own audio interface, on Windows.
- Core Audio, on macOS.
- OSS, on FreeBSD and NetBSD.
- sndio, on OpenBSD. OpenBSD records silence until
recording is allowed (
sysctl kern.audio.record=1); the daemon warns when it is not. - null, no sound hardware at all: for testing, and for a daemon connected to the simulated air. It still paces itself like a real sound card, delivering a block every 43 ms and no faster.
With auto, or with nothing chosen, a Linux daemon picks
PipeWire when it was built with it and PipeWire is installed, and ALSA
otherwise; a Windows daemon picks WASAPI, a macOS daemon Core Audio,
FreeBSD and NetBSD OSS, and OpenBSD sndio. On every system the daemon sends
the sound card nothing between transmissions, so an interface that keys the
radio on sound (VOX) is never held in transmit.
Capture and playback can be different devices: receive from one interface,
transmit through another. The backend and the devices can be changed from the
client while the station runs, but only while the MAC is idle, never in the
middle of a transmission; a request at any other moment is refused and can be
repeated. If the new choice will not open, the daemon goes back to the
previous one.
If the sound device disappears (a USB cable pulled, the sound server restarted), the daemon raises a blocking alert, keeps running, tries the device again about every eight seconds, and clears the alert when it comes back.
31.7.1 Never keep the sound card warm
Between transmissions the audio thread hands the sound system nothing to play. It writes samples only from key-up to key-down.
31.8 Rig control and keying
Everything that talks to the radio over a serial cable goes through the rig thread. A CAT command can take tens to hundreds of milliseconds to answer; the audio thread, which works in 43 ms blocks, must never wait for one, so it posts "key" or "unkey" and carries on. A key request is served ahead of any queued frequency or mode command, and a newer one replaces an older one that has not been served yet.
The station keys the radio in one of three ways (the form that chooses is described in Chapter 5):
- None: VOX or manual keying. The daemon opens no serial port. On HF such a station sends only a distress call: every other transmission waits at the moment of keying and is dropped unsent ().
- Serial PTT line: the daemon raises the RTS or DTR line of a serial port to key. No CAT needed.
- A CAT-controlled rig: frequency and mode control, driven by a rig description file in the widely used OmniRig format, and keying by the file's transmit command. When a control line is also set, on the CAT port or on a second port of its own, the line keys and the CAT command never does; the CAT port is still used to read whether the radio is transmitting.
On connecting to a CAT radio the rig thread only reads, between transmissions: first the setup the radio needs for CAT (Auto Information, the Icom CI-V menus), then the radio's mode (only if the file declares that its data mode is the radio's sound-card mode) and the value of each setting the file proposes. It writes nothing: what differs from mLink's values is listed for the operator, the setup as a group of its own, and the thread writes each group only on the operator's answer for that radio, remembered in the station's settings (Section 6.5). Every few seconds between transmissions it reads the dial, the mode and the power setting, and while the radio transmits its SWR meter and, where its rig file has one, the radio's own high-SWR flag, taking turns, each time in place of one of its checks of whether the radio is transmitting, so these readings add no exchange with the radio. The station calls the SWR high when the radio's own flag says so; for a radio whose file has no flag, when the meter reads above 3.0. A key request never waits for any of this (Section 5.3.10 has the operator's side).
The rig thread also keeps watch. When the rig can report whether it is really transmitting, the thread checks after an unkey and between commands; if the transmitter is still on it sends the unkey again, then drops the keying line, and if even that fails it sends every client a critical notice to check the radio at once. A USB serial rig that drops off the bus is held with the keying line low while the thread looks for the same device and reconnects when it returns.
If a rig was configured and does not come up when the daemon starts (unplugged, in use by another program, no permission), the daemon still starts, with no keying, and raises a blocking alert saying why.
31.9 Alerts that stop the station
Most things the daemon has to say are advisories: a message delivered, a relay failed, mail arrived. A few conditions mean the station cannot do its job. Those are states, not one-off events: they stay raised until the cause is gone, and a client that connects afterwards is told at once. The client shows them on its status row as "cannot transmit" and the reason (Section 7.3.5). The causes are:
- No callsign. The station still has the placeholder. Cleared when a valid callsign is set.
- An invalid callsign, saved earlier or given on the command line. Cleared the same way.
- The sound device lost, or never opened at start-up. The station is deaf and mute. Cleared when the device opens again.
- The rig refused to key. The rig thread reported that a key-up did not take, and the transmission was ended. A radio that is slow to answer can be judged after the first moments of audio have gone out; the transmission then ends at the next audio block. Cleared by the next transmission that keys normally.
- The radio is not connected. The link to the radio's control port was lost and nothing else can key it. Until it is back the station sends nothing: every send, Tune and the self test are refused with a plain reason, and an emergency is refused too, because there is nothing to key the radio with. A radio keyed by a line on a port of its own is not affected. Cleared when the port is back.
- The radio may still be transmitting. The link was lost while mLink had the radio keyed and the unkey could not be confirmed. The transmission is ended at once and the notice stays until the port is back and the radio reads receive. It says to switch the radio off.
- The configured rig did not open at start-up. Cleared when a rig is set up successfully from the client.
A distress call is not held back by a missing callsign (Chapter 25).
31.10 Reading the daemon's log
The daemon narrates what it does. The same lines go to its console and to any client that asks for them (). The daemon keeps the most recent 1,024 lines in memory; a client can ask for the last 200 of them, or up to 512, and then receives new lines as they happen.
Most lines have a fixed shape: the time in seconds since the daemon
started, a level, the part of the daemon that is speaking, then a short event
name in lower case with underscores and named values. When the audio thread
keys the radio it logs audio_rx_to_tx_rampup with the channel and
the priority; when someone signs in, auth_ok with the role and
the account. One state has one event name, whichever way the daemon got
there: the radio set-up it uses is always rig_in_use (with the
rig file, the serial port and its speed), the sound device is always
audio_device (opened, lost, back), and mail that lands in the
inbox is always mail_arrived, over the air or from the mail
server. A line carries up to 1,024 characters after its time, level and
part; a longer one keeps what fits and ends with cut=true, so a
cut line is never mistaken for a whole one.
Levels run from trace and debug (for developers) through info (normal activity) to warn (something unusual) and error (something failed). Clients are sent info and above. A warn line is not an alarm: the daemon uses warnings for things like a refused sign-in or a cluster member that went quiet. Things the operator must act on arrive as alerts.
31.10.1 The log file
The daemon also writes the lines its console shows, info and above, to a
file named mlinkd.log in the same folder as its database. The
folder is the same for every way of starting the daemon, whether by the
client's "Start local daemon" or by hand. With no --db and no
MLINK_DATA_DIR set, it is
~/.local/share/mlink/mlinkd.log on Linux,
~/Library/Application Support/mlink/mlinkd.log on macOS and
%APPDATA%\mlink\mlinkd.log on Windows (usually
C:\Users\you\AppData\Roaming\mlink\mlinkd.log).
MLINK_DATA_DIR or --db moves the database and the
log together. The file is written even when nobody sees a console, as when the
desktop client starts the daemon. "About this build" shows the path, and so
does the daemon's start-up summary. It holds, among other things, the release
check, each telemetry upload, every time the daemon keys the radio and any
audio underrun.
The desktop client writes no log file of its own. On Linux the daemon also
prints these lines to the terminal it was started from. The Raspberry Pi test
image runs the daemon as a system service, so its lines are also in the
system journal (journalctl -u mlinkd), and its file is
/var/lib/mlink/mlinkd.log; the plain Linux archive on a Raspberry
Pi is not a service and has the file only. The web client logs to the browser's
console and the web bridge to its standard output.
Each run adds to the end of the file and begins with one line giving the
date and time in UTC, the version, the release channel, the platform and the git hash. The times at the start of
the lines that follow count seconds from that start, so the first line is
what ties them to the clock. When the daemon stops it first says why
(run_stopping: stopped with Ctrl+C or the window's close, asked
to stop by the system or by the program that started it, or a part of the
daemon that did not start), and a run that finished its shutdown ends with an
"end of run" line. A run with neither was killed or crashed, or the computer
lost power.
The file does not grow without limit. When it reaches 20 MB it is
renamed mlinkd.log.1, replacing an older one, and a new
mlinkd.log starts with a line saying where the earlier lines of
the run went. At most about 40 MB is kept. --log-file
puts the file somewhere else and --no-log-file turns it off.
A database given with --db under another name, such as
club.db, gets a log of its own beside it,
club.mlinkd.log, so two stations kept in one folder never share
a log.
31.11 What to remember
- One daemon drives one radio. Each slow or time-critical job has its own thread, and one event loop makes every decision, one message at a time.
- The MAC decides and does the radio talking; the station manager only keeps records; the sweeps read the records and ask the MAC, and never key the radio themselves.
- A transmission is rendered completely into one audio buffer before the radio keys.
- Everything that must survive a restart is in one database file, shared by every way of starting the daemon. Back it up.
- The callsign, grid, password and sound-system flags win over what was saved and are then saved themselves.
- The daemon plays nothing between transmissions, because a VOX interface would key the transmitter.
The Client and the Daemon
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
32.1 Two programs, one conversation
The station daemon (Chapter 31) owns the radio, the protocol and the database. The client owns the screen ( walks through it). They talk only through a defined set of commands and live updates, sent over ordinary networking, and that set is the whole relationship between them.
The client never opens the station's database, not even to read it. Every fact it shows, it asked the daemon for or was told by the daemon. There are good reasons for this beyond tidiness:
- Only one program writes the database, so no two programs can disagree about what is in it or damage it.
- The database can change its layout as mLink grows without breaking any client, because clients never saw the layout.
- The client can be anywhere the network reaches, and several clients can share one station. Each sees the same truth because each gets it from the same place.
32.2 Datagrams with JSON inside
Client and daemon exchange UDP datagrams, by default on port 8488. UDP sends self-contained packets with no connection to set up or tear down, which suits a conversation made of short questions and answers.
Each datagram starts with five bytes: one byte saying what kind of packet it is, two bytes of sequence number and two bytes giving the length of what follows. What follows is JSON text.
The daemon listens on every network interface unless it was started with
--local-only, in which case only programs on the same computer
can reach it (Section 31.6 has every
flag). The password is the gate, and nothing in the conversation is
encrypted, so a station reachable from a network should have its own password
and should be on a network you trust.
32.3 The request and its answer
Every command is a JSON object with the same outer shape, called the command envelope:
command: the name of the thing to do, such asget_configorsend_mail.client_id: the session number the client received when it signed in. Required on every client command except three:auth(signing in),helpandget_commands.req_id: optional, any whole number from zero up. If present, the daemon copies it into the answer.- then whatever that command needs.
The req_id matters because a client may send several requests
before the first answer returns, and a late answer to an old question must not
be mistaken for the answer to a new one.
Every answer has a type naming what kind of answer it is, and
the echoed req_id if there was one. An error is an answer too, with
"type":"error", a human-readable error message, and
in most cases a code: a short fixed word a program can test
for.
32.3.1 Strict where it matters, lenient where it helps
Each command declares its parameters in the daemon: name, type, whether it is required, and for some, the list of allowed values. Before a command runs, the daemon checks the request against that declaration.
- A required parameter that is missing is refused with the code
missing_required. - A parameter of the wrong type (a number where text is expected, say) is
refused with
wrong_type. Numbers may also be sent as text, because some programming languages lose precision on very large ones. - A value outside a declared list is refused with
bad_enum_value. - A field the command does not know about is simply ignored.
Command names are forgiving about spelling. Upper and lower case,
underscores, hyphens and spaces are all ignored when a name is looked up, so
get_config, GetConfig and Get-Config are
the same command. An unknown command gets an error saying so.
Clients do not need a printed list of commands. help returns
every command the daemon offers with its category, a description and the role
needed to use it; get_commands returns each command's parameters
in full. A command that is declared but not built yet is still listed, and
answers with the code not_implemented.
| Code | Meaning |
|---|---|
unauthorized | No session number, an unknown or expired one, or a failed sign-in. Sign in again. |
auth_throttled | Too many sign-in attempts from this address; wait a few seconds. |
session_table_full | The sign-in was refused because 32 live clients are already signed in; one must sign out first. |
insufficient_role | The command needs a higher role than this session has. |
account_revoked,
accounts_required | The account behind the session was removed or disabled, or guest access was switched off. The session has been ended. |
not_implemented | The command is declared but not built. |
encryption_unavailable | The daemon was built without
transport encryption, and the crypto_* commands answer with this.
The command get_crypto_status reports available as
false. |
busy | Not now; ask again shortly. |
subs_full | The session already holds its limit of stream subscriptions. |
response_too_large | The answer would not fit even in fragments. Narrow the question. |
Individual commands add a few codes of their own, such as
not_found.
32.4 A worked example
Here is an exchange with a fresh daemon, shortened where marked. The client signs in first, with the station password and a name for itself:
{"command":"auth","req_id":1,"password":"mLink","client_name":"alice-laptop"}
The daemon answers:
{"req_id":1,"type":"auth_ok","client_id":69848641,"role":"administrator",
"posture":"solo","guest":false,"timeout_expiry_min":30}
The client_id is this client's session number from now on.
The answer also says which role the session was given, whether the station
signs people in by one password or by named accounts, and after how many idle
minutes the session expires. Session numbers start at a random point, so
another computer on the network cannot simply guess one.
Now the client asks to be kept up to date on the station's configuration, then changes the grid locator:
{"command":"subscribe","req_id":7,"client_id":69848641,"stream":"config"}
{"req_id":7,"type":"subscribed","stream":"config","newly_added":true}
{"command":"set_grid","req_id":8,"client_id":69848641,"grid":"DM12ab"}
Two things come back. One is the answer to the request. The other is an
event on the config stream, sent to every client
subscribed to it, so every open screen in the station shows the new value
(shortened here):
{"type":"event","stream":"config","callsign":"N0ABC","grid":"DM12ab",
"relay_policy_name":"allow_bulk","operator_present":true, ... }
{"req_id":8,"type":"grid_updated","grid":"DM12ab"}
The event carries no req_id: it is not an answer to anyone's
question, it is news. It arrived here before the answer; either order can
happen, which is why the client matches answers by number.
32.5 Streams: being told instead of asking
A client that asked for everything every second would keep the daemon busy answering questions whose answers had not changed. So most things the client shows arrive on streams: named feeds the daemon publishes to when something changes. A client subscribes to a stream by name and from then on receives an event whenever there is news.
| Stream | Tells the client about |
|---|---|
messages | A message received over the air. |
mail | Changes to the mail store. |
tx_status | Each step in the life of an outgoing message. |
stations, links | A station heard or changed; who hears whom. |
notifications | Advisories and alerts for the operator. |
emergency | Emergency events. |
config | The station's configuration. |
mac_state | What the daemon's protocol layer is doing: idle, sending, waiting for a reply. |
net | The virtual net the station belongs to. |
log | The daemon's log lines. |
seats, cluster | Other operators' activity at this station; cluster membership. |
audio_rx, audio_tx,
spectrum | Live audio and a spectrum display, only while a client wants them. |
A tx_status event carries the message's number in the outbox
(tx_id), a state, a time, and sometimes an
error text giving the reason. The state is one of the nine outbox
states by their names inside the daemon (draft,
pending, airing, sent,
failed, deferred, expired,
deposited, transferred), or queued when
a message goes back into the send queue because the channel turned out to be
busy at key-up. What each state means to the operator is in .
Subscriptions belong to the session, so they disappear when the client signs out or its session expires. A session can hold up to 32 of them. Stream names are free text: subscribing to a stream that nothing publishes is harmless and delivers nothing. The heavy streams (audio and spectrum) cost the daemon nothing unless someone is subscribed.
32.5.1 A snapshot, then the stream
A stream only reports changes, so a client that has just connected also
needs the current state. The pattern is the same everywhere: subscribe to the
stream, then ask for a snapshot with the matching get_
command.
For each kind of state, the snapshot answer and the stream event are built
by the same piece of the daemon, so they cannot drift apart: the
config event above carries exactly the fields that
get_config returns.
Clients adopt what the daemon reports, not what they asked for. If an operator types a callsign in lower case, the daemon stores it in upper case and announces that, and every screen shows the upper-case form.
32.5.2 Alerts that must not be missed
Notifications come in two sorts. Most are advisories, sent once. A few are
blocking conditions, which are states and not events
(Section 31.9 lists their causes). Each
is announced when it is raised and again when it clears, and when a client
subscribes to notifications the daemon immediately repeats every
one that is raised at that moment. A client that connects an hour after the
sound card died still finds out at once.
32.6 Sessions and who is asking
A session begins with a successful
auth and is identified by its session number. The daemon remembers
where each session's packets come from and sends answers there. If a known
session number arrives from a new address (a laptop that moved from wired to
wireless, say), the session simply follows it. Every command refreshes the
session; after 30 minutes with no command at all it expires, and the next
command is told to sign in again. A daemon holds up to 32 sessions at once.
A client program that is killed or crashes never signs out, and its
session would hold a place for the full 30 minutes. On Linux the daemon
notices: when the computer a session lives on answers a packet with "port
unreachable", the session is marked gone and gets no more events, and any
command from it clears the mark. When all 32 places are taken, a new sign-in
first sends every session an empty packet, reads the answers, and takes the
place of the longest-silent session found gone; a live client is never
pushed out. With 32 live clients the sign-in is refused with the code
session_table_full and the sentence "The station already has
32 clients signed in, the most it allows. Sign out of one you no longer use,
then try again."
Who may sign in with which name and password, and what each role may do, is decided by the rules in Chapter 9. At this level only three things show. Sign-in attempts are limited to five in any ten seconds from one address, because checking a password is deliberately slow work and a flood of guesses must not tie up the thread that answers every other command. Each session carries a role (operator, technician or administrator), each command needs one, and the daemon compares the two on every single command, not once at sign-in. And a command above the session's role is refused with the reason spelled out:
{"type":"error","error":"insufficient role for this command",
"code":"insufficient_role","required":"technician","role":"operator",
"command":"set_callsign"}
Because the comparison happens every time, a change to someone's account takes effect on their very next command: a new role is adopted without signing out, and a removed or disabled account's session is ended. The emergency commands are the one exception to that ending (Section 25.1.1).
32.6.1 Knowing the daemon is still there
UDP has no connection that breaks, so a client cannot tell from silence alone whether the daemon has stopped or simply has nothing to say. The reference client handles this by asking: after four quiet seconds it sends a small harmless request. It declares the connection lost only when nothing at all has arrived for twelve seconds and that probe has gone five seconds without an answer, or at once if the computer reports that nothing is listening on the daemon's port any more. Any packet from the daemon counts as a sign of life, so a busy session never needs to ask. An ordinary request that gets no answer within five seconds is reported as timed out.
32.7 Mismatches are loud
Clients and daemons are released together, and a client expects the daemon it talks to to understand the commands the client relies on. If the daemon rejects one of those, that is not something to work around quietly: it means the client and daemon come from different versions. The reference client checks what it needs when it connects, and if the daemon does not know one of those things it reports it the same way as a lost sound card: the status row says the station cannot transmit, "client/daemon version mismatch", naming what failed.
32.8 When one datagram is not enough
A UDP datagram carries at most about 64 KB. Most answers are far smaller, but some are not: a mail with attachments, a long list of messages with their bodies. Those are split into fragments. Each fragment carries a short sub-header (which document it belongs to, its position, and how many fragments there are) followed by a 60 KB piece. Every piece except the last is the same size, so the receiver can put each one in place as it arrives, in any order. One document can be up to 4 MB this way, in either direction.
Lost fragments are not resent. A document that has gone five seconds
without a new piece and is still incomplete is thrown away, and the
requester's normal timeout reports the failure; on a LAN or on the same
computer that is rare. An answer too large even for 4 MB is replaced by
an error with the code response_too_large.
32.9 Browsers and the WebSocket bridge
A web browser cannot send UDP datagrams. What it can do is open a WebSocket: a two-way message connection that starts life as an ordinary web request. To let browsers in, mLink has a small separate program, the WebSocket bridge.
The daemon starts the bridge itself, as a child process, and by default it
listens on port 8489 (--ws changes the port, and
--ws 0 turns the bridge off). For every browser tab that connects,
the bridge opens its own UDP conversation with the daemon and relays packets
both ways, unchanged: each WebSocket message holds one datagram, header and all.
To the daemon, a browser looks exactly like a desktop client on another port:
signing in, sessions, roles and streams all work the same way.
The bridge does one piece of translation for the browser's benefit: large documents. A browser may send one oversized request as a single WebSocket message, and the bridge splits it into fragments for the daemon; fragmented answers and events from the daemon are put back together in the bridge and handed to the browser as one message. Browser code never has to deal with fragments.
The bridge also keeps an eye on each browser: it sends a WebSocket ping every 30 seconds and closes the connection if no reply has come for 60 seconds. If a browser reads too slowly and its outgoing queue fills, the oldest whole messages are dropped, never part of one. It serves up to 32 connections.
32.10 The web client
The client an operator sees in a browser is the same client program as the desktop one, built to run inside a web page as WebAssembly. The bridge serves it: a plain web request to port 8489 gets the client's page and files, and the page then opens its WebSocket back to the same address. Every file is sent marked "do not cache", so a browser always loads the client that matches the daemon it came from, and a daemon upgrade upgrades every operator's screen with nothing to install.
By default the web client is served to the station computer only. Start the
daemon with --web-lan and it serves the whole local network; the
daemon prints the address operators should open, such as
http://shackpc.local:8489. Operators still sign in exactly as
they would from a desktop client. The WebSocket connection is not encrypted,
so keep this to a network you trust.
32.11 Writing your own client
Everything above is the whole contract. A terminal program, a phone app or a
logging bridge can talk to a station with nothing more than a UDP socket and a
JSON library: sign in with auth and keep the
client_id; call help and get_commands
to learn what the daemon offers; subscribe to the streams you care about,
then fetch their snapshots; number your requests and match the answers; and
treat an unknown error as a mismatch to report, not to hide.
The contract is not frozen: commands are still being added and refined.
get_commands on the daemon in front of you is always the current
description.
32.12 What to remember
- The daemon owns the radio and the database; clients only ever ask the daemon and are told by it. Any number of clients can be connected at once.
- Commands are JSON in UDP datagrams, checked against each command's declared
parameters; a
req_idties each answer to its question, and errors carry a fixedcode. - Streams push changes to every subscribed client; a client subscribes, then takes a snapshot, and both are built by the same part of the daemon.
- Every command is checked against the session's role, every time.
- Browsers reach the daemon through a separate WebSocket bridge process, which also serves the web client itself, always matching the daemon's version.
Clusters: One Station, Several Radios
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
33.1 When one radio is not enough
The basic unit of mLink is simple: one station daemon drives one radio on one band (Chapter 31). Real stations outgrow that. A club's emergency trailer may carry a 40 m rig for regional traffic and a 2 m rig for the local served agency. A home station may have an HF radio in the shack and a VHF radio on a hilltop across town, connected over the internet. mLink handles this with a cluster: several daemons, one callsign, acting as one station. Growth in people, several operators with their own names and roles, is a separate matter (Chapter 9).
33.2 A cluster is one station with several radios
Each daemon in a cluster is a member. A member is a machine, never a person: it has one radio, one band, and a short human label such as valley or 40m-trailer that you choose when it joins (the computer's hostname is used if you give none). All members share the same callsign, because on the air they are the same station.
Members talk to each other over the cluster link, which is ordinary networking: a LAN inside a trailer, or the open internet between a home and a hilltop. It uses the same network port a member's clients use (Section 32.2), and it never touches the radio. It carries three kinds of thing: a short keepalive, the shared record of what every radio hears, and occasional pieces of real work handed from one member to another.
From the operator's chair the cluster is almost invisible. You connect your client to whichever member is nearest, you see the stations every member has heard, and you send mail the way you always do.
33.3 Joining a cluster
Joining takes a label, one address, and one decision by an administrator. There is no shared secret to type into every machine.
- On the new member, an administrator gives the address and port of any member already in the cluster, plus a label for the new machine. The new member makes a fresh private/public key pair for itself and sends a join request carrying its callsign, its label, a random member number and its public key.
- The existing member holds the request as pending and shows it to
its own clients with the callsign, the label and a short fingerprint of the
new member's key, written like
ab12-cd34. The same fingerprint is shown on the joining machine. - An administrator compares the two fingerprints (by phone, by looking at both screens, by voice on the radio) and approves or denies. Matching fingerprints show that nobody in the middle swapped in their own key.
- On approval, the existing member sends back the cluster's shared secret and, if the station has one, its mail key, both sealed so that only the new member's private key can open them. The new member asks for this answer every two seconds until it arrives.
The shared secret is 32 random bytes. It is made the first time a daemon approves a join request, which is the moment an ordinary single station becomes the first member of a cluster. A member holds at most eight pending requests; one that nobody decides on is forgotten after 15 minutes, and the joining machine gives up after 10 minutes of waiting. A daemon whose callsign differs from the cluster's is refused with a clear error: a cluster is one station, and one station has one callsign. Because membership itself travels through the shared record (), a new member only ever needs one reachable address; it learns about every other member from there. A cluster holds up to 16 members.
33.3.1 The shared mail key is only borrowed
Approving a member hands it the station's mail key, the credential this station uses with the mailserver (). Approving is therefore a trust decision: the new machine can now act for the station with the mailserver.
The key arrives on a lease. Every successful signed contact with another member renews it. A member that has had no such contact for seven days throws the key away, logs a warning, and has to be approved again to get it back. Leaving the cluster throws it away at once. Radio kits move between missions, and a box that was lent to another group should not keep acting as your station. A mail key that a member registered for itself, before it joined, is that member's own: it is kept, and it is never leased or discarded.
33.4 Keeping in touch
Every member sends every other member it can reach a small keepalive every 10 seconds and gets a reply. Both carry a signature made with the cluster secret, and a time that must be within 120 seconds of the receiver's clock; a message seen a second time is refused. Members that keep network time never notice this. A member whose clock is minutes off fails its keepalives, and each failure is logged as a warning. The keepalive also carries the member's label, its current band and dial frequency, and whether it has a working path to the mailserver.
A member heard from within the last 30 seconds (three keepalive periods) counts as live. After three failed keepalives in a row, a member is only tried on every sixth round, about once a minute, so a dead machine does not cost the others much effort.
The station's rule for a silent member is short: if we can't reach that daemon, we can't use it to reach anyone.
- The moment a member stops being live, everything it heard stops counting when the station decides who can reach whom. The records are kept, just ignored.
- Every connected client gets a warning that the member is unreachable, and an information notice when it comes back.
- After three minutes of silence the member is treated as gone, and the mail it was responsible for is taken up by others (Section 33.7.1).
No warning is sent at start-up for a member that was already silent.
33.5 Sharing what every radio hears
The heart of a cluster is the journal. Every member keeps a numbered, append-only log of what it has learned: a station heard, a position or status report, a link between two stations, a change in membership, a station-wide setting, the outcome of work another member asked it to do. Each member writes only its own log. Nobody ever edits somebody else's.
Copying is done by asking, never by pushing. After each successful keepalive, a member asks its peer: "for each member's log I hold, what comes after entry number N?" The answer comes back six entries at a time, up to sixteen answers per member per round, and it also lists the newest entry number of every log the peer holds, so a member learns about logs it had never heard of. Any member will serve any log it holds, not just its own. A member hidden behind a home router, which nobody can reach directly, still catches up: it asks a reachable member, and that member hands over everyone's news.
Three rules make this sturdy without any clever merging.
- One writer per log. Two members can never disagree about what entry 57 of the hilltop's log says, because only the hilltop writes it.
- Applying an entry twice changes nothing. A lost reply, a repeated question, a member that was away for an hour and asks again from an old number: all harmless.
- Only the owner acts. Knowledge merges freely, but anything that makes a radio transmit runs only on the member that owns that piece of work.
Members may be on opposite sides of the internet with clocks that disagree, so an entry about a station never says "heard at 14:02:17". It says "heard 12 seconds ago", and the member that applies it works out the time on its own clock.
A member hears a busy station many times a minute, so routine "still hearing it" updates for the same station are written at most once every 30 seconds, while anything that matters (a new station, a new position, new telemetry or status, an emergency) is written immediately. Entries older than two hours are pruned, the same limit the station uses for its own links map (Section 20.8). Membership and station-wide settings are never pruned, so a member that joins next year still learns them from the first entry on.
33.5.1 Heard by me, and heard by the station
Every member keeps what other members heard in separate records from what its own radio heard. Everything the member does on the air (choosing whether to offer a relay, deciding who is reachable, building the list of stations it tells others it hears) reads only its own radio's records, exactly as it would if it were alone. The client gets both, with each row marked by the member that heard it. The same distant station heard by two members on two bands appears as two rows, one per member.
33.6 Carrying traffic across bands
The payoff of shared hearing is backhaul: moving a message from one member's band to another member's band over the cluster link. It is one more kind of helper in the ordinary relay exchange (Section 21.8 gives the on-air side, including the 3 dB a cluster member takes off the figure in its OFFER).
Suppose W7AAA on 40 m has a message for K7BBB and cannot reach it, so it sends a relay REQUEST. The station's 40 m member overheard the original message and holds a copy, but its own radio cannot hear K7BBB. The hilltop member's 2 m radio heard K7BBB within the last two minutes, and the hilltop is live. The 40 m member may then volunteer, provided its relay setting allows carrying large messages (Section 21.9) and the message is no larger than 40,960 bytes.
- If W7AAA selects it, the 40 m member passes the message to the hilltop over the cluster link, trying twice if need be, with the name of the original author attached.
- The hilltop sends the message to K7BBB on 2 m as a relay would, naming W7AAA as the author.
- The hilltop writes the outcome into its journal. The 40 m member picks it up the next time it asks, and sends the RESULT to W7AAA on 40 m.
The 40 m member waits up to 60 seconds for that outcome before reporting failure. The member that talked with W7AAA never transmits the delivery, and the member that delivered never talks to W7AAA.
There is a second form. When a REQUEST asks for a station that can reach the destination even without a copy (), a member that holds no copy and cannot hear the destination itself, but has a live member that can, may still offer. The requester then sends it the message first, and it travels on over the cluster link as above.
33.6.1 Members that share a callsign must not share timing
When several stations might answer the same thing, each waits a different time so they do not all key at once, and some of those waits are worked out from the station's callsign (). Cluster members share a callsign, so two members on the same band within earshot of each other would choose identical waits and collide every time. Each member therefore mixes its own member number into the calculation. A daemon that is not in a cluster behaves exactly as it would without any of this.
33.7 Who owns the mail
The rule that only the owner acts matters most for mail, which must never be lost and never be sent twice by accident. The member where a mail was composed owns it; its outbox row is the truth about that mail. Ownership moves only when the owner hands it over, or when the owner is gone.
The cluster uses this in three places, all to do with reaching the mailserver through a member that has a working internet path to it, a gateway member ( explains gateways, pickup and custody):
- Handing mail to the gateway member. Broadcast mail that has found no gateway on the air and is waiting for one (Section 26.4.6) is handed to a live gateway member. Its row on the original member becomes transferred, the outbox state that means "another member of this station has it now". The gateway member deposits it with the mailserver directly, and the final state comes back through the journal, so the original row ends as deposited, sent or failed. If the gateway member falls silent for three minutes without reporting, or no outcome arrives within the message's lifetime, the row goes back to waiting on the original member.
- Forwarding a deposit. A member without internet that takes custody of mail heard on the air passes the deposit to a gateway member. The mailserver's credentials never leave the gateway member. The custody member announces on the air that the mail has been taken only after the gateway member confirms the deposit.
- Answering for the mailserver. A member without internet can answer on-air questions about waiting mail by asking a gateway member, which puts the question to the mailserver and passes the answer back. Such a member shows the gateway flag in its PRESENCE only while a live gateway member is there to back it up (Section 16.2.1).
33.7.1 When the member that wrote the mail goes silent
The owner rule has one weak spot: a member that dies takes its unsent mail with it. If the hilltop box loses power with three mails in its outbox, the owner of those mails is the one machine that can no longer act. So each member lodges a copy of its unsent mail with a gateway member, before the copy is needed.
- While the mail is waiting. About every 30 seconds a member looks for mail of its own that is not yet finished and has no copy lodged, and sends a copy to a live gateway member. The copy is only held, never sent; the member that wrote the mail still owns it and still sends it the ordinary way. A cluster with no gateway member holds no copies.
- When the mail is finished. Once the mail is delivered, deposited or has failed, its owner tells the holder to drop the copy.
- When the owner is gone. A member silent for three minutes is treated as gone. The holder then adopts every copy that member left with it: each becomes a mail in the holder's own outbox, and the adoption is written into its journal so every member knows who now owns it. A holder that can reach the mailserver deposits the mail directly; otherwise it sends it on the air like any mail of its own.
- When the owner comes back. The returning member reads the adoption in the journal and gives way: its own row becomes transferred. It does not send the mail a second time; it waits for the adopter's outcome through the journal and marks its row from that, as for any mail it handed over.
So an operator's mail survives the loss of the machine it was typed on.
33.8 Administering the whole cluster from one seat
Administration happens from the client, from any member. Underneath, any
command from a signed-in client can name a target member, by its label or its
member number, in a field called member. The member you are
connected to carries the command over the cluster link and hands back the
answer, as if you had connected to the target directly. Your own role travels
with the request, and the target member enforces it exactly as if you had
signed in there. A few things never travel this way: the cluster commands
themselves, signing in, and subscribing to live updates, which all belong to
your own connection. A request cannot be passed on a second time from the
target to a third member.
33.8.1 Station-wide settings
A few settings describe the station, not the machine, and every member must agree on them. These travel through the journal:
- the mailserver address, whether the link to it is switched on, and whether the station may ask a known gateway directly to check its mailbox when a general mailbox query went unanswered;
- the station password and the technician and administrator passwords;
- every operator account, one entry per person, and whether walk-up guests are allowed (Chapter 9).
Values are sealed before they enter the journal (with AES-256-GCM, a standard authenticated cipher, under a key derived from the cluster secret), because the cluster link is signed but not otherwise encrypted and may cross the open internet. Passwords were already stored only as one-way hashes; sealing hides even those. Each setting is decided by the most recent change anywhere in the cluster, so two administrators editing two different people never overwrite each other; on an exact tie, the member with the higher member number wins, so every member reaches the same answer.
Everything about a particular machine stays on that machine and is never shared: audio devices, band, rig control, keying, calibration.
33.8.2 What the cluster secret does and does not protect
The cluster secret is the boundary of the station. Every message between members carries a signature made with it, so a machine that holds the secret is trusted as a member: its journal entries are applied, and its forwarded requests are honored at whatever role they claim. That is why joining requires an administrator's approval with a fingerprint check, and why that approval is the only gate.
The signature proves who is speaking and that nothing was changed on the way. It does not hide anything. Apart from the answer to a join request and the sealed settings, what members send each other, messages and mail on their way across included, crosses the link readable; run the cluster link over a network you trust or through a private tunnel.
A member leaves by its own command, which wipes its copy of the secret, the journal, its records of other members' hearing, and its borrowed mail key. The cluster has no command that removes another member.
33.9 What to remember
- A cluster is several daemons, each with one radio on one band, sharing one callsign and acting as one station. Joining takes a label, one address, and an administrator's approval after comparing key fingerprints.
- Members share what they hear through append-only logs that only their owner writes; on-air decisions still use only a member's own radio.
- A message for a station heard only on another member's band can be carried there over the cluster link and delivered on that band.
- Only the owner of a mail sends it. A gateway member holds a copy of every other member's unsent mail and takes it over when its owner has been silent for three minutes.
- The cluster secret signs everything between members and encrypts almost nothing; whoever holds it is a member.
Part VII: FmLink
FmLink: mLink on FM
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
34.1 What FmLink is
FmLink is mLink's answer to VARA FM. It is a channel-access profile: one setting that changes the signal on the channel and how stations share it. The frames stay the same, so mail, chat, relays and nets ride on FM unchanged.
FM needs its own layout because of the capture effect: an FM receiver hears only the strongest signal, so stations cannot share the channel side by side in frequency as the HF regions do (Chapter 10). Sharing moves into time, one signal at a time. FM is also close to all or nothing: a station you can hear you can nearly always decode. So an FM station decides how to send by contact (heard directly or through a relay), never by a measured signal level.
34.2 What goes on an FM channel
Every FM station sends and receives one signal in place of the three announce channels: a single carrier at 1,500 Hz, QPSK at 1,200 symbols per second. After a short sync come blocks, each one LDPC codeword of 648 bits carrying up to three 11-byte frames: 283.5 ms a block, at most 16 frames a transmission.
Large transfers between capable radios use a second signal, OFDM with 24 carriers filling 522 to 2,678 Hz. It follows the control frames in the same transmission: [presence]
34.2.1 The fast signal
The fast signal was laid out on two real radios, a Yaesu FTX-1 and a Yaesu FTM-3100, sending into a dummy load and recorded, then played back into each receiver at falling levels. It sits in the middle of the voice band, clear of the low edge where the radios cut and turn the phase. Its pilots move across the carriers from one block to the next, so the receiver measures every carrier's own path over the whole frame, and it trusts each part of a frame by how clean it came through: a click or a fade spoils a moment, not the frame. The sender drives the signal hard into a clipper of its own before the radio, so the radio's deviation carries more of it.
Each frame is one 9,720-bit codeword at one of three rungs:
- rung 0, QPSK at code rate 1/2: 603 bytes in 2.8 seconds, about 1,700 bit/s; it decoded within 0 to 2 dB of the control signal's limit;
- rung 1, QPSK at 5/6: 1,008 bytes in 2.8 seconds, about 2,900 bit/s, 2 to 4 dB above that limit;
- rung 2, 8PSK at 5/6: 1,008 bytes in 1.9 seconds, about 4,300 bit/s, 4 to 5 dB above it.
Frame 0 is always rung 0: it carries the message check and starts the timing. Every later frame goes at the transfer's ceiling, except that a frame that can hold the rest of the message takes the most robust rung that holds it, and that frame is the last. The fast signal never steps up a rung that the rest of the message does not need, and it does not climb step by step to find the link: the receiver has already said what it can take. From the opener's frame count and ceiling the receiver knows every frame's place and rung; only the last frame's could be rung 0 or rung 1, and it tries rung 0 first, then rung 1, and the message check decides.
The receiver chooses the ceiling. A transfer of one or two frames goes without asking. A longer one asks first, and the addressee answers with the highest rung it can take, read from how well it heard the ask: rung 1 from 12.5 dB, rung 2 from 13.5 dB as the control signal measures it (SNR@3k): measured radio to radio on two radios, that grants each rung from 0.3 to 3.6 dB above the level where it first decodes every frame. The sender plans the transfer under that ceiling; a message over 38,590 bytes cannot go at rung 0 (64 frames of 603 bytes) and goes at rung 1. A transfer that does not ask past two frames, and every broadcast, goes at rung 0: nobody has measured the link for it. A frame that is lost is sent again one rung more robust than the most robust frame lost; a lost rung-0 frame cannot go more robust.
34.2.2 The leader tone
Every FM transmission may begin with a leader, a plain 1,500 Hz tone running straight into the sync. It does two jobs for two different parties, and the station sends the longer of the two.
- The sender's own radio. A radio keyed by VOX needs its audio to open its transmitter: the VOX leader, 800 ms by default, settable from 0 to 2,000. On two handhelds the sender's VOX and the receiver's squelch together lost 550 to 750 ms; a 250 ms leader lost every transmission, 550 ms half, and 800 ms none. A radio keyed by CAT or a keying line needs none. HF has none (Section 10.9.1).
- The listener or the channel. A slow receiver's squelch, or a repeater's transmitter, opens late whoever sends. On a repeater channel every transmission carries the repeater lead-in (300 ms unless the operator changes it). A transmission addressed to a station that is slow to hear (Section 34.4) carries a 450 ms leader, the time its squelch needs to open measured on a handheld (137 to 393 ms of the start of a carrier lost with its battery saver off; a 450 ms leader decoded 16 of 16). Only that transmission carries it: a broadcast, a frame for the whole net, and traffic between two stations that are not slow to hear do not, however many slow stations are on the channel.
34.2.3 Decoding at the end, and no reserved time
FmLink keeps no time reserved for any class of station. A transmission is decoded the moment it ends: its first block says how many blocks it has, so the receiver knows where it stops, takes exactly that many, and is ready for the next signal at once. A one-block transmission, which is a presence beacon, an acknowledgment or a short chat message, is decoded about 0.28 seconds after it begins, and a reply can follow without a wait for air that has already ended. A station that has just heard a directed exchange holds off only for the reply it owes: a short turnaround, the replying station's leader if that is a VOX station, and one block.
34.3 A distress call on FM
On HF the distress signal sits in a region of its own, below the voice-like announce signals. FM has no such place, and because FM captures, a weak call cannot be heard while a stronger signal is on the air. The FM distress call therefore leans on repetition: it is short, and it is sent again and again.
The call is one signal: the same single carrier as every other FM frame, 0.35 seconds long, carrying the alert (where, what, how bad, how many people, drill or real) and 26 characters of text, who you are first and then what is wrong. The "Emergency" window stops you at 26 and says why; a longer text sent by any other program is cut to 26, never refused. A receiver tells it from an ordinary frame only after decoding it, and then shows it, acknowledges it and passes it on exactly as on HF (Chapter 25). A station that merely detects something does nothing about it.
34.3.1 The repeats
- The first transmission goes out the moment the operator declares. It waits for nothing: not for the channel to go quiet, not for a window, not for another station's transmission.
- The repeats come in bursts of 8. Each repeat follows the last by a random 5.0 to 9.5 seconds, picked by each station for itself, so two stations in distress do not repeat together.
- After a burst the station is quiet for a random 60 to 90 seconds, then sends the next burst. Twenty minutes after the call with no acknowledgment, the quiet stretch grows to a random 240 to 270 seconds.
- Nothing ends the sequence but an acknowledgment from another station, the operator's All clear, or the operator stopping it. It never gives up by itself.
- The All clear is sent the same way but only once through: at once, then 7 more times, each a random 5.0 to 9.5 seconds after the last, 8 in all, and then it stops. A gap is longer when the station had to answer someone in it, or was receiving a frame when the next one fell due.
- While the All clear goes out, the station holds its beacons, its net turns and the messages queued meanwhile; they go after the 8th. Replies it owes another station are not held. An All clear that has not finished three minutes after it started (normally it takes about a minute) is ended, so nothing is held for long.
A repeat that falls due while the station is already receiving something waits for it to finish, and then goes out at once, because that signal may be the acknowledgment and the sequence would then stop. Ordinary traffic is never waited for. In all it keys about 2 percent of the time: 2.8 seconds in a burst-and-pause cycle of about 130.
34.3.2 Acknowledgment and relay
An acknowledging station answers with the short acknowledgment frame (Chapter 25) in the same kind of signal, a moment after it hears a repeat end, at a time it picks for itself within the gap the repeating station leaves open. If it hears another station's acknowledgment under way first, it stays quiet. The gap between repeats is at least 5 seconds so that a VOX-keyed acknowledging station, with its leader, is heard before the next repeat.
Stations pass a heard call on exactly as on HF, in the ordinary FM frames (Chapter 25), so a station that cannot hear the caller can hear it through a neighbor.
34.3.3 Repeater channels
Settings, "Radio", "This channel is a repeater". On a repeater the capture happens once, at the repeater's input, so stations do not pass distress calls on and make no offers to relay ordinary traffic. A station keyed by push-to-talk starts every transmission, not only a distress call, with a lead-in that the repeater needs to open: 300 ms, or the number set under "Repeater lead-in (ms)" in the keying settings. A VOX station keeps its own leader when that is longer. The default is a direct (simplex) channel.
34.4 FM slow and FM fast
Every PRESENCE carries three FM flags (Table B.4).
- FM slow, slow to key: the station is sending a leader, that is, it is keyed by VOX on FM. It lines up behind the others for beacons only while a fast station has been heard (Chapter 19).
- FM slow, slow to hear: the station's radio opens its squelch late, so the start of a transmission to it is lost. A VOX station declares this as well. A station keyed by a line declares it only if its radio's rig file says so, from a measurement (Section D.7.6). Other stations begin each transmission addressed to it with a 450 ms leader, and no other transmission.
- FM fast: the operator declares the audio path flat enough for OFDM, a data port rather than a microphone jack. The fast signal is used only when sender and addressee both declare it.
The classes are a declaration, not a gate: nothing is refused for being slow. They are also a cost to everyone, and the client says so. When the operator chooses VOX keying, or a radio whose rig file declares it slow to hear, a window asks first: this radio is slow to key and slow to hear; every station that talks to you must add a delay to each transmission, and your transmissions hold the channel longer than they need to; on a busy channel fewer stations can use it; use it only if there is no other choice, because a radio with a data port and a push-to-talk line serves everyone better. Declining leaves the earlier choice in place. While the station is in the class, the Status window and Settings, "Radio", "Keying" say so. A radio with a push-to-talk line is better keyed by it than by VOX: on the handheld measured, the line brought the transmitter up in about 80 ms where VOX took 100 to 200 ms and then held the carrier about two seconds after the audio ended.
Whether turning the handheld's squelch fully open removes the slow-to-hear delay is untested; until it is measured, the advice is the measured one.
On the single carrier a message of up to 120 bytes after compression goes as a shortburst, up to 480 as a longburst (Chapter 17). Between two fast stations a message goes the way that takes less air, since the most robust rung is about as robust as the control signal: up to 240 bytes on the control signal, larger ones on OFDM up to 63,804 bytes, in segments of five frames (Section 18.7). Otherwise a directed message over 480 bytes is refused. A broadcast of 121 to 480 bytes goes as a longburst with no acknowledgment, apart from the reply slots of a mail to several stations (Section 26.5); a larger one is refused, because slow stations could not receive it, except a mail to several stations, which goes to a gateway instead.
34.5 Turning it on
Settings, "Radio", "FM mode (FmLink)" (Section 7.8.1): the "FM mode (FmLink)" box switches at once; "Auto from rig control" follows the radio: its mode when it reports one, FM or data FM on the radio selecting FmLink within a few seconds (mLink reads the mode every few seconds between transmissions); for a radio that reports no mode, the band of its frequency, read from the radio or, for a radio that cannot report it, the frequency the operator gave in the Rig control applet, while it is fresh: given or confirmed since the station last started and within the last four hours, after which the applet asks "Still on ...?" and Auto waits for the answer (the FM parts of 10 m, 6 m, 2 m, 70 cm and up select FmLink, the rest USB; a frequency outside the amateur bands changes nothing). Until you tick or untick it yourself, "Auto from rig control" is on when the radio's rig file covers only bands where mLink runs FM (a 2 m FM mobile, for one); your own choice, either way, is kept; "OFDM-capable audio path (data port)" is the FM fast declaration; "This channel is a repeater" is the channel property above, with its lead-in under the keying settings. Keying is under "VOX keying (FM only)": "VOX keying", "VOX leader (ms)" and its own "Auto from rig control".
34.5.1 Set the radio to wide FM
FmLink is built for wide FM, so set your radio to wide. Most FM radios ship that way; on others it is a "narrow", "N/W" or "half deviation" setting to switch off, and the radio's rig file names it (Section D.7.2). Wide and narrow are the radio's deviation: how far the carrier swings away from the channel frequency for a given audio level, about 5 kHz at the peaks on wide and about half that on narrow. Wide does not widen mLink's audio, which stays in the same voice band either way. It lets the radio swing the carrier twice as far for the same audio, and that is worth 2 to 4 dB to the fast data rates.
Both settings were measured radio to radio on a Yaesu FTX-1: its own transmissions, sent into a dummy load and recorded, were played back into its receiver at each setting. A station on wide was heard as well as or better than one on narrow by every receiver, wide or narrow. The one pairing that lost was a narrow transmitter heard by a wide receiver, by about 3 dB, and it disappears when everyone is on wide. With every station on wide the control signal does as well as with every station on narrow, the most robust OFDM rate about 1 dB worse, and the fast rates 2 to 4 dB better. A Yaesu FTM-3100 set to wide decoded its own signal and the FTX-1's at every rate. How other radios' narrow receivers take a wide signal is not yet measured.
The cost is room on the band: a wide signal is about 16 kHz across. Where channels are 25 kHz apart it fits; where they are 12.5 kHz apart it reaches into the next channel. That is for the operator to weigh when choosing a frequency; mLink does not check it.
34.6 What is proven
The simulated air models capture: at each receiver the strongest signal wins when it is far enough above the next (Section 35.2). The FM scenarios check:
- mail both ways between a VOX station and a fast station, with each one's flags arriving at the other, and again after a switch to FM while running;
- a hidden station: A and B cannot hear each other, both reach C, B is 1.5 dB weaker. A's mail, sent into B's transmission, decodes at C first time; with capture off the first try is lost and a retry delivers;
- a relay: a station that overheard a message for an unreachable station offers, is chosen and delivers, and the sender's outbox reads SENT;
- the fast signal: 2 KB delivered intact between fast stations and refused to a slow one; 6.5 KB reassembled across three transmissions;
- replies: two VOX stations exchange mail without either one's reply window running out, the acknowledgment keys within a turnaround of the request being decoded, and a third station queues its own message behind the exchange without keying over the reply;
- a repeater channel: every transmission carries the lead-in and no offer to relay is made, where on a direct channel one is;
- a distress call on FM: it keys at once even over another station's transmission; the repeats follow the gaps and bursts above; receivers show it and hold their own traffic only for the signal's own 0.35 seconds; an acknowledgment from several stations does not key together and ends the repeats; All clear (itself 8 short passes) and cancel end them; a relay carries the call to a station that cannot hear the caller; on a repeater channel there is no relay and the lead-in is there.
34.6.1 On real FM radios
Two handhelds, VOX (20 July 2026). On two inexpensive handhelds keyed by VOX, the worst keying conditions there are, every frame decoded at 600 and 1,200 symbols per second and none of four at 2,400, hence 1,200. A unit test checks that recordings from that session decode exactly at 1,200 and not at 2,400.
A mobile keyed by a line (1 and 2 November 2026). A Yaesu FTM-3100R/E on 146.520 MHz with a Digirig on its microphone jack, keyed by the Digirig's line, into a dummy load. Its transmitter is fully on 58 to 67 ms after the key line at low power and 29 to 33 ms at high power, before mLink's signal begins, and it stops within about 1 ms of the release; it needs no leader. What it sends through its microphone path is flat within 1 dB from 500 to 3,000 Hz, radio to radio. Results:
- Receiving: through the radio's receiver, mLink decoded 14 of 16 of the radio's own control transmissions (54 of 56 frames).
- Sending: the audio the interface delivers drifts in time by up to about 800 µs over a few tenths of a second. The receiver now follows that drift: it decodes all 124 recorded bench bursts, where the earlier fixed reading decoded 96 of 104, and 22 of 22 of mLink's own, where it decoded 13. The large drifts appeared only when the Digirig's internal hub ran at full speed (12 Mbit/s); on a 480 Mbit/s port 19 of 20 and 17 of 20 bursts decoded in two runs.
- Warm or cold: in a test of the first key-up after a pause, 60 of 60 bursts decoded whether the interface and the radio were kept warm or cold. There is no need to keep the audio path warm. One cold start after about 7 minutes idle was lost.
The radio's set-up is in its rig file, FTM-3100.ini, and the radio list shows it when the radio is chosen.
A handheld keyed by a line or by its own VOX (2 November 2026). A Baofeng UV-K5 Plus on 146.520 MHz at low power with a Digirig on its accessory jack, into a dummy load. The Digirig's key line keys it: its transmitter is fully on 48 to 88 ms after the line, and stays on about 0.4 s after the line is released. Through a standard receiver what it sends is flat within 3 dB from 400 to 2,800 Hz. Results:
- Receiving: its squelch (set to 1) swallows the start of a carrier: 288 ms when the radio was busy a moment ago. After 8 to 16 seconds of quiet it depended on the radio's battery saver (menu 3, SAVE): with it on, between 130 ms and 1.05 s were lost (once more than 1.2 s) and a burst needed a 1.5 s leader; with it off, 137 to 393 ms, no worse than when busy. The rig file says to set it off. A burst whose leader outlasts the loss decodes every time: with the battery saver off, 450 ms of leader decoded 8 of 8 busy and 8 of 8 after quiet (300 ms 6 of 8). Once the squelch had opened, every burst decoded at every signal level it opened for (20 of 20 at nine levels).
- Sending by VOX: the radio's own voice switch (set to its most sensitive level) needed a signal of about −30 dB of full scale at the interface; the carrier came up 84 to 194 ms after the audio began and stayed up about 2 s after it ended. Bursts with a 200 ms leader decoded 9 of 9, 150 ms 3 of 6, 100 ms or less 0 of 12, and the default 800 ms 23 of 23.
The same handheld again (15 November 2026), with its squelch at 0, its battery saver and VOX off, keyed by the Digirig's line. With the squelch open nothing is lost at the start of a carrier (0 ms after up to 16 seconds of quiet), and bursts with no leader at all decoded 6 of 6, so the rig file now says squelch 0 and no longer declares the radio slow to hear. Its transmitter is fully on 48 to 68 ms after the line. Its receiver carries the three fast speeds as well as the FTM-3100's. Its transmitter needs care: driven to where a steady tone just starts to limit, its limiter spoils stretches of the faster frames, so only the slowest speed got through. With the frames about 5 dB lower, every speed decoded; the rig file gives that level.
The radio's set-up is in its rig file, UV-K5.ini, and the radio list shows it when the radio is chosen.
Two radios with a computer port, on 2 m FM (2 November 2026). A Yaesu FT-991A and a Yaesu FTX-1 with its SPA-1 amplifier were each benched on 146.520 MHz at the lowest power, 5 W, into a dummy load, through their own USB cable and no Digirig, keyed by the cable's keying line or by a CAT command.
- The FT-991A: its transmitter is up about 24 ms after the key line (about 20 ms by CAT) and down about 4 ms after the release. Its squelch swallows only about 25 ms of what it hears, whether it was idle or busy, so it needs no leader. All 35 recorded bursts of its own decoded byte for byte. On Linux, with the radio's menu set to key on RTS, opening its keying port keys the transmitter for about 5 ms.
- The FTX-1 with the SPA-1: its transmitter is up about 26 ms after the key line (24 ms by CAT). Opening its keying port does not key it. Its USB audio is not gated by the squelch, so the receiver's hiss is always in front of the decoder and nothing is swallowed at the start of a carrier; it needs no leader.
Each radio's rig file lists the settings to make (the keying menu, squelch, power and the audio levels), and the radio list shows them when the radio is chosen.
34.7 What has been tested so far
FmLink ships in the pre-release, fast signal included. The radio figures in this chapter were measured radio to radio on the bench, into dummy loads, and mail, chat and relays are proven on the simulated air; FmLink has not yet been tried between stations in the field, and those tests come next. One thing to know today:
- The FM distress call is new. It has been tested on the simulated air and on one real radio: a Yaesu FTM-3100 keyed by a Digirig at low power into a dummy load sent the call, its repeats, the repeater lead-in and the all clear exactly as described, and decoded calls sent into it down to about −124 dBm, where its squelch, set to 1, closes. It has not yet been tried between two stations on the air. Repeating several times raises the chance that one repeat gets through a fade or a collision; it does not make a steady, weak signal reach further. For a life-threatening emergency, use voice on the channel as well.
34.8 What to remember
- FmLink is a profile: the same frames, mail and relays, one signal at a time, because FM captures.
- Control rides one carrier at 1,500 Hz; OFDM carries large transfers only between two FM fast stations, on three rungs whose ceiling the receiver chooses. Set the radio to wide FM: the deviation, not the audio, and worth 2 to 4 dB to the fast rates.
- A VOX-keyed station sends an 800 ms leader and is announced as FM slow, to key and to hear; a radio keyed by a line needs none, unless the channel is a repeater. A transmission addressed to a station that is slow to hear carries a 450 ms leader, and no other transmission does.
- FmLink ships in the pre-release and works on real FM radios, handhelds under VOX and a mobile keyed by a line; it is proven on the bench and on the simulated air, with field tests to come.
- A distress call on FM is one 0.35 second signal with 26 characters of text, sent at once and repeated in bursts until it is acknowledged, cleared or stopped. Set the squelch so the radio is quiet when nobody transmits.
Part VIII: How We Know It Works
How We Know It Works
This chapter describes mLink as the code stands today. Parts of it are placeholders that have not yet had their turn to be reviewed, and nothing here marks which parts those are.
35.1 Why test on a simulated band
Real radios are the final test, but a real band is a poor laboratory. You can't make it do the same thing twice, you can't make twelve stations key up on one frequency whenever you change a line of code, and when something goes wrong you get one recording from one receiver and a lot of guessing.
So most of the testing happens on the simulated air, which the project calls the fake over the air harness, or fOTA for short. It gives three things a real band can't:
- Control. The test decides how strong every path is, what the noise floor is, when a fade arrives, and which single frame gets lost.
- Scale. Twelve, a hundred, or a couple of hundred stations can share one simulated passband on ordinary computers.
- Ground truth. The simulator knows exactly what was on the air at every instant: who keyed, what frame it was, and which transmissions landed on top of each other.
What makes this more than a toy is that the stations in the simulation are the real thing: the station program you install (), with only the sound card swapped out.
35.2 The simulated air
35.2.1 Real stations, fake sound cards
For simulation a station is started with a null audio device that touches no hardware. Instead it trades audio with a separate program, the channel mixer, over the computer's internal network. The audio is what a sound card would carry: one stream at 12,000 samples per second (), traded in blocks of 512 samples, 42.7 milliseconds each. Each block is one round:
- Every station sends the mixer its next block of transmit audio. A station that isn't transmitting sends silence.
- The mixer builds a separate receive mix for each station. For listener B it adds up every other station's transmit block, each scaled by the strength of the path from that station to B, plus B's own noise, plus whatever band-wide interference the test has switched on. A separate mix per listener is what lets a test build a station that hears one neighbor and not another, or a path that works one way only.
- Each station gets its own mix back as its receive audio, and the next round begins.
35.2.2 A second is 12,000 samples
Here is the idea the rest of the harness is built on. Inside the simulation, time isn't read off the computer's clock. A second is 12,000 samples of audio, and nothing else.
Each simulated station runs on a sample clock: its sense of "now" is worked out from how much audio it has used up. Every timer, every wait and every deadline inside the station counts in that time. The mixer measures elapsed time the same way, as its position in the audio stream divided by 12,000, and so do the test's own waits and deadlines. Everything in the run agrees on one clock, and that clock is the audio.
The mixer also runs in lockstep. It won't send out a round until every station has delivered its block for that round, so if one station stalls the whole air waits for it. And a station holds its own clock still while it's decoding what it just heard or building a transmission it's about to send, so thinking time never leaks into air time.
Put those together and you get the property that matters: a busy computer makes a run slower, never different. A starved machine can't make a station miss a deadline, because the deadline is counted in the same samples the station is waiting on. It is also why the air can run far faster than real time: up to 16 times by default in the test suite, and usually eight times in the long operator simulations described later.
35.2.3 A test that breaks at speed is a bug
This leads to a hard rule for the test suite. If a scenario passes at real time and fails at sixteen times real time, the speed is not the problem. Somewhere, in the scenario or in the station, something is counting wall-clock time where it should be counting on-air time. That is a defect with a location, and the fix is to find it, not to slow the test down until it passes.
One more detail keeps the simulation honest. Real stations' clocks have nothing to do with each other, so in the test suite each simulated station's clock starts at its own random offset of up to a day. Any behavior that accidentally depends on stations sharing a clock shows up in simulation instead of hiding there.
35.3 Making the band misbehave
A clean band isn't much of a test. The harness has a set of impairments, and each one is built to work the way the real thing does, not just to produce the same symptom.
35.3.1 Effects on one path
These act on one sender's signal on its way to one listener, before the mixing. They're the things that make "A hears B" differ from "C hears B".
- Noise at a set SNR. A test states noise as a signal-to-noise ratio on the SNR@3k scale (Section 3.4.3), for the whole channel or for one listener's receiver alone. The conversion to an actual noise level accounts for what really goes on the air (the station sends only the real part of its signal, which carries half the power), so a label of "+6 dB" means +6 dB, not something 3 dB kinder.
- Per-path gain. Every ordered pair of stations has its own gain. The path from A to B and the path from B to A are set separately, so a test can build a one-way link (B hears A, A can't hear B) or a hidden station (A and C both reach B but can't hear each other).
- Fading. A fade is a gain envelope on one path: a list of points in time with a gain in decibels at each, joined by straight lines, steps, smooth S-curves or a half cosine. A fade can repeat, like ordinary fading (QSB), or run once starting from the moment the named sender next keys up.
- One lost frame. A test can make one listener miss one frame of one sender's transmission, for example "B loses frame 3 of A's bulk transfer". It's done as an extreme, instantaneous fade on the A-to-B path, exactly over that frame's samples, and every other listener still hears the frame. The harness finds the frame's position from the sender's own log of what it transmitted, so the loss lands on the right frame to the sample. This is how selective repair () gets tested against a known, specific loss.
35.3.2 Effects on the whole band
These are interference that every listener hears the same way, whoever is transmitting, added after the mixing: a steady carrier at a chosen frequency, optionally amplitude-modulated; atmospheric crashes, random impulses at a set average rate, like static from distant lightning; over-the-horizon radar, a train of chirped pulses, the "woodpecker" older amateurs will remember; and a recorded SSB voice clip dropped into the passband at a chosen dial offset, like a phone contact drifting onto the frequency.
35.3.3 An impairment that never happens fails the run
There's a quiet trap in every channel simulator. Suppose a test asks for "B loses frame 3 of A's next bulk transfer", but A never sends one, or the test misnames the frame. Nothing is lost, every repair check downstream passes on a clean channel, and the test passes for a situation that never happened.
The harness closes this trap. Any impairment aimed at a particular sender that's still waiting to fire when the run ends is reported as never fired, and the whole run counts as failed: it proved nothing.
35.4 Stopping the air at an exact moment
Some scenarios need the test script to act at a precise instant on the air: "hand station A a message while station C's probe is on the air". The stations and the mixer count samples, but a test script is ordinary software on an ordinary computer. With the air running sixteen times faster than real time, a tenth of a second of the script's own delay is 1.6 seconds of air, long enough for the moment to pass entirely.
So the mixer can pause the air. The test arms a pause to happen right now, or a set on-air delay after a named station's next key-up or after it logs a particular event. When the moment comes, the mixer stops sending rounds, and since every station is waiting on its next block, every station's clock stops with it. The stations still answer commands, so the script can do what it came to do (submit a message, stop a station, arm a frame loss), check that the station took it, and resume. However long the script takes, it costs no time on the air.
A pause lands on the first round boundary at or after the requested moment, so it's accurate to one round. While paused, the test can also step the air forward by an exact on-air duration and stop again, to place a second action at a computed offset from the first.
Two safety checks keep pauses honest, and both fail the run. A pause that isn't resumed within three seconds of real time is given up, and the mixer resumes on its own. And a pause that was armed but never triggered is reported the same way as an impairment that never fired.
35.5 What a run leaves behind
35.5.1 The event log and the labeled recording
Every station forwards its structured log events to the mixer as they happen. The mixer uses them to write an event log: one line per event, each with a start time and end time on the air clock. The most important kind is the transmitted frame. For every frame that goes on the air there's an entry naming the sender, the frame (PRESENCE, OPENER, a numbered bulk frame and so on), the channel it went out on, where in the audio stream it starts, how long it lasts, and the part of the passband it occupies.
The mixer can also record the band itself: the sum of every station's transmission plus the band-wide noise and interference, the way a monitoring receiver on the frequency would hear it. (The per-path effects belong to each listener, not to the band, and are left out.) The event log is written into the recording as an extra section of a standard WAV file, so a spectrogram viewer that knows about it can put a labeled box around every frame and show which station sent what and where two transmissions collided.
Labels are only useful if they're right, so a tool compares every label with the audio energy in its band, both ways: a label with no signal under it, or signal with no label. A simulation's collision count is only quoted after its labels have passed this check.
35.5.2 Assertions graded from the stations' own logs
A scenario says what it expects as assertions. Each one names a station, the event that station should log, an optional detail it must match, and a deadline in on-air seconds. For example: "station 1 logs that it transmitted a dNAK within 60 seconds after the previous step passed". Assertions can chain: one starts watching only when the previous one passes.
Scenarios written as scripts state what the protocol must have decided as queries over the stations' own event logs, not as searches for words in log text. A query can ask that a station logged an event with certain details, that it never did, how many times it did, that one event came before another, within a given number of on-air seconds of it, or at least so long after it, and that a station's decision was made by one particular row of a rule table (Section 35.7.6). A query that names an event or a detail the stations never log is a broken query, not an absent event, and it fails loudly. Every new scenario asks this way; older ones are converted when they are next touched.
Each assertion ends in one of three states: pass; fail (the deadline ran out, or the run ended while it was still watching); or skip (it never started, because a step it depended on failed). Skips are kept apart from failures so that one broken link in a chain doesn't read as five separate problems.
Two design choices matter here. First, assertions are graded from what the stations say they did, not from energy on the channel: "some station transmitted something" is a weak test, and "the receiver sent a dNAK naming frame 3" is a strong one. Second, the report line for each assertion is generated from the assertion's own fields, so the words in the report can't drift away from what's being checked.
35.5.3 The run is graded when it ends
However a scenario script ends, a common closing step grades the whole run, so a scenario started by hand is judged exactly as the suite judges it. The run counts as void, neither pass nor fail, when something in it waited by the computer's clock for a station that was still running, because a result reached that way says nothing about the protocol. It fails when an impairment that was set up never fired, when a pause of the air never happened, or when the air stalled. And it fails when any station's log breaks a safety rule that must hold in every run, whatever the scenario was about: for example, a message that moves through its stages in an order the stages do not allow, or an emergency that is refused for a reason that is not one of the allowed ones. A scenario that passes its own assertions can still be failed here.
35.6 How a protocol test runs
Most of the suite asks protocol questions: who waits for whom, which station answers an offer, what happens when a reply is lost. This section is about the machinery that answers them quickly and repeatably, and about how a change finds out which tests it needs to run.
35.6.1 Three simulated airs
The same scenario script can run on three different simulated airs. They differ in how much of the radio they bother to imitate.
- Audio. The full chain. Every transmission is rendered as real audio, mixed, and decoded again by the real receiver and modems. It is the slowest air, and the only one that tests the signal processing itself.
- Frames, the logical air. A station still builds its transmission, but the receiving side skips the detectors and demodulators. Whether a frame is found, and whether it decodes, is decided by looking up the measured success rate for that mode at that signal strength (the measurements are the ones in Chapter 11 and the modem chapters). Overlapping transmissions count as extra noise, and a station that is transmitting cannot hear.
- Sim, the one-process simulator. It uses the same logical channel as frames, but every station and the channel run together inside one program. The station software is unchanged; its threads become cooperative tasks that take turns on a single processor thread, and the program can copy itself at a chosen moment to try two outcomes from the same state. It is the default air.
The reason for three is that a protocol question needs no signal processing. Whether a relay hands a message on, or a station waits its turn, depends on which frames were heard and when, not on how the waveform looked. Asking such a question on the audio air spends most of its time on modulating and decoding. Frames and sim spend it on the protocol, which makes a scenario several times faster and lets many more of them run for every change.
Decoding questions stay on the audio air: whether the receiver finds a weak frame, and how well emergency frames decode. The emergency protocol (who repeats, who acknowledges, what a station refuses) is a logic question and runs on the logical airs; emergency decoding is never replaced by a lookup. A few scenarios cannot run on sim, for example because they need a real network connection, and use frames. To keep the logical airs honest, a fixed set of scenarios runs on both the audio air and the logical air and the two results are compared; where the airs legitimately differ, the difference is written down with its reason.
35.6.2 The same seed gives the same events
Time in all three airs is the sample clock described in : a second is 12,000 samples, and protocol time in a run comes from it, never from the computer's clock. On the simulated air the programs' short timed waits (a pause, a wait for another thread) still count the computer's time while the simulator runs, so there the repeatability is checked by replays rather than guaranteed by construction. The second ingredient is the seed. Every random choice in a run (the delay a station picks before retrying, which frame the channel loses, the text a scenario generates) comes from one number given at the start. Run the scenario again with that number and the same things happen at the same instants.
The property is checked, not assumed. A replay runs the same scenario and seed twice, on one air or on two, and compares the stations' decisions. A difference is treated as a defect: either the station used something other than the sample clock and the seed (the computer's clock, a thread race) or the script did. Most of the differences found this way were in the test machinery around the stations (a helper thread, a wait that counted the computer's time), not in the protocol. A run that ends because its own wall-clock deadline ran out is graded void, not passed or failed, since its outcome would depend on how busy the machine was.
Repeatability is what makes the rest of this section work. Because an identical build and seed give identical events, a passing result can be reused instead of run again, even on a different machine of the same kind. The seed is not one of the inputs that decide the reuse: a reused pass stands for the one seed its run happened to use, until the inputs change or the result expires.
35.6.3 Running only the tests a change can affect
A full run takes hours. Most changes touch a few functions, so most of the suite would repeat an answer it already has. A test is skipped when it has a passing result for the same inputs: the same machine type and compiler, the files the test reads, and the programs it runs built from the same sources. Change one of those and the result no longer counts.
To know which tests read a changed function, the project builds a coverage map. The program is built with coverage counting, the whole scenario suite is run, and the map records which functions each scenario executed. For a change inside the station's event loop, protocol or mail server code, only the scenarios that executed the changed functions are selected.
The map falls back to a coarser answer, and says why, when it cannot be precise:
- a changed header, or a change outside any function, selects by file: every scenario that ran a program including it;
- a new function is not in the map yet, so it selects by file;
- a map older than the code it describes is not trusted at function level;
- modem, error-correction, audio and shared core code is not counted function by function, so a change there selects every test that runs the program.
A change to documentation only selects nothing.
35.6.4 The queue and its record
Builds and tests run on separate compute machines, not on the contributor's own computer. A contributor submits a branch to a test queue and waits for the answer. The queue:
- refuses a branch whose build rules or test-selection rules are older than the main line's, since its results would not be comparable;
- picks a free machine, preferring one that already holds the right build, and runs one job per machine;
- replaces an older run of the same branch when a newer commit arrives, and stops the old one;
- runs only the selected tests, and builds only what changed, after checking that the build really reflects the new files;
- cleans up the machine when the job ends.
There are two kinds of run. A branch run is for work in progress: the simulated air, one seed, and only the tests the change can affect. A candidate run is made once at the commit that is about to be merged: it adds the audio-air runs that apply and the twin set that compares the airs.
Every result goes into a record kept for each machine, keyed by test, air and inputs. Results from the simulated airs and unit tests are shared across machines of the same kind, because a given seed gives the same events on all of them; audio-air results stay with the machine that produced them. The report for a run lists the wall time of every test, marks anything over ten minutes as slow, and sorts the failures into new and known. A known failure is one on the short, dated list of failures the project already tracks, each with a reason; a failure that is not on it is new and has to be explained.
35.7 The layers of the test suite
The simulated air is the biggest part of mLink's testing, but not the only part. The layers run from small to large.
35.7.1 Unit tests
More than two hundred and fifty standalone test programs each exercise one piece of the system in isolation: the modems and their round trips through noise, the error-correcting codes, frame layouts and integrity checks, message assembly, the reservation bookkeeping, the payload formats, the command interface, accounts and roles, the mail server's storage and authentication, and more. They run with one command, and each reports a plain pass or fail. A unit test is the right tool when the question is "does this piece compute the right answer", with no timing or other stations involved.
Radio files get the same care. The unit tests that need a radio file read
frozen copies kept for the purpose, so a new measurement written into a shipped
file never turns into a test change. One further check reads every radio file
that ships and asks what any of them must be, never what one of them says: it
loads; it has a name and says how far it has been tested; every ;mlink:
line is one the program understands (none dropped, none over-long, none
unknown); every measured row names its source and, for a delay, how many runs it
rests on; each radio setting reads back what it sets and gives its values in
words; a radio that sends CAT commands has been compared with Hamlib's bytes; no
file raises the serial lines when the port opens; and the list the radio picker
shows is exactly the directory. A new radio file fails this check until it
passes all of it (Appendix D).
35.7.2 The discrimination test: the bulk floor from both sides
One unit test deserves its own mention, because it checks the claim the whole passband layout rests on (): that all five signals can share one SSB passband at once. It generates simultaneous traffic in every region (the emergency tones, all three announce channels and a bulk frame), adds them into one audio stream, adds noise, and asks each receiver path to pull out its own data.
The noise is swept across a range of levels, measured against the combined power of all five signals (each region's own SNR is several decibels lower, and the test prints both). It passes only if two things hold:
- At the top of the sweep, about +6 dB of combined signal, every region decodes its data with zero errors after error correction.
- Nine decibels lower, the bulk frame must fail to decode. Its own SNR there is about −5.3 dB, a few decibels under the foot of its cliff.
The second condition is the unusual one. A test that only checks that something works above a threshold would keep passing if a mistake in the SNR arithmetic quietly made the noise several decibels weaker than labeled. Requiring a failure just below brackets the bulk decoder's cliff (Section 11.8.2) from both sides. If either the noise scale or the decoder's real floor moves, this test starts to fail.
35.7.3 The receiver test: one long recording
Another test checks the receiver as a whole (). It builds a two-and-a-half-minute recording of steady noise with frames of all three modems dropped into it at stated levels: emergency frames from −15 dB up, announce frames on each of the three announce channels from −6 dB up, and four bulk frames laid end to end. It plays the recording into the real receiver in sound-card-sized blocks. With one exception, every frame has to be found by its detector and then decoded byte for byte.
The exception is the lowest announce level. Short frames fade out along a slope a few decibels wide and not at a cliff (Section 11.8.1), so near the bottom of that slope one frame says nothing. The test sends 60 announce frames at −6 dB, twenty on each channel, and judges them as a rate: it passes when at least 50 decode. That level is three decibels above the announce floor (Section 13.9), where a healthy receiver decodes all 60.
35.7.4 Finding and reading, measured separately
A frame near its floor can be lost in two places: the detector never found it, or the detector found it and the decoder could not read it. Two measuring programs tell these apart, one for an emergency frame and one for an announce frame. Each puts a single frame into noise at an exact level, plays it into the real receiver, and repeats that many times with fresh noise. For every trial it records whether the detector found the frame, how far from the true start it placed it, whether the frame decoded from there, and whether it decoded when handed over at its true position. The difference between the last two is the loss that belongs to finding. The emergency program can also be run on noise alone, to count false alarms.
These are instruments, not pass-or-fail tests: they are run by hand when a floor is in question, and the statements about which stage gives out first (Section 15.4.1) rest on them.
35.7.5 Integration scenarios
The largest layer is close to three hundred scenario scripts. Each starts a simulated band and a handful of stations (sometimes a mail server, a cluster or the client too), sets up a situation, and grades what happens. Each one checks one behavior: a bulk transfer recovering from one lost frame, a relay carrying a message across a one-way path, two stations calling each other at the same moment, mail handed to a gateway, and so on.
Three rules keep the results trustworthy:
- Each scenario runs in its own sandbox: its own private network, process list and scratch directory, so scenarios can run side by side without disturbing each other.
- The suite grades the optimized build, the one you'd install. A scenario that fails is rerun against a debug build with memory checking on, so a memory error can be told apart from a protocol failure.
- A stale build refuses to run. If any source file is newer than the station program being tested, the scenario stops with an error instead of testing yesterday's code and reporting today's result.
35.7.6 The rule tables
Much of what a station decides is written down as a rule table: a numbered list of rows, each saying "in this situation, do this". The medium access rules (what a station does with each frame it hears, in each state it can be in) are numbered MLR-1 to MLR-115 (“mLink Rule”). The relay answer rules (Chapter 21) are the RLA table and the operator seat rules (Chapter 9) are the SEA table; their rows keep the short names they were first given (such as R7 or CA7). All three follow one convention, and any table added later must too:
- A row's name never changes meaning. A new row takes a number above the highest ever used, and the number of a retired row is never given to anything else. A list of every row and what it says is pinned in the test suite; changing a row under its name, dropping one without saying it is retired, or reusing a retired number makes the suite fail, so a change to a rule has to be announced in the same step.
- Each decision is written to the log before the action it decides. The line names the row that decided and carries the facts the row's conditions looked at, one character per fact behind a version letter that changes whenever the list of facts changes, so an old log can never be read with the wrong facts. If the station then ends up somewhere other than the row said, that is a second, separate line, never a change to the first.
- A logged decision can be checked offline. A small program decides again from the logged facts and compares its answer with the row the station named; a difference fails the run.
- Every row can win. A test proves that each row decides something for some input, so no row is hidden behind an earlier one.
- A case with no row is loud. When a table finds no row for what it was given, nobody has decided that case yet. The station logs it as a warning, says which table, state and event it was and what safe default it took instead, and counts it; in a simulated run the line fails the scenario. A case that has been judged safe to ignore gets a row of its own that says so, such as a station's beacon heard in the middle of an exchange, so only the undecided cases reach the warning.
Because the decisions are logged by row, a scenario can ask "did station B decide by row R7?" and the suite can count which rows the scenarios ask about and which rows the runs actually used. A row nobody has ever exercised is visible.
The relay and seat tables are also compared against the code exhaustively. A test follows the code through every combination of the facts it reads, and checks that the table gives the same answer as the code at every leaf, and that no two rows that match the same input disagree unless one is declared to take precedence over the other. These are small machines whose answer depends only on the facts handed to them, so every case can be tried.
35.7.7 Expected failures and known failures
Sometimes a scenario is written before the fix: it shows a misbehavior on purpose, so the fix can later be shown to cure it. Such a scenario is marked expected fail, and the suite runner counts it as behaving correctly while it fails. If it ever passes unannounced, the runner flags that loudly: either the fix landed and the mark should come off, or the scenario has stopped testing what it claims to.
The suite also keeps a short, dated list of scenarios that are known to be failing and owed a diagnosis. That list never turns a failure into a pass. It only lets the runner say "these failures are new" separately from "these are the known ones", with a different exit code for each.
35.7.8 Runs on the big machines
The heaviest runs (the whole scenario suite, the long operator simulations) are done on separate compute machines, one launch at a time, through the test queue described in Section 35.6.4. Where a run is owed but cannot be made yet (a hand check, a run on the audio air at several seeds), it is written down beside the change with a line saying why it covers it. An entry is removed only when its run passes or each failure has an owner.
35.8 Operator simulations
Scenario tests check one behavior at a time. Operator simulations ask the bigger question: what happens when a whole net uses this for hours? Each one scripts an event from start to finish (who sends what to whom, and when), makes propagation change as the event goes on, runs every station through it, and then grades the results against the stations' own databases. Each also has a variant in which some of the stations form a named net (Chapter 24) while others share the frequency without belonging to it.
35.8.1 The marathon: a 12-station 40 m event
This simulation is a marathon check-in net on 40 meters by NVIS (near-vertical incidence skywave). It has twelve stations: net control (which is also the mail gateway to a mail server), a start station, eight aid stations along the course, a medical rover sending position reports, and the finish. 250 runners in three waves pass the aid stations at randomly varied paces, and the aid stations report them. Over more than three simulated hours the operators send mail and chat messages, run a roll call and welfare checks, handle medical incidents, register with the mail server over the air, collect replies from headquarters, and work one distress call from the SOS to the stand-down. Propagation follows a day on 40 m: strong at dawn, weaker through midday absorption with static crashes and slow fades on some paths, then recovering into the evening.
35.8.2 Search and rescue: a lost vessel on 20 m
This one is harder on purpose. About fourteen stations are spread across a map of an ocean search. Each path is worked out from the distance between stations using a 20 m one-hop model, including a skip zone that moves through the day, so many paths are one-way and many pairs of stations are hidden from each other. A vessel in distress sends an SOS and its power fades afterwards. Search units move. The search aircraft works on a VHF FM channel of its own, reachable only through an on-scene vessel whose HF and VHF stations are clustered together (Section 33.6). Getting traffic through here means relays (Chapter 21) and clustered stations doing real work.
35.8.3 Scale: a hundred stations and more
The scale runs put 100 stations on one simulated passband for two hours of air, to see whether finding each other () and background announce traffic hold up in a crowd; a few automated operators sent traffic through it partway through. A further run started 256 stations across two computers, as a check of the harness's own capacity as much as of mLink.
35.8.4 What they measured
The table gives the results on record, with the evidence behind each. "Two seeds" means two runs of the same event script with different random choices; each run is a single sample.
| Simulation | Measured | Evidence |
|---|---|---|
| Marathon, 12 stations | Mail fully delivered: 76 of 76 and 77 of 77. Chat messages: 55 of 55 on both. SOS acknowledged and the distress beacon stood down on both. Frames that overlapped another station's transmission on the air: 0.6% and 0.0%. | Two seeds, one run each, early September 2026. |
| Marathon, 12 stations, October build | Mail fully delivered: 76 of 76, and 3 of 3 replies collected through the mailserver. Chat messages: 55 of 55. SOS acknowledged and stood down. Frames that overlapped another station's transmission: 0 of 2,366. No message needed more than two attempts. | One seed, one run, 8 October 2026, with the beacon interval of ten minutes up to ten stations. Labels checked against the audio. |
| Marathon with a virtual net, 38 stations: the 12 as a net, 26 more on the frequency outside it | Mail 77 of 78 (the last one still waiting at the end, not lost). Short chat messages 188 of 193. All 11 joins confirmed; six roll calls, the last five with nobody missing; a bulletin confirmed by all 10 members asked. The 26 outside stations' own traffic: 155 of 155 delivered. SOS acknowledged. Frames overlapped: 71 of 5,465 (1.3%). | One seed, one run, 8 October 2026, same build. The same event on the build of 5 October gave the same delivery figures and 2.2% overlap. Labels checked against the audio. |
| Search and rescue, about 14 stations, two bands | Directed mail 5 of 5, chat messages 37 of 37, SOS acknowledged, on both seeds. No relay offered to carry a message body that didn't match the one asked for. | Two seeds, one run each, mid-September 2026. Labels checked against the audio. Later changes to station timing and mail delivery have not been graded in this simulation. |
| Scale, 100 stations | All 100 registered, stayed up and found each other; every station's list of heard stations held 98 or 99 of the other 99. Background announce traffic used about 4-5% of each announce channel's air time. Test messages sent by the agents were delivered, except one bulk message lost when its opening frame collided. | One run, August 2026, on the code of that month. Every path was a clean 40 dB, so only collisions could cause losses: no fading and no hidden stations. |
The simulations also taught something about their own instrument. When the search-and-rescue event was run twice on the same code with the same event script, the share of overlapping frames came out at 4.5% one time and 9.4% the other. Roughly half to two-thirds of those overlaps were between stations that can't hear each other at all, which no amount of listening before transmitting can prevent (). So a small change in the overlap figure between two runs says nothing on its own.
35.9 What a protocol test asks
A protocol test does not check that "something happened". It checks one of three things, depending on the conditions the scenario sets up.
- Under good conditions, one specific outcome always happens. A clean path, a quiet band: the message is delivered, with the frames the rules call for, and not another outcome. Not "usually", and not "one of several things".
- Under degraded conditions, the message still gets through, as efficiently as it can. A lost frame, a fade, a busy channel, a station that cannot be reached directly: the test asks both that the message arrives and that it got there by the cheapest way left, repairing the one lost frame rather than sending everything again, or going by a relay only when the direct way is gone.
- When delivery is impossible, the station ends in a way the operator can understand. It tells the operator whether the message was delivered; if not, why not; and whether it is still trying or there is something the operator can do. A station that gives up silently, or stays "sending" for ever, fails the test.
A test never forces a pass that the simulated physics would not allow. If the simulated path is too weak for a frame to decode, the test does not make it decode; it asks what the protocol should do on such a path. A scenario that can only succeed by bending the band is a scenario that is wrong, or a protocol that is.
35.10 Test integrity
One rule sits above all the others: a test asserts what the protocol should do. If the code doesn't do it, the test keeps failing.
There are comfortable ways to break it: loosen an assertion from "the sender retransmits exactly the lost frame" to "the message got there somehow", rewrite the expectation to match whatever the code happens to do, or hand over a scenario that was never run as if it passed. Each turns a fail into a pass, and each is worse than leaving the failure alone. A failing test is the suite working. A false pass is the suite lying, and once one pass is known to be a lie, every other pass has to be checked again by hand.
So, in mLink's suite:
- When the code is wrong, the test keeps failing and the defect gets written up, or the scenario is held back until the fix. It is never quietly adjusted.
- A new assertion is proven by breaking the code on purpose and watching the assertion fail. An assertion that can't be made to fail isn't testing anything. The breaking is done from outside, on a copy of the source; the station program carries no switch to turn one of its own rules off for a test. What a test may set in the station is limited to the edges: the clock, fixed random draws, shortened timers and extra logging.
- Setup is checked as carefully as the result, which is what the "never fired" and pause checks above are for.
- If a test couldn't be run, the report says so plainly.
35.11 How to read a measured number
35.11.1 One run per side is not a comparison
Suppose a scenario fails, you change something, and it passes. It's tempting to conclude that the change did it. But many scenarios involve timing and random choices, and some fail now and then for reasons nobody has yet explained. If a scenario fails one time in three, two single runs will often disagree, and the disagreement will line up with whatever you just changed, because something has to. The danger isn't that the explanation is weak. The danger is that it's good.
The rule: run both sides of a comparison at least three times before blaming a difference on the change. If the two sets of results overlap, there's no effect to explain, only an intermittent failure to understand. The overlap figures above show why: the same code and the same event script gave 4.5% one time and 9.4% the next.
35.11.2 A single run near a cliff tells you nothing
Near a decoder's floor, whether one frame decodes depends on the exact noise that happened to land on it (). One run at −1.75 dB that decoded proves nothing about −1.75 dB, and one that failed proves nothing either. Only many runs, or a test built with a known margin on each side like the discrimination test and the announce rate check, say anything about where a floor really is.
35.11.3 Randomness decides when, never whether
Stations use random delays to avoid transmitting at the same instant as each other (Section 19.8). That randomness is allowed to decide when a station transmits. It must never decide whether an exchange completes. So a scenario whose outcome changes from run to run has found something real: a rule that should always hold, and doesn't for some random choices. "It was just bad luck" describes the spread of results; it isn't a cause. The harness gives each run fresh random starting conditions so that the full range of those choices gets exercised.
35.11.4 Every verdict says how it knows
A result should say what kind of evidence it rests on. "Measured on two seeds, one run each" is different from "consistent with the logs", which is different from "a hypothesis". A comparison is only as good as its control: if the control run would have looked the same whether or not the suspected cause were real, it can't clear or convict anything. "The computer was too slow" is never an explanation, because the lockstep design rules it out. A failure that can't be explained yet is written down as undiagnosed and kept on a list that is owed an explanation. That's why the results table above gives a date and an evidence class for every number; when you read a claim about mLink's performance, look for those two things first.
35.12 What to remember
- The simulated air runs the real station software and swaps only the sound card for a mixer that gives each listener its own mix and keeps a labeled record of what was on the air.
- In simulation a second is 12,000 samples, and everything runs in lockstep: a busy computer makes a run slower, never different, and a test that breaks at speed has found a bug.
- Protocol questions need no signal processing: scenarios run on the logical airs (frames, sim) and only decoding questions use the audio air. The same seed gives the same events, so a passing result for the same inputs is reused, and a change runs only the scenarios that executed the functions it touched.
- Impairments copy real mechanisms, and one that never fires fails the run. Assertions are graded from what the stations logged, not from energy on the channel.
- Floors are tested with a margin on both sides: the discrimination test requires bulk to fail 2 dB below the level where everything decodes, and the lowest announce level is judged as a rate over 60 frames.
- A test asserts what the protocol should do. If the code doesn't do it, the test keeps failing.
- Good conditions have one outcome; degraded conditions still deliver, as cheaply as possible; when delivery is impossible the station tells the operator whether it delivered, why not, and whether it is still trying.
- Station decisions come from numbered rule tables (MLR for medium access, RLA for relays, SEA for seats), each decision logged by row before the action, so a scenario can ask which row decided; the small tables are compared against the code exhaustively.
- Read every measured number with its evidence: at least three runs per side before blaming a change, never one run near a cliff, and randomness may decide when, never whether.
Appendices
Numbers at a Glance
Times are on-air time. Audio positions are counted in samples at 12,000 per second. Every signal level is on the SNR@3k scale (Section 3.4.3). "Derived" marks a figure worked out from others. In the random waits, N is the number of stations heard in the last 30 minutes, held between the bounds shown.
A.1 Audio and the passband
| Item | Value | See |
|---|---|---|
| Audio sample rate | 12,000 samples per second | Section 3.2 |
| Audio block | 512 samples = 42.7 ms | Section 15.2 |
| Receiver's running recording | 524,288 samples = 43.7 s | Section 15.2 |
| Emergency region | allotted 300–350 Hz; tones 303.125–346.875 Hz; filtered to 290–360 Hz | Section 10.3 |
| Announce region | allotted 350–1,500 Hz; three channels (next table) | Section 10.4 |
| Bulk region | allotted 1,500–2,900 Hz; carriers 1,567.2–2,832.8 Hz; filter passes 1,520–2,880 Hz, stops below 1,500 and above 2,900 Hz | Section 10.5 |
| All signals together | energy 290–2,900 Hz; information from 300 Hz to the top carrier at 2,833 Hz and its skirt | Section 10.3 |
| Empty spectrum between signals | 68 Hz emergency to announce (top tone to announce channel 0's edge); 80 Hz between announce channels; 115 Hz announce to the bulk filter's stop edge (135 Hz to its pass edge); top bulk carrier 67 Hz under 2,900 Hz | Section 10.6 |
| Keying ramp | first and last 20 ms (240 samples) | Section 10.9 |
| VOX | not supported on HF: no leader tone; a station keyed only by VOX sends nothing but a distress call | Section 5.3.12 |
| Channel | Center | Signal occupies | Transmit filter | Detector listens to |
|---|---|---|---|---|
| Announce 0 | 550 | 415–685 | 361–739 | 400–700 |
| Announce 1 | 900 | 765–1,035 | 711–1,089 | 750–1,050 |
| Announce 2 | 1,250 | 1,115–1,385 | 1,061–1,439 | 1,100–1,400 |
| Bulk-control (Section 10.5.1) | 2,200 | 2,065–2,335 | 2,011–2,389 | 2,065–2,335 |
A.2 The three modems
| Emergency (NB8FSK) | Announce (QPSK) | Bulk (OFDM) | |
|---|---|---|---|
| Modulation | 8 tones 6.25 Hz apart, one at a time | QPSK on one carrier, roll-off 0.35 | 28 carriers 46.875 Hz apart: 24 of QPSK data, 4 pilots per symbol (scattered: each moves up one carrier per symbol; symbol 0 at 1,708, 2,036, 2,364 and 2,692 Hz) |
| Symbol | 1,920 samples (160 ms) | 60 samples (5 ms) | 352 samples (29.33 ms): 256 + 96 of cyclic prefix |
| Symbol rate | 6.25 baud | 200 baud | 34.1 per second |
| Bits per symbol | 3 | 2 | 48 |
| Raw bit rate (derived) | 18.75 bit/s | 400 bit/s | 1,636 bit/s |
| Marker at the front of a frame | sweep 300 to 350 Hz, 11,520 samples (0.96 s) | 20 known symbols, 1,680 samples (140 ms), and three more blocks of 4 known symbols inside the message | one 352-sample symbol in two identical halves |
| Data in one frame | 11 bytes | 11 bytes | 603, 907 or 1,008 bytes |
| Coded frame | 23 bytes as 62 tones | 23 bytes as 92 message symbols, in a stream of 124 symbols with the 32 known ones | 9,720 bits as 203 symbols |
| Frame air time | 130,560 samples = 10.88 s | 7,920 samples = 660.0 ms, no silence inside | 71,808 samples = 5.98 s at every rate |
| Frames in a row | back to back, up to 15 | 256 samples (21.3 ms) apart: one every 8,176 samples (681.3 ms) | back to back, up to 10 per transmission |
| Useful rate (derived) | about 8.1 bit/s | about 129 bit/s | about 806 to 1,348 bit/s |
| Decodes down to | −19.6 dB for 90 % of frames in one pass | −9 dB (93 %); 99 % at −8 | about −1.5 dB at rate 1/2, +2.25 at 5/6 |
| Detector fires after the frame’s start (measured) | not measured | about 155 ms (medians 153 to 171 ms in three runs of 41 frames each: strong signal, about −3 dB and about −8 dB). Slowest seen: 337 ms at strong signal, 239 ms near the decode floor | not measured |
| See | Chapter 12 | Chapter 13 | Chapter 14 |
| Item | Value | See |
|---|---|---|
| FFT | 256 samples (21.33 ms) | Section 14.2.2 |
| Carriers | bins 1 to 28, shifted up 1,520.3 Hz; center 2,200 Hz | Section 14.3 |
| Pilots | carriers 4, 11, 18 and 25: 1,708, 2,036, 2,364 and 2,692 Hz | Section 14.3 |
| Cyclic prefix | 96 samples = 8.00 ms | Section 14.4 |
| Frame | 1 sync symbol (14 carriers, even bins only) + 203 data symbols | Section 14.6 |
A.3 Error correction
| Where | Code | See |
|---|---|---|
| Emergency frames | polar code: 256 positions cut to 184 bits; the 11 frame bytes and a 24-bit CRC on the 112 most reliable positions; sent as frame, 3 check bytes, 9 parity bytes; decoded from soft bits keeping 8 candidates | Section 11.7 |
| Announce frames | polar code: 256 positions cut to 184 bits; the 11 frame bytes and a 24-bit CRC on the 112 most reliable positions; sent as frame, 3 check bytes, 9 parity bytes; decoded from soft bits keeping 8 candidates | Section 11.7 |
| Bulk frames | LDPC, one 9,720-bit codeword per frame; each bit in 3 checks; soft bits −127 to +127; normalized min-sum (13/16); at most 15 decoding rounds | Section 11.4 |
| Bulk interleavers | 5 × 1,944 after the encoder; 48 × 203 in the modem (24 cells unused), each symbol rotated one data carrier further | Section 11.6, Section 14.5 |
| Filling a bulk frame | payload, 00 00, then a fixed 200-byte pattern repeated; 4 bytes held back per frame; a full frame ends in 34 to 36 known bits | Section 11.5 |
| Message check | 16 bits over sender, addressee (6 bytes each) and the message before compression | Section 18.2.1 |
| Code rate | Used by | Information bits | Parity bits | Bits per check | Capacity | Usable bytes | Throughput (derived) |
|---|---|---|---|---|---|---|---|
| 1/2 | frame 0 | 4,860 | 4,860 | 6 | 607 bytes | 603 | about 806 bit/s |
| 3/4 | frame 1 | 7,290 | 2,430 | 12 | 911 bytes | 907 | about 1,213 bit/s |
| 5/6 | frame 2 onward | 8,100 | 1,620 | 18 | 1,012 bytes | 1,008 | about 1,348 bit/s |
A.4 Message sizes and limits
| Item | Value | See |
|---|---|---|
| Shortburst | 1 to 160 bytes in up to 16 announce frames, 10 message bytes in each (the opener carries the length) | Section 17.2.1 |
| Longburst | 161 to 601 bytes as 2 to 4 shortbursts; to one station only | Section 17.3.1 |
| Bulk, one frame | 601 bytes of message (603 less the 2-byte check) | Section 17.4.4 |
| Bulk, largest (derived) | 64 frames: 603 + 907 + 62 × 1,008 = 64,006 bytes, 64,004 of message | Section 17.4.4 |
| Bulk segment | 10 frames per transmission | Section 18.7 |
| Largest broadcast (derived) | 6,028 bytes: 10 × 603 less the check | Section 17.4.4 |
| Rate ceiling | 5/6 to one station, over 601 bytes, on a link of +3 dB or better; 1/2 for one frame and every broadcast; 3/4 only in repairs | Section 17.4.2, Section 18.5.2 |
| Sizes and link levels the station decides on | 60, 100, 160, 601 and 6,028 bytes; −9 dB and +3 dB | Table 17.2 |
| Sends that ask first | to one station: a bulk transfer of 2 frames or more, or a longburst; the RTS names 2 to 10 bulk frames (the first transmission) or 2 to 4 pieces | Section 19.3.1 |
| Grid locator in a PRESENCE | six characters (about 5 by 7 km at mid latitudes); four if the operator chooses (about 170 by 110 km); always six from a station that has declared an emergency | Section B.5 |
| Longest chain with no opener | PRESENCE + 15 frames | Section B.3 |
| Longest shortburst chain | 18 frames; 19 with a longburst manifest; 22 with two HELLOs, FOR and AREA too | Section 16.4 |
| Largest message a station accepts for sending, and a receiver will expand | 1,048,576 bytes (1 MiB) | Section 23.5.3 |
| Item | Value | See |
|---|---|---|
| The acknowledgment, [ack] | one announce frame: 7,924 samples = 0.66 s | Section 18.4.2 |
| The ask and its answer, [rts] and [cts] | one announce frame each, 0.66 s | Section 19.3 |
| Two-frame reply, such as [cts] | 16,104 samples = 1.34 s | Section 16.1.1 |
| Shortburst with n data frames | (n + 2) × 8,180 − 256 samples: 2.02 s for one, 12.2 s for sixteen | Section 17.2.2 |
| Longburst, sending only (derived) | 15.0 s for 161 bytes, 47.6 s for 601 | Section 17.3.2 |
| Pause between the opener and bulk frame 0 | 1,800 samples = 150 ms; silent apart from the bulk filter's faint run-in in its last 85 ms | Section 15.9.1 |
| Start of PRESENCE to start of bulk frame 0 | 17,896 samples = 1.491 s | Section 17.4 |
| Bulk transmission of N frames | 1.491 s + N × 5.984 s: 7.48 s for one, 13.46 s for two, 61.33 s for ten | Section 17.4 |
| Shortburst and one bulk frame cost the same at | 90 bytes (the nine-frame shortburst 7.473 s against the bulk frame 7.475 s, a tie); the station switches at 100 | Section 17.5.4 |
| Longest emergency message | 15 frames = 163.2 s | Section 12.6 |
| Silence around a transmission | 60 ms after keying, 40 ms before unkeying | Section 31.4 |
| Radio given to key up | 60 ms to report transmit; a key-up not reported by then is refused | Section 31.4 |
| Radio polling interval | 175 ms by default; 50 to 5,000 ms set by the rig file's poll= line or by you (yours wins); a lost radio is declared after 3 missed answers in a row and not under 300 ms after the last good one | Section 6.6 |
| A keying-line radio whose USB adapter is unplugged | the port is checked every 500 ms (read only); reopening is tried every 5 s, by the adapter's USB identity, with both lines low | Section 6.9 |
| High SWR, a radio with no SWR flag | above 3.0; a rig file that declares the radio's own flag is judged by that flag | Section 6.5 |
A.5 Reservations (defers)
| Heard | Reserves | For |
|---|---|---|
| Bulk opener for N frames, or a repair's opener | the bulk region | 0.15 s + N × 5.98 s + 0.5 s, counting at most 10 frames: 30.57 s for five, 60.49 s for ten |
| SEG-OPENER | the bulk region | 0.15 s + that segment's frames × 5.98 s + 0.5 s |
| Shortburst opener | its announce channel | 10.73 s: fifteen more frames + 0.5 s |
| A PRESENCE that opens a transmission | its announce channel; on the bulk-control channel, the bulk region | 2.48 s; each further frame decoded moves the end to 1.82 s after it |
| A dNAK | its channel, and the bulk region for a bulk exchange | 0.15 s + the repair's air time + 0.5 s |
| A longburst ACK with pieces still to come | its announce channel | 14.89 s: a full shortburst and its answer (the same time the station that sent the ACK is left alone) |
| An ASK (the ask that names its message) for someone else | the same as an RTS, below, also when its PRESENCE was missed | 7.023 s, as an RTS; an "I have it" ACK naming the asker ends it, except at a station that missed the PRESENCE in front of the ASK |
| An RTS (an ask) for someone else | its announce channel; on the bulk-control channel, the bulk region | 7.023 s: the 3 s wait for the CTS + 4.023 s to the latest opener (2 s to key + 2.023 s of PRESENCE, a RELAY/FOR line and the opener); not cut short when no CTS is heard |
| A CTS that grants N bulk frames | the bulk region | 6.664 s + N × 5.984 s: 4.023 s to the opener, 0.15 s, the frames, 0.5 s, 1.991 s for the reply; 18.63 s for two frames, 66.50 s for ten. A station that hears it also sends nothing to the granting station meanwhile |
| A CTS that grants a longburst | its announce channel | 17.426 s, the first piece and its reply |
| A CTS of "not now" or "too weak for bulk" | nothing | – |
| Own reply that invites the other station straight back | every channel and the bulk region, at the replying station | 3 s; 4.023 s from the end of a CTS that grants, which also reserves for itself what it grants |
| A signal on an announce channel that did not decode | that channel, for the periodic beacon only | 1.5 s |
| Anything, for distress traffic | nothing | never defers (Section 25.2) |
A.6 Random waits
| Before | Fixed part | Random part, up to | Longest | See |
|---|---|---|---|---|
| A queued message, after the channel clears or when handed over on a quiet channel | 0.15 s | 0.45 s × N (4 to 12) | 1.95 to 5.55 s | Table 19.4 |
| A new bulk transfer, after a heard bulk reservation ends | 2 s | 1.5 s × N (6 to 12) | 11 to 20 s | Table 19.4 |
| A beacon, position report, geopoll or heartbeat | 0.2 s | 1.5 s × N (6 to 12) | 9.2 to 18.2 s; on FM a VOX-keyed station waits one full span longer, but only while a fast (not VOX) station has been heard in the last 10 minutes | Table 19.4 |
| Asking a broadcaster to say again | 1 s + one of N places 2.25 s apart (4 to 8); after a mail with k reply slots, k × 1.2 s more | 0.45 s | 17.2 s; 26.8 s after a mail with 8 slots | Section 19.9 |
| Asking again: after an unanswered RTS or ASK (counted from the end of its 3 s wait), or a grant that could not be used | one of 6 places 2.541 s apart, the first at once; of two stations asking each other, the lower station ID takes the 1st, 3rd and 5th, the higher the 2nd, 4th and 6th, so they never pick the same place | 0.45 s | 13.15 s | Section 18.6.1, Section 19.3.3 |
| A relay OFFER | one of 9 slots starting 2.0 s apart | 0.4 s | starts by 16.4 s | Section 21.3.3 |
| A relay OFFER when 5 or more stations could answer | by the station's own place in line: places 1–2 at once, 3–4 after 2.0 s, the rest after 6.0 s; dropped after hearing 2 offers | 0.4 s | starts by 6.4 s (14.4 s for a station outside an active net) | Section 21.3.4 |
| An answer to a geopoll | 0.2 s + one of 9 slots 0.75 s apart | none | starts by 6.2 s | Section 20.4 |
| Repeating a heard distress call | 5 s + one of 8 to 16 slots 1.5 s apart | 0.45 s | about 16 to 28 s | Section 25.8.1 |
| A courier's first try | 24 s + one of 8 to 16 turns 6 s apart | 3 s | 69 to 117 s | Section 26.7.1 |
| Answering an internet request | 0.3 s | 1.2 s × N (6 to 8) | 7.5 to 9.9 s | Section 29.5 |
A.7 Replies, retries and relay
| Item | Value | See |
|---|---|---|
| Reply to a bulk transmission of N frames | keyed 150 ms + N × 5.98 s + 0.5 s + 150 ms after the opener | Section 18.4.1 |
| Sender's reply window | 5 s (0.5 + 0.15 + 1.341 + 3.009) | Section 18.4.5 |
| Sender's wait for a CTS | 3 s from the end of its RTS: no bulk burst to decode first, so shorter than the reply window | Section 19.3.3 |
| Starting a granted transmission | within 2 s of decoding the CTS; otherwise it asks again, never sends late | Section 19.3.3 |
| An ask granted first time | the opener starts at most 5.66 s after the RTS: 0.66 + 3 + 2 | Section 19.3.3 |
| A granted transmission this station could not start in time | asked again; after the third such miss for one message it stops asking for now: the message is set aside with the reason, the operator is told, and it is tried again on the "not now" gap | Section 19.3.3 |
| An ask with no answer | one more RTS (or ASK), due 3 to 16.2 s after the first ended, then a relay search that also invites stations without a copy | Section 18.6.1 |
| An ask answered "not now" | set aside until the addressee is heard, or 1 min, doubling with each "not now" to 32 min; then asked again, never a relay search | Section 19.3.3 |
| Follower tied to a PRESENCE | within 1,363 ms of the chain's last frame | Section 16.5.1 |
| Shortburst retries | up to 3 | Section 18.6.2 |
| Silence after a bulk transfer | for a message that asked first and went out whole on the grant: the ASK at once (once a try), 3 s for its answer, one repeat, then relay; for any other, or a second silence after the whole send the ASK's grant brought: a "did you get that?" probe, 8 to 9.5 s of listening, then relay | Section 18.6.3 |
| A stored copy that answers a probe or an ASK ("I already have it") | a mail filed in the last day; any other message heard in the last 15 min; the memory of recent deliveries lasts 1 min | Section 18.6.4 |
| The ASK, in place of the RTS | the sender waits 3 s from the ASK's end of air, as for an RTS; unanswered, one more ASK, then relay; after a whole send's silence it is asked at the reply window's end; on air two announce frames, 1.34 s on HF, three with the FOR of a carried message, 2.02 s | Section 18.6.5 |
| The addressee's "I have it" (ACK) or "send these" ([cts] | keyed without listening first for at most 1.159 s after it decides (1.009 s to get it ready + 0.15 s turnaround), so it ends inside the asker's 3 s; later, it listens first like a new send | Section 18.6.5 |
| A partly received transfer is kept | 10 min, restarted by each repair | Section 18.5.1 |
| Checkpoint after a segment | the sender waits 8 s for it, probes once, waits 8 s more; the addressee waits 30 s for the next segment | Section 18.7.2 |
| Say-again round of a broadcast | requests collected for 22 s from the end of the broadcast (from the end of the last reply slot, for a mail to several stations: 0.65 s + k × 1.2 s after a bulk transfer's air, 0.5 s + k × 1.2 s after a shortburst's, k the slots its opener says), and 60 s more if none came; a listener asks again after 35 s | Section 19.9 |
| Spacing of large sends after an empty relay search | 15 s, doubling to 10 min | Section 19.8.2 |
| First-frame rule | verdict 7.73 s after the opener decodes | Section 19.7 |
| Listening before keying | busy while the receiver collects an mLink frame and for 0.6 s after one; noise does not hold a send; just before keying the station checks once more that no mLink signal has started (a frame start found or a decode under way), never the audio level; on an FM channel the FM voice wait below holds the same sends and the same last check | Section 19.6, Section 19.6.1 |
| Relay search | 24 s from the moment the REQUEST is keyed; the choice is made 2 s after the first valid OFFER | Section 21.2, Section 21.4 |
| A volunteer holds its own traffic | 5.2 s (2 s + 2 × 1.6 s) | Section 21.4 |
| Who may volunteer | destination decoded within 30 min, or 2.5 beacon intervals if longer; a volunteer whose hearing is older than 120 s stands 4 places further back; link of −9 dB or better | Section 21.3.1 |
| Waiting for a RESULT | 60 s, restarted by signs of progress; from the helper's opener it covers the transmission, its acknowledgment and a reply round (about 136 s for ten frames) | Section 21.6.1 |
| Retry gaps of a deferred message | 1, 2, 4, 8, 16, then 32 min; a frame heard from the destination ends the gap at once, at most once per gap | Section 22.6.1 |
| Own random wait before a due relay retry or re-ask goes out | none up to about 6 s (4 places) or 13.5 s (8 or more stations heard in 30 min), counted down only while the channel is clear | Section 21.7.1 |
| Hold on routine traffic after decoding an SOS frame | until the last frame of that pass has gone by, then a random wait of the station's own | Section 25.2 |
A.8 Applets
| Limit | Value |
|---|---|
| Lua memory | 64 MB |
One call (draw, save, a reply...) | 50 million Lua steps, or 3 s on the clock |
main.lua from the top, and load | 200 million Lua steps, or 15 s on the clock |
| A call shown as slow (the applet keeps running) | 50 ms or more |
| All of an applet's calls together: its window warns | above 60 % of the client's time over 2 s (unless it declares applet.cpu = "high") |
| Sounds playing at once | 4 per applet, 16 in all |
| No dialog after you close one | 5 s |
| Pictures, models and sounds held at once | 256 MB |
| One picture | 8,192 pixels a side, 16 million pixels |
| One sound; one piece of music | 1 minute; 5 minutes |
| Data folder | 8 MB a file, 64 MB and 256 files in all |
| A Lua file | 4 MB |
A save() value | 16 MB |
applet.state written to disk | when it changed: on applet.save_state(), after an upgrade, every 5 s between calls (the applet may set another period or none), before a reload, when the window closes and when the client quits; never after an error stops the applet |
| Event handlers | 32 per applet; 512 events waiting in all, 64 handed over a frame |
| Messages from other stations waiting for an applet that is not open | 32 in all |
| An applet in the repository (packed, as one file) | at most 49,152 bytes (48 KiB), so one mail carries it; at most 128 files and 2 MiB before packing; files at most three folders deep |
| A repository name | 2 to 27 characters: lowercase letters, digits and dashes, starting with a letter |
| Applets one client holds | 40 |
An applet's icon (applet.icon) | at most 1,024 characters; 8 colors, 64 shapes, 64 point lists and 512 points; a 64 by 64 grid (a unit is a quarter pixel at 16 px); carried in an info answer by mail only when the answer still fits one frame |
| An applet message's own bytes on the air | 5 (the applet and a byte of flags), and 2 for each of version, session, sequence and state check when used; 10 with the message's own check, envelope, time and kind bytes |
A room (applet.room) | 2 to 8 stations, one room per applet; each move sent once by its member and once more by the maker when there are more than two; an invitation waits 30 min for its answer; a member waited for is quiet after 10 min unless the applet sets another time, looked at every 30 s |
| Sending (chat messages, mail, internet chat, station chat and MeshCore texts together) | one a second; 60 an hour counted only while the applet's window is not in view; a notice names the applet when it sends out of view |
| Opening the composer | once every 5 s |
Opening another applet's window (mlink.open_applet); a notice (applet.notify) | a window: only while the caller is in view, once every 2 s from one applet and once a second from all; a notice: once every 2 s and 60 an hour from one applet, 10 a minute from all |
A station card, the map, a friend, a contact-log offer or a place (mlink.open_station, show_on_map, friend, offer_contact_log, navigate) | only while the caller is in view, once every 2 s from one applet, counted with the window opens in the one a second from all |
Clipboard and share (ui.copy, ui.share) | only while the caller is in view; a copy twice a second, a share once every 2 s |
| Rows of a chat list; lines of a line log | 512 each (a log keeps the newest); a key is 1 to 127 bytes |
| Widget memory (scroll, selection, follow) | 96 widgets and 4 MB per applet, the one unused longest dropped first; 6 menus of 32 items |
applet.tick of a background applet | on a frame where something reached the applet, at most 5 a second; otherwise at most once a second; the client does not wake to tick |
| Arguments of an open request | 8, names under 32 bytes, text under 256 bytes; 4 requests wait |
| A MeshCore text, an internet chat message or a station chat message from an applet | 255 bytes each |
| Markers set by an applet | at most 4 a second |
| Changes to the radio by an applet (frequency, mode, the stated frequency, the FM mode) | only for an applet the operator allowed, only as the operator presses something in its window, at most 4 a second |
| Requests to the station | 8 waiting at once, 20 started a second |
| A chat message | 255 bytes |
A.9 Signal levels
| Item | Value | Kind | See |
|---|---|---|---|
| Emergency message | one frame in one pass: 90 % at about −19.6 dB, 50 % at about −20.6; for repeats added up, see the emergency table | measured | Section 12.8 |
| Announce frames | 93 % at −9 dB; 99 % at −8; 60 % at −10; 50 % at about −10.2 | measured | Section 13.9 |
| Bulk, 99 % of frames | rate 1/2 from −1.55 dB, 3/4 from +1.2, 5/6 from +2.25; rate 1/2 decodes almost none 1 dB lower | measured | Section 11.8.2 |
| Bulk trusted; a HELLO calls a link strong | from +3 dB | setting | Section 11.8.3, Section 20.7 |
| Link estimate under −9 dB | only messages of up to 601 bytes are still tried directly; a station does not volunteer to relay | setting | Table 17.2, Section 21.3.1 |
| An FT8 or JS8 report of the same signal | about 0.8 dB higher | derived | Section 3.4.3 |
| Link estimate | newest reading weighs 40 %; usable for 5 min; readings while the bulk region is reserved, and for 8 s after, are left out | setting | Section 20.6.1 |
| Detector threshold | 5 × (emergency) or 4 × (announce) the spread of recent noise scores, and one quarter of the loudness of all the audio | setting | Section 15.4, Section 15.5 |
| False starts on white noise | emergency about 9 an hour (3 to 14 in three separate hours); each announce channel about 3 an hour (1 to 8); none passed its check | measured | Section 15.4 |
| Static and steady carriers (announce) | a burst above 6 × the noise level and up to 4 ms, with quiet audio 8 ms either side, is blanked; a steady line 15 dB or more over its channel's noise, found over about 10 s, is canceled | setting | Section 15.6 |
| A saturated announce channel | 4 failed decodes in 60 s that are 80 % or more of its decodes: its detections stop holding the key; the operator is told once when a channel was saturated half of each of 2 of the last 3 minutes, again only after 6 h | setting | Section 15.6 |
| Finding bulk frame 0 | within 1,400 samples (116.7 ms) of the predicted start, correlation match of 0.60 or better (a genuine one scores about 0.997); given up 16,384 samples after it should have ended | setting | Section 15.9.2 |
| Finding later bulk frames | within 64 samples (5.33 ms) of the expected start | setting | Section 15.9.3 |
| Where a bulk frame's symbol windows start | at the earliest clear peak of the sync match within 96 samples (8 ms) before the strongest, if it scores at least 0.25 of the strongest | setting | Section 15.9 |
| Frequency offset | measured to 47 Hz either way | setting | Section 15.11 |
| Our own frequency error | judged off when 2 or more other stations, and a majority of those heard in 15 min, agree within 6 Hz on 5 Hz or more (each station's middle value of its last 5 frames); cleared below 2.5 Hz; dial retuned (only with the operator's dial correction setting, off unless ticked) at most once per 10 min, else the operator told | setting | Section 15.11.1 |
| Offset each modem takes out | bulk up to 23 Hz either way (frame 0 found to about 18 Hz), counted from the opener's offset when that is 5 Hz or more; announce up to 24 Hz (hunted by fit to the code), and up to about 90 to 100 Hz by the wide try (offset measured over 64 Hz, or to about 100 Hz when a stronger line stands beyond; one more decode, only past 18 Hz and when the frame's start shows a clear peak); emergency up to 24 Hz | setting | Section 15.11 |
| How far off we can be and still correct | about 80 Hz at 0 dB and better, 64 Hz at −3 dB, 24 Hz at −6 and −9 dB; one retune; first retune after a median of 7 min with 2 other stations, 5 min with 3 (at 0 dB and up, beacons every 10 min); 101 to 200 Hz not at all | measured in simulation | Section 15.11.2 |
| The same limit in parts per million | at 0 dB and better: 22.9 at 3.5 MHz, 11.4 at 7, 5.7 at 14, 3.8 at 21, 2.9 at 28 MHz | derived | Section 15.11.2 |
| "Frames arriving off frequency" notice | 3 announce frames within 30 min, each 18 Hz or more off, with a clear start peak, within 6 Hz of each other; past about 90 Hz it says "more than about 64 Hz" with no figure; not raised while the station's own judgment is up; taken back at once when a station heard far off decodes twice within reach, else after 30 min without one; not on FM | setting | Section 15.11.3 |
| Recommended radio accuracy | about 1.5 ppm in all, warm-up included: 5 Hz at 3.5 MHz, 10 Hz at 7, 21 Hz at 14, 31 Hz at 21, 42 Hz at 28 MHz | recommendation | Section 6.11 |
| Mode | Peaks shaved to | Average power | Hiss inside the signal | Gain in decoding threshold |
|---|---|---|---|---|
| Emergency | not shaved | about 80 W | none | none |
| Announce | 2.4 dB above the average | about 50 W | 36.4 dB below the signal | about 0.7 dB |
| Bulk, rate 1/2 | 3.2 dB above the average | about 24.9 W | 19.6 dB below the signal | about 4.0 dB |
| Bulk, rates 3/4 and 5/6 | 6.0 dB above the average | about 17.1 W | 30 dB below the signal | about 2.8 dB (3/4) and 3.3 dB (5/6) |
| Emergency relay chain (announce-type frames) | not shaved | about 42.5 W | none | none |
| Carriers lost | Rate 1/2 | Rate 3/4 | Rate 5/6 |
|---|---|---|---|
| 1 (2,833 Hz) | 0.9 dB | 1.4 dB | 1.3 dB |
| 2 | 1.5 dB | 2.0 dB | 2.3 dB |
| 4 (from 2,692 Hz) | 2.1 dB | 3.3 dB | does not decode |
| Top four turned down 6 dB (a slope, none removed) | 0.45 dB | 0.8 dB | 1.0 dB |
| Bottom 2 (from 1,567 Hz) | 1.5 dB | 2.0 dB | 2.4 dB |
| See | Section 6.1.1 | ||
| Level | Announce frame decoded | Level | Emergency frame found | Emergency frame found and decoded |
|---|---|---|---|---|
| −8 dB | 99 % | −17 dB | 100 % | 100 % |
| −9 dB | 93 % | −18 dB | 100 % | 100 % |
| −10 dB | 60 % | −19 dB | 100 % | 99.5 % |
| −11 dB | 15 % | −20 dB | 99 % | 86 % |
| −12 dB | 1 % | −21 dB | 94 % | 30 % |
| See | Section 11.8.1 | Section 15.4.1 | Section 12.8 |
| Channel | Emergency | Announce | Bulk, rate 1/2 | Bulk, rate 3/4 | Bulk, rate 5/6 |
|---|---|---|---|---|---|
| Steady noise only | −20.4 / −19.3 | −10.1 / −9.1 | −2.0 / −1.6 | +0.8 / +1.4 | +1.8 / +2.4 |
| Mid-latitude, moderate (two paths 1 ms apart, 0.5 Hz fading) | −17.4 / −14.1 | −8.2 / +1.8 | +1.3 / +5.0 | +5.5 / +8.1 | +7.6 / +11.2 |
| Poor, also mid-latitude disturbed (2 ms, 1 Hz) | −17.1 / −14.2 | −6.1 / +1.4 | +1.9 / +4.9 | +6.1 / +7.9 | +8.1 / +11.1 |
| Near-vertical skywave, NVIS (7 ms, 1 Hz) | −17.4 / −14.5 | −3.9 / +5.8 | +3.7 / +5.8 | +7.4 / +10.7 | +9.9 / +12.7 |
| One equal echo 4.5 ms late, slow fading (0.1 Hz) | −17.2 / −12.1 | −6.7 / −0.2 | +1.0 / +5.7 | +5.2 / +10.4 | +7.5 / +14.5 |
| Flutter (0.5 ms, 10 Hz) | none (at most 0 %) | +1.0 / +18.7 | +4.6 / +6.0 | +11.5 / +17.2 | +26.0; 90 % not reached (at most 56 %) |
| High-latitude, moderate or disturbed (3 to 7 ms, 10 to 30 Hz)a | none (at most 0 %) | none (at most 4 %) | none (at most 0 %) | none (at most 0 %) | none (at most 0 %) |
| Average power from a 100 W (peak envelope power) radio | about 79 W | about 50 W | about 25 W | about 17 W | about 17 W |
| Data carried | 11 bytes a frame, about 8 bit/s | 11 bytes a frame, about 129 bit/s | 603 bytes a frame, about 806 bit/s | 907 bytes a frame, about 1,213 bit/s | 1,008 bytes a frame, about 1,348 bit/s |
The first measurements through a real radio, on 22 October 2026, agree with these tables: with a Yaesu FT-991A set up as in Section 6.3, its receiver fed mLink's frames and noise by a software-defined transmitter, the level at which half the frames decoded matched the simulated emergency figure within 0.5 dB and the announce figure within about 1 dB. That was a small first set, ten announce frames and three emergency frames at each level.
A.10 Beacons and finding each other
| Item | Value | See |
|---|---|---|
| Listening after start-up | 20 s, then a random 0 to 16 s before the first beacon | Section 20.2.1 |
| Beacon while nobody is heard | every 90 s ±20 %; from 20 min after start-up, the routine beacon interval | Section 20.2.2 |
| Beacon interval | 10 min with up to 10 stations on the net; 10 min more per further 10 (20 min for 11–20, up to 60 min above 50), ±20 %; 20 min at most after 10 min without traffic | Section 20.3.2 |
| A beacon or position report that came due on busy air | after the air clears and the usual random wait, a new random time up to a quarter of its interval later (on a 500 ms step; up to 2.5 min at the 10 min pace), once; busy again, the usual random wait | Section 20.3.2 |
| HELLO frames | up to 2 on a new shortburst or bulk transfer that did not ask first, 3 on a beacon, position beacon or heartbeat chain; one such transmission per 60 s | Section 20.7.1 |
| "Heard recently" | 2 min to retry a station directly, or to be counted present by net control holding its mail; 5 min for a link estimate; 30 min to count in a random wait; "on the net" (next row) to offer to relay to it | Table 20.1 |
| On the net | 30 min, or 2.5 beacon intervals if longer | Table 20.1 |
| Records kept | a heard station for 3 beacon intervals, never less than 1 h (1 h with up to 20 stations, 3 h at most); a links-map row for 2 h | Section 20.6, Section 20.8 |
| A station with a mailserver connection looks in its own mailbox | every 5 min, and 15 s before each of its own beacons | Chapter 26 |
| Gateway flag shown | while the last mail server contact is under 10 min old | Section 16.2.1 |
| Position beacon | off, or every 30 s to 1 day, ±20 % | Section 30.2.2 |
A.11 Lifetimes and time
| Item | Value | See |
|---|---|---|
| Message lifetime | 15 min, or the contact horizon if longer | Section 22.4 |
| Contact horizon | 2.5 beacon intervals: 25 to 150 min | Section 22.4.1 |
| never expires | Section 22.6 | |
| Chat message to one station | gives up when its first message lifetime runs out: 15 min, or the contact horizon if longer | Section 22.6 |
| On-air time epoch | 2020-04-20 00:00:00 UTC | Section 23.6 |
| The time byte of a message | one byte after the envelope byte on chat, data, applet, net bulletin and map-object messages: the low byte of the seconds since the epoch divided by 4; one tick is 4 s, the byte tells 256 ticks (17 min 4 s) apart; no byte when the clock reads earlier than the software's build date | Section 23.3 |
| When a heard message was written | the latest tick that ends in its time byte and is not more than 8 ticks (32 s) ahead of the receiver's clock | Section 23.3.1 |
| Where a heard line sits | where it was written only when it arrived 30 s or more after it and its sender's clock agrees (2 of its stamps of the last hour within 10 s of ours, and no newer pair that reads off: 2 stamps within 60 s of each other, heard 2 min or more apart, with no agreeing stamp between); else where it arrived; it then shows both times; one over 17 min late is placed up to 17 min wrong; first values | Section 23.3.1 |
| A copy already delivered | with a time byte: the same sender, check and tick, remembered 16 min from the first copy, at most 256 messages (kept across a restart for what is left of the 16 min); with none: the same bytes from the same sender within 60 s of the last copy, except mailbox control, where every copy is handled | Section 23.3.1 |
| The clock notice | 3 or more stations heard, each by 2 of its stamps of the last hour within 60 s of each other and heard 2 min or more apart, off the same way by more than 30 s, within 60 s of each other, and more than those that agree with our clock; once up, it stays while no fewer; a clock before the build date raises it by itself; cleared by every WWV time the station takes and every operator's clock set; first values | Section G.5.4 |
A.12 Virtual nets
| Item | Value | See |
|---|---|---|
| Cycle (heartbeat period) | 300 s; settable 150 to 600 s in steps of 30 s | Section 24.3.2 |
| Members | up to 127; up to 3 ranked alternates | Section 24.4, Section 24.9.4 |
| Roll-call slot | 1.2 s; the first starts 0.4 s after the ROLL decodes; the TALLY follows the last by 0.5 s | Section 24.6.1, Section 24.6.3 |
| Roll call of twelve stations, nobody missing | about 17 s | Section 24.6.5 |
| Net control taken as gone | after 3.5 cycles (17.5 min at 300 s); 5 s after a closing heartbeat | Section 24.9.1, Section 24.9.10 |
| Net control after a restart | listens 2 cycles before it takes the seat again | Section 24.4.1 |
| A stand-in nobody follows | calls the roll once after 3.5 cycles with no sign of a follower; stops if nobody checks in | Section 24.9.3 |
| The net's choice | net control's count under half the stations in the net in four heartbeats running; a member whose count, less one, is over half the stations and over net control's count claims 3 s after that heartbeat, plus 3 s for each member fewer than all it hears (at most 4 places), plus up to 1.875 s; the owner gets the net's state by mail when the job moves by its wish or as the net's choice, after a changed roll call (at most once an hour) and when it asks | Section 24.9.7 |
| Claiming a vacant net | 3 s per place in the order, plus up to 1.875 s | Section 24.9.2 |
| Bulletin; standing orders | 200 characters; subject 60 and text 1,000 characters | Section 24.7.2, Section 24.7.3 |
| Asking for the standing orders | after 60 s, in one of 4 to 8 slots 1.875 s apart | Section 24.7.3 |
| A silent member is taken off the roster | after 2 h | Section 24.11 |
| Safety Critical net | a member speaks for up to 4 stations; net control says again chat messages of up to 400 bytes | Section 24.9.9 |
| Net control keeps a member's mail | when the member has not been heard for 120 s; answers 18.5 s after decoding the REQUEST, plus 0, 0.5 or 1 s; says it again no sooner than 15 s after its last TAKEN | Section 24.8.1 |
| "Mail held" list | up to 10 entries, 154 bytes with the custodian's callsign; named by an 8-bit tag in every ROLL frame (0 = nothing held), which leaves 7 spare bits; fetched like the standing orders | Section 24.8.2 |
| Custodian of held mail | alternate 1, else the member heard most recently; replaced at a list change when not heard for 120 s; fetches one mail at a time, after the standing orders' wait for a new list, with no retry by the clock | Section 24.8.5 |
| Held mail delivered | after the member's check-in, or for 5 min after net control hears the member transmit once the hold has begun; each delivery needs its frames plus 6.6 s (the FOR frame and the answer) before net control's next heartbeat; a delivery that leaves net control's queue unanswered counts as failed after 30 s; an overheard delivery clears the entry if the member's acknowledgment follows within twice the delivery's air time as a bulk transfer, plus 11 s | Section 24.8.3 |
| Held mail left at the mailserver | when a gateway has been heard in the last 120 s and the member has not; the "delivered" message that follows a direct delivery is tried again after 1, 2, 4, 8, 16, then every 32 min, each time only after a gateway is heard again | Section 24.8.4 |
A.13 Mail
| Item | Value | See |
|---|---|---|
| Largest mail, wrapped | 64,004 bytes to one station; 6,028 as a broadcast (480 on FmLink); a larger mail to several stations goes to a gateway heard in the last 2 min | Section 26.2.3 |
| The mail's date | 4 bytes, right after the record's four-byte header, seconds since the mLink epoch, low byte first (record version 2); 0 = none | Section 26.2 |
| Recipients and fields | 16 To and 16 Cc callsigns; 8 outside addresses; subject 255 bytes; body 1,048,575 bytes (and the compressed mail must still fit one transmission); 16 attachments | Section 26.2 |
| Bundle, before compression | 48,000 bytes to one station; 5,600 as a broadcast | Section 26.12 |
| A gateway deposits instead of transmitting | when the recipient has not been heard for 120 s | Section 26.4.2 |
| A gateway answers a relay REQUEST for mail it holds | after 3 to 4 s | Section 26.6.5 |
| TAKEN statuses | 0 deposited, 1 already held, 2 delivered direct, 3 held by net control | Table B.26 |
| REQUEST flag bits | bit 0 anyone who hears the destination may offer; bit 1 a station with the mailserver may ask for a copy; bit 2 the message is mail in the clear; bit 3 the fetch form (one held mail, named by its original sender and id, for the station asking) | Table B.22 |
| Mailbox control "delivered" | operation 0x08, 15 bytes: author 6, message id 2, recipient 6 | Section 26.10 |
| The "mail held" list and the net roster | one payload kind, 0x0A; the first byte of the body says which: 1 the roster, 2 the held-mail list | Section 23.4 |
| Mailbox listing | mailbox control operation 0x09, up to 5 mails in a shortburst | Section 26.9.3 |
| Unasked "you have mail" | mailbox looked at once per station per 15 min; the same news repeated after 15, then 30, then 60 min (stays at 60) while unanswered; back to 15 when the station asks or the waiting mail changes | Section 26.9.1 |
| GET with no delivery | sent again after 12 s, 3 times in all | Section 26.9.2 |
| Mailbox query | one per minute; 30 s for an answer | Section 26.9.3 |
| Reply slots after a mail to several stations | 1.2 s each; slot 0 at the receiver's end of the broadcast (0.65 s after a bulk transfer's air, 0.5 s after a shortburst's); the ACK keyed by 0.5 s into its slot or not at all; the opener says how many, k: the sender gives at most 8, the first 8 stations of To then Cc, and the field holds up to 15; the slots end 0.65 s + k × 1.2 s after a bulk transfer's air (10.25 s for 8), 0.5 s + k × 1.2 s after a shortburst's | Section 26.5.2 |
| A station that heard the opener of a mail with k slots, whether or not it decoded the mail | its own traffic waits until the last slot ends, then each kind of traffic goes on its own random wait | Section 26.5.2 |
| The sender's next broadcast after a mail to several stations | waits for the mail's say-again round: until the end of its last reply slot + 22 s (32.25 s after a bulk mail's air with 8 slots); when a repair was asked for, until it has gone, at most 22 s more; no wait once every named station has confirmed and no repair was asked for | Section 26.5.3 |
| Asking a station silent in its reply slot | after the say-again round, 22 s after the last slot; one QSL probe at a time, up to 8 s for each answer from the probe's key-up; none once a gateway has taken the mail; on FmLink also when no slot was answered; stop after 2 unanswered in a row; only stations heard inside the on-the-net window | Section 26.5.3 |
| Pickup broadcast with no TAKEN | deferred after 10 min | Section 26.8 |
| Signed request to the mailserver | 8-byte keyed check; clock within 10 min | Section 27.3.8 |
| Sender tag | 2 bytes; 5 bad tags for one author within 10 min shut that author's deposits out until the 10 min end | Section 27.5.2 |
| Mail portal sign-in code | 8 characters (40 bits); works once; accepted for 24 hours after the minute it was made and 1 min early | Section 27.3.5 |
| Written-down sign-in codes | 5 per mailbox, each 8 characters, each works once with no expiry; refreshing makes 5 new and retires the old 5 | Section 27.3.5 |
| Mail portal sign-in link | 256 random bits; works once, within 10 min; at most 4 live per mailbox; no guessing limit applies | Section 27.3.5 |
| Portal password and sign-in guesses | 10 to 63 characters; 5 wrong codes or passwords for one mailbox from one address within 10 min refuse that address for 10 min; 100 from all addresses in a day refuse everyone's codes and passwords for the day | Section 27.3.5 |
| Mail portal session | ends after 30 min without a page, or 8 hours in all; 4 per mailbox at once (a fifth ends the one used longest ago) | Section 27.3.5 |
| Add-a-station code | 8 characters (40 bits); works once; a station's code is accepted for 15 min after the minute it was made and 1 min early; a portal code for 15 min, retired by a newer one or by 5 wrong codes; 5 wrong codes for one mailbox from one address within 10 min refuse that address for 10 min, 100 from all addresses in a day refuse every code for the day | Section 27.3.4 |
| Station keys | at most 8 per mailbox; the last one cannot be removed; adding or removing one in the portal needs a sign-in from the last 15 min | Section 27.3.4 |
| Administrator code | 8 characters (40 bits); works once, within 1 hour; a remembered browser comes back signed in for 30 days from that sign-in, until signed out or forgotten | Section 27.3.6 |
A.14 Emergency
| Item | Value | See |
|---|---|---|
| Emergency message | 1 to 15 frames of 11 bytes (2 of header, 9 of content): frame 0 (72 bits) and up to 14 text frames | Section 25.3 |
| Text | 13 characters per frame from a set of 45; 182 in all; the identity kept whole up to 181 | Section 25.3.3 |
| Incident age steps | 15 min, 1 h, 6 h | Section 25.3.1 |
| Next pass of an SOS | 75 s + a random 0 to 15 s after the last pass was keyed, and never sooner than 15 s + a random 0 to 15 s after the station last stopped transmitting | Section 25.4.1 |
| Combining the repeats of a weak call | repeats within 5 min added up; 4 passes kept per burst, 12 in all; at most 4 combined attempts per frame; at −21 dB, simulated, a three-frame message complete after 4 passes: 38.8 % alone, 97.5 % combined | Section 12.8.1 |
| Acknowledgment in the emergency region | one frame 0, keyed 0.4 s after a heard pass ends, at most once per 60 s | Section 25.6.2 |
| All clear in the emergency region | one frame 0 (10.88 s of air), three passes: the first at once, the next 75 s + a random 0 to 15 s after the last was queued, never sooner than 15 s + a random 0 to 15 s after the station last stopped transmitting | Section 25.7.1 |
| All clear in the announce region | one PRESENCE and one frame, once per all clear per station, after the same 5 s + 8 to 16 slots of 1.5 s hold-off as a rebroadcast of a call; held back while any rebroadcast of a call is waiting | Section 25.7.3 |
| Acknowledgment in the announce region | sent once, with up to 118 bytes of contact text | Section 25.6.1 |
| Rebroadcast of a heard call | PRESENCE + up to 15 frames, up to 156 characters of text; not again within 5 min | Section 25.8, Section 25.8.1 |
| A distress call on FM | one signal of 0.35 s (a sync and one 648-bit codeword), 3 frames at most: frame 0 and 26 characters of text; 0.8 s longer behind a VOX leader of 0.8 s, 0.3 s longer behind the repeater lead-in | Section 34.3 |
| Repeats of an FM distress call | the first at once; a repeat a random 5.0 to 9.5 s after the last one ended; 8 to a burst; then a pause of a random 60 to 90 s, or 240 to 270 s from twenty minutes after the call; until acknowledged, all clear or stopped; about 2 % of the time keyed (6.8 % behind a VOX leader) | Section 34.3.1 |
| Acknowledgment of an FM call | one frame 0 in the same kind of signal, keyed a random 0.3 to 1.6 s after the caller's transmission ended (from the moment it has decoded it, where that is later), at most once per 60 s; waits for a signal already under way and stays quiet if it is another acknowledgment | Section 34.3.2 |
| All clear on FM | one frame in the same kind of signal (0.35 s), 8 passes: the first at once, the next 7 each a random 5.0 to 9.5 s after the last one ended (longer after an answer the station owed, or a frame it was receiving); then it stops (no pause, no second burst). The station's routine traffic waits until it has gone out; a run not finished 180 s after it started is ended | Section 25.10 |
| Receive hold after an FM call | the signal's own 0.35 s from the decode, then the station's own random release | Section 25.10 |
| FM fast signal | 24 carriers, 522 to 2,678 Hz; one 9,720-bit codeword a frame; rung 0 QPSK 1/2: 603 bytes, 2.8 s; rung 1 QPSK 5/6: 1,008 bytes, 2.8 s; rung 2 8PSK 5/6: 1,008 bytes, 1.9 s; frame 0 at rung 0, the last frame at the most robust rung that holds the rest, every other frame at the ceiling | Section 34.2.1 |
| FM ceiling | chosen by the receiver for a transfer of three frames or more (the ask's answer): rung 1 from 12.5 dB, rung 2 from 13.5 dB as measured on the ask; one or two frames go without asking; a broadcast, or a longer transfer that does not ask, at rung 0; over 38,590 bytes at rung 1 at least; a repair one rung more robust than the most robust frame lost | Section 34.2.1 |
| FM control or fast signal | between two fast stations, the one that takes less air: up to 240 bytes on the control signal, larger on the fast signal | Section 34.4 |
| FM transmission decoded | when its last block is in: a one-block transmission 0.28 s after its sync ends (its first block says how many blocks follow, at most 6); blocks 283.5 ms each | Section 34.2.3 |
| FM leader | the longer of the station's own VOX leader (800 ms default, 0 to 2,000) and the listener's: the repeater lead-in on a repeater channel (300 ms default, 0 to 2,000), or 800 ms while a VOX station has been heard in the last 10 minutes (first setting, not yet measured for the receiver alone) | Section 34.2.2 |
| Hold after hearing a directed FM exchange | the reply's turnaround (150 ms), plus 800 ms if the addressee is a known VOX station, plus one block (283 ms); a heard bulk transfer holds for its declared frames from the sync | Section 34.2.3 |
| Wait for a missing reply to a heard FM request | at most the 500 ms key-off slack after the request is decoded, then the dNAK | Section 34.2.3 |
| Gap between broadcast longburst chunks | the sender's turnaround: 150 ms, plus its own VOX leader on FM | Chapter 19 |
| FM voice wait, from the squelch (a courtesy wait, not “busy”) | audio 20 dB above the radio’s own quiet level for more than one block (283 ms) holds voluntary sends, one block longer, at most 30 s at a time; the squelch looks open after 2 minutes without quiet; off for a radio whose rig file says its receive audio is not gated by the squelch; distress calls, owed replies and roll-call turns never wait for it | Section 19.6 |
A.15 Clusters
| Item | Value | See |
|---|---|---|
| Members | up to 16 | Section 33.3 |
| Joining | the newcomer asks every 2 s and gives up after 10 min; a pending request is kept 15 min | Section 33.3 |
| Keepalive | every 10 s; live when heard within 30 s; gone after 180 s | Section 33.4 |
| Relay through another member's radio | message of 40,960 bytes or less; the OFFER claims 3 dB less; outcome awaited 60 s | Section 33.6 |
A.16 Sessions and station software
| Item | Value | See |
|---|---|---|
| Default ports | clients 8488; web client 8489; mailserver 8380 | Table 31.2, Section 27.1 |
| Sessions and accounts | 32 sessions at once, closed after 30 min without a command; with all 32 taken, a daemon on Linux gives the place of a client program found gone to a new sign-in; up to 64 accounts | Section 32.6, Section 9.2 |
| Sign-in | 5 attempts per 10 s from one address; passwords stored through 100,000 rounds of PBKDF2 | Section 9.3.1 |
| Daemon log file | mlinkd.log, renamed mlinkd.log.1 at 20 MB; about 40 MB kept | Section 31.10.1 |
| Rig file limits | a file up to 1 MiB; a command up to 64 bytes; 8 STATUS sections, 4 INIT sections, 24 mode flags; per file up to 24 auto=, 4 setup=, 24 manual= and 6 howto= lines, 4 id=, 4 each of power_set= and power_min=, 8 freq_range=, 8 curve (af_) and 16 timing= lines; a setting has up to 2 values= tables of up to 32 entries; 256 files listed | Appendix D |
On-Air Frame Reference
B.1 Conventions
- Byte numbers count from 0 within the frame before error correction. An announce frame is bytes 0 to 10; the 3 check bytes and 9 parity bytes the modem appends after them (23 bytes on the air) (Section 11.7) never appear here.
- Byte 0 of every announce frame is the type byte: family in the high four bits, subtype in the low four (Section 16.3). Each layout table names its type byte in the caption and starts at byte 1.
- Bytes and bits a table does not list are zero, and receivers ignore them.
- Multi-byte numbers are little-endian (least significant byte first) unless the table says "big-endian".
- "Callsign" is a six-byte packed callsign (Section B.4).
- "Message id" is the two-byte
message check
(Section 18.2): a CRC-16
(cyclic redundancy check; polynomial
0x1021, initial value0xFFFF, no bit reflection, no final inversion) over the sender's packed callsign, the addressee's (0CQCQCQfor a message to everyone or to an area), and the message before compression. A longburst piece and a shortburst repair compute it over the bytes actually sent. - "Station ID" is a station's two-byte short name: the same CRC-16 computed over the six bytes of its packed callsign alone (Section 16.6.1).
- SNR fields are signed whole decibels.
B.2 Every frame, by type byte
"Place" is the frame's place in a transmission (Section 16.4): first opens a chain; alone is a one-frame transmission with nothing in front of it; a follower rides behind a PRESENCE and leaves the chain open; an opener closes it.
| Type | Frame | Place | What it is for |
|---|---|---|---|
0x00 | PRESENCE (beacon) | first | Heads every ordinary transmission: who, where, and whether an operator is at the station. |
0x01 | GEOPOLL-RESPONSE | first | A station inside a polled area answers. One frame. |
0x02 | RTS (request to send) | alone | A sender asks the addressee of a long message whether it can take it now, and says how much its first transmission holds. |
0x03 | CTS (clear to send) | alone | The addressee answers an RTS: go, not now, or too weak for bulk. |
0x04 | ACK | alone | The addressee: the message arrived complete and checked. The frame names the addressee itself. |
0x05 | (reserved) | Not sent. | |
0x10 | REQUEST | opener | The originator of an undelivered message asks who can relay it. |
0x11 | OFFER | opener | A volunteer answers a REQUEST: how well it hears the destination, and which copy it holds. |
0x12 | SELECT | opener | The originator names the relay it chose. |
0x13 | FOR | follower | A station carrying another's message, ahead of its delivery or of its ASK, names the original sender. |
0x14 | RESULT | opener | A relay tells the originator: delivered or failed. |
0x15 | (reserved) | Not sent. | |
0x16 | EMERG | follower | A station that decoded a distress call repeats it on an announce channel, in up to fifteen frames. |
0x17 | EMERG-ACK | follower | An Authoritative Station acknowledges an incident it passed to emergency services. |
0x1D | EMERG-CLEAR | follower | A station that decoded a station's all clear repeats it on an announce channel, in one frame. |
0x18 | MAIL-TAKEN | opener | A station that took a mail into custody says so. |
0x19 | MAIL-QRY | opener | A station asks any gateway whether mail is waiting for it. |
0x1A | MAIL-AVAIL | opener | A gateway says how much unread mail a station has, asked or unasked. |
0x1B | MAIL-GET | opener | The recipient tells one gateway to deliver its mail. |
0x1C | HANDOFF | follower | The originator, ahead of a transfer to a relay that holds no copy: carry this to that station. |
0x20 | ABORT | opener | A sender abandons a transfer part way. |
0x21 | OPENER | opener | Announces a bulk transfer and reserves the bulk region. |
0x22 | (reserved) | Not sent. | |
0x23 | dNAK | opener | The addressee: these frames are missing. |
0x24 | LONGBURST | follower | The manifest of a longburst, in its first transmission only. |
0x25 | SB-OPENER | opener | Announces a shortburst; the data frames follow at once. |
0x26 | RETX-OPENER | opener | Announces a bulk repair holding only the missing bytes. |
0x27 | SB-RETX-OPENER | opener | The same for a shortburst repair. |
0x28 | INET-REQ | opener | Asks a neighbor with internet access for a piece of internet data. |
0x29 | SEG-OPENER | opener | Opens each transmission after the first of a long bulk transfer. |
0x2A | CKPT | opener | The addressee, between those transmissions: all good so far, or what is missing. |
0x2B | QSL | opener | A sender asks whether its message arrived: once when an expected reply did not come, and of a station silent in its reply slot. |
0x2C | ASK | opener | In place of the RTS, for a message the addressee may hold already: names the message, and asks for the air if the addressee does not have it. |
0x30–0x3F | SHORTBURST 0 to 15 | after SB-OPENER | The message itself. |
0x40 | APRS position | follower | A precise position report. |
0x50 | AREA | follower | The circle a transfer to 0CQQTH is aimed at. |
0x51 | GEOPOLL | alone | Asks every station inside an area to answer. |
0x60 | HELLO, strong | follower | "I recently heard this station, well enough for bulk." |
0x61 | HELLO, weak | follower | The same, well enough for announce frames only. |
0x70 | HEARTBEAT | follower | Net control, once a cycle: the net's name, period and roster edition. |
0x71 | CLOSING | follower | Net control steps down or closes the net. |
0x72 | ROSTER | follower | One roster entry, in a heartbeat chain. |
0x73 | JOIN | alone | A station asks to be listed in a net. |
0x74 | JOIN THROUGH | follower | A member passes a JOIN on to net control; also a former net control handing over its roster. |
0x75 | ROLL | follower | Net control calls a range of member numbers to check in. |
0x76 | CHECKIN | alone | A member answers a roll call; also a goodbye, or "list me". |
0x77–0x7A | TALLY: missing list, heard list, low map, high map | follower | Net control, after a roll call's slots: who did not answer. |
0x7B | ROSTER REQUEST | alone | A station asks a member for the roster, the standing orders, or both. |
0x7C | INSTRUCT | alone | The net's owner tells the station running its net what to do. |
A PRESENCE-family frame with a subtype not assigned here
(0x05 to 0x0F) counts as hearing the station it
names, and nothing else
in it is read: not its flags, and not its other 28 bits as a location. Any
other unassigned type byte is ignored.
B.3 Common chains
Followers go out in a fixed order: PRESENCE, HELLOs, FOR or HANDOFF, LONGBURST, AREA, then the opener.
| Chain | What it is |
|---|---|
| [presence] | A beacon; also a GEOPOLL-RESPONSE. |
| [presence] | A periodic beacon with up to three HELLOs. |
| [geopoll] | An area poll. |
| [presence] | A shortburst, up to sixteen data frames. |
| [presence] | The first transmission of a longburst. |
| [presence] | A bulk transfer, or its first ten frames. The bulk frames start 150 ms after the opener ends. |
| [presence] | The next ten frames of a long bulk transfer. |
| [presence] | A new bulk transfer or shortburst with up to two HELLOs (never one sent on a CTS). |
| [presence] | A transfer to 0CQQTH; also with an SB-OPENER. |
| [rts], [cts] | The ask before a long message to one station, and the addressee's answer. |
| [ack], [cts] | The addressee's replies (on FmLink, a PRESENCE in place of the CTS). |
| [presence] | A repair. |
| [presence] | The sender asks whether its message arrived; the sender gives up. |
| [presence] | The ask that names its message, for the sender's own message and for one it carries; the FOR has its probe bit set. |
| [presence] | The relay handshake. |
| [presence] | A relay delivering; also with an SB-OPENER. |
| [presence] | The originator handing a relay the message to carry. |
| [presence] | Mail pickup and custody. |
| [presence] | A request for internet data. |
| [presence] | A position report; the automatic position beacon adds up to three HELLOs. |
| [presence] | A repeated distress call; its acknowledgment. |
| [presence] | Net control's cycle: the HEARTBEAT, up to three roster entries, up to three HELLOs. |
| [presence] | Net control stepping down: its own entry, then the CLOSING. |
| [presence] | A roll call: the call, each answer, the tally (two TALLY frames when both maps are needed). |
| [join], [presence] | Other named-net business. |
A chain with no opener (a repeated distress call, a net chain, a beacon) holds at most fifteen frames after its PRESENCE.
B.4 Callsign packing
A callsign is upper-cased, padded with spaces to nine characters, and
read as a nine-digit base-39 number: space is 0, 0 to
9 are 1 to 10, A to Z are 11 to 36,
/ is 37 and - is 38. The number is stored in six
bytes, big-endian. A received value of 399 (208,728,361,158,759)
or more is rejected. The rules for a valid operator callsign are in
Section 16.6; a reserved
addressee is any name whose first character is 0.
| Text | Six bytes |
|---|---|
W1AW | A0 EB 4B E7 01 B1 |
K6MQI | 67 2B 6D C1 30 AD |
VE3XYZ/P | 9D A6 DC 5C BA B5 |
0CQCQCQ (everyone) | 06 93 E3 F7 AB C3 |
0CQQTH (area) | 06 94 2F AF 70 70 |
0MARITIME (the net MARITIME) | 07 C6 9B E8 B3 69 |
B.5 Station field and grid
The last four bytes of every PRESENCE-family frame are read as one 32-bit number, most significant byte first. The top four bits are flags about the station, the same in every subtype. The low 28 bits are what the subtype says: in a beacon PRESENCE and a GEOPOLL-RESPONSE, an operator bit and one location number, whose range says how precise the location is; in an ACK, the acknowledgment (Table B.10); in an RTS and a CTS, the ask and its answer (Table B.8, Table B.9).
| Bits | Meaning |
|---|---|
| 31 | gateway flag: 1 = the station can reach its mail server (Section 16.2.1) |
| 30 | 1 = the station keys by VOX and sends a leader tone before each transmission: slow to key (Section 34.4) |
| 29 | 1 = the station's audio path is declared able to carry bulk frames on FM (Section 34.4) |
| 28 | 1 = the station's radio is slow to hear: its squelch opens late, so a transmission addressed to it begins with a leader (Section 34.4) |
| 27 | 1 = an operator is at the station (Section 20.3.1) |
| 26–25 | spare: sent as 0, ignored on receive |
| 24–0 | location number |
| Location number | Meaning |
|---|---|
| 0 to 18,662,399 | six-character locator. The six characters are digits of one number in mixed radix 18, 18, 10, 10, 24, 24, first character most significant. |
| 18,662,400 to 18,694,799 | four-character locator only (radix 18, 18, 10, 10), counted from 18,662,400 |
| 18,694,800 to 18,695,123 | two-character field only (radix 18, 18), counted from 18,694,800 |
| 33,554,431 (all ones) | no location |
| any other value | read as no location; the frame still counts for its callsign and flags |
The flags do not depend on the location: a station with no locator set still sends them.
B.6 Compact area
GEOPOLL and AREA, the two frames of the GEO family, carry an area in bytes 1 to 10. Byte 1 says which form follows.
| Byte | Form 0: callsign | Form 1: circle by position | Form 2: circle by grid |
|---|---|---|---|
| 1 | 1 | 2 | |
| 2–4 | callsign (bytes 2–7) | latitude, 24 bits big-endian: round((lat + 90) / 180 × 16,777,215) | locator, up to 6 ASCII characters, zero-padded (bytes 2–7) |
| 5–7 | longitude, 24 bits big-endian: round((lon + 180) / 360 × 16,777,215) | ||
| 8–9 | radius in km | radius in km |
B.7 PRESENCE family
Every frame of the family has the same shape: the transmitting station's callsign in bytes 1 to 6, and the station field in bytes 7 to 10 (Section B.5), whose low 28 bits the subtype names.
| Byte | Field | Contents |
|---|---|---|
| 1–6 | callsign | the transmitting station |
| 7–10 | station field | flags, operator bit and location number (Section B.5) |
| Byte | Field | Contents |
|---|---|---|
| 1–6 | callsign | the sender that asks |
| 7–10 | station field, big-endian | bits 31–28: the four flags, as in a PRESENCE (Section B.5); bits 27–12: the addressee's station ID; bits 11–6: count, what the first transmission holds, 1 to 63; bit 5: unit, 0 = bulk frames, 1 = longburst pieces; bits 4–0: spare, sent as 0, ignored on receive |
| Byte | Field | Contents |
|---|---|---|
| 1–6 | callsign | the addressee that answers |
| 7–10 | station field, big-endian | bits 31–28: the four flags, as in a PRESENCE (Section B.5); bits 27–12: the asking station's station ID; bits 11–6: count granted, the RTS's count repeated, or 0; bits 5–4: how I heard you, coded as in the ACK (Table B.10); bit 3: unit, the RTS's repeated; bits 2–1: on FmLink, the ceiling granted to a bulk ask, the highest rung the addressee can take (Section 34.2.1): 0 = rung 0, the most robust, 1 = rung 1, 2 = rung 2, 3 reserved and read as rung 0, so a station that does not know the field grants the safe rung; elsewhere sent as 0 and ignored; bit 0: spare, sent as 0, ignored on receive |
An RTS's count is never 0 when sent; a bulk ask names at most the ten frames of a first segment, a longburst at most its four pieces. An RTS that arrives with a count of 0 counts only as hearing its sender: it is not answered and reserves nothing. A CTS with a count of 0 is "too weak for bulk" when it answers a bulk ask and reports 0 or 1 in "how I heard you"; any other count of 0, including every one that answers a longburst, is "not now". On HF a CTS that grants a bulk ask always reports 2 or 3; on FmLink a station that heard the ask grants it, and its ceiling says how well. The sender accepts a CTS only from the station it asked, with its own station ID, its count (or 0) and its unit repeated, and on the channel its RTS used (Section 19.3.2).
| Byte | Field | Contents |
|---|---|---|
| 1–6 | callsign | the addressee that answers |
| 7–10 | station field, big-endian | bits 31–28: the four flags, as in a PRESENCE (Section B.5); bits 27–12: message id, the echo of the id in the opener being answered; bits 11–10: pieces remaining, for a longburst piece the pieces still to come (at most 3), otherwise 0; bits 9–8: how I heard you, 0 = no report, 1 = heard but below what bulk needs, 2 = good enough for bulk (+3 dB), 3 = well above it (+9 dB or more); bits 7–0: the low 8 bits of the station ID of the station acknowledged, so a station that heard only this station's CTS knows which exchange is over |
B.8 BULK family
| Byte | Field | Contents |
|---|---|---|
| 1 | frame count | bulk frames in the whole transfer (RETX-OPENER: in the repair), 1 to 64 |
| 2 | rate and flags | bits 1–0: top rate, 0 = 1/2, 1 = 3/4, 2 = 5/6 (3 is not an opener); bits 5–2: reply slots that follow this transmission, 0 to 15 (Section 26.5.2), nonzero only on an OPENER to 0CQCQCQ of a mail to several stations, and read as 0 anywhere else; bit 6: 1 = carried for another station (a relay, courier or gateway is sending someone else's message); bit 7, RETX-OPENER only: 1 = a broadcast's repair that lists the original frames it carries, as a 48-bit map in bytes 3–8 (bit i for frame i) in place of the addressee |
| 3–8 | addressee | callsign or reserved addressee |
| 9–10 | message id | same value as the container's first two bytes; a RETX-OPENER repeats the original message's id |
| Byte | Field | Contents |
|---|---|---|
| 1–2 | message id | the message's 16-bit check (SB-RETX-OPENER: the check of the gathered repair bytes) |
| 3–8 | addressee | callsign or reserved addressee |
| 9 | flags | bit 0: 1 = carried for another station, as in the opener; bits 4–1: reply slots that follow this transmission, 0 to 15, as in the opener |
| 10 | length | message length in bytes, 1 to 160 (SB-RETX-OPENER: the length of the gathered repair bytes); 0 and anything over 160 is not an opener |
Note the order: the SB-OPENER carries the message id first.
| Byte | Field | Contents |
|---|---|---|
| 1 | first frame | index, in the whole transfer, of the first bulk frame in this transmission |
| 2 | frame count | bulk frames in this transmission |
| 3–8 | addressee | callsign |
| 9–10 | message id | of the whole transfer |
| Byte | Field | Contents |
|---|---|---|
| 1–2 | total length | bytes in the whole message |
| 3–4 | whole-message id | message id of the whole message |
| 5 | piece count | shortburst transmissions in the series, at most 4 |
Piece i of a longburst is bytes 160·i onwards of the message; the pieces carry no index.
| Byte | Field | Contents |
|---|---|---|
| 1–8 | missing map | 64 bits; bit set = frame missing |
| 9 | round | bursts of this exchange the replier has seen (1 = the original only) |
| 10 | context | bit 0: 1 = bulk exchange, 0 = shortburst; bits 2–1: how I heard you, coded as in the ACK |
B.8.1 Missing-frame map bit order
The dNAK and CKPT maps are one 64-bit number, least significant byte
first; bit i stands for frame i. Map bytes
0A 00 00 00 00 00 00 00 report frames 1 and 3 missing. A dNAK's
map refers to the most recent burst of the exchange, which after a repair is
the repair burst.
| Byte | Field | Contents |
|---|---|---|
| 1 | all good | 1 = nothing missing so far |
| 2–9 | missing map | 64 bits, indexed by frame of the whole transfer (used when byte 1 is 0) |
| 10 | frontier | how many frames of the transfer the replier knows have been announced, capped at 255 |
| Byte | Field | Contents |
|---|---|---|
| 1–2 | message id | the exchange being asked about |
| 3–8 | addressee | the station being asked |
| 9 | kind | 0 = waiting for a checkpoint, 1 = waiting for the final ACK or dNAK |
| Byte | Field | Contents |
|---|---|---|
| 1–2 | message id | the message asked about: the sender's own message, its id; a carried one, the id of this hop, which its opener will carry (the FOR in front gives the original) |
| 3–8 | addressee | callsign |
| 9 | count | bits 5–0: what the first transmission holds, 1 to 63, as in the RTS; bit 6: unit, 0 = bulk frames, 1 = longburst pieces |
An ASK with a count of 0 is not an ASK. The addressee's answers are the
RTS's, CTS go, not now or too weak for bulk, or silence, and two more: an ACK
echoing the ASK's id ("I have it"), and on HF
[cts]
| Byte | Field | Contents |
|---|---|---|
| 1–2 | message id | the transfer being abandoned |
| 3 | reason | 0 = operator canceled, 1 = pre-empted by higher-priority traffic |
| Byte | Field | Contents |
|---|---|---|
| 1 | data kind | 1 = weather at a position |
| 2 | session | chosen by the requester; the answer echoes it |
| 3–4 | freshness hint | seconds, big-endian: "I would prefer data newer than this" |
| 5–7 | latitude | signed 24-bit, big-endian, units of 90/8,388,607 degree |
| 8–10 | longitude | signed 24-bit, big-endian, units of 180/8,388,607 degree |
Bytes 5 to 10 depend on the data kind; these are the ones for weather.
B.9 SHORTBURST family
Frame n has type byte 0x30 + n, for
n = 0 to 15. The number of frames follows from the length in the
SB-OPENER. Every frame, frame 0 included, carries message bytes only:
| Byte | Field | Contents |
|---|---|---|
| 1–10 | data | message bytes 10n to 10n + 9; the last frame is padded with zeros |
After an SB-RETX-OPENER, the frames carry the gathered repair bytes, not the original message, and the opener's length and check describe them.
B.10 RELAY family
| Byte | Field | Contents |
|---|---|---|
| 1–6 | destination | callsign; in the fetch form (bit 3), the original sender of the mail asked for |
| 7–8 | message id | the message to be relayed; in the fetch form, the id the mail is held by |
| 9 | flags | bit 0: nobody holds a copy; a station that only hears the destination may offer. bit 1: this is mail and an earlier REQUEST found nobody who can reach the destination; a station connected to the mailserver may ask for a copy. bit 2: the message is mail; net control of a Virtual Net may ask for a copy to keep for a member who is off the air (Section 24.8). bit 3: the fetch form: the station sending the REQUEST is itself the destination and asks for one mail held for a member, named by its original sender and id; a station holding a copy offers as usual, delivers it behind a FOR naming the original sender, and sends no RESULT (Section 24.8.5) |
| Byte | Field | Contents |
|---|---|---|
| 1–2 | message id | the message offered for |
| 3 | SNR to destination | signed dB, the offerer's last measurement |
| 4 | flags | bit 0: the destination was showing the gateway flag; bit 1: "hand me the message" (the offerer holds no copy) |
| 5–6 | length | length of the held copy, saturating at 65,535; 0 if bit 1 is set |
| 7–10 | fingerprint | 32-bit FNV-1a hash of the held copy; 0 if bit 1 is set |
| Byte | Field | Contents |
|---|---|---|
| 1–6 | callsign | SELECT: the chosen relay. FOR: the original sender. HANDOFF: the final destination. |
| 7–8 | message id | the message's original id |
| 9 | flags | FOR only: bit 0, probe: 1 = this FOR is in front of an ASK, not an opening; it names the message asked about, and the addressee notes nothing for the carrier's next transfer (Section 21.5.1) |
| Byte | Field | Contents |
|---|---|---|
| 1–2 | message id | the relayed message |
| 3 | status | 0 = delivered, 1 = failed |
| Byte | Field | Contents |
|---|---|---|
| 1–6 | original sender | callsign |
| 7–8 | message id | the mail taken into custody |
| 9 | status | 0 = deposited at the mailserver, 1 = the mailserver already held it, 2 = handed directly to the final recipient, 3 = held by net control for a member who is off the air (Section 24.8) |
| Byte | Field | Contents |
|---|---|---|
| 1–4 | since | seconds since the mLink epoch; 0 = all mail |
| 5 | flags | bit 0: also send a list of the mail |
| Byte | Field | Contents |
|---|---|---|
| 1–6 | mailbox | callsign whose mail this reports |
| 7 | count | unread mails, capped at 255; 0 = no mail |
| 8–9 | total size | unread bytes in units of 256 bytes |
| 10 | flags | bit 0: this answers a MAIL-QRY; bit 1: a mail list follows |
| Byte | Field | Contents |
|---|---|---|
| 1–6 | gateway | callsign of the chosen gateway |
| 7 | flags | bit 0: deliver everything unread; bit 1: only mails no larger than the size cap |
| 8–9 | size cap | per-mail limit in units of 256 bytes (used with bit 1) |
B.10.1 EMERG (0x16), EMERG-ACK (0x17) and EMERG-CLEAR (0x1D)
Each carries a content stream, eight bytes per frame, in 1 to 15 frames.
| Byte | Field | Contents |
|---|---|---|
| 1 | drill and incident number | top bit: the original call's drill flag; low 7 bits: the original caller's incident number |
| 2 | position | high 4 bits: this frame's index (0 to 14); low 4 bits: frame count (1 to 15) |
| 3–10 | content | 8 bytes of the content stream, zero-padded on the last frame |
| Byte | Contents |
|---|---|
| 0 | 0 |
| 1–2 | incident check value, carried unchanged from the first decode |
| 3–11 | the caller's 9-byte alert, as in emergency frame 0 |
| 12 onwards | identity and detail, packed as in the emergency text frames: up to twelve 9-byte groups of 13 characters (156 characters); the detail is shortened to fit |
| Byte | Contents |
|---|---|
| 0–1 | incident check value of the incident being acknowledged |
| 2 onwards | contact text, plain bytes (not packed), up to 118 |
EMERG-CLEAR is always exactly one frame: frame count 1, byte 3 is 0, bytes 4 and 5 are the incident check value of the call whose all clear is being repeated (low byte first), and bytes 6 to 10 are zero. A receiver discards one with any of those wrong, and reads it frame by frame, so a second all clear after the call has been heard again is not mistaken for a repeat.
The incident check value is a CRC-16 (same form as the message id) over the caller's 9-byte alert with its incident-age field set to 0, then the identity text as decoded, a zero byte, and the detail text as decoded.
B.11 HELLO family
| Byte | Field | Contents |
|---|---|---|
| 1–6 | subject | callsign of the station heard |
| 7 | age | minutes since the sender last heard the subject, capped at 255 |
| 8 | SNR | signed dB, the sender's link estimate for the subject (its last reading when it has no estimate) |
| 9 | flags | bit 0: the subject was showing the gateway flag. bit 1: the subject is heard by another radio of the sender's cluster, not on this frequency |
A HELLO never causes a transmission. Up to two ride on a new shortburst or bulk transfer that did not ask first, up to three on a periodic beacon, an automatic position beacon or net control's heartbeat chain, on at most one transmission a minute (Section 20.7.1).
B.12 APRS family
| Byte | Field | Contents |
|---|---|---|
| 1–3 | latitude | signed 24-bit, big-endian, units of 90/8,388,607 degree (about 1.2 m) |
| 4–6 | longitude | signed 24-bit, big-endian, units of 180/8,388,607 degree (about 2.4 m at the equator) |
| 7 | course | degrees ÷ 2, rounded; valid when flag bit 0 is set |
| 8 | speed | km/h, 0 to 254; valid when flag bit 0 is set |
| 9 | symbol | one printable ASCII character for the map; * by default |
| 10 | flags | bit 0: the station is moving |
B.13 GEO family
AREA (0x50) and GEOPOLL (0x51): bytes 1 to 10
are a compact area (Section B.6).
B.14 NET family (virtual nets)
Bytes 1 to 10 of every frame in this family are one 80-bit field, most significant bit first: bit 0 is the top bit of byte 1, bit 79 the bottom bit of byte 10. A callsign is the usual six bytes in 48 consecutive bits; a member number is seven bits, 1 to 127, with 0 for "none". The HEARTBEAT carries the net's full name; ROLL, JOIN and JOIN THROUGH carry a 32-bit key of it; the rest carry a 5-bit tag (Section 24.2.2).
B.14.1 Net name, key and tag
A net name is 1 to 8 characters from A–Z
and 0–9. A–Z
have the values 1 to 26 and 0–9 the values 27
to 36. The packed name is the base-37 number formed from those values, first
character most significant, with no padding; it fits in 42 bits, and 0 means
"no name". The names CQCQCQ and CQQTH are
refused.
The key is the low 32 bits of the packed name, XOR (the bits above the low 32, multiplied by 2,654,435,761, modulo 232). For names of six characters or fewer the key is the packed name itself. The tag is the top five bits of (key × 2,654,435,761 modulo 232).
| Name | Packed | Key | Tag |
|---|---|---|---|
TETON | 0x2403D52 | 0x02403D52 | 22 |
MARITIME | 0x1203B582530 | 0xC530C210 | 30 |
B.14.2 HEARTBEAT (0x70) and CLOSING (0x71)
| Bits | Field | Contents |
|---|---|---|
| 0–3 | term | counts net controls round a circle of 16: 1 to 7 steps ahead is newer; 8 apart is a tie |
| 4–7 | period | cycle period: 150 s + 30 s × this value |
| 8–14 | live count | stations net control counts as live, itself included; 127 at most (Section 24.10.1) |
| 15–56 | net name | packed name; a HEARTBEAT with no name is ignored by every station |
| 57–60 | edition / flags | 0x70: roster edition, 1 to 15. 0x71: lowest bit set = the net is closed; clear = net control steps down and the net goes on |
| 61 | acting | net control is a stand-in for the net's owner |
| 62–68 | alt | 0x70: the owner's first alternate. 0x71: the member the job is handed to. 0 = none |
| 69–75 | top | highest member number on the roster |
| 76 | delegated / restored | 0x70, with acting: the owner handed this station the job and stays owner. 0x70, without acting: restored, the owner is back from a restart, heard no net while it listened and has heard no member follow it yet; a stand-in keeps the seat against it. 0x71: alt is handed the job that way |
| 77 | repeated | net control's HEARTBEAT said again by a member; alt then holds net control's own member number |
| 78 | safety critical | set = a Safety Critical net, clear = a Casual one |
| Bits | Field | Contents |
|---|---|---|
| 0–3 | edition | roster edition this entry belongs to |
| 4–8 | net tag | tag of the net's name |
| 9–56 | callsign | the member |
| 57–63 | number | member number, 1 to 127 |
| 64–69 | flags | sum of: 1 = heard through another member; 2 = not heard at the last roll call; 4 = left the net; 8 × the owner's alternate rank (1 to 3); 32 = the net's owner |
| 70–77 | standing orders | names the current standing orders: the CRC-16 of that message, high byte XOR low byte, 255 in place of 0; 0 = none (Section 24.7.3) |
| Bits | Field | Contents |
|---|---|---|
| 0–47 | callsign | the joiner, in both frames |
| 48–54 | net key, top 7 bits, XOR number | the key's top seven bits XOR the member number the joiner asks for; 0 = any number |
| 55–79 | net key, low 25 bits | the rest of the key of the net's name |
A station takes a JOIN for its own net when the low 25 bits match its key; the top seven bits XOR its key give the number asked. A JOIN that asks for no number carries the plain key. Names that differ only in their last characters differ in the key's low bits, so they are never taken for each other.
| Bits | Field | Contents |
|---|---|---|
| 0–31 | net key | key of the net's name |
| 32–36 | net tag | tag of the net's name |
| 37–38 | roll call | low two bits of net control's count of roll calls |
| 39–45 | first | first member number called |
| 46–52 | last | last member number called; every number between has a slot |
| 53–56 | edition | roster edition |
| 57–64 | bulletin tag | 0 = ordinary roll call; otherwise a receipt roll for the bulletin whose message id, folded the same way as the standing orders, is this value |
| 65–72 | held tag | names net control's current "mail held" list: the CRC-16 of the list, folded the same way as the standing orders; 0 = net control holds no mail for any member (Section 24.8) |
| 73–79 | spare | sent as 0, ignored on receive |
A roll-call slot is 1.2 s. The length is a constant and is carried on no frame.
| Bits | Field | Contents |
|---|---|---|
| 0–47 | callsign | the sender |
| 48–52 | net tag | tag of the net's name |
| 53–54 | roll call | the roll call answered |
| 55–61 | number | the sender's member number; 0 = it has none ("list me") |
| 62–66 | remaining | slots that come after this one: 0 to 30 exactly, 31 = 31 or more |
| 67–72 | status | sum of: 1 = operator present; 2 = has traffic; 4 = needs help; 8 = leaving; 16 = has the bulletin; 32 = out of turn (not in the sender's own slot) |
| 73–79 | heard | in its own slot: the last member the sender heard check in before it; out of turn: the missing member it vouches for; 0 = none |
| Bits | Field | Contents |
|---|---|---|
| 0–4 | net tag | tag of the net's name |
| 5–6 | roll call | the roll call tallied |
| 7 | final | set = no further slots follow; the roll call is over |
| 8 | more | set = one more tally frame follows in the same transmission |
| 9–15 | tail | how many slots follow the tally, in units of two slots |
| 16–79 | payload | lists: up to nine member numbers, seven bits each; a 0 ends the list. Maps: one bit per member, set = missing. Low map: bit 79 is number 1, bit 16 number 64. High map: bit 79 is number 65, bit 17 number 127 |
A missing list names the members not accounted for. A heard list names those accounted for; every other number the ROLL called is missing. When both maps are needed, the low map goes first with more set.
| Bits | Field | Contents |
|---|---|---|
| 0–47 | callsign | the asker |
| 48–52 | net tag | tag of the net's name |
| 53–59 | member asked | member number of the station asked; 0 = any member |
| 60–61 | wanted | 0 = the roster; 1 = the roster and the standing orders; 2 = the standing orders only; 3 = the "mail held" list only |
| Bits | Field | Contents |
|---|---|---|
| 0–47 | callsign | the sender, who must be the net's owner |
| 48–52 | net tag | tag of the net's name |
| 53–55 | kind | 1 = take a member off the roster; 2 = rank an alternate; 3 = set the period; 4 = hand net control to a member; 5 = close the net; 6 = set the net's type |
| 56–62 | member | the member concerned (kinds 1, 2 and 4) |
| 63–66 | value | kind 2: the rank, 1 to 3, or 0 for "not an alternate". Kind 3: the period, as in the HEARTBEAT. Kind 6: 1 = Safety Critical, 0 = Casual |
The roster sent in answer to a ROSTER REQUEST is an ordinary directed message of payload kind "net roster" (Section 23.4). Its body: a record byte (1, which says this is the roster); the packed net name, six bytes big-endian; the roster edition, one byte; the owner's callsign, six bytes (zero if unknown); a count byte; then eight bytes per member: callsign, member number, and the ROSTER flags without "not heard".
The "mail held" list is a message of the same payload kind, "net roster" (Section 23.4), sent by net control to the net, or to one member that asked for it. Its body: a record byte (2, which says this is the held-mail list); the packed net name, six bytes big-endian; the custodian's callsign, six bytes (zero when none is named); a count byte, at most 10; then fourteen bytes per entry: the member's callsign (six bytes), the original sender's callsign (six bytes) and the message id the mail is held by (two bytes, low byte first). Ten entries make 154 bytes, which with the payload kind and envelope bytes fill one shortburst exactly (Section 24.8).
B.15 The bulk frame
A bulk frame has no header: no sender, no index, no length. Its sender and its place in the transfer come from when it arrives (Section 16.5.3), and its code rate from that place: frame 0 at rate 1/2, frame 1 at 3/4, later frames at 5/6, none above the top rate in the opener.
B.15.1 The container
| Container byte | Contents |
|---|---|
| 0–1 | message id |
| 2 onwards | the message as sent on the air, after its envelope and compression (Chapter 23) |
The container is cut front to back: frame 0 takes the first 603 bytes, frame 1 the next 907, each later frame 1,008, the last frame whatever is left (fewer at a lower top rate; Table A.6). A transfer is at most 64 frames, so the largest container is 603 + 907 + 62 × 1,008 = 64,006 bytes, of which 64,004 are message.
B.15.2 Inside one frame
| Part | Contents |
|---|---|
| data | the frame's container bytes, most significant bit of each byte first |
| marker | two zero bytes |
| filler | a fixed 200-byte table, repeated as needed, to the end of the information bits; it begins with the decimal digits of pi two per byte (03 14 15 92 65 35 …) |
The data ends at the first two zero bytes that are followed by exactly the filler, to the last bit (Section 11.5). A full frame still holds the marker and at least 18 bits of filler.
B.16 The emergency frame
The emergency region has its own modem (Chapter 12); its frame is also eleven bytes, protected by a polar code with a 24-bit check (Section 11.7). A distress call is 1 to 15 frames sent back to back and repeated, with no PRESENCE.
| Byte | Field | Contents |
|---|---|---|
| 0 | position | high 4 bits: this frame's index (0 to 14); low 4 bits: frame count (1 to 15) |
| 1 | drill and incident number | top bit: 1 if this frame belongs to a drill, on every frame of it; low 7 bits: the incident number, 0 to 127, starting at a random value and one more for each incident a station declares. An acknowledgment carries the complement of the number it answers; an all clear carries the number plus 64, wrapping at 128 |
| 2–10 | content | frame 0: the alert or the acknowledgment (below); later frames: text |
Frame 0's content is a 72-bit field, most significant bit first from the top bit of byte 2. Bits 64 and 65 say which of three layouts it is. In an alert, a zero in any field means "not provided", and every field always holds one of the codes listed: a sender fills in "not provided" for anything else, and a receiver discards a frame 0 with an unlisted code or a spare bit set.
| Bits | Field | Coding |
|---|---|---|
| 0–20 | latitude | round((lat + 90) / 180 × 2,097,151); 0 if no position (about 9.5 m steps) |
| 21–41 | longitude | round((lon + 180) / 360 × 2,097,151); 0 if no position (about 19 m steps at the equator) |
| 42–44 | position uncertainty | 0 unknown; 1 to 6: about 10 m, 50 m, 150 m, 500 m, 2 km, 10 km; 7 more |
| 45–46 | position source | 0 none, 1 GPS, 2 entered by hand, 3 dead-reckoned or last known |
| 47–50 | environment | 0 unspecified, 1 water, 2 wilderness, 3 mountain, 4 roadway, 5 aircraft, 6 structure, 7 underground |
| 51–54 | nature | 0 undesignated, 1 medical, 2 trauma, 3 exposure, 4 entrapment, 5 fire, 6 hazardous material, 7 lost or stranded, 8 violence, 9 disabled and adrift |
| 55–56 | severity | 0 unknown, 1 immediate threat to life, 2 urgent, 3 advisory |
| 57–59 | persons involved | 0 unknown, 1 none, 2 one, 3 two, 4 three or four, 5 five to nine, 6 ten or more |
| 60–61 | mobility | 0 unknown, 1 can move, 2 impaired, 3 cannot move |
| 62–63 | incident age | 0 under about 15 min, 1 under an hour, 2 under 6 h, 3 longer; advances as the call repeats |
| 64–65 | layout | 0 = alert |
| Bits | Field |
|---|---|
| 0 | spare, 0 |
| 1–7 | incident number of the call being acknowledged |
| 8–23 | incident check value of that call |
| 64–65 | layout = 1 |
A station sends the acknowledgment as frame 0 alone (Section 25.6.2). The format allows text frames behind it (who acknowledged, then contact details), and a receiver reads them if present.
| Bits | Field |
|---|---|
| 0 | spare, 0 |
| 1–7 | incident number of the call that is over |
| 8–23 | incident check value of that call |
| 24–63 | spare, 0 |
| 64–65 | layout = 2 |
| 66–71 | spare, 0 |
An all clear is frame 0 alone: its header's frame count is 1, and a frame 0 with layout 2 and any other count is discarded. Layout 3 is not used, and a receiver discards it (Section 25.7.1).
B.16.1 Text frames
Frames 1 onwards carry thirteen characters each of one stream: the caller's identity, a separator, the detail, then padding. With no detail there is no separator. The stream holds at most 182 characters; the detail is shortened first.
| Value | Character |
|---|---|
| 0 | separator and padding |
| 1 | space |
| 2–11 | 0 to 9 |
| 12–37 | A to Z (lower-case letters are sent as capitals) |
| 38–45 | . , - / ? : + # in that order |
The thirteen values of a frame are the digits of one base-46 number, first character most significant, stored big-endian in the nine content bytes. A character outside the table is left out, never replaced.
B.17 Applet messages
A message of payload kind "applet message" (Section 23.4) carries, after the kind byte, the applet's part, numbers low byte first. The four optional fields appear in the order of the table, each only when its flag is set.
| Bytes | Field | Meaning |
|---|---|---|
| 4 | applet | which applet: a check of its folder's name, the same at every station |
| 1 | flags | bit 0 version, bit 1 session, bit 2 sequence, bit 3 state check follow; bit 4 snapshot (the body is the whole state); bits 5–7 are 0, and a message with one of them set is refused |
| 2 | version | a 16-bit check of the applet's rules files |
| 2 | session | which conversation |
| 2 | sequence | the message's place in the session |
| 2 | state check | a 16-bit check of the sender's state before this message |
| rest | body | the applet's own bytes, up to 60,000 |
A Busy Frequency: the Large-Network Simulation
Until then this appendix has no figures. How the simulated air works is described in Section 35.2.
Writing a Rig File
The operator's side of rig files is in Chapter 6: what mLink proposes to set on a radio, how it asks the radio how it is, and the CAT profile. This appendix is the other side of the same file. It says what each line means and what mLink does with it, so that you can describe a radio mLink does not have yet.
D.1 What a rig file is
A rig file is a plain text file whose name ends in .ini, such as
IC-7300.ini. It has two layers.
- The base is an OmniRig rig file. OmniRig is a Windows program for sharing a radio between programs, and it has a large public library of rig files. Its format is a list of sections, each holding the bytes to send to the radio for one job (set the frequency, key the transmitter, switch the mode) or the bytes to ask for a reading and where in the answer to find it. mLink reads this format directly. It uses the parts it needs and skips the rest, so a community OmniRig file loads as it is.
- The mLink lines are comments in that file. A line beginning
;mlink:is a comment as far as OmniRig is concerned, so an OmniRig file that carries them still works there. mLink reads them. They carry everything OmniRig has no place for: the radio's name, how far the file has been tested, the menu settings to propose, the meters, the polling rate, the frequencies the file can carry, and the set-up the operator must do by hand.
Many shipped files are ported from Hamlib, the open-source
radio-control library: the command strings, frequency layouts and addresses were read out of Hamlib's
backend and written down as an OmniRig file. Say "ported from Hamlib" for such a
file, in its header and in its tested= note. Files from the OmniRig library keep their
authors' headers.
The aim of the format is that a radio's whole description sits in its file. The daemon holds no code for any one radio.
D.2 Where mLink finds a rig file
The daemon looks for rig files in these folders, in this order, and the first folder that has a file of a given name wins:
- the
rigsfolder in the station's data folder (beside the station's database); - the
rigs-updatesfolder beside it, where the station puts the newer rig files it takes from mlinkproject.org (below); - the
rigsfolder next to the daemon program (the AppImage, the Windows zip and the Pi image ship it there); - the
rigsfolder undershare/mlinkin amake installtree; - the
rigsfolder two levels above the program, in a build tree; - one more folder named by the environment variable
MLINK_RIGS_DIR, when it is set (the Android app uses it for the rig files unpacked from the app).
Put your own file in the first folder. Settings, "Radio" lists it within half a minute, or at once when the page is opened again, with no restart and no new mLink. A file there with the same name as a shipped one replaces it, which is the way to try a corrected copy. The rig form also takes a file name or a full path in its "Rig file" box, for a file kept somewhere else.
D.2.1 Newer rig files between releases
The rig files and interface files that ship with mLink are also published on mlinkproject.org, each with a version number, its author ("mLink": the project's own files) and a line, read by a person before it goes out, that says what changed. So a corrected file, or a radio added since, reaches a station without a new mLink, and is "from mLink" just as the files that came with it. Each release carries the list as it stood, which is how the station knows which version each shipped file is.
With the internet, the station fetches that list when a client is connected, at start and then
every hour. After such a list, a file newer than the one the station uses is downloaded, checked
against the list's sum, and put in rigs-updates, where it wins over the file that shipped.
A list fetched because the operator pressed "Check now" only shows what is new; the next list of the
station's own puts it in, or the operator's press does. Nothing of this goes over the air. When a
later mLink ships the same version or a newer one, the station's copy steps aside and the shipped file
is used again: at the start by the list that came with that mLink, otherwise at the next hourly list.
Some files are never changed by themselves. The radio in use keeps the file it was opened with while
the station runs, and so do the interface files while a radio is chosen: the update is downloaded and
waits, and goes in when the station next starts (before the radio is opened, so nothing is on the air
then), or at once on "Use it now", which opens the radio again with it through the same steps as
choosing it, refused while it transmits or is in the middle of an exchange. A file in the station's own
rigs folder, or in rigs-updates, that is not exactly a published version is
the operator's own, and is never written over: Updates offers "Keep mine" or "Use the new one", and
the second keeps the operator's file as <name>-custom.ini, listed with "(custom)"
after its name. The screens are in Section 7.8.12.
A file is listed if its name ends in .ini and does not begin with a dot; two names that
differ only in capitals count as one. In the list the radio appears under its display name, the
name= line below, or under the file name without .ini when there is none. A
file that mLink cannot use, or that describes no way to tune, is still listed, with the reason. By convention a radio that has a separate data mode
has two files, IC-7300.ini and IC-7300-DATA.ini, and the second one's name
ends in "(DATA)" (see Section 6.2 for why there are two).
D.3 What a rig file cannot make mLink do
A rig file can make mLink send bytes to a radio, so the format is built so that a mistaken file cannot do silent harm. These rules hold whatever the file says.
- mLink writes nothing to the radio that the operator has not seen. The file's
settings (
setup=,auto=) and its data-mode command are proposed in a list, and written only when the operator answers "Apply now and at every connect" or "Apply once" (Section 6.5). The file's[INIT]sections are never sent. Commands there are logged as unsent, with a note to write them assetup=lines. Adding a line to the format never adds a silent write. - A control is written only on the operator's press. The switches, choices and buttons a file describes (Section D.10) are asked about, never written, until the operator presses one; a control that transmits (an antenna tuner's tune) also waits for clear air, is refused wherever the Tune is, is never repeated, and is stopped with the file's own stop or CAT unkey if the radio still transmits 15 seconds after mLink sent the command.
- The file's reads are only questions. Every other write mLink can make to a radio is one the operator started: the key and unkey commands the operator chose in the rig form, the dial correction (off until ticked), the power turn-down of the radio self test (a box the operator ticks) and the key test of the CAT profile (a box the operator ticks).
- A frequency outside the file's
freq_range=is refused before anything is sent. No byte goes out for it, whoever asked for the change. - A file that can neither set nor read the frequency is not a CAT file. It cannot
drive a transceiver, so mLink refuses to open it for CAT. A radio with no CAT at all is described with
keying=instead, and a CAT radio that cannot be keyed by CAT addskeying=to its CAT commands. - A file that marks its radio unusable changes nothing. It is listed, the operator can choose it to read why, and mLink then refuses it before opening any port and keeps the radio control it had.
- A line mLink cannot read is left out whole. A half-understood setting, meter or curve is worse than none. The line is skipped, the daemon's log says which line and why, and the file is otherwise used as it stands.
D.4 Two small files, then a piece of a large one
The smallest useful rig file describes a radio with no CAT at all. This is the Icom IC-718 file as it ships, with its long lines shortened:
;mlink: name=Icom IC-718 ;mlink: keying=line|rts|inferred ;mlink: about=The radio has no CAT PTT, so mLink keys it by a line of the ; interface's serial port and you set the mode by hand. ;mlink: tested=listed|Ported from Hamlib's source (no CAT PTT for this radio); ; nobody has keyed it with mLink ;mlink: manual=Mode|USB (upper sideband)|Select USB on the radio.|mLink's signal ; is upper sideband, and mLink cannot set the mode on this radio (no CAT).|inferred
(In the shipped file each of these is one line; the second lines here continue the one above.) It has
no sections at all. Choosing the radio in the list makes mLink key it by the RTS line of the serial port
the operator picks, and send nothing on that port. The operator sees the name, the one-sentence
about=, how much the file can be trusted, and what to set on the radio by hand.
The smallest file for a radio mLink cannot use at all is shorter still, a listing so that the operator can see why:
;mlink: unusable=no CAT control at all, and a CW-only transmitter: cannot carry mLink's signal ;mlink: name=Elecraft KX1 ;mlink: tested=listed|The maker's design: no CAT port and CW-only transmit
A file for a radio that mLink drives over CAT has sections as well. This is the middle of the Yaesu FT-891 file, a file from the OmniRig library with mLink's lines added at the top:
;mlink: name=Yaesu FT-891 ;mlink: tested=community|Checked 2026-11-05 against Yaesu's FT-891 CAT Reference Book 1909-C and the Advance Manual ;mlink: serial_handshake=hardware ;mlink: power_read=(PC;)|(;)|2|3|vfText|1|0 [pmFreqA] Command=(FA.........;) Value=2|9|vfText|1|0 ReplyLength=0 [pmTx] Command=(TX1;) ReplyLength=0 [pmRx] Command=(TX0;) ReplyLength=0 [pmSSB_U] Command=(MD02;) ReplyLength=0 [STATUS1] Command=(IF;) ReplyEnd=(;) Validate=(IF.........................;) Value2=5|9|vfText|1|0|pmFreqA Flag6 =(.....................2......)|pmSSB_U
The sections say how to set the frequency (nine decimal digits, starting at the third character of the
command), how to key and unkey, how to set upper sideband, and how to read the radio's status: send
IF;, read up to the semicolon, check that the answer looks like IF followed by
characters, take the frequency from the nine characters that start at position 5, and take the mode from
the character at position 21. The next section explains each line.
D.5 The base format
D.5.1 Lines and sections
The file is read a line at a time. Blank lines are skipped, and so are lines that begin with
; or #. A line in square brackets begins a section; every
name=value line after it belongs to that section until the next one. Names of sections and
keys are matched without regard to capitals. A file must be plain text with plain characters. A file
saved as UTF-16 (with its byte-order mark) is accepted if every character in it is plain ASCII; with
anything else in it, it is refused with a message to save it as UTF-8 or ANSI instead. A file larger than
1 MiB is refused. The limits on how many of each thing a file may hold are in
Table A.24.
D.5.2 Writing the bytes of a command
Every Command= line, and the byte strings in many mLink lines, take one of two forms:
- Text, in round brackets:
(FA;)sends the three characters F, A and semicolon. Yaesu, Kenwood and Elecraft radios speak this way. - Hexadecimal, two digits to a byte, with or without dots between the bytes:
FEFE94E0.1C00.01.FDorFEFE94E01C0001FD. Icom radios speak CI-V this way.
A command can be up to 64 bytes. In a command that has a number in it (the frequency, a power
setting), mark the place for the number with filler: dots in a text command (FA.........;),
zero bytes in a hexadecimal one (25.00.0000000000). A Value= line, below, says
which bytes of the command are the number.
D.5.3 The sections mLink uses
| Section | What it holds | What mLink does with it |
|---|---|---|
[pmFreq] or [pmFreqA] | Command= and Value=: set the frequency | Both names are the same place; a later Command= replaces an earlier one. Used for the dial correction and for a frequency request. A file with neither and no frequency read cannot drive a transceiver. |
[pmSSB_U] [pmSSB_L] [pmCW_U] [pmCW_L] [pmAM] [pmFM] [pmDIG_U] [pmDIG_L] | Command=: set a mode | mLink's modes in order: USB, LSB, CW, CW reverse, AM, FM, data-USB, data-LSB. Sent only on the operator's answer or request. [pmDIG_U] is the data mode only if the file declares so (Section D.8). |
[pmTx], [pmRx] | Command=: key and unkey | Used when the operator chooses CAT keying. A file without both can still be used with a serial keying line. ReplyLength= in [pmTx] tells mLink whether the radio answers the key command (0, nothing to wait for; more, it does). |
[STATUS], [STATUS1]… | A question and how to read its answer; up to 8 sections | The frequency, the mode and the keyed state are read from these (below). |
[pmRitOffset], [pmRit0], [pmRitOn] | Receiver-offset commands | Read and kept. The station's frequency correction moves the dial instead of using the receiver offset, so a new file need not carry them. |
[INIT], [INIT1]… | Commands to send on connect | Read, never sent. Write the same commands as setup= lines (Section D.9). |
In a section that sets something, mLink writes the command and does not read an answer. The
ReplyLength= of such a section is not used, except in [pmTx] as above. The VFO,
split, XIT, pitch and other sections of an OmniRig file are skipped.
D.5.4 Putting a number in a command: Value=
A number goes into a command, or comes out of an answer, through a field description with five parts separated by bars:
Value=start|length|format|multiply|add
start and length are counted in bytes from 0 and say where the number sits in the command or reply. format says how the bytes are written. multiply and add are optional (1 and 0 when left out) and convert between the number mLink means and the number on the wire: the wire number is the value times multiply plus add, in both directions. So a file that sets the frequency in units of 10 Hz and reads it in hertz gives the two sections different multiply values; there is nothing to invert.
| Format | How the number is written |
|---|---|
vfText | ASCII decimal digits, filled with zeros to the length. In an answer, one decimal point is read as a fraction. |
vfBinL, vfBinB | A binary integer, least significant byte first, or most significant first. |
vfBcdBU, vfBcdLU | Packed BCD (two decimal digits per byte), unsigned; most significant digit pair first (B) or last (L). Icom frequencies are vfBcdLU. |
vfBcdBS, vfBcdLS | The same, signed: the sign is a byte, 00 for plus and FF for minus, in the most significant place. |
vfYaesu | A big-endian integer with the sign in the top bit of the first byte. |
A number that does not fit its field is not sent: mLink does not truncate. This is the reason for the
freq_range= line below.
D.5.5 Asking the radio: the STATUS sections
A [STATUS] section is a question. Its lines are:
Command=: the bytes to send.ReplyLength=(a number of bytes) orReplyEnd=(the byte that ends the answer): how much to read. Count an Icom's echo of the command as part of the answer. Reading to an end byte drops a first reply that is exactly the question, which is the port echoing it.Validate=: what a good answer looks like. Without a mask it is a template: in text form each.matches any byte and any other character must match itself ((IF.........................;)); in hexadecimal it is the bytes that must be set, ormask|bitsfor both. An answer that does not match is a failed read, not a value. Without aValidate=line any non-empty answer is accepted.Value1=,Value2=… (or plainValue=): a field description as above with a sixth part that names what the field is. mLink takes the dial from a field namedpmFreqorpmFreqA(the first such section is the one used) and the CAT profile decodes up to six fields of a section with the names the file gives them.Flag1=,Flag2=…: a test on the answer, writtenmask|bits|nameor as one termterm|name. A flag whose test matches says what the radio is doing. A flag namedpmTxmatches when the radio is keyed, and one namedpmRxwhen it is not; the first of these found is how mLink reads the radio's real keyed state, the only way it can notice a key stuck down. A flag named after a mode section (pmSSB_U,pmDIG_U…) names the mode, and the first flag that matches is the mode. A file with no keyed-state flag has no keyed-state read.
D.6 The mLink lines
An mLink line has the form ;mlink: key=value. The word mlink: and the key
are matched without regard to capitals, and spaces around them and the equals sign are free. The value is
kept as written, and the line's end is trimmed. A line may stand anywhere in the file, inside a section
too; by convention the lines go at the top.
- Fields are separated by a vertical bar,
|. A field cannot hold a bar. Where a key allows commas or equals signs inside a field, the key's description says so. - A key mLink does not know is ignored, and the file still loads, so a file written
for a newer mLink works in an older one and a prose comment that happens to start
;mlink:(with no equals sign) is harmless. mLink counts such keys. The shipped files are held to a stricter rule: a key the program does not read, a typing slip in a key's name, makes the shipped-file check fail (Section D.14). In your own file a slip is silent, so check the page the client shows (Section D.15). Write ordinary comments with a plain semicolon so that no one has to ask. - A key it knows with a value it cannot read is left out, whole, and the daemon's log carries one warning that names the key and the value. A line that is too long or badly formed, or that would be one more than a table has room for, is dropped the same way. The shipped-file check refuses a file with any such line (Section D.14).
- Some keys count only once: where the first good line counts, a second one is ignored; where a key may repeat, the limits are in Table A.24.
- Confidence appears in many keys, always as one of three words:
measured(seen on a radio, on the bench),manual-verified(from the maker's manual or CAT reference), orinferred(from Hamlib, a forum, or a likeness to another radio, not checked). Be honest here: it tells the operator how far to trust the line.
| Key | One line on it | See |
|---|---|---|
name= | The name in the radio list. | Section D.7 |
about= | One sentence on what the radio is to mLink. | Section D.7 |
tested= | How far the file has been tested. | Section D.7.1 |
manual= | One setting the operator makes by hand, and why. | Section D.7.2 |
howto= | How to reach one step (a meter, the drive, the transmit light, the mode) on the radio's own panel. | Section D.7.3 |
unusable=, unusable_fix= | The radio cannot carry mLink; why; what would help. | Section D.7.4 |
keying= | A serial line keys the radio (with no CAT, or beside CAT for frequency and mode). | Section D.7.5 |
key_audio= | An interface that keys the radio from the audio: the tone before the first frame and the hang after the last audio, in milliseconds. | Section D.11.5 |
fm_class= | The radio is slow to hear on FM, and what was measured. | Section D.7.6 |
fm_squelch_audio= | The radio’s receive audio is not gated by its squelch, and what was measured. | Section D.7.7 |
DIG_U=audio-data | This file's [pmDIG_U] is the audio data mode. | Section D.8 |
setup=, auto= | A radio setting mLink proposes and sets on the operator's answer. | Section D.9 |
values= | What a setting's numbers mean in words. | Section D.9 |
settings_if= | Apply the settings only when the radio answers as a named model. | Section D.9 |
control=, control_value=, control_stop= | A switch, a choice or a button the operator presses in the Rig control applet (the antenna tuner, the preamplifier, the AGC), with the read that shows the radio's state. | Section D.10 |
id= | How the radio says which model it is. | Section D.9 |
mode_source= | Where the radio takes its transmit audio from. | Section D.9 |
poll= | How often to ask the radio how it is. | Section D.11 |
cat_ptt_transmit_validation_ms= | How a key command is checked. | Section D.11 |
freq_range= | The frequencies the file's frequency command can carry. | Section D.11 |
serial_handshake=, serial_lines= | Flow control and the two serial lines. | Section D.11 |
cat_iface= | Which USB interface of the radio carries CAT. | Section D.11 |
status_side=b | This status section reads the radio's second side, for a radio mLink follows to the side that transmits. | Section D.11.6 |
status_side=tx | This status section reads which side transmits. | Section D.11.6 |
side_b_command= | The same mode set on the radio's second side, inside a mode section. | Section D.11.6 |
interface=, interface_rule= | The ways the radio connects to the computer, and which of them cannot be used together. | Section D.11.4 |
power_read=, power_set=, power_min=, power_unit= | The transmit power setting, for the radio self test and the status bar. | Section D.12 |
meter_alc=, meter_po=, meter_swr=, swr_flag= | The meters read while keyed. | Section D.12 |
firmware_read= | The radio's firmware revision. | Section D.12 |
af_tx=, af_rx=, af_link= | A measured audio response curve. | Section D.13 |
timing= | A measured switching or audio delay. | Section D.13 |
D.7 Telling the operator: name and about
;mlink: name=Yaesu FTM-3100R/E (2 m FM) ;mlink: about=A 2 m FM mobile with no CAT: its rear USB jack is for firmware only, so mLink keys it by the Digirig's RTS and you set it up by hand.
name= is the radio's name in the list; the first line counts, up to 63 characters. For a
radio with a data-mode twin, put "(DATA)" at the end of the data file's name so the two sort side by
side. about= is one plain sentence on what the radio is to mLink, shown under the radio list
and on the project's supported-radios page; the first line counts, up to 239 characters. Say the thing
the operator most needs: that there is no CAT, that the file covers only some bands.
D.7.1 tested=: how far the file is trusted
;mlink: tested=level|note
The note is one plain sentence (up to 159 characters): the date, the radio, what was done. The first good line counts. A line with an unknown level or no note is ignored, and the client then says nobody has said how far the file is tested. Choose the level the evidence supports and no higher:
| Level | It means | The client says |
|---|---|---|
bench | mLink was run on this radio on the bench. | Tested with mLink on the bench. |
field | mLink was used on a field tester's radio. | Used with mLink on a field tester's radio. |
cat-checked | The CAT exchanges were checked against the radio; no radio signal was measured. | Control commands checked on the radio, no radio signal measured. |
community | A community file that others ran on real radios; mLink was not run on it. | A community rig file; others have run it on real radios, mLink has not. |
hamlib | Ported from Hamlib; not run on a radio. | Ported from Hamlib; not tried on a radio. |
listed | A listing only. | Listed only; not tried on a radio. |
Each line of the client's text ends with the note. A file you wrote from a manual and have never
tried is listed; a file you ran the CAT profile with on your own radio is
cat-checked; one you sent mLink over the air with is field.
D.7.2 manual=: what the operator sets by hand
;mlink: manual=setting|value|how-to|why|confidence[|when=fm]
One line for each thing the operator must set on the radio, because CAT cannot reach it or because it
depends on how the station is built. setting is the menu number and name or the control as the
operator sees it, value is what to set it to, how-to is the route to it on the
radio in plain words ("Press the FUNC knob, touch RADIO SETTING, MODE DATA, RPTT SELECT"), and
why is one sentence, which the client shows as its own "Why:" line. Two shorter forms still
read: without the why, and without the how-to too. Do not put the reason into the
how-to. A line may end in one more field, when=fm or when=usb, when it matters
only in one of mLink's two modes (USB and FM, each on any band, so the field names the mode and never a
band). The client lists the lines that fit the mode the station works in now, and folds the others into
one group named for their mode, such as "For FM (6)"; with no field a line always applies, and until the
station has said its mode nothing is folded. Every file may carry manual lines, the unusable and keying-line ones included: this is where a
radio with no CAT keeps its whole set-up. Where you could not confirm a menu path in the maker's manual
for that model, say so in an ordinary comment line above it; the client does not show comments.
D.7.3 howto=: how to reach a step on the radio
;mlink: howto=step|text|source|confidence
One plain sentence on where, on this radio, the operator finds one thing mLink asks them to look at or
set. step is one of alc (the ALC meter), power (the power meter),
swr (the SWR meter), drive (the drive or input gain), tx_light (the
transmit indicator) or mode (the mode the radio must be in). text is the route in the
file author's own words, source names the maker's manual and the page, and
confidence is manual-verified, measured or inferred, as
for manual=. The client shows it as a muted line beside the step: under Tune in the level
settings (the ALC and drive lines in view, the power and SWR lines and the source under "More", since the
Tune step is the drive against the ALC), in the radio self test and in the set-up wizard's rows. A file holds one line
per step (the first good one counts), and a radio whose manual does not say how to reach a step simply has
no line for it. Do not guess a path.
D.7.4 unusable= and unusable_fix=: a radio that cannot carry mLink
;mlink: unusable=single-tone transmitter: cannot carry mLink's signal ;mlink: unusable_fix=A QRP Labs QMX can carry mLink: choose that radio instead.
The first good unusable= line marks the radio unusable; an empty reason still does, with a
stock reason. The file may be a stub with these lines and no commands at all. The radio is listed and can
be chosen, so that an operator who owns it sees the reason, the fix, the tested level and the manual
lines; nothing else happens. mLink refuses it before opening a port, and it beats keying=
in a file that has both. unusable_fix= is optional, one line of up to 199 characters, shown
beside the reason. A radio that works badly is not unusable: say so in about= and
manual=.
D.7.5 keying=: a serial line keys the radio
;mlink: keying=line|rts|measured
Every rig file says how its radio is keyed, and any one way will do: CAT key commands, a serial line (this line), an interface that keys the radio from the transmit audio (see below), or the unusable line (mLink does not key the radio at all, and says why). A file that sets and reads a frequency but has no CAT key command must say how it is keyed.
The first field is the kind of keying, and line is the only kind. The second is
rts or dtr, the serial line the file proposes; the client offers both and the
operator's choice wins. The third is the confidence. The line has two shapes.
A radio with no CAT. A file with this line and no frequency command is a radio mLink
never opens for CAT, whatever else it holds: choosing it sets the rig to a keying line on the serial port
the operator picks, and mLink sends no byte on that port, not a frequency, not a mode, not a reading. The
station then shows no dial. The file's manual= lines carry the set-up.
A CAT radio that cannot be keyed by CAT. Some radios take a frequency and a mode over CAT but have no CAT key command (the Icom IC-706 family and IC-725 are two). A file for one holds its frequency and mode commands and this line. mLink opens the CAT port for the frequency and the mode, as for any CAT file, and keys by the line, never by CAT: the file's own key commands, if it carries any, are dropped when it loads, so no key command can go over CAT. The line is the file's unless the operator chooses the other one; with no keying port of its own it is on the CAT port, which is how a Digirig works (CAT on its serial data pins, RTS on its key circuit). A read of the transmit state, if the file has one, is still used, because a read is only a question.
A file that is not a keying file and has no way to set or read the frequency is not usable as a CAT file. The reason shown is "no frequency set or read section: an incomplete rig file".
D.7.6 fm_class=: a radio that is slow to hear
;mlink: fm_class=slow_hear|Its receive squelch eats the front of every carrier: 137-393 ms after quiet
The first field is the class, and slow_hear is the only one: the bench measured that the
radio's receiver loses the start of a transmission while its squelch opens. The second field, required,
says what was measured, in plain words; a line with no measurement behind it is left out. A station whose
chosen radio has this line declares itself slow to hear in its PRESENCE (Section 34.4),
and the stations that hear it begin each transmission addressed to it with a leader. A station keyed by VOX
declares the same thing without any file. The line changes nothing else: it is a declaration, never a
gate, and mLink refuses nothing because of it. Choosing such a radio in the client first asks the operator
to confirm, in words. Put the cheaper way to key the radio first: a file for a handheld that a keying line
can key says so in its manual= advice for VOX (use the line; VOX only if the line cannot key
it), because VOX holds the channel about two seconds after every transmission.
D.7.7 fm_squelch_audio=: receive audio the squelch does not gate
;mlink: fm_squelch_audio=ungated|The USB audio carries receiver hiss at every squelch setting
The first field is the word ungated, the only one: the bench found that the audio this radio
hands to the computer carries the receiver’s hiss whether its squelch is open or closed, so the audio
never falls quiet between transmissions. The second field, required, says what was measured, in plain
words; a line with no measurement behind it is left out. On an FM channel mLink waits for a voice by
noticing audio well above the radio’s own quiet level (Section 19.6);
for a radio with this line there is no quiet level to learn, because the hiss would become the quiet level,
so mLink does not wait for voices on it and shows no warning about the squelch. The line changes nothing
else, and nothing is asked of the radio to find out whether the channel is in use. It is a declaration,
never a gate.
D.8 The data mode: DIG_U=audio-data
;mlink: DIG_U=audio-data
In an OmniRig file, [pmDIG_U] means the radio's RTTY or FSK mode, which takes its
signal from a keying line, not from sound. mLink wants the radio's audio data mode, upper
sideband (DATA-U, USB-D, PKT-U and the other names). It proposes the file's [pmDIG_U] only
when the file says on this line that the section is that mode; spaces and capitals do not matter. A file
without the line gets no mode command at all, and the log says so, naming the "-DATA" twin when one
sits beside it. Add the line only when you have checked that the section selects the audio data mode on
the upper sideband. mLink reads the mode when it connects and, if the radio is in another mode it can
name, offers the change as one line in the radio's settings list; nothing is sent without the
operator's answer.
D.9 Settings mLink proposes
These lines are how a rig file carries the menu changes that Section 6.5 describes to the operator.
;mlink: auto=setting|value words|value|read command|reply|start|len|format|set template|start|len|format|confidence ;mlink: setup=(same thirteen fields)
One line is one setting: thirteen fields, in this order. setting and value words
are what the operator reads ("SSB-D TBW (Tone Control/TBW > TX)", "100-2900 Hz"). value is
mLink's value as the number the CAT field carries. The next five fields are a read: the question, the
length or end byte of the answer, and where the value sits in it, as in a Value= line
(reply is a count of bytes, or an end-byte string such as (;)). The next four are
the write: a command template with the value's place marked, and the same start,
len and format. The write must carry mLink's value and read back as it. A line
that cannot do both is rejected.
auto=is a setting that helps mLink's signal: a filter edge, an input choice, a noise processor off. The list may hold 24.setup=is something the radio needs so that mLink can talk to it by CAT: auto-information off on a Yaesu or Kenwood, CI-V echo and transceive on an Icom. It has its own group and its own answer, asked first. The list may hold 4. This is where a community file's[INIT]commands go, assetup=lines, with the sections commented out.
mLink reads each setting at every connect, lists those that differ, and writes nothing until the
operator answers. When the answer is yes it keeps the radio's own value first, then writes, then reads
it back; "Restore my settings" puts the kept values back. A setting the file can read but not write, or
write but not read, does not belong in auto=: put it in manual=.
;mlink: values=setting|table|confidence[|mode=mode]
values= tells the client what a setting's numbers mean, so the operator reads "3,200 Hz"
and not "51". setting is the auto= or setup= line's setting, word for
word; the line may come before or after it. The table is one of:
enum:n=words,n=words,…: each number and its words, up to 32;linear:off=n:words,first=n,base=x,step=x,unit=words[,last=n]: the number off reads as its words (optional); a number from first up (to last) reads as base + (n − first) × step, then the unit.
Words cannot hold a comma, an equals sign or a bar. mode= (usb,
lsb, data-usb, data-lsb and the other spellings mLink knows for
them) limits a table to the radio being in that mode, because a filter width means something else in
each. A setting may have two tables, and a third is dropped. A values= line for a setting
the file does not have is dropped, and the log says so.
;mlink: settings_if=query|answer|model ;mlink: id=query|answer|model
Both ask the radio a question, the query and answer written as in Command=.
settings_if= is for one file that drives two models with different menus: the
auto= settings apply only when the radio answers exactly answer; any other answer
sets nothing and names model. id= may repeat (up to four times, all with the same
query and answers of the same length), one line for each model the file drives; today only the CAT
profile asks it, and a file without it simply shows "not supported by the file" for the identity.
;mlink: mode_source=read|data value|confidence
For a radio whose mode answer does not say where the transmit audio comes from. The first seven
fields are a read as in power_read= below, and data value is the whole number the
read decodes to when the radio is on the source mLink needs (a USB sound card, not a microphone). It is
asked once at each connect, only when the mode read already says the file's data mode. Any other value
makes the mode check treat the radio as in plain USB, so it offers the data mode's set for the operator's
answer, as for any other mode difference.
D.10 Controls: switches, choices and buttons
Many radios have a feature worth one press from the Rig control applet: an antenna tuner to put in line or to run, a preamplifier, an attenuator, the AGC speed, the noise blanker. A rig file describes each one in a few lines, so that a new feature on a new radio is only new lines, never new program. The applet shows a section for the radio's controls only when the file has some.
;mlink: control=id|kind|label|about|transmits|confidence[|read command|reply|start|len|format] ;mlink: control_value=id|value|words|set command[|also read as] ;mlink: control_stop=id|stop command
A control= line names one control. id is a short name (lower-case letters, digits,
underscore and hyphen) that the next lines and the applet use; label and about are what
the operator reads (the label up to 39 characters, the sentence up to 159). kind is one of:
switch: two values,0(off) and1(on): the tuner in line, the attenuator, the noise blanker;choice: two to eight values, each with its words: the preamplifier (IPO, AMP 1, AMP 2), the AGC speed;action: one value, a button: the tuner's tune cycle.
A switch or a choice also gives the read that shows the radio's real state: the same five fields as a read in Section D.12 (the multiply and add are always 1 and 0), where the value is the whole number at start for len characters of the answer. A switch or a choice without its read is dropped, because a panel that cannot show the radio's state would show a guess. An action has no read.
Each control_value= line gives one value: the number, its words (up to 23
characters; a comma, an equals sign or a bar makes the line unreadable), and the whole command that sets it, written as for
Command=. A control's values come after its control= line. The last, optional field
lists up to three other numbers the radio answers with for this value but is never set with: an FT-991A set to
AGC "auto" answers 4, 5 or 6 (auto-fast, auto-mid, auto-slow), so its auto line says 5,6 and the
panel shows "Auto" whichever it answers. A switch whose read gives 2 while the tuner is tuning does the same
with its "on" line.
transmits is yes or no. Only an action may say yes: a
control that keys the radio is always a button, never a switch that could be pressed in passing. The antenna
tuner's tune cycle is the example, because the radio sends a carrier into whatever is on its antenna socket.
;mlink: control=tuner|switch|Antenna tuner|Puts the radio's internal antenna tuner in line (on) or out of line (off).|no|manual-verified|(AC;)|(;)|4|1|vfText ;mlink: control_value=tuner|0|Off|(AC000;) ;mlink: control_value=tuner|1|On|(AC001;)|2 ;mlink: control=tune|action|Tune antenna|Runs the radio's tuner. The radio keys itself and sends a carrier: connect an antenna first.|yes|manual-verified ;mlink: control_value=tune|1|Tune antenna|(AC002;)
The rules a control follows are the safety rules of this chapter, and a few more of its own:
- A control is written only when the operator presses it. Nothing is written at connect, on a band change, on a timer or by any other path. The panel asks the radio the state of each control (a question, at rest, never while the radio is keyed, at most every two seconds while the window is open) and shows the answer.
- A press is one write. mLink sends the command of the value pressed once and asks the state back at once, so the panel shows what the radio took. A value or a control the file does not have writes nothing. It is refused, like a change of frequency, while the radio transmits or is about to, while a tune or a test runs, while the CAT profile runs, while mLink is writing the settings the operator agreed to, when the operator said never to the radio's setup, and while the radio's port is lost.
- A control that transmits is a key-up, treated as the Tune is. It waits for clear air and is
refused during an emergency (ours, or one heard and not acknowledged), the update lockout, the transmit
inhibit, a listen-only station, a net whose cycle is running, and while messages are going out. It needs the
file to read the radio's transmit state and to unkey it, so that mLink can watch it. One press is one cycle:
nothing repeats it. mLink watches the radio's transmit state until the radio lets go, which ends the cycle.
If the radio still transmits 15 seconds after mLink wrote the command, mLink stops it: with the action's own stop
command when the file gives one (
;mlink: control_stop=id|command, for a radio whose tune ends that way), else with the file's CAT unkey, which it sends whatever way the radio is keyed otherwise, because a keying line holds nothing of a carrier the radio makes itself. It then reads the radio's transmit state again, a few times, and tries once more if the radio still sends; the cycle ends, and the station's own sends are released, when the radio reads receive, or after the second try says to stop it at the radio. A second press, an emergency or the transmit inhibit stops it the same way at once, unless the station itself has keyed the radio meanwhile: that transmission is not the tune's to cut, and mLink sends nothing then. While the radio's tune is on the air the station's own sends wait (a send, a beacon, a reply owed): the transmitter refuses to key under the carrier and gives the refused send its usual outcome, and an emergency goes out as it can. When the radio lets go the station listens before its first send, as it does after a sound device comes back. A radio that is already transmitting that mLink did not key (the operator at the microphone, or the tune's toggle already running) is never pressed. A tuner that already matches may not transmit at all: after three seconds mLink says so and sends nothing more. Every press, start, end and stop is in the log. - An applet may press a control only on the operator's press in its own window and only when the operator allowed the applet to change the radio, as for the frequency and mode (Appendix E). The transmitting action is more: only an applet that comes with mLink, unchanged, may ask for it, whatever the operator allowed, and the station wants a technician.
A control can name the same command as a setting mLink proposes (NR0 for the noise reduction is
both). They do not interfere: the setting is mLink's proposal at connect, written only on the operator's
answer; the control is the operator's own press. The panel shows the radio's state either way.
D.11 How mLink talks to the radio
D.11.1 poll= and the key check
;mlink: poll=500 ;mlink: cat_ptt_transmit_validation_ms=60
poll= is one whole number of milliseconds, 50 to 5,000: how often mLink asks the radio
how it is. Without it the rate is 100 ms; the first good line counts, and the operator's own setting
beats the file's. cat_ptt_transmit_validation_ms= is auto_poll or a whole
number from 0 to 255. Both are explained, with what slowing them costs, in
Section 6.6 and Section 6.7.
Use them only on a radio that has shown it needs them, and say in a comment where the need was seen.
The shipped QMX file is the example: its USB link locked up in a field test.
D.11.2 freq_range=: what the frequency command can carry
;mlink: freq_range=144000000-148000000 ;mlink: freq_range=5650000000-5850000000
Whole hertz, the lowest and the highest with both included, one line for each range, up to eight lines. A file with no line has no limit. With lines, a request to set a frequency outside every range is refused before anything is sent: no byte goes out, the log carries one warning, and the dial correction's notice tells the operator which frequencies the file covers. It exists because a frequency field has one fixed length. The Icom IC-905's five-byte field cannot say 10 GHz, and a wrong frequency written to a radio is something mLink never does. The ranges are shown on the radio's page ("This file covers only…"). Reading the frequency is not limited.
D.11.3 Serial lines and which port
;mlink: serial_handshake=none | hardware ;mlink: serial_lines=dtr:low,rts:low ;mlink: cat_iface=0
serial_handshake= is none (the default) or hardware, RTS/CTS
flow control on the CAT port, which Hamlib lists for the Yaesu and some Kenwood radios. RTS then belongs
to the flow control and cannot also key the radio on that port.
serial_lines= sets each of dtr and rts to low,
high or leave, in either order or alone. A line nothing names is low, on every
system, and leave means mLink writes nothing to it; the keying line is not changed by this
key. Icom files and the QMX set both low, because on those radios a raised line can key the transmitter.
cat_iface= is the USB interface number (0 to 15) that carries CAT on a radio whose built-in USB
shows two serial ports. When the system reports that the chosen CAT port is another interface of that
radio, mLink refuses it before opening it, so no line is raised. All three are explained from the
operator's side in Section 6.8. Add cat_iface= only with a
cited source.
D.11.4 The radio's interfaces
;mlink: interface=id|kind|carries|settings|recognize|text|source|confidence ;mlink: interface_rule=id,id|never_open_together|why|source|confidence
One interface= line describes one way the radio connects to the computer: a serial port, a
sound device, a network link. id is a short name in lower case (letters, digits, _
and -) that the rules refer to. kind is cat-serial,
key-serial, audio, lan or key-audio. carries lists what travels on it:
cat, rts, dtr, audio-in, audio-out.
settings is baud= and a number, or -; on an audio line it may be capture_channel=left or capture_channel=right instead (the line must carry audio-in and say usb= or alsa=): the channel of a stereo sound device that carries the radio's receive audio, which mLink then keeps alone (Section 5.3.6). A radio with two sides adds capture_channel_b=left or right after it, with a comma: the channel while its second side transmits (Section D.11.6). recognize says how to
tell the interface on the computer, as a comma list of usb= and the vendor and product ids
(10c4:ea70), if= and the USB interface number, by-id= and a name
pattern, alsa= and the sound card's name, or -. Write only what a bench record or
the radio's manual shows. text is what the operator reads about it, in plain words; it may not
contain a bar. source and confidence are as for the other measured lines
(measured, manual-verified or inferred). A CAT interface with
if= stands in for cat_iface= when the file has no such line. Each interface is
listed on the radio's page.
A key-audio line says the interface keys the radio itself from the transmit audio it is
sent: a SignaLink USB's Auto-PTT, a Masters Communications DRA-70's VOX. It is fast, in the way of a VOX
that listens to the digital audio, and the interface's own delay control (a SignaLink's DLY knob, about 28
milliseconds to over 3 seconds) sets how long it holds the key after the audio stops. mLink has only to send
the audio: no key command, no line. The line carries audio-out and nothing else, and its
settings are -; a line that carries a serial word, audio-in or a
setting is left out and logged. The client lists it as "Key from the audio". With such an interface in use mLink allows an HF radio that has no keying
line and no CAT key command, which it otherwise refuses; the interface is found by the open sound card, or named in
the station's keying settings.
D.11.5 key_audio=: what an audio-keyed interface needs
;mlink: key_audio=400|100|A guess, not tried on a radio: ...|docs/radios/signalink_usb_rigfile_research_2026-11-10.md|inferred
In an interface file that has a key-audio line, the first good line counts. The first field is the
lead-in in milliseconds, 0 to 2000: for that long mLink sends an unmodulated tone in the middle of the passband at the
transmit level before the first frame, because the interface closes the radio's key only when it hears audio, and
silence would not do it. The signal itself does not move: the transmission is planned so that its first frame lands
where it would with any other way of keying, and the tone starts earlier. The second is the hang in milliseconds, 0 to
5000: how long the interface keeps the radio keyed after the last audio, which the interface sets itself (a
SignaLink's DLY knob runs from about 28 milliseconds to over 3 seconds). mLink adds it to the silence after the last
audio and treats the radio as keyed for that time, so nothing is received into it. The third says in plain words where
the numbers come from, the fourth names the record, and the fifth is the confidence, measured,
manual-verified or inferred. A file with a key-audio line and no
key_audio= line states no numbers, and both are 0. The shipped SignaLink and DRA-70 files carry guesses
(400 and 100, 400 and 500) that have not been tried on a radio; copy the interface file into your own rigs folder and
change them to what you measure. Your copy wins over the shipped one.
interface_rule= says two interfaces named above it cannot be open at the same time. The one
rule today is never_open_together. It exists for a radio whose two serial ports sit on one chip:
on the Yaesu FTX-1 the second port's line-setting requests time out for five to thirty seconds each, so
mLink stalls, and it did so in either order. When a station is set up with CAT on one port and line keying
on the other, and the file carries such a rule between a CAT interface and a line interface, mLink opens
the CAT port, keys the radio with the file's CAT keying command, leaves the line port closed, and tells
the operator once why. A file with no CAT keying command is opened as set up, with a warning. A station set
up for line keying alone opens only the line port, and the rig file it names still applies: its measured
facts are used however the radio is keyed, and no CAT port is opened for it. Declare a rule only for a
radio where it was measured: the Yaesu FT-991A, whose two ports on the same kind of chip were open at once
on the bench without trouble, has none.
D.11.6 Radios with two sides
Many radios have two sides, each with its own dial and often its own receiver: OmniRig calls them VFO A and
VFO B, Yaesu and Icom call them main and sub. The operator chooses which side transmits; some radios can receive
on one side and transmit on the other (split), and some receive on both at once (dual receive). Each radio does
it its own way. The rig file describes what the radio does, and mLink handles every radio the same way. On the
Yaesu FTX-1 the main side answers IF; and FA; and the sub side OI; and
FB;, whichever is chosen; VS; says which side is selected and FT; which
transmits; and the USB audio always carries the main receiver on the left and the sub receiver on the right.
Read the plain way, the file would show the main side's dial and listen to the main receiver while mLink
transmitted on the sub side.
What the file says.
[STATUS3] Command=(VS;) ReplyEnd=(;) Validate=(VS.;) Flag1=(..0.)|pmVfoAA Flag2=(..1.)|pmVfoBB [STATUS4] ;mlink: status_side=b Command=(OI;) ReplyEnd=(;) Validate=(OI...........................;) Value1=7|9|vfText|1|0|pmFreqB Flag1 =(.......................2......)|pmSSB_U [STATUS5] Command=(ST;) ReplyEnd=(;) Validate=(ST.;) Flag1=(..0.)|pmSplitOff Flag2=(..1.)|pmSplitOn [STATUS6] ;mlink: status_side=tx Command=(FT;) ReplyEnd=(;) Validate=(FT.;) Flag1=(..0.)|pmVfoA Flag2=(..1.)|pmVfoB [pmFreqB] Command=(FB.........;) Value=2|9|vfText|1|0 [pmSSB_U] Command=(MD02;) ;mlink: side_b_command=(MD12;)|manual-verified
- The select read: a status section with flags named
pmVfoAA,pmVfoAB,pmVfoBAorpmVfoBB. In OmniRig's names the first letter is the side that receives and the second the side that transmits. - The transmit read: a status section whose first line is
;mlink: status_side=tx; itspmVfoAandpmVfoBflags name the side that transmits. - The split read: the first status section with
pmSplitOnorpmSplitOffflags (OmniRig's). It may be the select read's own section. - The second side's dial and mode: a status section whose first line is
;mlink: status_side=b: its field namedpmFreqBis that side's dial and its mode flags are that side's mode. - The second side's frequency set:
[pmFreqB], OmniRig's. - The second side's mode set: OmniRig has none, so a mode section may carry one more line,
;mlink: side_b_command=command, optionally followed by|and a confidence word: the same mode set on the second side (the FTX-1 sets its main side's mode withMD0n;and its sub side's withMD1n;). - Each side's receiver: the audio line's
capture_channel=andcapture_channel_b=. This is also how a file says the radio has dual receive on two channels.
The two status_side= lines must come before their section's Value and
Flag lines, and side_b_command= inside a mode section, each once; anywhere else a line
is left out and logged. mLink follows a radio's sides only when its file has a select or transmit read and a
status_side=b section. Many OmniRig files name VFO or split flags or [pmFreqB];
without that section they are read as before, one side only, and their side and split reads are never
asked.
What mLink does with it.
- mLink works on the side that transmits: it shows and records that side's dial and mode, sends a frequency or mode change to that side, and keeps that side's receiver from the sound card. The side that transmits is what the transmit read says; without one, the select read's second letter, moved to the other side when the split read says split is on and the select read named one side for both.
- A change the file has no command for on the transmitting side is refused, because the other side's command would move the side that does not transmit. So the data mode mLink proposes when it connects is set on the side that transmits. mLink never sends a select, split or swap command: every side read is a question.
- When the radio receives on one side and transmits on the other, on two different dials, mLink keeps working on the transmitting side and keeps transmitting. It hears an answer only if its receive channel carries the transmitting side's receiver. It logs the split, shows it in the radio's status and tells the operator once, as a notice with both dials, that turning split off at the radio lets mLink receive where it transmits.
- With dual receive, mLink listens to the transmitting side's receiver alone.
The select read (else the transmit read) is asked in every second status reading, in place of a keyed-state read: with the usual polling, the dial, the mode and the power are each read every four seconds and the side every two, so a change of side is seen within two seconds. The other side reads are asked every fourth reading, and at once when the selection changes. That costs one short question more every four seconds, plus the other side reads, and while split on two dials one dial more. The reading that finds the side changed reads that side's dial and mode at once, so the status bar, the record of what was heard on which dial and the choice between the FM and the HF channel plan never mix the two sides. A reading never makes a second question while a transmission is about to start: what is left waits a second. A frequency or mode change asks every side question again just before it writes, and sends nothing when one goes unanswered. The sound card's other side is taken within about a second, between two blocks of audio, with nothing reopened (never during a transmission). The operator's own choice of receive channel still wins.
D.11.7 Interface files and the radios used through them
;mlink: name=text ;mlink: interface=id|audio|audio-in,audio-out|-|usb=vendor:product,alsa=card|text|source|confidence ;mlink: sound_level=capture|playback|control|step|why|source|confidence ;mlink: via=interface file name|why (in a radio's file)
A radio with no sound device of its own (the FT-857D, the FTM-3100) is used through an interface such
as a Digirig, and what that interface needs is the same whatever radio sits behind it. It is written once, in
an interface file: a file in the interfaces folder inside any folder that holds rig files, found by
the same rules (your own copy in the station's data folder replaces a shipped one). An interface file is not a
radio and does not appear in the radio list. Its audio line is what makes it match: mLink recognizes
the interface by the sound chip's USB numbers. Its sound_level= lines give the step the chip needs for
a control the card calls control ("Mic", "Speaker"), in the card's own steps; mLink sets it each
time it opens the card (on an Android phone, once per plug-in). A change on the Sound card levels page is
not stored, so your own copy of the interface file is where a station keeps its own step; the page's "Save as
my default" writes it there. A radio's file says
via= and the interface file's name (once) when that is how it is normally used; mLink then takes the
expected sound card, and the receive channel if the interface file states one, from the interface file. A radio
with a sound device of its own states it in its own audio line and needs no via=. The effect
for the operator is described under Section 5.3.8.
D.12 Power and meters
These lines let the radio self test read the radio's power setting and meters, and let the status bar show power and SWR. Each is a read: a question, how the answer ends, and the field that holds the number. They have the seven-field form
command|reply|start|len|format|multiply|add
where command is written as for Command=, reply is a byte count or an
end-byte string, and the last five are a Value= field over the answer.
power_read=reads the transmit power setting in the radio's own units.power_set=(command template|start|len|format|multiply|add) writes it back, andpower_min=(set command|value) is the command for the lowest power and whatpower_read=reads after it. The self test turns the power down only when the operator ticks the box that allows it, and only when the file has all three.power_unit=wattssays the reading is in watts (Yaesu, Kenwood), so the status bar can show it as such.- A
power_set=orpower_min=line may end in one more field, a shape: which answer ofpower_read=the line is for, written like oneValidate=term (text in parentheses with.for any byte, or hex, two digits per byte, each byte exact, with??for any byte). It is for a radio whose set command and lowest power change with what is fitted. The Yaesu FTX-1 answersPC1nnn;when its field head sets the power andPC2nnn;when the SPA-1 amplifier of the optima does, and the amplifier goes no lower than 5 W, so its file says;mlink: power_set=(PC1...;)|3|3|vfText|1|0|(PC1...;) ;mlink: power_set=(PC2...;)|3|3|vfText|1|0|(PC2...;) ;mlink: power_min=(PC1001;)|1|(PC1...;) ;mlink: power_min=(PC2005;)|5|(PC2...;)
Apower_set=with a shape gives all five parts of its value field first. With a shape on any power line, mLink reads the power before it writes it and uses the first line whose shape fits the answer, or else the line of that key that has no shape. When no line fits, mLink writes nothing, and the self test ends before anything is transmitted, saying what the radio answered. A file with one line of each and no shape works as it always did, with no read first. Each key takes at most four lines, only one of them without a shape, and no two with the same shape; another line is left out and logged. meter_alc=andmeter_po=read the ALC and power-output meters while the radio is keyed. Scale them with multiply so that 1.0 is the meter's full scale; the test compares tones with each other, so the scale only has to be the same for every reading. Withoutmeter_alc=the self test is the manual one, where the operator types in what the radio's meter shows.meter_swr=adds two fields after the seven: raw:ratio points of the meter's calibration, in rising order (at least two, ratios from 1.0 up), and the confidence. mLink reads between points on a line. It reads the SWR only while keyed.swr_flag=is the radio's own high-SWR flag: a read of seven fields and the confidence, decoded as 0 for not high and anything else for high. A file that has it is judged by it; one without it is judged high above 3.0.firmware_read=(command|reply|start|len|confidence) asks the radio's firmware revision once after the radio is found. The revision is len characters (1 to 47) of the answer from start. A command ending in a semicolon is checked against the answer: the answer must open with the command's own letters, so a refusal or noise is no revision. Put in only a command that the maker's CAT reference lists; never guess one from a similar model.
D.13 Measured curves and delays
Four kinds of line hold measurements. Nothing in mLink acts on them yet: the client shows them on the radio's page, and the project keeps them with the file, so the numbers are not lost.
;mlink: af_tx=mode|hz:dB,hz:dB,…|how|conditions|source|confidence ;mlink: timing=what|condition|median ms or -|min..max|runs|how|source|confidence
af_tx= is the audio response of the radio's transmit side, af_rx= of its receive
side, and af_link= of both together, radio to radio. The mode is the file's mode group the
curve was measured in. The points are hertz and decibels, ascending in hertz, from 2 to 24 points, 1 to 24,000
hertz and −99 to +99 dB, relative to 1 kHz unless conditions names another
reference. how is one of bench-po-meter (the radio's own power meter, read by CAT),
bench-rx-dbfs (a tone into the receiver, at the level the station hears it),
bench-deviation (an FM transmitter's deviation, from a software-defined radio's capture),
bench-sdr-level (each tone's level on the air, from a software-defined radio's capture of the
transmitter, relative to the 1 kHz tone), self-test, operator or manual.
conditions says in plain words what the curve was measured under; it is only true under them.
source names the record the numbers come from.
timing= is a switching or audio delay. what is one of key_to_rf,
unkey_to_rf_off, tx_audio_delay, rx_audio_delay,
squelch_open, squelch_tail, cat_key_ack or
cat_unkey_ack, and carrier_settle_100hz, carrier_settle_50hz or carrier_settle_20hz (from key-up until the carrier stays within that many hertz of where it settles). The median is a number or - when only a range is on record, and it
must lie inside the range (.. separates the two ends, which may be negative). runs is
a whole number from 1. how is bench-rf-capture, bench-audio-capture,
bench-log, self-test or manual.
gd_tx=, gd_rx= and gd_link= are the radio's group delay across
the audio band: how much later one tone arrives than another. They are written like the af_ lines,
with milliseconds in place of decibels (−99 to +99), relative to the average over 1 to 3 kHz unless
conditions names another reference; a positive figure arrives later. The delay of the whole path is
not in them. They share the 8 curve lines a file may carry with the af_ lines.
;mlink: carrier=what|condition|median Hz or -|min..max|runs|how|source|confidence
carrier= is written like timing=, in hertz. what is
tx_offset (the transmitted carrier minus the dial), tx_drift (how fast the carrier
moves while keyed, in hertz per second) or rx_offset (where the receiver's passband center sits
against the dial). A measuring receiver with no frequency reference of its own adds its own error to the first
and third; say in condition how large it was. A file may carry up to 8 such lines.
All of them keep their facts honest: a line with no conditions, a missing field or an unknown word is left out. Every measured row names its source, the record the numbers come from, and, for a delay or a carrier figure, how many runs they rest on; the source note must stay under 200 characters. A shipped file cannot carry a measured row without both, and the shipped-file check refuses one that does. Cite yours.
D.14 The check every shipped file passes
One automatic check reads every rig file that ships with mLink. It asks what any of them must be, never what one of them says, so a new measurement does not make it fail. Every shipped file must:
- load, and be either usable, or listed as unusable with a plain reason, or a radio keyed by a line;
- have a name and say how far it is tested (Section D.7.1);
- have no
;mlink:line that is dropped at load (too long, badly formed, past a table's room, or with a value the key cannot take) and no;mlink:key the program does not read; - give every measured row its source and, for a delay or a carrier figure, its number of runs;
- make each setting read back what it sets and give its values in words, with each setting the operator makes by hand saying where and why;
- give every control (Section D.10) a label, a sentence and a confidence, a command for every value (no two the same, none the file's key command) and, for a switch or a choice, a read whose value sits inside its answer; and, for a control that transmits, read the radio's transmit state and have an unkey;
- if it sends CAT commands, have been compared with Hamlib (below);
- declare the audio data mode only when the file has a section that selects it, and never raise DTR or RTS when the port opens;
- be in the radio list, once, and nothing be in the list that is not a file.
A new radio file fails this check until it passes all of it.
D.14.1 Hamlib as a reference, the bench as the judge
For every file that sends CAT commands, the check builds the commands the file describes (set the
frequency, key and unkey, select the data mode, ask whether the radio is transmitting) and compares
their bytes with what Hamlib's backend for that radio sends. A match means the file is
consistent with Hamlib's behavior. It does not mean the file was tested: only the bench, or
a radio in the field, can say that, and the file's tested= line says so
(Section D.7.1). Where a bench record says the radio does something
other than what Hamlib does, the bench record wins and the file follows the bench. For the serial lines
of such a radio, the check uses what the bench record states, not what Hamlib says.
D.15 Testing a new file
- Put it in the station's
rigsfolder and open Settings, "Radio". The radio should appear under its name. If it does not, the name does not end in.ini, or the file cannot be read; a file the reader rejects shows the reason. - Choose it and read its page without a radio. The page shows what mLink read: the
name,
about=, the tested level, the coverage fromfreq_range=and eachmanual=row (and eachhowto=line). A line that is missing from the page did not parse; the daemon's log says which and why. - Connect the radio and run the CAT profile
(Section 6.13), first without its key test. It asks everything the
file declares and changes nothing. Read the problem lines: a timeout on everything is the port, the speed
or the radio's own CAT menu; a mismatch on one read is that read's layout (its length, its
Validate=or its value field); "refused by the radio" is a command this radio does not take. - Tick the key test on a dummy load or a clear frequency. A file is ready when every read is ok and the radio reports transmit within 60 ms of the key command.
- Set the tested level to what you have done (Section D.7.1).
D.16 Sending a file to the project
The report the CAT profile writes names the rig file and carries its commands without its comments.
It goes to the project from the CAT profile tab of Diagnostics, by the routes described in
Section 6.13 and Section 7.8.19:
over the internet, or as an ordinary mLink mail when the station cannot reach it. To send the rig file
itself, use the "Open in your email program" button there, and attach the .ini yourself,
because a mail link cannot.
D.17 What to remember
- A rig file is an OmniRig file plus
;mlink:comment lines. A new radio needs a new file, not a new mLink. - Put your own file in the
rigsfolder in the station's data folder; it beats a shipped file of the same name. - mLink never writes a setting or the mode without the operator's answer, never sends
[INIT], and never sends a frequency outsidefreq_range=. - A line mLink cannot read is left out whole and logged. Test with the radio's page, then the CAT profile, then the key test.
- Say honestly how far the file is tested (
tested=) and how sure each line is (measured, manual-verified or inferred). - Every shipped file passes one check: no dropped line, no unknown key, every measured row with its source and run count. A match with Hamlib means "consistent with Hamlib", never "tested", and a bench record outranks Hamlib.
Writing Applets
Where applets appear on the screen, and the Applets window that lists them, are in Section 7.8.13. This appendix is the writer's side.
E.1 What an applet is
An applet is a folder holding a file called main.lua, and whatever else the applet
needs: more Lua files, pictures, sounds, 3D models. The folder's name is the applet's name; it may hold
letters, digits, "-", "_" and ".", and is at most 27 characters long.
There are two places applets come from.
- The ones that come with mLink sit in the client's resources folder, next to its fonts and maps. An update of mLink may replace them.
- Your own sit in the folder the Applets window names, in the client's data folder. "New applet" makes one there. When you edit an applet that came with mLink, the client first copies its whole folder into yours, and your copy is the one that runs from then on. An update of mLink never overwrites it. When a newer version of that applet comes with an update, the Applets window says so and your copy stays as it is.
Lua is a small language made to live inside other programs. It is the language of many game and editor extensions, so tutorials and examples are easy to find; the client runs Lua 5.4. If you have never written Lua, the first applet below and the Toolbox applet are enough to start from: each page of Toolbox shows one thing an applet can do, with the code that does it.
E.2 A first applet
This is what "New applet" writes. It shows a heading, a button and a count of clicks, and keeps the count when you change the file.
applet.title = "My applet 1"
applet.width, applet.height = 420, 260
local clicks = 0
function applet.draw(w, h)
ui.section(8, 8, w - 16, "Hello from Lua")
if ui.button(8, 40, 160, 28, "Click me") then
clicks = clicks + 1
end
ui.label(180, 44, "Clicks: " .. clicks)
end
function applet.save() return { clicks = clicks } end
function applet.load(saved) if saved then clicks = saved.clicks end end
Everything an applet tells the client goes into the table called applet:
| Field | What it does |
|---|---|
title | The window's title and the name in the Start menu. Without it the folder name is used. |
needs | The applet interface the applet was written for, a whole number (applet.needs = 1). A client that offers less (its own number is applet.api) does not run the applet and its window says which number it asks for, instead of failing at the first call it lacks. The number goes up when a release of mLink adds to what applets can call. The requests get_diagnostics, get_audio_health and get_relay_candidates, the log event and the places "sound_devices", "self_test" and "cat_profile" of mlink.navigate need applet.needs = 5. |
asks | What the applet needs the operator to agree to, as a list of words (applet.asks = { "background", "station_chat" }): "background" keeps it running when its window is closed, "station_chat" lets it send lines to the station's other operators, "rig_control" lets it change the radio's frequency and mode (Section E.8.1). Read without running it, like needs, so write it at the start of a line near the top. It is not needs, which is an interface number. Section E.9 says how the operator is asked. |
icon | The applet's picture on the desktop, the taskbar, the Start menu and the Applets window, and in the repository's list: a line of text in mLink's small picture format (Section E.15). Without it, or with one the client cannot read, the client draws a tile with the first letter of the title. |
menu | Where the Start menu lists the applet: a group ("Communicate", "Heard & Map", "Radio", "This station", "Tools", "Help"), then submenus, joined by "/": "Tools/Games" lists it in a Games submenu under Tools. A name that is not one of the groups puts the whole path under Tools. Without it, Tools. |
status_line | applet.status_line = false takes away the line under the window that says whether the applet is running and how much memory it uses. Only an applet that came with mLink and has not been changed (a copy made with Edit that nobody has touched still counts) can: any other applet always shows the line, so you can see what it is doing. Read without running it, like needs, so write it at the start of a line near the top. |
rules | The files that hold the applet's rules, as a list of names in its folder ({ "rules.lua" }). Two stations whose rules files differ are told so when one sends the other a message (Section E.10). Without it, every .lua file in the folder counts, so changing only the look also counts as a change. |
width, height | The size the window opens at. |
cpu | "high" when the applet means to use a lot of the computer's time; otherwise its window warns the operator when it does. |
fps | How many times a second the window draws itself while nothing happens, up to 60. Without it the window draws when you move the mouse or type, when the station sends news, and when one of the applet's timers is due. |
load(saved) | Called once, after main.lua has run. |
draw(w, h) | Called every time the window is drawn, with the size of its inside. |
save() | Called before the applet runs again after a change; what it returns is handed to the next load. What should outlast closing the window or the client goes in applet.state (Section E.3). |
close() | Called when the window is closed. An applet granted "background" goes on running afterwards (Section E.9). |
tick(dt) | Called for an applet granted "background", window open or not, when an event, a reply, a message or a timer reached it (at most five times a second) and otherwise at most once a second; dt is the seconds since the last call. |
opened(args) | Called for every request to open the applet, also when its window is open already or it runs in the background; args is the table the opener gave ({} for a plain open). |
receive(from, msg) | Called with a message from the same applet at another station, unless it belongs to one of the applet's rooms (Section E.10). |
The client reads title, menu, icon, status_line and needs from the file without
running it, so the Start menu can list an applet that has never been opened. Write them as in the example: on a line of
their own near the top, as plain text in quotes.
E.3 How an applet runs
Opening the window starts the applet: the client runs main.lua from the top, then
calls load. From then on it calls draw every time it draws the window, and
the applet draws its whole window each time. There is no list of buttons kept somewhere: a button
exists because draw drew it this time, and ui.button answers whether it was
clicked. Writers of games know this style as an immediate-mode interface; it makes an applet's code
short, because the screen is always just a picture of the applet's own variables.
Editing. Save any file in the applet's folder, from the client's Notepad or from
any other editor, and the applet runs again within a second: the client calls save, starts
the new code from the top and hands what save returned to load. That is how
the example keeps its count. save may return numbers, strings, true and false, and tables
of those; a function or a table that holds itself cannot be kept, and the log says so. When the new
code has an error, the window shows it until the next save fixes it. Notepad colors a .lua file,
checks it as you type without running it (a misspelled name, a library call given too few or too many
arguments, a local never used or one that hides a library, and a value kept at the top of the file that
starts as nil and is indexed in a function with no check for it), and offers the names that can follow ui. and
the other libraries (Section 7.8.14).
Errors. A mistake in an applet stops that applet only. Its window then shows the message, the file and line it happened on, the chain of calls that led there, and what the applet had printed; "Open line N in Notepad" opens the file at that line, and "Run again" starts it afresh. The rest of the client carries on.
Globals. A variable you never declared reads as an error that names it, instead of
quietly giving nil, so a misspelling is caught where it happens. You may create globals
while main.lua runs from the top; after that, a new global is an error too. Use
local for everything else.
Printing. print writes to the applet's log, which the error window
shows, and to the client's own log. help("ui.input") prints what a call takes and gives;
help() lists the libraries.
Later, and again. applet.after(seconds, fn) runs fn once
after that long, and applet.every(seconds, fn) runs it again and again; both give a timer
whose :cancel() stops it. They run between drawings of the window, so the shortest wait is
one drawing, and they stop when the applet stops or runs again.
Waiting in order. Some work is a list of steps that each wait: ask the station,
wait for its answer, ask again. applet.task(function() ... end) runs such a list as a task;
inside it, mlink.await(command, params) waits for the station's answer and gives it back,
and applet.sleep(seconds) waits for time, while the window goes on drawing:
applet.task(function()
local list = mlink.await("list_mail", { limit = 1 })
local first = list and list.rows[1]
if first then
local mail = mlink.await("get_mail", { id = first.id })
print(mail.subject)
end
end)
What the applet keeps. local S = applet.state({ tab = 1, name = "" })
gives a table that is kept for the applet: after an edit, after the window is closed and after the
client itself is closed and started again, S comes back as it was last saved, with the
values given filling in any that are missing. A saved value of another kind than the one given for it
(a copy of the applet that kept it differently, a damaged file), or a number that is not one, is replaced
by the value given, and the log says which. It holds strings, numbers, booleans and tables of them.
Put in it what the operator would expect to find again: the tab that was open, a game in progress,
settings.
The promise to the author is that the saved copy is always one the applet's code left whole. It is saved, when it has changed, at these points and no others:
- at once, when the script calls
applet.save_state(): the place for a change the operator would hate to lose, such as a move played; - every 5 seconds by itself, between calls, never in the middle of one (
autosavebelow); - when the applet stops cleanly: before it runs again after an edit, when the window closes and when the client quits.
It is never saved after an error stops the applet, because the call that failed may have left it
half-changed: the next start finds the last copy saved, and changes made since are not kept. A task
that waits (applet.sleep, mlink.await) lets other calls run meanwhile, an
automatic save among them, so make changes that belong together on the same side of a wait. Each
save replaces the file whole, so a full disk or a crash leaves the last good copy. When a
close or save raises an error as the applet stops or runs again, the
applet's log says that applet.state stayed as last saved. A saved copy that cannot be
read is set aside in the data folder (as .state.bad, or the next free
.state.bad.1 to .9) and the applet starts from its defaults; when it cannot
even be set aside, it is left where it is and nothing is saved until the applet starts again. It is
never written over.
A second argument sets three things:
applet.state(defaults, { version = 2, upgrade = fn, autosave = 5 }).
version numbers the shape of the table (0 when not given); when the saved copy has a
lower number, upgrade(old, from) is called once with it and returns the new table, which
is saved at once. Without an upgrade the older copy is used as it is and saved under the
new number; a copy with a higher number (saved by a newer edition of the applet) is used as it is
and keeps its number, and the log says so. autosave is the seconds between automatic saves, or
false for none, leaving only applet.save_state() and the clean stops.
applet.state_info() tells the script where it stands: what was loaded
("new", "saved", "upgraded", "set aside" or
"left alone"), the
wall time of the last save in milliseconds, whether anything has changed since, and why the last save
failed, if it did.
A number a widget can read only one way. A layout that runs out of room hands a widget a
width or height below zero; a value that went wrong upstream hands it NaN; a saved choice outlives its list.
The ui calls read such a number the one sensible way instead of stopping the applet: a size
below zero reads as 0 (a control with no room is not drawn; a line of text keeps the width of its first
word), NaN or infinity reads as 0, a coordinate or size past the limit is held at it, a choice of 0 or less
is no choice and one past the end of its list is none (a tab past the end is the last tab), a dialog too
small or too large is held to its range, a slider whose maximum is not above its minimum is not drawn, and
a canvas under 1 x 1 or an icon under 4 pixels is not drawn. The applet keeps running, and its log says so
once for each line of the script that did it ("main.lua:423: ui.notice: argument #3 is -12, a size below
0; read as 0"), so the layout can be fixed. A value of the wrong kind, a string where a number belongs, is
still an error: no reading of it is the right one.
Two kinds of failure. A call that can never work, such as a command name with a
typo or an option of the wrong type, is an error at once, with the line, so the mistake is found
while writing; where a near name exists the message suggests it ("did you mean get_mail?"). A call
that cannot work just now, such as a send while the station is not connected or over the send limit,
gives nil, the reason in plain words and a short code a script can test:
"offline", "rate" (a limit: try again in a moment), "busy" (too
many requests waiting), "queue_full" or "failed". A refused
mlink.request never calls its function, so a script that marks a request as waiting does so
only after the call gave true:
local ok, why, code = mlink.send_chat("K7OTR", "QRV?")
if not ok then
if code == "rate" then applet.after(2, retry) else ui.toast(why, "warn") end
end
More files. require("rules") runs rules.lua from the
applet's folder once and gives back what it returned; require("lib.board") is
lib/board.lua. Checkers keeps its rules in a file of their own this way.
E.4 The ui library: the client's own controls
ui draws the same buttons, check boxes, sliders, text fields, tables, tabs and dialogs
the client's own windows use, so an applet looks and behaves like the rest of mLink. Toolbox's folder
has a file, WIDGETS.md, with every call; the rules that matter are these.
- Coordinates are in the client's screen units, from the top left of the window's inside. Inside a scrolling area or a dialog they are from that area's top left.
- A control returns what happened. A button returns true on the click; a control
that edits a value returns the new value and whether it changed:
name, changed = ui.input(x, y, w, h, name). The applet keeps every value itself and passes it in again next time. - Choices are numbered from 1, like Lua's lists.
- Telling controls apart. The client must know which control is which from one
drawing to the next (which one has the keyboard, which is being dragged). It tells them apart by the
line of the script that draws them and how many have come from that line. When a control is drawn
only some of the time, or a list of them grows and shrinks, give each one a name of its own as its
last argument (
ui.button(x, y, w, h, "Delete", "del-" .. id)). - Laying out.
local c = ui.column(x, y, w, { h = h })places controls one under the other so an applet need not count heights:c:button("Send"),name = c:input(name),c:section("Mail")and every other control, without the position and size.c:row(3)orc:row({ 2, 1 })splits the width into cells for controls side by side; a table, list or text area placed last takes the rest of the height, andc:rest()gives that rest for drawing of your own. - Areas.
ui.scrollandui.modaltake a function that draws what is inside them; the client opens the area, runs the function and always closes the area again, even when the function fails. When you close an applet's dialog, that applet opens no dialog for five seconds, so a script that keeps asking can never trap you behind one.
E.5 Messenger-style screens: lists, logs, menus and icons
Four pieces make a screen like the side-tabbed chat of a modern messenger, and every one is the client's own control, so it looks and behaves as the rest of mLink does, on a desktop with a mouse and on a tablet or phone with a finger.
- A list of conversations.
picked, menu = ui.chat_list(x, y, w, h, rows, selected_key)draws one tall row for each conversation: an icon, a title, a one-line preview of the last message, the time of it and a count of what is unread. A row is a table:{ key, icon, title, preview, time_ms, unread, dim, reason, section, muted, link, mark }. Thekey(a string, required) says which row is which, so a list that grows or reorders keeps its place.iconis a name fromui.icon_names()(an unknown name draws no icon);title,preview,reasonandsectionare text, cut at 96, 160, 120 and 48 bytes.time_msis Unix milliseconds (none or 0 shows no time); it shows as hours and minutes for today and as a short date for any other day, where “today” runs from midnight in the zone the operator chose in Settings, not from midnight UTC.unreadis the count in the badge (“99+” above 99), andmutedgrays the badge. Adimrow is grayed, and itsreason(“the radio is off”) shows under it, on one line or, when it is long, on two (a third is cut), for a conversation whose link is down. Asectionputs a heading above its row.linkis a short word (cut at 24 bytes) naming the link the conversation uses, such as “MeshCore”; it is drawn beside the time, and left out on a row too narrow for it.markis the state of the conversation in a word or two,{ label, tone }, with the label cut at 32 bytes and the tones of a line's mark below (an unknown tone is an error that names the row): the Chat puts the state of the operator's last message there, such as “trying again 3” or “gave up”. It stands at the right of the second line, before the unread count, and takes at most half of that line; the preview gives way to it. A client older than this ignores it. A tap or click gives back the row's key once; a right-click or a long press gives back the key as the second result, for a menu; both arenilon a frame when nothing was pressed.selected_key, the sixth argument, is the key of the row to highlight (ornil). The up and down keys move the pick while the list has the keyboard. Rows past the 512th are not read. - A log of lines.
result = ui.line_log(x, y, w, h, lines, opts)shows lines as12:04 <K7OTR> words(12:04 <K7OTR→AI7YN> wordswith an addressee), wrapped under the time and name. The operator can drag across lines to select, extend with Shift and click, select all with Ctrl+A and copy with Ctrl+C; with nothing selected, Ctrl+C copies every line. On a desktop a tooltip on a line gives the full date and time; a touch screen has no tooltips, so offer the full date from the line's menu. The log follows the newest line until the operator scrolls up, and follows again at the bottom. Each line has akeyof its own: the selection, the follow state and every result name a line by it, never by its place, so new lines arriving above or below do not move a selection. A line is a table:{ key, time_ms, who, to, text, mine, dim, mark, tip, star, button }.time_msis Unix milliseconds (none or 0 shows--:--).whoandtoare names of up to 24 bytes;textis cut at 400 bytes.minedraws the line in the ink of the operator's own lines anddimin muted ink.markis a status column left of the text,{ label, tone, tip }: a shortlabel(32 bytes), atoneof"normal","muted","ok","warn","alert"or"error"(the same as alert;"link"is accepted and shows as normal) and atipshown as its tooltip.tip(160 bytes) adds words to the line's own tooltip after the time.staristrueorfalsefor a favorite star column (leave itnilon every line for no column), andbutton(32 bytes) is the label of a small button at the line's right. The options arekey(the log's own state),day_breaks(a date heading wherever the date changes),divider(the key of the first new line; a “new messages” divider is drawn above it, none if no line has that key),follow(defaulttrue; false never follows),empty(the text shown when there are no lines) andselect_all(truefor one frame selects everything). The result isnilwhen nothing happened and nothing is selected; otherwise it is a table withclicked(the key of the line that was pressed and released on one spot),menu(the key of a line that was right-clicked or long-pressed),menu_empty(truefor the same on empty space),star(the key of a line whose star was pressed),action(the key of a line whose button was pressed),selection(the selected text) andat_bottom(the newest line is in view). A log holds 512 lines: given more, the oldest are dropped and the newest 512 kept. - Keys and the state behind them. A key is a string of 1 to 127 bytes of valid UTF-8
without control characters (enough for a MeshCore conversation key such as
mc:dm:board:64 hex digits of a public key). A longer key, or one with a control character or bad UTF-8, is an error that names the key; it is never changed quietly, so a key handed back is always the one you passed. Thekeyoption ofui.chat_listandui.line_lognames the widget's own memory: its scroll position, its selection and whether it follows. That memory belongs to the key, so give each thread its own key (key = "log:" .. thread) and a thread keeps its place when the operator switches away and back. One applet keeps the memory of up to 96 widgets and 4 MB at once (a line log's is about 145 KB, so about 28 logs); when that is full, the memory of the widgets not drawn for the longest time is dropped, and such a widget starts again at the bottom with nothing selected. - Menus.
ui.menu_open("line")opens a menu at the pointer when the operator right-clicks or long-presses;ui.menu_open("line", x, y)opens it at a place in the applet's area instead.ui.menu("line", { "Copy", "Reply" })is called on every frame, draws the menu while it is open, and returns the number of the item picked on the frame it is picked, otherwisenil. An applet keeps 6 menus at once, with up to 32 items each. Draw only the menus you opened: a click is handed to a menu that was open on the previous frame. - The clipboard and sharing.
ui.copy(text)puts text on the clipboard and says so; it gives backfalseand the reason when the browser refuses or when it is called twice within half a second.ui.can_share()says whether the client can start a mail from a text, andui.share(text)does it (at most once every 2 seconds). Both are used insideapplet.drawonly, and only while the applet's window is in view: otherwise they givenil, the reason and"not_in_view", asmlink.open_appletdoes. - Icons.
ui.icon("radio", x, y, 20, { tone = "muted" })draws a one-color icon from 4 to 512 pixels (any other size is an error) and gives backtrue; an unknown name draws nothing and gives backfalse, as a row ofui.chat_listwith an unknown icon shows none.ui.icon_names()lists them: radio, net, internet, mesh, people, chat, mail, map, friends, settings, back, search, star, star_off, menu, send, warn and lock.
A narrow window is the same list and log, one at a time: show the list, and when a row is picked,
show its log with a back arrow (ui.icon("back", ...)) over it. ui.splitter
gives the wide layout. The Messenger page of the Toolbox applet draws all four with made-up data.
ui.input returns a third value, submitted, true on the frame the operator
presses Enter in the field, and takes the option focus = true to pick up the keyboard on that frame
(pass it for one frame). A touch screen ignores it, so the on-screen keyboard rises only when the operator
taps the field, and so does an applet whose window is not in view.
ui.label takes the roles caption, body, strong,
mono, heading (also written title) and display, and
the tones muted, ok, warn, alert and
link.
E.6 The rl library: raylib, for drawing anything
The client draws with raylib, a library for games and
graphics, and rl gives an applet almost all of it, under raylib's own names:
rl.DrawCircle, rl.BeginMode3D, rl.LoadModel,
rl.KEY_SPACE, rl.RED. raylib's own cheat sheet and examples are therefore the
reference: an example in C turns into Lua by putting rl. in front of each name and writing
a structure as a table, { x = 10, y = 20 } (or { 10, 20 }).
help("rl.DrawCircle") gives a call's arguments and raylib's own line about it, and
Notepad offers the names as you type.
That is why there are two styles of name. rl keeps raylib's own, with capitals
(rl.DrawCircle, rl.KEY_SPACE), so that raylib's documentation applies word for
word; everything else is mLink's and is written in lower case with underscores
(ui.text_view, mlink.time_ms, applet.save_state).
raylib draws inside a canvas: ui.canvas(x, y, w, h, function(cw, ch) ...
end) gives the function a picture of its own, the size of that rectangle, and puts it in the
window when the function ends. Inside it the applet owns everything: clearing, 2D and 3D cameras,
blending, clipping, shaders. Toolbox's 3D page is a spinning cube drawn this way, and Checkers draws
its board in one. The differences from a raylib program of your own:
- Drawing happens only inside a canvas function, and the canvas's coordinates start at its top
left.
rl.GetScreenWidth()is the canvas's width. - The mouse, the keys and touch count only for the applet whose window has them: a click counts
when it is on the canvas, keys when the window has the keyboard and no text field in it has.
rl.GetMousePosition()is measured from the canvas's top left. - The window, the program's loop and the screen are the client's: opening or resizing windows,
setting the frame rate, hiding the mouse, taking screenshots and opening web pages are not there.
Neither are raylib's own file and folder functions and its text-formatting helpers; Lua's string
library and
fs(below) do those jobs. - Every file raylib loads, a picture, a font, a model and every file a model names inside it, must be inside the applet's own folder or its data folder. A name with ".." or a full path is refused.
- Something loaded (a texture, a model, a sound) stays until you unload it or the applet stops; the client frees whatever an applet still holds when it stops or runs again.
E.7 Sound
Applets play sound with raylib's own calls: rl.LoadSound, rl.PlaySound,
rl.StopSound, rl.SetSoundVolume, rl.SetSoundPitch, and for
longer pieces rl.LoadMusicStream and rl.PlayMusicStream. Sound files may be
WAV, OGG, MP3 or QOA.
Sounds without a file. sfx makes sounds with the client's own
synthesizer, the one the station's alert tones come from. sfx.sound("explosion") gives a
ready-made one (sfx.presets() lists them: bell, chime, explosion, thud, shot, whistle,
click, blip, coin, laser, rise, fall, wind), and sfx.sound("bell", { pitch = 1.5, length = 0.5 })
changes its pitch, length or level. A sound of your own is notes, played together:
local zap = sfx.sound({ wave = "square", hz = 1600, to = 200, length = 0.3 })
local boom = sfx.sound({
{ wave = "noise", length = 1.2, decay = 1.1, cutoff = 4000, cutoff_to = 120 }, -- the crack
{ wave = "sine", hz = 90, to = 35, length = 0.7, decay = 0.6 }, -- the thump
})
rl.PlaySound(boom) -- an ordinary Sound
sfx.play("coin") -- made and played at once
A note has a wave (sine, square, triangle, saw or
noise), a pitch hz that can glide to another, and, in seconds, a
start in the sound, a length, an attack (the rise), a
decay towards a sustain level and a release (the fade at its end);
then level, duty (the square's share high), a low-pass filter
(cutoff, gliding to cutoff_to), vibrato and
vibrato_cents, and a seed that makes noise the same every time.
sfx.length says how long a sound lasts.
Sound goes to one place only: the speaker chosen for alerts in Settings, at the alert volume times
the applet's own. A station's computer often has the radio's sound card on it, where any sound keys the
transmitter, so the client never guesses a speaker, and an applet cannot either. While no speaker is
chosen, an applet's sounds play nowhere, and the applet's log says why the first time.
rl.IsAudioDeviceReady() tells an applet whether its sounds can be heard now.
The speaker is mono, so rl.SetSoundPan is accepted and changes nothing. A sound file is
read whole when it is loaded, a sound up to one minute long and music up to five minutes, so
rl.UpdateMusicStream has nothing to do; it is there so that raylib examples run as
written. On the web and on a phone a sound plays once, whole: stopping, pausing, pitch and the
position in the music are not there.
An applet plays at most four sounds at once, and all applets' sounds together are never louder than the alert volume. When the alert speaker changes, goes missing or is turned off, every applet sound stops at once; a sound never moves to another speaker.
E.8 The mlink library: the station
mlink is what makes an applet part of the station. Its quick calls give a copy of
what the client already knows, as tables, every time they are called:
mlink.connected(),mlink.me()(this station's callsign, grid and position, andsession, this client's session number, which the station chat's rows carry asclient_id),mlink.radio()(what the radio is doing);mlink.stations(), the heard stations, most recent first, with grid, signal level (missing until a frame from the station carried a reading) and when each was last heard;mlink.messages()andmlink.mail(), the chat messages and the inbox, newest first; a chat message sits by when it arrived, and carriesarrived_ms; one the station put back where it was written (it came late from a station whose clock agrees) also carrieswritten_msand sits by that (Section 23.3.1);mlink.time_ms(), the clock the times in those tables use, andmlink.now(), the same clock in seconds;mlink.rev(name), a number that changes when that data changes ("stations","messages","mail","radio","me"), so an applet rebuilds a list only when it must, andmlink.on_change(name, fn), which callsfnwhen it does.
Lists of tables are easy to sort and sift with util:
util.sort_by(mlink.stations(), "snr", true) for the strongest first,
util.filter(mlink.mail(), { read = false }), util.group_by(list, "from"),
util.take(list, 10), and for showing them, util.ago(ms) ("5 min ago"),
util.clock(ms) ("14:05", in the operator's clock settings, as every clock in the client) and util.bytes(n) ("1.2 KB"). geo works
with places: geo.from_grid("DM43bp") gives the middle of the grid square,
geo.to_grid(lat, lon) the square, geo.distance_km and
geo.bearing take two positions or two grid squares, and geo.me() gives this
station's position when it has one. For data, util.crc32(s) and
util.sha256(s) give the usual checks of a string, and util.base64 and
util.unbase64 turn bytes into text and back. help("util") and
help("geo") list the rest.
And it can act:
mlink.send_chat(to, text)sends a chat message, exactly as the Chat does, up to 255 bytes.mlink.compose_mail(to, subject, body)opens the mail composer filled in; you read it and press Send.mlink.open_station(call)opens the station's card, andmlink.show_on_map(call)opens the map on it; both givefalsewhen the station is not heard or has no position.mlink.is_friend(call)andmlink.friend(call)ask about and add to the friends list (friendshows the page when the station is already there and tells which it did).mlink.offer_contact_log(call)offers to log the contact after a chat message, as the Chat does.mlink.navigate(place)opens one of a short fixed list of places:"mailbox","radio","nets","friends","notifications","updates","about"(About this build), the radio's"sound_devices"(Settings, Radio, Sound devices),"self_test"and"cat_profile"(the Diagnostics window's "Radio self test" and "CAT profile" tabs),"cat_profile_report"(the report window with the last CAT profile report ticked), or one of Mail's folders:"waiting"(Waiting to send),"sent"and"drafts". A client older than this knows fewer places and raises an error for a newer one, so call it insidepcall.mlink.stop_message(id, to)stops one of your chat messages that is still on its way, as Abort in Mail does: it goes back to Drafts and nothing more is sent for it.idis the chat message's own id (as the station lists your messages) andtois the addressee it was shown with (0CQCQCQ for everyone). The station decides: it stops only your own chat message to that addressee that is still waiting, on the air or set aside, sent by your operator account when it names one, and refuses mail, emergency traffic, messages carried for other stations and other operators' messages; the operator sees the refusal, and is told whenever an applet stops a message. An older client has nostop_message: look for it before offering it. A callsign is checked and upper-cased for you: letters, digits,/and-, 1 to 15 characters with a letter and a digit, never one that starts with 0 (that is a room address such as 0CQCQCQ). The station need not have been heard on air. Each of these exceptis_friendacts only while the applet's window is in view, and givesnil, the reason and"not_in_view"(or"rate") when it may not;offer_contact_loggivestruewhen it asked, though the client offers nothing when the preference is off or the station was not heard directly.mlink.updates()gives what the client keeps current, as the Updates window shows it:{ applets, map_packs, history, lists }, one row per item with what is installed and where it came from, what is newer, its state ("current","available","downloading","failed","edited","own","needs_newer","not_listed") and whether it updates by itself; the history says what changed and how.mlink.update(kind, id)starts one update andmlink.check_updates()asks for the lists again (it installs nothing); both are only for an applet from mLink, unchanged, andupdateonly on a press in its window. The station's own release and its rig files come throughmlink.request:get_release_status,release_check_now,list_rig_updatesandrig_update(the last again only for an applet from mLink, unchanged, on a press; the station wants a technician for it).mlink.open_applet(name, args)opens another applet's window, or brings it to the front, and calls itsapplet.opened(args);argsis a table of strings, numbers and booleans (Section E.9).mlink.on(name, function(ev) ... end)calls the function for each event of that name, and gives a handle whose:off()stops it (mlink.off(name)stops every handler of a name). Events come in two kinds. The main events, one word each, keep their names and fields as mLink changes:chat(a chat message heard, withev.from,ev.to,ev.textandev.snr),mail(mail arrived),heard(a station heard),tx(our transmissions queued, on the air, done),net(the Virtual Net changed),emergency,station(its settings changed),radio(what the radio is doing),rig(a reading of the station's radio changed, with the fieldsget_riganswers) andlink(the client connected to the station or lost it). Four more serve a chat:inet_chat(the internet chat channel:ev.whatis"chat_rows", withev.channel,ev.ok,ev.after_seqand the lines inev.rows, each withseq,from,ts_msandtext, or"chat_posted", withev.channel,ev.okandev.seq; these answerchat_fetchandchat_post),station_chat(a line between the station's operators:ev.from,ev.text,ev.ms,ev.client_id),marker(a seen-up-to marker changed,ev.type"marker"withev.keyandev.value, or markers were cleared,"markers_cleared"withev.scopeandev.count) andmeshcore(a MeshCore line heard or sent, or its state changed:ev.id,ev.seq,ev.state).station_chatis quiet for an applet that was not allowed"station_chat". A name for a stream the station does not publish yet is simply quiet. The log events, named with underscores, are every event the station writes to its log (rx_message_delivered,tx_send_queued...) with all its fields; they say more, but their names follow the station's log and may change between versions. A name ending in*takes every log event that starts with the rest ("rx_*", or"*"for all of them). Every event hasev.event, its name, andev.time_ms, when it reached the client, on the clock ofmlink.time_ms; a log event also hasev.level,ev.cat,ev.message(the line as it reads in the log) andev.uptime_ms, the station's own clock. The main eventloggives every line the station logs, plain lines too, which the named log events leave out: it hasev.level("debug","info","warn"or"error"),ev.cat(the part of the station),ev.message,ev.uptime_msand, when the line was logged as a named event,ev.what, its name. Events come a moment later, on the next drawing of the window;get_log(below) gives the lines from before the applet started.mlink.request(command, params, function(reply, err) ... end)asks the station anything the client's own windows ask it, with the same commands, and calls the function with the answer when it comes. This is how an applet builds its own mail window:list_mail,get_mailfor a whole mail,send_mailto send one, andestimate_mail, which answers with the size the mail compresses to, the most one transmission can carry, the air time and whether it fits the link to that station. The commands open to applets are named one by one: the ones that read the station's status, the heard stations and links, chat, mail and its attachments, the outbox and send queue, beacons, map objects, notes, the net, emergencies, the contact log, friends, statistics, relays, internet data, forms and the station's log; for the station's own health,get_diagnostics(its counters:statuswithmac_state,convergence_phase,operator_present,tx_outstanding,send_queue_depth,last_snr_db,frames_rx,frames_txandnav, the busy times, thenstations,state_machine,relay,emergencyandann_lanes),get_audio_health(watchingandverdicts, each{ id, severity, hint, held, of }withseverity"warning"or"notice",hintwhat to check, andheldof the lastofchecks that showed it) andget_relay_candidates(candidates, each{ callsign, grid, last_snr_db, last_heard }); the Diagnostics window is itself an applet that comes with mLink, so it can be read as an example and replaced with one of your own); the ones that act:send(at most 255 bytes, like a chat message),send_mail(the station fills in the author, the position and the name shown),mark_readandmove_mail; for a chat,chat_fetchandchat_post(the internet chat channel),get_markers,set_markerandclear_markers(the seen-up-to markers the station keeps for the operator, so a line read in one client is read in the next; clearing removes the ones under a prefix the applet no longer needs),get_meshcore_messages,send_meshcore_textandcancel_meshcore_text(the MeshCore lines heard and sent, a text over the MeshCore radio, at most 255 bytes like a chat message, and stopping one of ours that has not gone out), andsend_station_chat, a line to the station's other operators, and reading that chat (get_station_chatand thestation_chatevent), only for an applet the operator allowed"station_chat"(get_station_chatanswers{ type, count, rows }, each row{ from, client_id, text, ms }, the lines the station keeps in memory); and the basic facts about the station:set_tx_inhibit,set_operator_presence,set_status,set_relay_policy,set_aprs_beacon,set_position,set_gridandset_presence_grid_chars. Each time an applet changes one of those, a notice tells the operator which applet changed what (a seen-up-to marker is not a setting and shows no notice). A MeshCore companion radio attached to the station can be read and set the same way:get_meshcore_status,get_meshcore_contactsread it (the station keeps the answers, so ask for the status at most every five seconds), andset_meshcore_name,set_meshcore_radio,set_meshcore_tx_power,set_meshcore_position,set_meshcore_options,set_meshcore_channel,send_meshcore_advert,reboot_meshcoreandrefresh_meshcore(read the radio again now) act on it. The link itself is turned on and off withset_meshcore(a serial port fromlist_serial_ports, or a Bluetooth board,ble:and its address, fromscan_meshcore_bleandget_meshcore_ble_devices); the station refuses the radio's own ports, and the operator is told. The MeshCore Manager applet uses them. An action does not wait for the radio: the station answersmeshcore_acceptedwith anidat once, and the radio's result comes later as themeshcore_requestevent (mlink.on) and in therequestslist ofget_meshcore_status, matched by thatid. Accepted is not success: only the result says whether the radio did it. A change the station refuses at once (a bad value, the link off) is an error at the call. Every other command is refused, so an applet never deletes mail, never declares, changes or cancels an emergency, and never touches the radio's set-up (which radio, its port, its settings, its tests), the keying, the audio, keys or accounts. The radio itself has its own rules (Section E.8.1). The answer comes on a later drawing of the window, never in the middle of one. The station's commands and their answers are described in Chapter 32.
An applet acts with the rights of whoever is signed in to the client, never more.
E.8.1 The station's radio
An applet can show the station's radio and, when the operator allows it, tune it. The Rig control
applet that comes with mLink is built this way. Reading costs nothing: get_rig and
rig_status answer with what the station last read from the radio (the dial in
dial_hz, mode, the power setting in tx_power_w, the SWR of the last
transmission in swr_ratio and swr_high, keyed, the sides of a radio
that has two in tx_side, rx_side and split, and whether the port is
lost), and what the radio's rig file lets mLink do: can_set_freq, can_set_mode, can_set_power,
can_read_freq, can_read_mode, can_read_power,
can_read_swr. Neither asks the radio anything, and neither makes the station ask it more often:
the station reads the radio on its own schedule, and the rig event brings a changed reading.
The ALC and output meters are read only during Tune and the radio self test, and the S-meter not at all.
get_rig_file with { ini = rig.rig_ini } gives the radio's rig file: its name, the
set-up the operator makes on the radio by hand (manual_settings, each with the setting, the
value, where it is and why), the frequency ranges it covers (rig_freq_ranges, empty for no
limit) and the modes it can set (cat_modes). get_band_table gives the bands as
mLink knows them, each part with the modulation mLink usually runs there (usb or
fm), and get_fmlink_config the FM mode.
Eight commands change the radio, or what mLink takes it to be: set_rig_freq
({ hz }), set_rig_mode ({ mode }: usb,
lsb, data-usb, data-lsb, fm, data-fm,
am, cw, cwr), set_rig_power ({ watts }, 0.1 to 1000;
only where can_set_power is true: the rig file sets and reads the power in watts, which an Icom's
file does not; the radio holds it to its own limits, tx_power_w in the next reading is what it took and
rig_write_note says when that is not what was asked; the station also refuses it while the radio
self test has the power lowered and has not put it back, so a power set from an applet is never undone by
the test), set_rig_stated_freq ({ hz },
the frequency a radio that cannot report its own is on, as the operator reads it; 0 when it is not known; it
writes nothing to the radio; the station goes by it only while it is fresh, given or confirmed since the station
started and within four hours, which stated_state in get_rig says) and set_fmlink_config ({ enabled } to use the FM
mode, { from_rig } for its Auto, nothing else), set_rig_control ({ id, value }:
one switch or choice of the controls the rig file describes, which get_rig_controls lists with the
state last read from the radio), press_rig_control ({ id }: a control that keys the
radio, the antenna tuner's tune; the station treats it as a transmission like Tune, waits for clear air and
refuses it as it refuses Tune; it wants a technician, and only an applet that comes with mLink, unchanged, may
send it, whatever the operator allowed) and stop_rig_control (ends it). They go only for an applet that asks for
"rig_control" and that the operator allowed, and only from its window, in the moment the
operator presses something there: a button, Enter in a field, the wheel. A call from a timer, a task, the
background or while the window opens is an error. At most four go in a second. The station still refuses a
change while the radio transmits or is about to, when the operator said never to the radio's setup, and when
the rig file cannot carry it; rig_writes and rig_write_note in the next reading
say how the last one went. The first change in a session puts a notice on the screen that names the
applet, and each one is written in the applet's log.
The radio's two tests have calls of their own. mlink.self_test() gives the radio self test as
the station last told it: its state and what it is doing in words, each tone with its newest meter reading
and, once judged, whether it passed, the station's verdict, what the rig file lets the test do and what the
test still needs before it can run. mlink.cat_profile() gives the CAT profile the same way: its
step, the plan, the verdicts in words, the problems and where the report is. Any applet may read them.
Running them is another matter: the self test makes the radio transmit and may turn its power down, and the
CAT profile keys it when its key test is ticked, so mlink.self_test_start,
mlink.self_test_judge (the manual test's readings), mlink.cat_profile_start and
mlink.cat_profile_open (the report, or a mail to the project) go only for an applet that comes
with mLink, unchanged, and only in the moment the operator presses something in its window; whatever the
operator allowed does not change that. mlink.self_test_cancel and
mlink.cat_profile_cancel stop a test at any time. The Diagnostics window runs both tests this way,
and the station still refuses a test it cannot run, in its own words.
E.9 Asking, running without a window, notices and opening
These calls are for applets that matter when their window is closed, a chat above all: one that keeps its unread count, tells the operator about a new line and opens at the right place when the operator clicks.
Asking. Some things an applet may do only when the operator agrees. The applet
lists them in applet.asks: "background" to keep running with no window, and
"station_chat" to send lines to the station's other operators, and "rig_control"
to change the radio's frequency and mode. A word that is not one of
these stops the applet and the message names it. The operator is asked once, in plain words, for each
ask the applet makes; the answer is kept and can be changed on the Installed tab of the Applets window,
where a button beside the applet says what a click does ("Allow background", "Stop background"). An
applet that comes with mLink is allowed what it asks for by default, without the question, and the
operator can turn each permission off with the same buttons in the Applets window; a copy of it that the operator edited is the operator's own and is asked. An applet
that is refused still runs while its window is open; only that one thing is not done
(send_station_chat gives an error that says what to ask for).
applet.allowed("station_chat") says whether the operator agreed, so an applet can leave out
what it may not do instead of meeting the error.
Running without a window. An applet granted "background" starts when
the client starts and keeps its state when its window is closed: events, replies to
mlink.request, timers and applet.receive go on, and the client calls
applet.tick(dt): on a frame in which something reached the applet (an event, a reply, a message, a timer that fell due), at most five times a second, and otherwise at most once a second, on whatever frames the client draws. The client does not wake itself to tick: it wakes for the station, for input and for a timer that is due, so an idle background applet costs almost nothing. It does not draw. Closing
the window calls applet.close() and nothing else; opening it again shows the same
applet, not a fresh one, and calls applet.opened. It stops for real when it is removed or
hidden, when the operator takes the background permission away (its state is kept as
applet.state says), and when an error stops it; the client says so once, and opening the
window shows the error. It keeps to the same limits as an applet with a window: each call has its
time limit and the whole of its calls count toward the warning that an applet uses a lot of the
computer's time, so keep tick short and do nothing in it that can wait for an event.
Unread count. applet.attention(n) sets the applet's count of things
that wait for the operator (0 clears it). The count shows on the applet's taskbar and Start menu
entries as the number badge the client's own windows use, up to 99, whether the window is open or
not. A stopped applet has no count.
Can the operator see it. applet.in_view() is true while the operator
is looking at the applet's window: it is shown, not minimized, at least half uncovered, and the client
is in front of the other programs. It is the rule the Chat uses to decide that a
line has been read. A chat clears its count, and holds back a notice, only while it is true. With
no window it is false; right after the window stops drawing it may still be true for one frame.
Notices. applet.notify{ title = "K7OTR", body = "QRV?", kind = "message",
key = "dm:K7OTR" } tells the operator. kind is "message" (a line from a
person) or "notice" (the default); each has its own row in Settings > Notifications,
which decides whether it pops up, plays a sound and leaves a row in the notification list, exactly as for
the client's own notices (the call does not post to the phone's own notification bar). key is yours: clicking the notice (or its row) opens the applet
and calls applet.opened({ notify_key = "dm:K7OTR" }), so the applet can show the right
conversation. The key travels in the notice itself, so a row from an earlier session still opens the right
thing, and it must be short: 23 bytes less the length of the applet's folder name (19 for a folder called
chat); a longer key is an error. A notice for an applet that has been hidden or removed since
opens nothing. A notice that nobody would miss does not belong here: check in_view()
first. The call gives true, or nil, the reason and the code
"rate" when the limit is reached.
Opening with arguments. mlink.open_applet("chat", { to = "K7OTR", line = 3,
reply = true }) opens the named applet, or brings its window to the front if it is open, and
calls its applet.opened(args) as soon as it is running (after load, on the
next frame), also when it runs in the background. The table holds at most 8 strings, numbers and
booleans, with names under 32 bytes and text under 256. A name that is not an applet is an error;
otherwise the call gives true, or nil, the reason and a code:
"not_in_view" (the operator is not looking at the calling applet's window: only an applet
in front of the operator may open another window), "gone" (the target is hidden or removed),
"rate" or "busy". A plain open from the Start menu calls
applet.opened({}).
applet.asks = { "background" }
function applet.opened(args)
if args.notify_key then show_thread(args.notify_key) end
end
mlink.on("chat", function(ev)
unread = unread + 1
applet.attention(unread)
if not applet.in_view() then
applet.notify{ title = ev.from, body = ev.text, kind = "message", key = "dm:" .. ev.from }
end
end)
E.10 Messages to the same applet at other stations
An applet talks to itself at other stations with messages of its own kind, which the client never
shows in the chat. applet.send(to, msg) sends one to a station, or to everyone with
"0CQCQCQ"; applet.receive(from, msg) is called with each one that arrives for
this applet, with the applet's own bytes in msg.body (up to 60,000).
E.10.1 What mLink carries for you
Every byte is airtime on a frequency other stations share, so it helps to know exactly what goes out. An applet never has to send these itself:
- Who sent it and who it is for. The transmission's own frames carry both
callsigns, as for every message; they reach the applet as
fromandmsg.to. - Arriving intact, and arriving at all. The message has its integrity check, and a message to one station is acknowledged and repaired like any other; a message to everyone is not (Chapter 18).
- Compression. The station compresses every message when that makes it smaller (Section 23.5), so an applet gains nothing by compressing before it sends, and usually loses a little.
- Which applet it is for. A 4-byte check of the applet's folder name, and a byte of flags saying which of the fields below follow.
With the integrity check, the envelope and kind bytes and those 5, a message costs 9 bytes before its body. Then, only when the sender asks for them, 2 bytes each:
| Field | What it is for |
|---|---|
version | Added unless the sender says version = false: a check of the applet's rules files. The receiver gets msg.version_ok, false when its rules differ, so the two ends know they may disagree. |
session | Which conversation, a number the applet chooses: one game against one station, one group. |
sequence | The message's place in the session, a number the applet chooses (a move's number). A gap means one was missed. |
state | Given a table (the board, the game), the client sends a 16-bit check of it, mlink.hash(state); the receiver compares msg.state_hash with its own mlink.hash to know whether both ends are in step. |
snapshot | True when the body is the applet's whole state: for a station out of step, or joining late. |
Sending raw. applet.send(to, bytes), with the body alone, sends it
with none of the fields: the 5 bytes of identity and flags are all the applet's part adds. An applet
that wants a protocol of its own builds it there, from applet.send,
applet.receive and the station's events (Section E.8).
applet.check(msg, { sequence = n, state = board }) and
applet.session(peer, id) do the numbering and checking for one that wants only that much.
E.10.2 Packing a message: bits
The costly part of a message is nearly always its body, and the costliest way to write a body is as
text. "11-15" takes 40 bits, where two squares out of 32 take 10; a position written as
{"lat":47.6062,"lon":-122.3321} takes 31 bytes, where the same two numbers to about a
meter take 7. Text formats grow with every field name and every digit, and on a shared frequency that is
other stations' time as well as yours. bits packs each value into exactly the bits it
needs. The shape of a message is written once, as a schema:
local Move = bits.schema {
{ "from", "range", 1, 32 }, -- a square: 5 bits
{ "to", "range", 1, 32 },
{ "crown", "bool" }, -- 1 bit
{ "note", "text", 40, optional = true }, -- 1 bit when it is not there
}
applet.send(peer, Move:pack({ from = 11, to = 15, crown = false })) -- 2 bytes
function applet.receive(from, msg)
local m, why = Move:unpack(msg.body) -- nil and why for a message that does not read
end
A field is a whole number in a range (range lo hi, or uint n and
int n for n bits), bool, one of a list (choice { "move", "resign" }),
a fraction rounded to a step (number -90 90 0.0001), a whole number of any size
(varint: 5 bits up to 15, 10 up to 255), text (text max, 8 bits a byte),
text from a few letters only (chars max alphabet: a callsign in bits.CALLSIGN
takes 6 bits a letter),
a list (list max spec), or a schema inside a schema (struct). Packing a value
that does not fit its field is an error at once, naming the field; unpacking another station's message
never is: a message that ends early or holds a value outside its field gives nil and why.
bits.writer() and bits.reader(bytes) do the same one value at a time, for a
message whose shape depends on what came before.
Notepad points out a message body written as text (a string, json.encode,
string.format or joined with ..), and the first such message an applet sends is
pointed out in its log. JSON (json.encode and json.decode) remains a quick way
to try an idea; for anything that goes on the air more than now and then, pack it.
E.10.3 Doing something together: rooms
Most applets that talk to other stations need the same things around their own messages: an
invitation and its answer, a set-up everyone agrees on, moves that arrive in one order and from the
same state, a way back in step when one is missed, members who join late, leave or go quiet.
applet.room does all of that with applet messages, the way an author would; an applet that
wants something else uses applet.send directly. A room is for 2 to 8 stations
(max, 2 unless given), and an applet has one: calling applet.room again
replaces it.
local room = applet.room({
max = 4,
setup = Setup, move = Move, -- bits schemas: what an invitation and a move carry
state = function() return board end, -- checked with every move
snapshot = Game, snapshot_state = game_record, -- the whole game, for a late or lost member
check = function(from, m) return legal(from, m) end, -- the maker's rule for a move
waiting_for = function() return whose_turn end,
on = {
start = function(setup, with) ... end, -- this station is in (with: the maker, or at the maker the first member)
move = function(from, m) ... end, -- in the room's order, from the same state
joined = function(call) ... end, left = function(call) ... end,
},
}, S.room)
S.room = room.data -- the room lasts with applet.state
room:invite("W1AW", { rounds = 3 }) -- at the other end: room:invite_buttons(c)
room:move({ angle = 45, power = 70 })
One station keeps the order. The station that made the room, its maker, numbers
everything that happens in it: each move, and each member joining, leaving or being dropped. A
member's move goes to the maker alone, as one message to one station, acknowledged on the air; the
maker checks it with check and sends it on once, to the other member when there is one,
to everyone in a single transmission when there are more. So a two-station room costs what two
stations writing to each other would, and a room of five sends each move twice, not four times.
Messages to everyone are not acknowledged on the air, so the numbers carry the order: a station that
misses one sees the gap in the next and asks the maker for the whole room.
Handing on the turn. The one message a room cannot afford to lose is the move that
hands the turn on, because nothing follows it until the station whose turn it is plays. So a move sent
to everyone names whose turn comes next (waiting_for, asked once the move is played), and
that station answers by sending the same move on to everyone as its turn: the maker hears the turn was
taken up, and a station that missed the move hears it a second time. One more transmission, by the
station that was about to speak anyway, and no station has to ask. The maker's own move goes out at the
room's next step, a moment after room:move, so that the room can name the next turn once the
move is played.
- Invitations. The maker invites one station at a time, before the room starts
and while it is under way, up to
max. An invitation reaches the other station'son.inviteand waits for its operator, up to 30 minutes:room:invite_buttons(c)shows each waiting one with Accept and Decline. A station accepts only once its answer has been sent (the station offline leaves the invitation waiting, with the reason). A room nobody has joined yet starts at once, from the invitation alone, at both ends (on.start); a station that joins a room already under way starts when the maker's answer, the whole room, arrives, and the others are told it joined (on.joined). The maker's ownon.startandon.joinedrun before it sends the room, so what they change is in it.room:leavewithdraws invitations not yet answered (on.withdrawnat the other end). An invitation from a copy of the applet with other rules, or one whose set-up does not read here, says so. - Moves.
room:move(m)carries the room's next number and the check of this station's state before the move. Apply the move on your own side after sending it. A move the maker refuses (checksays no, or it was not the next, or the state differs) comes back as the room as the maker has it, aton.snapshot. A move that arrives twice is played once, and costs nothing more. In a room of four or more, where the maker sends a move on to everyone, a member hears its own move come back as the word that it was played. While a station waits for the room it asked for,room:moverefuses ("busy"): the room would undo the move. - Out of step. A missed event shows in the next one's number, and a different state
in its check.
on.out_of_step(from, why)is told; unless it returns true (the applet deals with it itself), a member asks the maker, and the maker answers a member's bad move with the room as it stands. The room travels as its members andsnapshot_state()(state()unless given), packed bysnapshot; what the maker sends while it is on its way is held, and played after it. - Leaving.
room:leave(why)tells the others; a member leaving is told to everyone as a numbered event, and the maker leaving ends the room for all (on.ended). The maker can take a member out withroom:drop(call, why). A station still writing to a room it is no longer in is told so, once for each message. - Quiet members. When the applet waits for a member (
waiting_fornames it) and that station has not been heard, on the air at all, forquietseconds (10 minutes unless set),on.quietis told once; nothing is dropped by itself: the maker's operator decides.room:ping(call)asks whether a station is still there, and its answer counts as hearing it.
What the room sends by itself is only ever an answer to a message that came: the maker sending a move
on, the room to a station that joins or asks or sent a move it refused, a ping's answer, the "no longer
in this room" above, and a member's request for the room when it sees a gap. Nothing is ever sent again.
An applet may send once every 2 seconds (Section E.13), and a room
often has more than one thing to say at once (the news that a member joined, then the room for the
newcomer): what must wait, waits its turn in the room's own queue, in order, with its state check as it
was when it was due (room:queued() says how many). The queue lasts as long as the window: what still waits when
the applet stops is not sent, and the others find the gap at the next event. When the applet has used
its sends for the hour, the queue waits for the hour to allow more. On the air a room's message is an applet
message whose session is the room's number and whose body starts with 4 bits saying what it is. The room
leaves out what the receiver knows: the maker's callsign in the member lists it sends (the others go 6
bits a letter, bits.CALLSIGN), and whose move it is in a room of two. Checkers' move between
two stations is 14 bytes of applet message in all. An applet with a room keeps
session numbers for it: a message carrying one is never handed to its applet.receive.
E.10.4 Trying both ends alone
An applet that talks to other stations can be tried on one. applet.loopback(msg, from)
hands a message to the applet's own receive on a later drawing of the window, built
exactly as a send builds it, as if from had sent it; it never goes on the air and needs no
station. A send to this station's own callsign does the same. mlink.fake_event(name, fields)
gives the applet's own handlers an event with those fields, marked ev.fake. A room needs
real stations, or several clients: one room cannot play more than one member.
A message for an applet that is not open waits for it, up to 32 in all, and a notice says it came. Messages that arrive while the client is not running are not handed over later. Sending counts against the applet's send limit (Section E.13); a loopback, or a send to this station's own callsign, does not.
E.11 Files: fs
Every applet has a data folder of its own, apart from its code, so that editing the applet or an
update of mLink never touches what it saved. fs.write(name, text),
fs.read(name), fs.list() and fs.remove(name) work there, on
plain file names without folders. fs.asset(name) reads a file from the applet's own
folder, such as a word list that comes with it. A file that cannot be read or written gives
nil and the reason, so an applet can say what went wrong:
local text, err = fs.read("scores.txt"). fs.save_table(name, t) and
fs.load_table(name) keep a table in a file the same way, for anything beyond
applet.state, such as a file per saved game. Pictures and sounds an applet exports with
raylib's Export calls also go to the data folder, under the same limits.
E.12 What keeps one applet from harming the station
An applet may come from anyone, and anyone can make a mistake, so the client gives each applet a box of its own: a mistake stops that applet, never the station. Each applet runs in its own copy of Lua, with these walls around it:
- No reach outside its folders. The parts of Lua that open any file, run other
programs, load precompiled code or look inside the interpreter are not there. Of the clock functions,
os.time,os.clock,os.dateandos.difftimeare. Files come only throughfs,requireand raylib's loaders, inside the applet's two folders; a link that leads outside them is refused. - A memory limit per applet. Past it, the applet gets an out-of-memory error; the station does not notice.
- A time limit per call. A call to
drawthat runs too long, counted in Lua steps and on the clock, is stopped, and the window says on which line, adding "an endless loop?", because that is nearly always the cause. A pattern search with Lua's string functions that would take far too long on a long text is stopped the same way. A call that stays within its limits but takes long on the clock is not stopped: a line in the applet's window says which call takes how many milliseconds, because the whole client slows down while it runs. An applet whose calls together take much of the client's time says so in its window, and keeps running: some applets mean to (a game thinking about its next move). Such an applet setsapplet.cpu = "high", and the warning is not shown; the Applets window lists it as using a lot of CPU, so the operator knows why the client is slower. - A limit on pictures and sounds held at once, and on the size of each picture.
- A limit on its data folder, in bytes and in files.
- Limits on acting: how often it may send, open the composer and ask the station (Section E.13).
A few Lua features are not open to applets because the time limit cannot watch them: a
__gc finalizer in a metatable (Lua runs finalizers where nothing can stop them),
table.insert and table.remove on a table with a __len
metamethod, table.move or string.rep over tens of millions of elements, and a
plain string.find whose text and pattern are both very long.
Each is an error that says so. The figures for every limit are in
Section A.8.
E.13 How often an applet may act
draw runs many times a second, and a script that sends from it by mistake would fill
the outbox and the air. So each applet may send (a chat message, a mail through
mlink.request, a text over the MeshCore radio, or a message to the same applet at another station) once a second;
the cap of 60 an hour counts only the sends made while the operator cannot see the applet's window
(applet.in_view() is false), so an applet working in the background cannot flood the air and
an operator typing in a window in front of them is never capped. A send from an applet whose window is not
in view also puts a notice on the screen that names the applet, what it sent and where, as a change
of the station's settings does. The same rule covers a chat message, a mail, a message to the internet chat, a message
to the station's other operators and a MeshCore text (each text at most 255 bytes); a message looped back to
the applet itself, or sent to this station's own callsign, does not count. Markers are set at most four times
a second. An applet changes the radio at most four times a second, and only as the operator presses
something in its window. An applet may open the composer once every five seconds; may open another applet's window only while
its own is in view, once every two seconds, and all applets together once a second; may open a
station's card, the map, the friends list or one of the places of mlink.navigate, add a friend or
offer to log a contact on the same terms (only while its own window is in view, once every two seconds, and
counted with the opens in the one-a-second limit across all applets); may copy to the clipboard twice a second and
share by mail once every two seconds, only while its window is in view; may notify the operator once
every two seconds and 60 an hour, and all applets together 10 times a minute; and may have eight requests waiting for the station's answer, starting at most 20
a second. A send over the limit is not queued: the call gives nil, the reason and the code
"rate". These figures
are a first choice and may change.
E.14 Writing a game
Checkers shows the pattern for a game two stations play. Keep the rules in a file of their own that
neither draws nor reads the mouse, and name it in applet.rules: given a board and a move, it
says whether the move is legal and what the board becomes. Both stations run the same rules on the same
moves, so only the moves cross the air, packed with bits, in a room
(Section E.10.3): one operator invites the other and chooses
sides, the invitation says when the two copies' rules differ, and the receiving station plays each
move only when the move's number and its board agree; a station out of step gets the whole game from
the one that made the room and plays on from it.
For both ends to agree, the rules must give the same answer on every computer:
- Do not depend on the order of
pairs. Lua walks a table's named keys in an order that changes from one run to the next. Walk lists withipairs, or sort the keys first.mlink.hashdoes not depend on that order. - Random numbers from
math.randomstart the same on every run; give both ends the same seed withmath.randomseedand they draw the same numbers. - Keep the clock out of the rules.
- Whole numbers stay whole.
mlink.hashtells 1 from 1.0, as Lua does; a board that keeps counts as whole numbers on one side and as fractions on the other does not match.
Checkers' rules check themselves against the published counts of the positions after each of the first seven moves from the start, which is a good way to catch a mistake in any game's move rules.
Hamtillery shows the pattern for a game of up to six, and for a world much bigger than its moves.
Its hills are not sent as pixels, or even as heights, but as a description: one number the hills are
made from, and the circles the shots have blown out or piled up, from which every station draws the
same pixels. Even that goes on the air only to a station that joins late or falls out of step; a turn
is the shot itself, 17 bits. Its on-air formats are a file of their own, wire.lua, named
in applet.rules beside the rules, so that two copies that would read the air differently
are told so. For every station to draw the same crater, its rules use whole numbers
only: directions from a table written into the file, positions in 256ths of a pixel, exact whole square
roots, and a wind drawn from a counter both ends share. Its test plays a whole match from a script and
compares the result with a number written into the test, so that a change to the rules cannot pass
unnoticed. The notes at the top of its world.lua are worth reading before writing a game of
your own.
E.15 The applet's picture
An applet's icon is one line of text near the top of main.lua, so the client can show it
before the applet has ever run, and the repository's list can carry it to stations that have not
installed the applet. It is a small drawing on a grid of 64 by 64 units, each number written as one
character: 0 to 9 are 0 to 9, A to Z are 10 to 35,
a to z are 36 to 61, and + and / are 62 and 63. This is
the Chat's speech bubble:
applet.icon = "v1 #406080 #000 #f5f5f5 #808080 B01 R28Cui r14AEsg R1GiWm R2KiSm R1GmSq R1GqKu R3GOiS R3GWaa"
Read it word by word. v1 is the format. Each # word is a color, numbered
from 0 in the order written (up to 8). Every other word is a shape: a letter, the number of its color,
for an outline or a line its width, then its numbers. B01 fills the whole tile in color 0
and draws the client's black frame (color 1) round it. R28Cui is a filled rectangle in
color 2 from (8, 12) to (56, 44); r14AEsg its black outline, 4 units wide;
the next four words the tail, as small rectangles a pixel at a time; the last two the gray lines of text. Instead of a palette number, t
draws in the client's text color, for an icon drawn like a letter.
| Word | What it draws |
|---|---|
B color [frame] | The whole tile; with a second color, the client's one-pixel frame round it. |
R / r | A rectangle from one corner to the other: R color x0 y0 x1 y1. |
C / c | A circle: C color x y radius. |
E / e | An ellipse: E color x y half-width half-height. |
A | An arc: color width x y radius, then the angles it runs between, clockwise, in 64ths of a turn (0 right, 16 down, 32 left, 48 up). |
P / p | A polygon through its points, two numbers each; several lists separated by commas make one shape in which a list inside another is a hole. |
L | Lines through the points, with round ends: color width points. |
The client draws an icon at the size it shows it and keeps the picture, so the 16-pixel icon on the
taskbar is drawn for 16 pixels, not shrunk from a big one. A unit is a quarter of a pixel there: edges on
multiples of 4 are sharp, and a line one pixel wide is 4 units wide, centered on 2, 6, 10 and so on.
Round edges and slants are shaded, as smooth drawings are. An icon is at most 1,024 characters; the
other limits are in Section A.8. One the client cannot read
or refuses shows the letter tile, and Notepad says why on its line; the client refuses to pack such an
applet for the repository, and the repository refuses to take one. The icon tool,
applet_icon.py, checks an icon, draws it into a picture to look at, magnified, and turns a
simple drawing saved as SVG (straight lines, rectangles, circles, solid colors) into this format. It
needs Python 3. The Linux archives carry it next to the programs (./applet_icon.py), the
AppImage runs it as ./mLink-x86_64.AppImage --applet-icon, and on Windows and macOS it is in
mLink's source, in the tools folder.
E.16 Sharing an applet
An applet is its folder. To share one, give someone the folder; they put it in their applets folder and press "Look again" in the Applets window. To share it with every station, submit it to the project's repository with the "Submit" button on its row in the Applets window's Installed tab (Section 7.8.13). The client packs the folder into one file of at most 48 KiB, so that one mail carries it to any station, and refuses it with the reason if it breaks a rule: the folder's name is 2 to 27 lowercase letters, digits and dashes, starting with a letter; files sit at most three folders deep, with names of letters, digits, dots, dashes and underscores; at most 128 files and 2 MiB before packing. The folder of saved data is never sent. The project reads every submission before listing it; the first one listed makes the name yours, and a later submission of it from your callsign is its next version. Stations that installed it are offered the update.
Before you run an applet someone gave you, remember what it can do: it cannot reach your files or harm the client, but it can read what the station shows you and send within the limits above, under your callsign.
E.17 What to remember
- An applet is a folder with
main.lua;applet.drawdraws its whole window each time, and saving any of its files runs it again, keeping whatsavereturns. uiis the client's own controls,rlis raylib inside a canvas,mlinkis the station (its listed commands throughmlink.request, and messages to the same applet elsewhere throughapplet.send),fsis the applet's own data folder,util,geoandjsonhelp with data, andhelp(name)says what any call takes.- Messages to other stations carry only the applet's own bytes and a few of mLink's; pack them
with
bits, and useapplet.roomfor an invitation, moves in step and leaving. applet.statekeeps what the operator expects to find again, even after the client closes;applet.after,applet.everyandapplet.taskdo things later or in order.- An applet that must work with its window closed asks for
"background"inapplet.asks; the operator decides. Thenapplet.tick,applet.attention,applet.notify,applet.in_viewandapplet.openedare its way to count, tell and be opened. - Sound plays only on the speaker chosen for alerts, never anywhere else.
- A mistake stops only that applet, with the line it happened on; the limits on memory, time, files and sending keep any applet from harming the station.
- A game keeps its rules apart and free of chance and clock, and sends only its moves.
Coming from Winlink
F.1 What mLink is to a Winlink operator
mLink is an original project, not a clone of Winlink or of any modem. It aims to be a more efficient and homogenized alternative: one system that is the mail program, the modems and the gateway software together (Section 1.5). Winlink got the important things right, and mLink keeps them.
F.1.1 What stays the same
- Mail is the unit. A mail is addressed to a callsign, held in that callsign's mailbox on a server, and passed between radio and internet by gateway stations (Chapter 27).
- The forms. mLink ships the Winlink Standard Forms, unchanged and credited to the Winlink Development Team: ICS-213, Radiogram and about 150 others (Section 7.5.7).
- The station. An ordinary radio on USB or FM, a sound interface and a computer (Section 5.1). There is no hardware modem to buy.
- Internet email, in and out through the mailserver, where its operator has set that up (Section 27.5.5).
- Your Winlink contacts. Experimental today: an mLink station can send mail to Winlink addresses and receive mail from them, Winlink forms included.
F.1.2 What is different
The difference is in the radio half, and three ideas explain nearly all of it:
- Say only what is needed. What every station already knows, or can work out, is not sent: headers are a few bytes, a standard form is its filled-in text, and no one sets up a link first.
- Be robust from the first frame. The speed is chosen before sending and starts at the robust end, so a mail rarely has to be said twice.
- Let neighbors help. Stations hear each other's mail, so a lost link is repaired by a relay that was listening, not by the same two stations trying again.
F.1.3 Your Winlink habits, and what they become
| The habit | In Winlink | In mLink |
|---|---|---|
| Choosing a gateway | Picked from a list, by band, mode and modem | None to pick: any station with internet can be a gateway, and mail goes to the one heard most recently (Section F.3.5) |
| Before the mail | The modem connects, then B2F, Winlink's mail protocol, logs in with a password challenge | Nothing: the station already knows who hears it, and each mail carries its own short proof of its sender (Section F.3.1) |
| Turns for one mail | Seven, after the connection | One for a shortburst or a bulk transfer; one per piece for a longburst, at most four (Section F.3.2) |
| Speed | Adjusted frame by frame as answers come back | Chosen before sending, from what the station has heard; robust from the first frame |
| A lost frame | Wait, repeat, usually at a slower level | Only the missing frames go again (Section F.3.3) |
| The answers | Short control signals of the same modem | Frames of the announce modem, which decodes down to about −9 dB |
| Short traffic | The same session as any other mail | A shortburst on the announce modem (Section F.4.3) |
| Message header | About 240 bytes of text lines on every message | A few dozen bytes (Section F.4.1) |
| A standard form | Its content three times: in the body, as an attached form file and as an attached data file | The filled-in text only (Section F.4.2) |
| Checking for mail | A full session, even when the box is empty | Usually nothing is sent (Section F.3.4) |
| Peer-to-peer | A session of its own kind, opened to a station that is waiting for it | The ordinary case: mail for a station that has been heard goes straight to it (Section 26.4.3) |
| A path too weak for the mail | The same two stations keep trying on that path | A relay that hears both ends carries it, found automatically (Chapter 21) |
| No internet anywhere near | A separate radio-only network of chosen stations | Every station relays and carries mail toward one that has internet (Section 26.7) |
| Internet at your own station | A Telnet Winlink session, over the internet with no radio | Ask for the mail to go by internet: the station hands it to the mailserver and nothing is keyed (Section 26.4.1) |
| Stations at once | One pair per frequency; the rest wait | Four exchanges per passband on HF (Section F.2.3) |
| Packet, VARA FM and APRS on FM | A session to one gateway; APRS on a frequency of its own | FmLink: one shared frequency for mail, chat and position reports (Section F.6) |
| The programs | A mail program, a modem program or box, and gateway software | One system (Section 1.5) |
F.1.4 What you give up
- Raw speed on a strong path. Above about 15 dB PACTOR-4 and VARA deliver three to six thousand bits a second; an mLink bulk frame tops out at 1,348. For a large file on a good path, the other modems finish first (Section F.5.2). That is a choice, not a limit: denser signals would go faster and be heard by fewer stations, and every station that overhears a mail can carry it when the direct path fails.
- The established network. Winlink has a long-standing worldwide network of dedicated gateways, and PACTOR hardware has years of field use. Behind Winlink stands ARSFI, the Amateur Radio Safety Foundation, Inc., a nonprofit that serves emergency communications communities. mLink's network is only as dense as the stations on the air.
- Fading channels at low levels, and fast fading, until mLink's work there is done (Section F.5.1).
- Long lists of recipients. An mLink mail names at most 16 stations today (Section F.4.1).
- A finished product. mLink is a development preview and is still changing (Section 1.6).
F.2 What you gain: less time on the air
Modems are sold on bits per second. But what an operator wants to know about a mail is how long it takes from the first key-up until the other end says "got it", and whether it gets there at all. A modem twice as fast that spends half a minute setting up a link, and then repeats itself on a fading path, delivers a short mail later than a slower one that just sends it. So this appendix counts seconds of air time, and the bit rates come last.
F.2.1 One mail, in seconds
For one 600-byte mail, with mLink as the yardstick and signal levels in SNR@3k:
| Where the time goes | mLink | Winlink over VARA, +15 dB | Winlink over VARA, +5 dB |
|---|---|---|---|
| Finding and tuning to a gateway | None: already on the frequency | About 30 s | About 30 s |
| The modem's connection | None | About 8.2 s | About 8.2 s |
| Login, challenge, proposal and the other turns | None | At least 21.5 s | At least 21.5 s |
| Opening the transmission | 1.5 s | Counted in the turns | Counted in the turns |
| The header | About 15 bytes | About 200 bytes | About 200 bytes |
| The mail and its header on the air | 6.0 s | 4.2 s | 20.8 s |
| The reply, and the wait for it | 2.0 s | Counted in the turns | Counted in the turns |
| On the air | 9.5 s (1×) | At least 34 s (3.6×) | At least 51 s (5.3×) |
| With finding and tuning | 9.5 s (1×) | About 64 s (6.7×) | About 81 s (8.5×) |
| Share of the air time that is not the mail | 37 % | 91 % | 69 % |
Every layer adds its own cost: the modem sets up a link, B2F sets up a session over it, the header spells out in text what every station already knows, and the mail itself ends up the smallest part of the exchange. PACTOR changes direction faster than VARA, so its turns cost less; on a strong path, once connected, it comes out about level with mLink. But VARA is the mode on most of Winlink's HF gateway channels: 1,142 of 2,122 in its published list.
The same mail over each of the other modems, on the weaker path:
F.2.2 It depends on the traffic
The gap is not one number. Winlink's set-up and turns cost the same for every mail, so the shortest mail shows mostly that. The more of a mail is something both ends already know, the wider the gap gets, and nothing is more known in advance than a standard form.
| The mail | mLink | Winlink over VARA, +5 dB | How many times faster |
|---|---|---|---|
| A two-line note | 9.5 s | About 37 s | 3.9× |
| A 600-byte mail (the table above) | 9.5 s | At least 51 s | 5.3× |
| An ICS-213 form | 9.5 s | About 76 s | 8.0× |
All three fit in one mLink bulk frame, so mLink's time hardly moves. For Winlink the form costs twice the short note, because Express sends the filled-in form three times over.
F.2.3 A day of traffic on a crowded frequency
Costed both ways, a sample of real Winlink HF mail would take mLink 1.5 to 4.7 times less air time, depending on the modem and the signal level. This is an estimate from about 55 hours, 1,549 sessions, and it counts only mail that reached Winlink's servers: failed sessions and empty mail checks would add to Winlink's side.
Air time matters most where a frequency is shared. A Winlink session is the only conversation on its frequency, one way at a time, and every other station that wants the frequency waits for it to end. mLink's passband holds four exchanges at once, one on the bulk modem and one on each of the three announce channels (Section 19.1), each able to carry mail: up to about 1,735 bits a second at the frame, between four pairs of stations.
And Winlink's frequencies are crowded. From Winlink's own published list of gateways, and the same sample of traffic:
- The gateways share frequencies. Winlink's HF gateways list 535 distinct frequencies; 208 of them are listed by two or more gateways, and one by 29. In North America, 310 of 335 gateway frequencies have another gateway's within 3 kHz, close enough for their signals to overlap.
- The traffic bunches up. In about two and a quarter days of HF mail, 401 of the 1,834 messages with a known frequency, 22 percent, were on one 12 kHz stretch of 80 m, 3.585 to 3.597 MHz, and 47 percent were on 40 m. The busiest 12 kHz stretch of all is on 40 m: 7.096 to 7.108 MHz carried 29 percent.
mLink is built for a crowded frequency: it is meant to share one frequency among many stations at once, with nets, mail and chat going on together. A large simulation of exactly that is being run again for the current protocol, and its results will appear in Appendix C. It is the case a system of one session per frequency was not built for.
F.3 Step by step: a Winlink session and an mLink mail
F.3.1 No link to set up
A Winlink mail pays for set-up twice. First the modem connects: a call, an answer and a confirmation; a black-box test of VARA HF put that at about 8.2 seconds. Then B2F logs in over the link. For a session that sends one mail and has none waiting, Winlink's own documents describe these turns:
- The client sends its callsign and what its program can do.
- The gateway answers with a challenge, a random number.
- The client answers the challenge with the operator's password worked in, and proposes the mail.
- The gateway accepts it.
- The client sends the mail.
- The gateway says it has nothing for the client.
- The client says it is finished, and the modem takes the link down.
Four turns come before the first byte of mail, and only one of the seven carries mail. Before any of it, the operator picked a gateway from a list without knowing whether it would answer.
An mLink station just sends the mail; a mail of two bulk frames or more first asks the recipient, in one frame each way, whether it can take it now (Section 19.3). It already knows whether the addressee can hear it, directly or through a relay, from what it has heard while sitting on the frequency: the PRESENCE frame that opens every transmission, and the notes of who has been heard that stations add to transmissions they were making anyway (Section 20.8.1). There is no password challenge either: a station registers with the mailserver once, and from then on each mail carries a short tag that proves its sender (Section 27.3).
F.3.2 One reply per transmission
Every change of direction costs time whatever the modem's speed: one station drops out of transmit, the other radio settles, keys up and answers. In mLink the station sends, and the addressee answers once, with an ACK ("got it") or a dNAK ("here is what I am missing") (Section 18.4). How many times that happens depends on how the mail travels:
- A shortburst, up to 160 bytes on the announce modem: one transmission and one reply. A 257-character net check-in, compressed to about 115 bytes, is a shortburst of about 9.5 seconds.
- A longburst, 161 to 601 bytes on the announce modem: an ask and its answer, then two to four shortbursts, each with its own reply.
- A bulk transfer, on a link of +3 dB or better: one transmission and one reply for up to ten frames, and one more of each for every further ten; a transfer of two frames or more adds an ask and its answer, one announce frame each, in front. A mail of up to 601 bytes goes in one bulk frame: two key-ups and about 9.5 seconds, first key-up to ACK (Section 18.4.1).
The replies themselves go on the announce modem, which decodes far below the level bulk needs, so an mLink answer is rarely the part that gets lost.
Every answer is air time that carries no mail. The other modems pay for one in every cycle, all through the session. mLink pays once per transmission of up to ten frames, and once more for the ask in front of a mail of two frames or more, so the longer the mail, the smaller its share.
F.3.3 When a frame is lost
On a weak or fading path frames are lost, and then the number of turns matters most. Every Winlink turn is a frame that must arrive and an answer that must come back, and the session cannot move on until both have. When either is lost, the modem waits out its timer, sends again and waits again, and the whole session stands still. A lost answer costs as much as a lost frame: the frame had arrived, but the sender cannot know it, so it sends it again.
Count what must get through for one mail:
- Winlink: the modem's call, answer and confirmation, three transmissions, then a frame and its answer for each of the seven turns, fourteen more. That is at least seventeen, any one of which can stall the session.
- An mLink shortburst, or a mail in one bulk frame: two, the mail and the reply.
- An mLink bulk mail of two to ten frames: four. The ask and its answer, one frame each, go in front.
- An mLink longburst: ten at most, every one of them on the robust announce modem. It asks first as well, and adds a piece and a reply for each further 160 bytes.
On a path that loses one transmission in five, a turn that needs both its frame and its answer gets through the first time about two times in three. Seven turns then take about eleven tries on average, and the login is repeated exactly like the mail. (The counts and the arithmetic are ours, from the published exchanges.)
When mLink loses something:
- Frames missing: the dNAK names exactly which, and only those go again, on bulk at a rate one step more robust (Section 18.5). The same holds for a shortburst and for each piece of a longburst.
- A rate-1/2 bulk frame lost a second time: the path cannot carry even the most robust rate, so instead of grinding on, the sender asks the stations around it for a relay, and one that hears both ends carries the mail the rest of the way (Chapter 21).
- No reply at all after a shortburst: the sender tries again, up to three more times, each after a random wait and only when the channel is quiet (Section 18.6.2).
- No reply at all after a bulk transfer: the sender asks once, "did you get that?", with a short QSL probe; the addressee answers from what it holds, and the data is never sent again into silence (Section 18.6.3).
| Mode | The receiver | The sender |
|---|---|---|
| PACTOR | Answers every packet with a short control signal; repeating the last one asks for the packet again. | Sends the packet again one cycle later, 1.25 or 3.75 seconds; repeated losses bring a lower level. |
| VARA HF | Answers every frame with a short tone burst, yes or no. | After a no, falls one to four levels and sends the data again in smaller frames. |
| ARDOP | Answers every frame, yes or no, and keeps the parts of a damaged frame that passed their check. | Repeats the whole frame; with no answer, assumes it was lost and repeats. |
F.3.4 Checking for mail
A Winlink station checks for mail the way it sends it: a connection and a login, about five changes of direction and two set-ups, even to find the mailbox empty. An mLink station has two ways, both cheaper:
- Wait to be heard. Any gateway that hears the station's PRESENCE asks the mailserver for it. If nothing is waiting, nothing is sent; if mail is waiting, one short frame from each side starts an ordinary transfer (Section 26.9).
- Ask. One short query, answered even when there is no mail: about 2.7 seconds of frames in all (Section 26.9.3).
F.3.5 Every station with internet is a gateway
A Winlink gateway is a station set up for the job. In mLink any station with internet and the setting switched on is a gateway, and says so in every PRESENCE it sends (Section 26.6.1). A station sends its mail to the gateway it heard most recently, so the choice follows propagation by the minute, and every station with internet adds a way in.
F.4 Saying only what is needed
Anything every station already knows, or can work out from what it has heard, is not sent: who is talking, what kind of data follows, how a form is laid out, the common words of ham traffic. A Winlink session sends the same connection, the same login, the same turns and the same block of header lines for a hundred bytes as for a hundred kilobytes.
F.4.1 Headers
Every Winlink message starts with lines of plain text, a label and a value on each, and every line goes on the air. mLink packs the same facts into a few bytes, or leaves them out because the frames already say them:
| What it says | Winlink | Bytes | mLink | Bytes |
|---|---|---|---|---|
| Which message this is | Mid: a 12-character name | 19 | The 16-bit check the frames already carry (Section 18.2.2) | 0 |
| Who sent it | From: and Mbo:, the callsign twice | 27 | The PRESENCE that opens every transmission; a relayed mail adds one frame naming its author | 0 |
| Who it is for | To:, the callsign as text | 12 | A packed callsign | 6 |
| When it was sent | Date:, as text | 24 | Not in the mail | 0 |
| How long the body is | Body:, the number as text | 11 | A binary number | 2 |
| What kind of message, which character set, which encoding | Type:, Content-Type:, Content-Transfer-Encoding: | 94 | The kind byte | 1 |
| The subject | Subject: and the text | 11 + text | A length and the text | 1 + text |
| The layout itself | A blank line to end the header | 2 | Version, flags and counts | 4 |
| In all | about 200 + subject | 14 + subject |
Two things stand out:
- Winlink writes every fact as text. A body length that fits in two bytes goes as a label and its digits in text; a callsign that packs into six bytes goes as text, twice for the sender; the kind of message, its character set and its encoding take 94 bytes to say what every station could take for granted. About half of a typical header is labels, colons and line ends.
- Compression does not rescue it. B2F compresses the whole message, header included, but a compressor saves bytes by finding repeats, and a short block of different lines has few. Measured with Pat's own compressor, a header of about 240 bytes still takes about 210 on the air: compression saves about an eighth of it. mLink's header is small before compression ever starts.
We measured whole messages too: 2,297 real Winlink messages, from about two and a quarter days of traffic, rebuilt in the format Pat puts on the air and compressed with Pat's own code, against the same content written and compressed the mLink way. The messages' attached files are not counted here, so for form messages this is Winlink's best case:
- The whole message, as it goes on the air: a median of 370 bytes for Winlink against 195 for mLink: Winlink sends 1.9 times as many.
- Messages with a body of up to 300 bytes, 1,200 of the 2,297, about half: 225 bytes against 63: Winlink sends 3.6 times as many. In those, Winlink's header is most of what goes on the air.
A long list of recipients makes it worse. A hundred messages in the sample went to lists of 75 stations or more, up to 417. For most of them that is over a kilobyte of header, and up to 3.4 kilobytes, more than a whole typical message. An mLink mail names stations in six bytes each, and a message for everyone goes to a reserved "everyone" address, or to every member of a Virtual Net as a bulletin (Section 24.7.2), with no list at all.
A weekly word game played by Winlink mail shows it plainly. A bare guess is five letters, and it goes on the air as a message of about 200 bytes; the answer that comes back is a message of 580 to 1,070 bytes before compression. We saw 32 messages of this game in the 2,298 we opened, some of them over HF, each one a full Winlink session. The same five letters in mLink are a shortburst of about two seconds.
Every message pays for its header, so the gap is largest on short mail, which is about half of all messages. The sample is about 55 hours, Monday to Wednesday and early Sunday; its quietest hours, overnight, had smaller messages than the busy mid-morning and afternoon, and the other days of the week are not in it, so the figures will shift as more days are added.
F.4.2 Standard forms
An ICS-213 or any other standard form is mostly the form itself: its layout,
its labels and its instructions. Both ends already hold it: Winlink Express
downloads the standard form set to every station, so each side knows exactly
what the form looks like. Express still sends the filled-in
form three times: as text in the body of the mail, again in an attached form
file, and a third time in an attached data file (FormData.txt).
The attached files tell the receiving program which form to show.
- In the traffic we sampled, 408 of the 2,242 messages whose list of attached files was recorded, 18 percent, carried a form's
attached files: an Express form file or a
FormData.txt. - In the median form message the attached files were 4.2 kilobytes, about three quarters of the message. Pat's own compressor shrinks them to about 40 percent, so they still take about 1.6 kilobytes of air that mLink does not send.
- One of them, an ICS-213 of 4.4 kilobytes, was 3.3 kilobytes of attached files around 841 characters of filled-in text.
- mLink sends the filled-in text only, written out through the form's own text template (Section 7.5.7): that same ICS-213 goes on the air in about 530 bytes. The form itself never goes on the air.
F.4.3 Two modems for mail
mLink carries mail on two modems, and the station picks one for each message from its size and what it knows of the path (Section 17.5). For small messages it weighs air time against data rate, and the choice puts deliverability first, ahead of almost anything else:
- The announce modem carries short traffic on any path, and all mail of up to 601 bytes on a path too weak for bulk. Up to 160 bytes goes as a shortburst, 161 to 601 as a longburst, and both decode down to about −9 dB (Section 17.2). Every message of up to 100 bytes goes this way whatever the path, and so does one of up to 160 bytes unless the link is good and the bulk region free.
- The bulk modem carries larger mail on a link of +3 dB or better: 603 to 1,008 bytes in each 5.98-second frame, up to 64 frames (Section 17.4).
mLink compresses every message with a dictionary of common ham-traffic text that every station already holds, so a 257-character net check-in goes on the air as about 115 bytes (Section 23.5.2). Winlink compresses in B2F; PACTOR's own compression is often left off under Winlink. For ordinary text it is the bytes on the air, not the bits per second, that decide the time. The shipped dictionary is trained partly on real Winlink mail, on phrases that several different stations used.
F.5 Weak paths, fading and raw speed
Near the low point of the eleven-year sunspot cycle the higher bands close more often, traffic crowds onto the lower bands, and paths are weaker, noisier and longer-echoed (Section 3.6). That is the HF that mLink is built for: its weakest signals decode well below where the other modems were tested, it keeps a margin for fading, and it is tested on longer echoes. A mail too large for the announce modem on a path too weak for bulk is not ground out slowly on that path: mLink hands it to a relay that hears both ends, or to a gateway with a better path, and finds that station automatically (Chapter 21).
| The path | mLink | The other modems |
|---|---|---|
| Weakest, on steady noise | The announce frame decodes down to about −9 dB and carries mail of up to 601 bytes there. A rate-1/2 bulk frame decodes 98 times in 100 at −1.5 dB; bulk is sent from +3 dB for now, four and a half decibels in hand for fading. | The Winlink study stopped at 0 dB. No maker publishes where its slowest level stops decoding. |
| Long echoes | An echo of 7 ms, a path aimed nearly straight up on the lower bands: a rate-1/2 bulk frame decodes half the time at about +3.9 dB. | The Winlink study's longest echo is 2 ms. |
| Fading | Loses more than it should. Flutter of 10 Hz is followed by the announce frames and the slower bulk rates, at higher levels; faster flutter on long echoes is not yet. Both are being worked on (Table A.17). | The Winlink study's standard good and poor channels (Figure F.4). |
F.5.1 Fading
Fading is where mLink has the most work left. On flutter of 10 Hz over a short echo the announce frames and the slower bulk rates get through, at far higher levels than steady noise needs, while the emergency modem and the fastest bulk rate mostly do not; the high-latitude paths, flutter of 10 to 30 Hz on echoes of 3 to 7 ms, still defeat every mLink modem (Table A.17 has the figures). Short mail still gets through on the paths it can follow, with repairs and retries.
F.5.2 Raw speed: the Winlink study's numbers beside mLink's
On a strong path the other modems are ahead. The Winlink study (Section F.7.2) reports that PACTOR-4 led over the realistic range of signal levels, that VARA came second above roughly 13 to 17 dB and PACTOR-3 below, and that ARDOP was far slower. The figures set those delivered rates beside what one mLink frame carries, on each of its two modems. They are different measures: the Winlink study's lines include every repeat and change of speed on large files, and mLink's are frames. Its noise is measured in 3 kHz, so its levels read as SNR@3k.
F.6 On FM: one shared frequency, like APRS, carrying mail
Winlink on FM is a session: a station connects to one gateway, over packet or VARA FM, and holds the frequency while everyone else waits. FmLink, mLink on FM (Chapter 34), shares a frequency the way an APRS frequency is shared: everyone on one channel, short transmissions, every station in range hearing every one.
It is not APRS and sends no AX.25 packets. It carries mail and chat, every message is acknowledged and only what is missing goes again, and a station that overheard a message carries it on only when the direct path failed (Chapter 21), where an APRS digipeater repeats every packet. It does have an APRS function of its own: position reports and map objects, on mLink's own frames, that every listener's map shows (Section 30.2).
F.6.1 One frequency, twenty messages
Picture twenty stations each sending one message through the same gateway, as on a weekly check-in net. Over VARA FM each session spends about 20 seconds on the connection and the six turns of B2F, whatever the speed. FmLink has no session: more than two messages in five fit one short transmission of the control signal, more than half go on the control signal in one transmission or two, larger ones go on the OFDM signal, and every station in range hears each one.
Over all 1,476 of the sample's 2,297 opened messages that went through VHF and UHF gateways, counting the time transmitters are on at both ends. FmLink's receiving station picks the fastest of its three OFDM speeds that the path allows, so a good path is FmLink at its fastest against VARA FM at its fastest level, and a weak path holds each to a slower one:
- One message per session, as in the figure: on a good path FmLink needs 4.7 times less air than VARA FM, and on a weak path, FmLink at its most robust speed against VARA FM at its slower levels, 3.9 to 4.9 times less. Even FmLink's most robust speed against VARA FM's fastest level, the pairing that favors VARA FM most, needs 3.6 times less.
- With the sessions as the Winlink listing shows them, nearly half of these messages sharing a session and its set-up with others: 3.5 times less on a good path, 2.9 to 4.1 times on a weak one, and 2.7 times for FmLink's most robust speed against VARA FM's fastest level.
- The median message takes FmLink 3.3 seconds at any speed, and VARA FM 23.4 at every level. VARA FM's time moves in steps, so its mean is the steadier figure: 22.7 seconds at its fastest level and 24.1 to 30.9 at the slower ones, against a mean of 4.8 for FmLink at its fastest speed and 6.3 at its most robust.
- VARA FM at its fastest level is faster than FmLink at its fastest on 16 messages, 1.1 percent, all of them messages of 18 kB or more with attached files. Against FmLink's most robust speed it is faster on 34, 2.3 percent, all but one with attached files, from about 5 kB.
- The frequencies are shared: in Winlink's own gateway list, 49 percent of VARA FM gateway channels have another gateway on the same frequency within 50 km, and 44 percent sit on just eight frequencies.
F.6.2 Faster at a weaker signal
On FM, signal-to-noise says little, so levels are measured from the receiving radio's own limit: the weakest signal at which it still decodes FmLink's control signal, its most robust, and so the edge of everyone who can hear a station. Every decibel a faster speed needs above that limit shrinks the area that can still hear it, the scale along the top. FmLink's OFDM signal stops at 8PSK 5/6 (eight phases, three bits a symbol) above QPSK 1/2 and 5/6 by choice: denser signals would go faster and be overheard by fewer stations, and every station that overhears a mail can carry it when the direct path fails.
QPSK 1/2 reaches about as far as the control signal, so why keep both? Air time. An OFDM frame takes 2.8 seconds and carries about 600 bytes; its reach comes from that long code. The control signal reaches as far with a short code, in blocks of 0.28 seconds that hold up to three 11-byte frames. Most of what goes on the air is short: the PRESENCE that opens a transmission, an acknowledgment, the ask and answer before a long send each fit one block, decoded as soon as it ends, and a short message takes a few. Every station hears the control signal, a slow handheld included. OFDM is for anything big.
F.7 How this was measured
F.7.1 Where the figures come from
- mLink's HF figures are from simulation of the modems and protocol as they stand today. They are not on-air comparisons. Its FM figures are from the bench described in Section F.6.
- The other modems' figures are from the Winlink study below, from makers' published tables, or derived from them; derived figures say so.
- Winlink traffic is a sample of real messages from the public viewer: 2,099 HF and about 3,300 VHF and UHF listings in two windows, 9 November 03:33 to 11 November 00:25 UTC and 15 November 02:29 to 12:41 UTC, about 55 hours in all. Of them 2,298 messages were opened in full; 2,297 could be rebuilt as they go on the air, and 2,242 have their list of attached files recorded. The sample is growing; the figures in this appendix are aggregates of it and will be refreshed as the sample grows. Estimates are marked.
F.7.2 About the Winlink study
The other modems' figures come from the one published test that puts all three on the same simulated paths, referred to here as the Winlink study: A comparison of Winlink digital mode performance based on simulation results using the Teensy IONOS Simulator, Take Three, by Tom Whiteside, N5TW, published on winlink.org in November 2020. It is not mLink's study, and it is used here as a yardstick, not as a like-for-like test:
- It tested whole Winlink sessions: B2F, with its own compression, over each modem, one pair of stations at a time.
- It sent files of 4 to 120 kilobytes, so the cost of setting up each session all but disappears from its figures. On a short mail that cost is most of the time.
- It stopped where mLink's weak-signal modes are just getting started (Table F.6).
mLink has worked on the air between real stations, chat and mail by bulk and announce frames on 40 meters, until the daytime band closed. The measurements that would compare it directly with these modems have not been rigorously made; its figures here come from simulation (Table A.17).
F.7.3 The other modems
| Mode | Signal | Width | Published rates |
|---|---|---|---|
| PACTOR-2 | Two differential-PSK tones, 100 baud | 500 Hz | 100 to 700, four levels |
| PACTOR-3 | Up to 18 tones, 100 baud, BPSK and QPSK | Up to 2.2 kHz | 77 to 2,722, six levels |
| PACTOR-4 | One carrier at 1,800 baud, from a spread signal up to 32-QAM | 2.4 kHz | 67 to 7,500, ten levels |
| VARA HF | FSK, then PSK and QAM on up to 59 carriers; closed source | 500 to 2,750 Hz | 18 to 7,050 at 2,300 Hz, 16 levels; the free version stops at 175 |
| ARDOP | FSK or PSK on one to eight carriers; openly published | 200 to 2,000 Hz | Up to 2,296 |
ARDOP's signal is published in full. SCS, PACTOR's maker, publishes speeds and an outline of each mode. VARA's author publishes no description; the Signal Identification Wiki tables its waveform, and xara, an independent open-source implementation, documents it.
F.8 Where to go next
- Set up a station: Chapter 5, then Chapter 6.
- Send and read mail, and fill in a form: Section 7.5.1 and Section 7.5.7.
- Follow one mail from station to station: Chapter 2; the full rules are in Chapter 26.
- Gateways, mailboxes and mail login: Chapter 27.
- How a neighbor carries your mail: Chapter 21.
- FM: Chapter 34.
- Running a net: Chapter 24.
- Why one system and not separate programs: Section 1.5.
- Every figure in one place: Appendix A.
WWV and WWVH: time and frequency by radio
G.1 Why the carrier is a reference
The stations WWV and WWVH belong to NIST, which holds the carriers on their nominal frequencies (5, 10 and 15 MHz, and others). For a radio amateur's purposes the carrier is exact. If your radio is in USB with its dial 1,000 Hz below the carrier, the carrier comes out of the speaker as a tone of 1,000 Hz plus whatever your radio is off by. That error is the number mLink cares about, because a radio that is too far off frequency cannot be decoded (Section 6.11, Section 15.11.2). The error is the tone's pitch minus 1,000 Hz, divided by the dial frequency in megahertz, in parts per million.
Skywave adds a small shift (Doppler) from the moving ionosphere. On the nights mLink's check was run, the line was about 0.1 Hz wide, which is small beside the 42 Hz that 1.5 ppm comes to at 28 MHz.
G.2 What the stations send
Everything below is from NIST's description of the broadcast and its Special Publication 432 (Section I.5).
G.2.1 The second ticks
Every second begins with a tick: 5 ms of 1,000 Hz from WWV, 1,200 Hz from WWVH. Around each tick there is a short silence, 10 ms before it and 25 ms after. Two ticks are left out in every minute, the 29th and the 59th, which tells a listener which second is which.
G.2.2 Minute and hour tones
The first second of each minute starts with an 800 ms tone at the tick's pitch instead of a tick. The first second of each hour carries 800 ms of 1,500 Hz, on both stations. Other tones, at 440 Hz once an hour and 500 or 600 Hz on a minute-by-minute schedule, and the spoken time announcements, carry no code. A listener sees them as noise where the code is looked for.
G.2.3 The 100 Hz time code
Under all of that, a 100 Hz subcarrier sends one symbol a second, 60 to a minute, the whole minute being one frame. The first 30 ms of each second are held back, so a pulse seen on the air starts 30 ms in. What counts is where it ends:
- a pulse that lasts to 200 ms is a 0;
- to 500 ms is a 1;
- to 800 ms is a position marker (NIST gives it as 770 ms of tone);
- second 0 of the minute carries no pulse at all: a hole, which marks the frame's start.
Markers come at seconds 9, 19, 29, 39, 49 and 59, so a receiver can find its place from the markers alone. The digits are binary-coded decimal (BCD), each with its least significant bit first, weights 1, 2, 4, 8.
| Field | Seconds |
|---|---|
| Year, units digit | 4–7 |
| Minutes, units | 10–13 |
| Minutes, tens | 15–17 |
| Hours, units | 20–23 |
| Hours, tens | 25–26 |
| Day of year, units | 30–33 |
| Day of year, tens | 35–38 |
| Day of year, hundreds | 40–41 |
| UT1 sign (a 1 is plus) | 50 |
| Year, tens digit | 51–54 |
| UT1 correction, in tenths of a second (weights 0.1, 0.2, 0.4) | 56–58 |
| Daylight-saving flags | 2 and 55 |
| Leap-second warning | 3 |
UT1 is the small correction, under a second, that takes the broadcast time to the earth's actual rotation.
G.2.4 A worked frame
This frame was decoded by mLink's check at 07:28 UTC on 20 November 2026, day 324 of the year. Each group of ten is ten seconds, starting at second 0; the dash is the hole and M a marker:
-00001100M 000100100M 111000000M 001000100M 110000000M 001000100M
| Field | Seconds | Bits | Value |
|---|---|---|---|
| Year, units | 4–7 | 0 1 1 0 | 2 + 4 = 6 |
| Minutes, units | 10–13 | 0 0 0 1 | 8 |
| Minutes, tens | 15–17 | 0 1 0 | 2, so minute 28 |
| Hours, units | 20–23 | 1 1 1 0 | 1 + 2 + 4 = 7 |
| Hours, tens | 25–26 | 0 0 | 0, so hour 07 |
| Day, units | 30–33 | 0 0 1 0 | 4 |
| Day, tens | 35–38 | 0 1 0 0 | 2 |
| Day, hundreds | 40–41 | 1 1 | 1 + 2 = 3, so day 324 |
| UT1 sign | 50 | 0 | minus |
| Year, tens | 51–54 | 0 1 0 0 | 2, so with the units, year 26 |
| UT1 correction | 56–58 | 1 0 0 | 0.1 s, so UT1 −0.1 s |
Day 324 of 2026 is 20 November, which is the date the frame was heard. The daylight-saving and leap-second bits are all 0.
G.2.5 No parity
The code has no check bits. What protects a reader is the structure: the markers must come where they should, every digit must be a valid decimal digit, and the minute must count up from one frame to the next. A listener who gets a frame that breaks those has not heard the time.
G.3 How mLink reads it
Set the radio to plain USB, with the dial 1,000 Hz below the carrier (9.999 MHz for the 10 MHz station). No AM mode is needed. The carrier becomes a 1,000 Hz tone, the 100 Hz code becomes two side tones at 900 and 1,100 Hz, and the ticks fall near 2,000 Hz. One setting and one recording therefore give both things at once: the carrier's pitch is the frequency error, and the ticks and code are the time.
The check works out the time as the single answer that best explains every second of the recording at once, and it says the time is confirmed only when that answer beats the next best one by a wide margin. It never trusts one second on its own, and when the signal fades out it gives no answer rather than a guess.
G.4 What the check measured
All of this is from one radio, an FTX-1 listened to on 20 November 2026 between 06:04 and 08:22 UTC, on 5 and 10 MHz (15 MHz was not tried, as it was night). Treat it as a record of what the check did that night, not as a rating of the method on other radios, bands or hours.
- Frequency. The radio's error ran between −0.055 and −0.076 ppm over the two hours, and runs a few minutes apart agreed to 0.003 ppm. A negative number means the radio's real receive frequency is above its dial. That is far inside the 1.5 ppm that Section 6.11 asks for.
- Time with no idea of the time. A confirmed, right time from any 62 s of recording. The broadcast itself needs 55 to 61 s: every bit of minute, hour, day and year has to be heard once, and they sit between seconds 4 and 58.
- Time with a clock to start from. With the computer's clock good to 2 s, 5 to 10 s of listening: the ticks place the second, and the markers and the two missing ticks say which second it is.
- Wrong answers. None in 18,544 decodes, cold and warm, on the recordings of that night.
The listening is not always easy. On 5 MHz the fades were deep, and in a few minutes a pulse appeared in a second the format leaves unused. The check does not let unused seconds decide the time.
G.5 The check in the station
The station runs the check on request, every hour, or at start (below; the screens are in Section 7.8.2). It holds the station in Transmit Inhibit from before the radio leaves its frequency until it is back, so nothing is transmitted on the time station's frequency; a request to lift the inhibit meanwhile waits for the radio to come back. It tries 10 MHz first and 5 MHz when 10 is not heard: a band with no ticks after 20 s is given up, or after 40 s when its carrier is there but its ticks are not, and no band is listened to for more than 90 s. It decodes what it has heard every 2 s and stops once the time is confirmed and it has listened at least 20 s (the carrier's error is a median over 10 s windows). The station's own clock is not used as a starting point, so a wrong clock cannot lead it to a wrong time; the year is: when the year's bits have not been heard yet, the year mLink was built is assumed (or the next one, for a time that would fall before the build), and the result says so. That is right for a version less than a year old. The difference to the station's clock is the time as heard: the path from Colorado or Hawaii, a few to about 20 ms, and the radio's own delay are not taken out. The sound card's own clock error, which the ticks measure, is taken out of the frequency error.
G.5.1 The station's clock
A confirmed time sets the station's clock. When the year came from the build and the station's own clock gives another year, the clock is not set until the operator has looked at the year. From then on the station counts its own time as being as good as a GPS receiver's: WWV is that accurate, and the few milliseconds of the radio path are far below what mLink's timing needs. That holds until the computer's clock is changed some other way: the station watches its calendar clock against its steady clock, and a jump of 0.4 s or more that mLink did not make (someone setting the clock, a laptop waking from sleep) ends it, as does any other setting of the station's clock. A restart forgets it.
G.5.2 The frequency correction
After the time, the check measures the carrier on each of WWV's 5, 10 and 15 MHz stations it has not measured yet: the radio settles for 1.2 s, then 5 s of audio give the carrier, and a band with no carrier by 6 s is passed over. Each carrier says how far the radio's dial reads above or below the real frequency there. A radio's error is mostly its reference oscillator, which grows in step with the frequency (so many parts per million), and sometimes a part that stays the same at every frequency, from an oscillator of its own further down the radio's chain. The points are fitted to a straight line that has both; with one point, or two less than 4 MHz apart, the line is the scaling part alone.
With CAT that can set and read the dial, the line is kept as a station setting, and from then on every dial mLink sets is moved by the error at that frequency, and every dial it reads has the error taken off. Everything else in the station, and the operator, sees the real frequency; Rig Control shows the radio's own dial beside it. An FT-857D 1.46 ppm high, sent to 28.085 MHz, has its dial set to 28.085.041. The radio goes back from the check through the new correction, so it lands on its real frequency at once. A correction past 10 ppm, or a constant part past 100 Hz, is a wrong measurement and is not kept. The operator is told when the error has a constant part of 10 Hz or more, when a point is 3 Hz or more off the line, when it is past 1.5 ppm, or when it changed by 1 ppm or more since the last check: a radio like that may need to be repaired or aligned. Without CAT, nothing is kept: the operator is told the error, to tune by.
G.5.3 The hourly correction
A radio's oscillator drifts as it warms. The check is offered once the radio has been on for 10 minutes (once a run, and not when a correction is already in force or the hourly check is on), and after a check that corrected the station, the operator may have it repeated every hour. The hourly check needs CAT and never asks the operator to tune; one that cannot tune does not run that hour. It measures one carrier (the one heard best last time), about 10 seconds off frequency, and moves the scaling part to fit it; when that carrier has moved 0.3 ppm or more, it measures the other two as well. While the checks agree (the correction moves less than 0.1 ppm), it checks less often: every 2 hours, then every 4 hours. A check that finds it moved brings it back to every hour, and so does losing CAT (the radio may have been switched off, and is cold again) or a restart. A check that is skipped or hears nothing tries again the next hour. It leaves only when the station is quiet: nothing of its own on the air, queued or waiting for an answer, nothing being received, no relay, net or emergency duty, and nothing heard from another station for 90 s, the longest another station's exchange with it waits. A station that is never quiet for 15 minutes skips that hour. Each station's hour moves by a fixed amount, up to 5 minutes either way, so stations that started together do not leave the frequency together, and coming back from it does not send the announcement a station makes after the operator's own inhibit. If a scheduled check cannot put the radio back, the operator is told at once, it keeps trying by CAT every 30 s, and the hourly check is turned off.
A station that stops in the middle of a check (a crash, a power cut, a reboot) finds out when it starts again how long it was stopped: on the same boot from the computer's time since boot, after a reboot from the clock, when the clock was set both before and after. It puts the radio back by CAT when the check was tuning by CAT, nobody had been asked to tune it back, it was stopped less than 10 minutes, and a fresh read of the dial finds the radio still on the WWV dial; it then tells the operator. It waits, with Transmit Inhibit held, while CAT is not yet answering or a Pi's clock is not yet set, for up to 10 minutes. Otherwise, or when the dial reads anywhere else, it asks the operator to tune it back, and no later restart writes to the radio for that check. A second such restart in a row, with no check finished between, turns the hourly check off.
G.5.4 When the stations heard say the clock is off
Every message with a time byte is a small time signal: it was stamped when it was first made ready for the air, a tick or two before it arrived (Section 23.3.1). The station compares the stamps of the last hour with its own clock, taking only first copies heard straight from their authors (a copy a relay carried is late by the carry). A first copy can still carry an old stamp: a retry whose first copy was missed, or a line set aside and aired later. Such a stamp reads behind, or ahead once it is more than about 8.5 minutes old, because the byte is read within half its window either way. So one stamp alone counts for nothing, and nor do lines set aside together and aired in one flush, which arrive seconds apart and all equally late. A station counts as agreeing with this station's clock when two of its stamps read within 10 s of it and no newer pair reads off. It counts as reading the clock off when two of its stamps read more than 30 s off, within a minute of each other, heard at least 2 minutes apart; such a pair also ends its agreement, and two fresh stamps that agree bring it back. A station that agrees keeps agreeing when its late lines arrive together. When at least three stations read the clock off the same way, within a minute of each other, and outnumber the stations that agree with it, the operator is told, for example "This station's clock looks about 4 min slow (KX1ABC, W7XYZ and N7DEF agree)." One station alone, a flush of late lines, or one late line never raises it; a clock that really is off is found within a few minutes of ordinary traffic from three stations.
A clock that reads earlier than the day this mLink was built is certainly wrong, whatever is heard; such a station already sends its messages with no time. It raises the notice by itself, with words that say so: "This station's clock reads 1970-01-01, earlier than the day this mLink was built (...), so it is wrong. Until it is set, its messages go out with no time."
The notice offers one thing: the WWV check. The station never starts that check by itself because of it: the check retunes the radio, so the operator decides when. FM has no WWV; there the notice offers to set the station's clock from the computer the client runs on, except when that computer is the station's own and has not checked internet time: setting the clock from itself would change nothing, so the window says the clock must be set on that computer. The notice does not stop the station transmitting. Once up, it stays while no fewer stations read the clock off than agree with it, so a net with as many each way does not raise it, and a notice that is up does not drop and come back as one more agreeing station is heard. It comes down when more stations agree than read it off, when the stamps that raised it are an hour old, when the station takes a time from a WWV check, or when the operator sets the clock: every WWV time the station takes and every set the operator makes, however small, starts the comparison again (a WWV time the station refuses leaves the clock as it was, and the notice stands), and so does any other change of the clock by a tick, 4 s, or more. A restart forgets the stamps.
One byte tells the time only within its 17-minute window. A clock off by more than about 8.5 minutes shows the wrong amount, and one off by close to a whole number of windows (17, 34, 51 minutes, ...) reads as right, so the notice does not show it at all; the WWV check finds the full time. The three stations, the 10 s, the 30 s and the 2 minutes are first values.
G.5.5 At start, without a time source
A Raspberry Pi has no battery clock, and away from the internet it may start with no idea of the time. When the operator has said yes to it once, a station that starts with no reliable time source runs the check by itself. It waits 90 s first, the time network time takes to arrive on a Pi; a station that then has network time, the mail server, a declared clock or a time set from a client that had checked internet time does not need it. It waits up to another minute for CAT, and tells the operator if there is none. It takes the time only: the radio is cold, so the correction waits for the warm-up offer. A check that hears nothing tries once more 30 minutes later.
For recordings, the same check is also a standalone program, mlink_wwv. It is receive-only: it
never transmits. It listens to a
sound card, or reads a recording. With a CAT port and a rig file
(Appendix D) it also sets the dial and mode
itself and puts both back at the end. It is run like this:
mlink_wwv --device plughw:CARD=CODEC --rf-mhz 10 --secs 240 [--cat DEV --rig rigs/FTX-1.ini] [--grid DM33] mlink_wwv --file recording.wav [--rf-mhz 10] [--start-unix N] [--grid DM33] [--from S] [--secs L]
The first listens live for 240 s on a 10 MHz station; the second
reads a recording. --grid gives your grid square, so the check can allow
for the radio path's delay. --progress S decodes what has been
heard every S seconds and says when the time is first confirmed. A prior
(--prior-unix with --prior-pm) tells it what time you already
believe, and how far off that may be. The last line of the output is the
answer in a form a script can read.
G.6 What to remember
- WWV's and WWVH's carriers are exact, so a radio in USB 1,000 Hz below one hears a tone whose offset from 1,000 Hz is the radio's error (Section 6.11).
- The same recording carries the time: ticks every second, and a 100 Hz code, one symbol a second, a minute to a frame, with markers, a hole at second 0 and no parity.
- On one radio, the check gave a confirmed time from any 62 s and was never wrong in 18,544 decodes.
- The check sets the station's clock, which then counts as being as good as GPS until the computer's clock is changed some other way.
- With CAT, the carriers on 5, 10 and 15 MHz give a correction that mLink keeps and puts on every dial it sets; the operator sees both the real frequency and the radio's own dial, and may have it checked every hour.
Glossary
Every underlined term in this manual links here. Each entry lists the chapters that use it.
- ACK (acknowledgment)
- The one-frame reply saying a message arrived complete and checked. It is a PRESENCE of its own kind, so it names the replier, and it echoes the message identifier so the sender cannot mistake another exchange's ACK for its own.Used in: Chapter 2, Chapter 16, Chapter 18
- ADIF (Amateur Data Interchange Format)
- The standard file format for exchanging contact logs between logging programs. The client's QSO Log exports and imports it.Used in: Chapter 7
- AGC (automatic gain control)
- The receiver circuit that turns its gain down under a strong signal and back up afterwards. A slow AGC leaves the noise low for a while after a strong signal, and weak frames right behind it can be missed.Used in: Chapter 4
- ALC (automatic level control)
- The circuit in a transmitter that turns the drive down when the audio would push the output past its limit. Acting on a data signal it squeezes the peaks and spreads the signal outside its region, so mLink's drive is set just below where it acts.Used in: Chapter 4, Chapter 6
- alternate (Virtual Net)
- One of up to three members the owner of a Virtual Net has ranked to stand in for it. When net control goes quiet the alternates claim the seat first, in rank order, three seconds apart, ahead of every other member.Used in: Chapter 24
- announce channel
- One of the three independent QPSK channels inside the announce region, centered at 550, 900 and 1,250 Hz and numbered 0, 1 and 2. Three stations can use the three at the same moment.Used in: Chapter 10
- announce frame
- The one small frame format of the announce channels and the bulk-control channel: eleven bytes (a type byte and ten data bytes) in a 23-byte polar codeword (the frame, a 3-byte check and 9 parity bytes), sent as one QPSK frame of about 660 ms.Used in: Chapter 16, Chapter 24
- AppImage
- A Linux program packaged as a single executable file that runs without installation. mLink's AppImage holds the client, the station daemon, the web bridge and the web client.Used in: Chapter 5
- applet
- One tool in the mLink client, opened in its own window from the Start menu: Messages, Stations, World Map, Waterfall and so on.Used in: Chapter 7
- APRS (Automatic Packet Reporting System)
- The long-established amateur system for sending positions that others plot on a map. mLink's position report frame follows the same idea on mLink's own announce band.Used in: Chapter 30, Appendix F
- area CQ
- A message addressed to a circle on the map rather than to a callsign. Everyone who hears it keeps it; stations whose grid square lies inside the circle are also alerted.Used in: Chapter 7, Chapter 30
- ARQ (automatic repeat request)
- Any scheme in which the receiver reports what it did or did not get and the sender repeats what is needed.Used in: Chapter 18
- ASK (the ask that names its message)
- The ask a station sends in place of the RTS when the addressee may hold the message already: its own mail that went out whole with no answer, or a message it carries for another station. It names the message, so the addressee can answer "I have it" with an ACK, "send these" with the frames it still lacks, or as to an RTS.Used in: Chapter 18
- audio backend
- The part of the daemon that talks to a particular sound system: ALSA or PipeWire on Linux, or null for no sound hardware.Used in: Chapter 5
- Any station whose operator has passed a heard emergency to the people who can respond and says so on the air by acknowledging it. It is not a setting or a special kind of station. The acknowledgment stops the caller's beacon and tells other stations the incident is handled.Used in: Chapter 25
- AX.25
- The amateur packet-radio protocol. On VHF and UHF FM it is usually sent at 1,200 baud as two audio tones; APRS runs on it.Used in: Appendix F
- B2F
- Winlink's mail transfer protocol: the conversation two stations have, once their modems are linked, to offer, accept, send and close messages.Used in: Appendix F
- backhaul
- Carrying a message from one cluster member to another over the cluster link, so it can be delivered on the second member's band.
- band
- An amateur frequency range such as 40 meters or 20 meters. A band contains mLink channels.Used in: Chapter 10
- BCD (binary-coded decimal)
- A way of writing a number in which each four bits hold one decimal digit, so two digits fit in one byte. Icom radios send frequencies this way.Used in: Appendix D, Appendix G
- beacon
- A transmission that is only a PRESENCE frame (plus, for the periodic beacon, up to three HELLO frames): "this is me, here". A converged station beacons only after 10 to 60 minutes of its own silence.Used in: Chapter 7, Chapter 16, Chapter 20
- belief propagation
- The LDPC decoding method: bits and checks repeatedly exchange opinions along the Tanner graph until every check is satisfied or a round limit is reached (15 in mLink).Used in: Chapter 11
- bulk frame
- One LDPC codeword sent on the bulk modem: a sync preamble symbol plus 203 data symbols, 71,808 samples or 5.98 s long at every code rate.Used in: Chapter 14
- bulk transfer
- A transfer carried in the bulk region as one or more OFDM frames of 5.98 s each, opened by [presence][opener]. The station uses it for messages above about 100 bytes when its estimate of the path is +6 dB SNR@3k or better.Used in: Chapter 2, Chapter 17
- bulk-control channel
- A fourth QPSK channel, at 2,200 Hz in the middle of the bulk region, that carries only the short control frames of a bulk exchange: its opener, its replies and the openers of repair or follow-on bursts. It is keyed only while no OFDM burst is using the region.Used in: Chapter 10, Chapter 19
- bulletin (Virtual Net)
- Text of up to 200 characters that net control sends to every member, followed by a receipt roll to find out who has it and one re-send for those who do not. A member's bulletin is taken up and sent by net control.Used in: Chapter 24
- bystander
- A station that hears a Virtual Net but is not a member of it. It sends nothing for the net, keeps its routine traffic off the announce channel a roll call is using, and lets the net's members answer first when help is asked for.Used in: Chapter 24
- callsign packing
- Writing a callsign as a nine-character base-39 number (space, digits, letters, '/' and '-') stored in six bytes, the same idea the FT8 family uses. Portable and SSID suffixes are kept.Used in: Chapter 16
- capture effect
- An FM receiver locks onto the strongest signal on the channel and hears nothing of the weaker ones. Two stations on one FM channel therefore cannot be heard at the same time.Used in: Chapter 34
- capture ring
- The receiver's continuous recording of incoming audio: 524,288 samples, about 43.7 seconds at 12,000 samples per second. The newest audio overwrites the oldest, and every sample is addressed by an ever-increasing position so detections and frames share one timeline.Used in: Chapter 15
- carrier (OFDM)
- One of the tones that together make up an OFDM signal. In mLink's bulk modem the carriers are 46.875 Hz apart and each carries one QPSK point per symbol, or a known pilot value.Used in: Chapter 14
- CAT (computer aided transceiver)
- Control of a radio from a computer over a serial or USB cable: keying, frequency and mode.Used in: Chapter 5, Chapter 15, Chapter 31, Chapter 34
- CFAR (constant false alarm rate)
- A detection threshold that moves with the noise instead of being fixed: the bar is set from recently seen noise-only scores, so noise alone clears it about equally rarely however loud the band gets. mLink sets it at five times the estimated noise spread for emergency and four times for announce.Used in: Chapter 15
- channel
- One mLink operating frequency inside a band: the dial frequency everyone in a conversation tunes to. A channel's audio passband is divided into regions. (The three announce channels inside the announce region are the one exception to this meaning.)Used in: Chapter 10
- channel estimate
- The receiver's measurement of how the path changed each carrier's strength and phase, taken from the pilots: either carrier by carrier across time or symbol by symbol across the carriers, whichever explains the frame's data best.Used in: Chapter 14
- channel mixer
- The program at the center of the simulated air. Each round it collects every station's transmit audio and builds a separate receive mix for each listener, applying path gains, noise, fades and band-wide interference.Used in: Chapter 35
- channel-access profile
- The setting that decides what signals a station puts on the channel and how stations share it: the HF layout of regions, or FmLink on FM. Everything above the signal stays the same.Used in: Chapter 34
- chat
- Short live lines typed to a station or to a net, as on IRC. A chat message is a kind of message; it is not mail.Used in: the Preface
- check-in
- A member's answer in a roll call: one announce frame sent alone, carrying the sender's callsign, its member number, how many slots come after it, status marks such as 'has traffic' or 'needs help', and the number of another member it heard. It is not acknowledged. A check-in marked as the last one is also how a member leaves the net.Used in: Chapter 24
- checkpoint (CKPT)
- The addressee's reply after each segment except the last of a long transfer: either everything so far arrived, or a map of the frames that did not, plus how many frames it has been told about.Used in: Chapter 18
- CI-V
- Icom's control protocol: binary messages that start FE FE, then the radio's address byte, and end FD.Used in: Appendix D
- client
- The program an operator looks at. It sends commands to a station daemon and shows live updates from it over a local network connection, but never transmits or stores traffic itself. The reference client runs on the desktop or in a web browser.Used in: Chapter 1, Chapter 2, Chapter 5, Chapter 7
- cluster
- Several mLink station daemons, each with its own radio and band, sharing one callsign and acting as one station. Members share what they hear and can carry traffic between bands over the internet.Used in: Chapter 7, Chapter 33
- cluster journal
- Each cluster member's numbered, append-only log of what it has learned (stations heard, links, membership, station-wide settings, work outcomes). Only the owner writes its log; other members copy it by asking for entries after a number.
- cluster link
- The ordinary network connection (LAN or internet) between cluster members. It never involves the radio.
- cluster member
- One daemon in a cluster: a machine with one radio on one band and a short human label. A member is never a person.
- code rate
- The fraction of a codeword that is data rather than redundancy. mLink's bulk LDPC code runs at 1/2, 3/4 or 5/6.Used in: Chapter 6, Chapter 11, Chapter 17
- codeword
- One complete block of an error-correcting code: data plus redundancy. In mLink an emergency or announce frame's polar codeword is 23 bytes on the air; an LDPC codeword is 9,720 bits.Used in: Chapter 11
- coherence test
- The check the first frame of a bulk burst must pass: how closely the received stretch matches the preamble's shape, ignoring loudness, on a 0-to-1 scale. A real preamble scores about 0.997; mLink requires at least 0.70.
- command envelope
- The fixed outer shape of every client command: the command name, the session number, an optional request number that the answer echoes, and the command's own parameters.
- compression dictionary
- A block of typical content built into every station in advance, which lets the compressor shrink even short messages well. mLink has one, of 8 KiB, made from ordinary amateur message traffic and tried for text, mail, net bulletins and standing orders.Used in: Chapter 23
- congestion collapse
- What happens to a shared channel when stations resend on a timer: late answers are taken for lost ones, the resends make every answer later still, and the channel fills with copies of messages that were already on their way.Used in: Chapter 22
- constellation
- The set of points (amplitude and phase combinations) a modulation may send, plotted on a plane. QPSK's constellation has four points, one per quadrant.Used in: Chapter 3
- contact horizon
- Two and a half times a station's current beacon interval (25 minutes on a small net, up to 150 on a busy one): how long it may take to hear a quiet station again, with margin. Promises to act "on next contact" last at least this long.Used in: Chapter 20, Chapter 22
- convergence
- A station's start-up process: twenty seconds of listening, then ordinary beacons about every 90 seconds if nobody has been heard, ending the moment it decodes any other station. It decides only when the station sends beacons, never what it can receive.Used in: Chapter 20
- courier
- A station that is not a gateway, heard a pickup broadcast and holds the mail until it can hand it to a gateway, or straight to its only recipient. Couriers transmit nothing until they act.Used in: Chapter 24, Chapter 26
- coverage map
- A record of which functions each test scenario executed, built by running the suite with coverage counting. It lets a change select only the scenarios that ran the functions it touched.
- CRC (cyclic redundancy check)
- A short check value computed from data by fixed rules; the receiver recomputes it, and a mismatch means the data is wrong. Announce and emergency frames each carry a 24-bit CRC inside their polar codeword.Used in: Chapter 11
- cross-symbol interleaver
- The bulk modem's bit shuffle: the codeword is written into a 48-row by 203-column grid and each OFDM symbol sends one column, rotated one data carrier further per symbol, so a symbol lost to a fade or a carrier lost to a filter becomes errors scattered across the whole codeword.Used in: Chapter 14
- CTS (clear to send)
- The addressee's one-frame answer to an RTS: go (the count asked for), or a count of 0 meaning not now, or too weak for bulk. A CTS that grants makes the stations around the addressee, including those the sender cannot hear, keep off for the whole transmission it grants and the reply after it.Used in: Chapter 2, Chapter 16, Chapter 18, Chapter 19, Appendix B
- custody (of a mail)
- Responsibility for a mail. A gateway takes custody only after the mailserver has confirmed storing the mail, and says so with one TAKEN frame; from then on the sender's station can stop worrying about it.Used in: Chapter 26
- cyclic prefix (CP)
- A copy of the end of each OFDM symbol placed in front of it. Echoes of the previous symbol land in the prefix, which the receiver discards. In mLink's bulk modem it is 96 samples, 8.00 ms.
- dARQ
- mLink's selective ARQ: the receiver keeps what it got and names what is missing in a dNAK; the sender packs only the missing bytes into new frames, starting again at the most robust rate. Bulk data is never sent again into silence.Used in: Chapter 2, Chapter 18
- data mode
- A radio's operating mode meant for sound-card data, labeled DATA-U, USB-D, PKT or USB-DATA depending on the maker. It takes audio from the rear or USB input; on many radios its filters are narrower than plain USB's.Used in: Chapter 6
- datum (search and rescue)
- The reference point a search starts from, usually the subject's last known position.Used in: Chapter 7, Chapter 30
- dBFS (decibels relative to full scale)
- A sound level measured against the largest sample a sound card can carry: 0 dBFS is full scale and quieter audio reads below zero. mLink's average reading puts a steady full-scale tone at 0 dBFS.Used in: Chapter 5
- dead reckoning
- Estimating where something is now from its last known position, course, speed and the time since. The map shows it as a hollow circle joined to the last report by a dotted line.Used in: Chapter 30
- decibel (dB)
- A logarithmic way of writing a power ratio: +3 dB is double, +10 dB is ten times, -10 dB is a tenth. Decibels add where ratios multiply.Used in: Chapter 3
- decoder worker
- A separate thread in the station that demodulates and error-corrects a completely recorded frame, so the heavy work never holds up listening. A station runs two.
- defer
- Staying off a part of the channel that another station has reserved, until the announced transfer (and the allowance for its reply) is over. mLink's name for what the 802.11 wireless standard calls the NAV (network allocation vector).Used in: Chapter 2, Chapter 7, Chapter 19
- deferred
- The outbox state of a message the station has set aside but not given up on: no relay found yet, a relay chosen but no confirmation yet, or a relay that reported failure. The station keeps it on disk and tries again when another station is heard.Used in: Chapter 2, Chapter 8, Chapter 21, Chapter 22
- deviation (FM)
- How far an FM transmitter swings its carrier away from the channel frequency for a given audio level. A radio's wide setting allows about 5 kHz at the peaks and its narrow setting about half; FmLink is built for wide.Used in: Chapter 34
- dNAK (selective negative acknowledgment)
- The BULK-family reply listing, as a 64-bit map, which frames of a transfer are missing, so the sender re-sends only those.Used in: Chapter 2, Chapter 16, Chapter 18
- dynamic-range guard
- A second detection bar tied to the loudness of all the received audio, not just one region's noise. It stops faint leakage from a very loud signal elsewhere in the passband from being mistaken for a frame.Used in: Chapter 15
- ECDH (elliptic-curve Diffie-Hellman)
- A key-agreement method: each side combines its own private key with the other side's public key, and both arrive at the same shared secret without ever sending it.Used in: Chapter 27
- emergency frame
- The unit of the emergency region: 11 bytes, a little over ten seconds of air. Every frame carries a two-byte header (frame number, frame count, drill flag, incident number); a distress call is 1 to 15 of them sent back to back.Used in: Chapter 25
- envelope byte
- The first byte of every mLink message. Its bits say how the rest was packed: compressed or not, which shared compression dictionary, whether it is text, and whether and how it is encrypted.Used in: Chapter 23
- equalizer
- The receiver step that undoes the path's effect on each carrier using the channel estimate. mLink multiplies each received point by the conjugate of the estimate, which turns it back by the path's phase and weights it by the carrier's strength in one step, so a carrier in a notch comes out small instead of having its noise amplified.Used in: Chapter 14
- event loop
- The daemon's central thread: it takes messages (a frame decoded, a timer tick, a send request) from one queue and handles them one at a time. Every decision about the air is made here.Used in: Chapter 31
- expected fail
- A test scenario written to show a known misbehavior before it is fixed. The test runner treats its failure as correct and flags it loudly if it ever passes unexpectedly.Used in: Chapter 35
- fading
- The rise and fall of a received signal as its echoes drift in and out of step, from fractions of a second to minutes. It can hit one part of the passband while sparing another.Used in: Chapter 3
- FEC (forward error correction)
- Adding computed redundancy to data before sending it so the receiver can find and fix errors without asking for a repeat.Used in: Chapter 11
- FFT (fast Fourier transform)
- A fast algorithm that turns a stretch of samples into the amplitude and phase of each frequency in it; the inverse FFT goes the other way. mLink's bulk modem uses a 256-point FFT at 12,000 samples per second.Used in: Chapter 14
- first-frame rule
- How long a station keeps overhearing a directed bulk transfer that is not for it and does not belong to a net it can hear: until about eight seconds after the opener. If nothing of the transfer has decoded by then, it stops overhearing and may use the announce channels, staying out of the bulk region and never calling the transfer's two stations. If the first frame did decode, it listens to the end and keeps a copy for relay.Used in: Chapter 19
- FM fast
- A flag in PRESENCE: the operator declares that the radio's audio path, a proper data port, can carry FmLink's OFDM signal. Large transfers on FM go only between two such stations.Used in: Chapter 34
- FM slow
- The FM slow class: a station keyed by VOX on FM is slow to key (it sends a leader tone before every transmission and lines up behind fast stations for beacons) and slow to hear. A station whose radio's rig file says its squelch opens late is slow to hear only. Other stations add a leader to the transmissions addressed to a station that is slow to hear, and to no others.Used in: Chapter 34
- FmLink
- mLink on an FM voice channel: the same frames, mail, chat and relays, with one signal on the channel at a time instead of the HF regions. A setting switches a station between it and HF.Used in: Chapter 34, Appendix F
- frame chain
- The frames of one transmission in the order they go out, written in brackets, such as [presence][opener][bulk 0].Used in: Chapter 16
- frame family
- A group of related announce frames sharing the high half of the type byte, such as PRESENCE (0x0), RELAY (0x1) or BULK (0x2).Used in: Chapter 16
- freshness window
- How long, 1.36 s (two frame spacings), a PRESENCE binding stays valid on its channel after the last frame that kept the chain going. An opener arriving later than this is dropped.Used in: Chapter 16
- frozen bit
- A position in a polar code that always carries 0 and that the receiver knows in advance; it carries no data but makes the reliable positions easier to read.Used in: Chapter 11
- FSK (frequency-shift keying)
- Sending data by choosing which of a set of tones to transmit. RTTY uses two tones; mLink's emergency modem uses eight.Used in: Chapter 12
- FX.25
- AX.25 with error-correction bytes added around each frame, so that a frame with a few wrong bits still arrives. A station that does not understand them still reads the plain AX.25 frame inside.Used in: Appendix F
- gateway
- A station, registered at a mailserver and in contact with it within the last ten minutes, that does mail work for other stations, under two settings: depositing the mail it overhears, and checking and serving mail for the stations it hears. Only the second shows the gateway flag in every PRESENCE it sends.Used in: Chapter 1, Chapter 5, Chapter 7, Chapter 25, Chapter 26, Chapter 27
- gateway flag
- The top bit of the 32-bit field every PRESENCE frame carries. A station sets it while it, or another member of its cluster, can reach the mail server over the internet.Used in: Chapter 16
- geopoll
- A single frame that asks "is anyone in this area?", carrying a circle (center and radius) and no callsign, sent with no PRESENCE in front. Stations whose configured grid square lies inside the circle answer.Used in: Chapter 7, Chapter 20, Chapter 30
- gpsd
- The standard Linux service that reads a GPS receiver and shares its fixes with programs over a local network connection. The mLink station daemon takes its GPS position from it.Used in: Chapter 5, Chapter 30
- Gray code
- An ordering of bit patterns in which neighbors differ in exactly one bit. Labeling a constellation this way means the commonest mistake, confusing a point with its neighbor, costs one wrong bit instead of two or more.Used in: Chapter 13
- guard band
- Empty spectrum left between two signals so one cannot spill into the other's receiver. mLink measures its guard bands from where each signal's energy actually stops, not from the allotment lines.Used in: Chapter 10
- half duplex
- Able to transmit or receive, but not both at once. An amateur transceiver hears nothing while it transmits, so stations must take turns.Used in: Chapter 3
- Hamlib
- An open-source library for controlling radios from a computer. Some of mLink's rig files are ported from what its source says about a radio, with no code copied.Used in: Appendix D
- heard list
- A station's record of every station it has decoded first-hand: callsign, grid, first and last heard, signal reports and the gateway flag. Only first-hand decodes create entries, and an entry is dropped after an hour of silence.Used in: Chapter 7, Chapter 20
- heard through
- A roster mark for a member that net control has not heard directly but listed or counted present on another member's word: a JOIN THROUGH, a number named in another member's check-in, or a roster handed over after a merge.Used in: Chapter 24
- heartbeat
- Net control's cycle frame for a Virtual Net, sent once a cycle (150 to 600 seconds, normally 300) on a free announce channel, like a beacon. One frame carries the net's name, type and cycle period, the term, the live member count, the roster edition, the highest member number, the first alternate, and whether net control is a stand-in.Used in: Chapter 24
- HELLO
- An announce frame meaning "I recently heard this station", with a strong or weak class, minutes since heard, SNR and that station's gateway flag. It rides only on transmissions that are happening anyway.Used in: Chapter 20, Chapter 24
- A station that the receiver of a transfer can hear but you cannot. Its openers reserve nothing at your station, so you may key over it; mLink partly covers this by reserving air when it hears the receiver's CTS before a long message, its dNAKs and its longburst ACKs.Used in: Chapter 19, Chapter 24
- HMAC (hash-based message authentication code)
- A short code computed from a message and a secret key. Anyone holding the key can check the code; nobody without it can produce a valid one. It proves who made the message without hiding anything.Used in: Chapter 27
- hold-off (emergency rebroadcast)
- The wait, at least 5 seconds and different for each station, before a station that heard an SOS rebroadcasts it in the announce region. Slots are spaced so a later station can hear an earlier rebroadcast and drop its own.Used in: Chapter 25
- hub (client)
- An applet that gathers several related views under tabs in one window, such as Messages (mail folders and the composer) or Stations (heard list, QSO log, friends).Used in: Chapter 7
- I and Q (in-phase and quadrature)
- The two coordinates that describe a signal's amplitude and phase at each instant, as if the tone were an arrow on a circle. Receivers work with both to read phase-shift modulations.Used in: Chapter 3
- impairment
- Something the simulated air does to signals to imitate a real band: noise at a set SNR, a weak or one-way path, a fade, one lost frame, or interference such as carriers, static crashes, radar pulses or a voice signal.
- incident (emergency)
- One declared distress call. It is named on the air by a 7-bit incident number plus a 16-bit check value over its decoded content; together they let every station recognize repeats, rebroadcasts and acknowledgments of the same call.Used in: Chapter 25
- INET-REQ
- The announce frame an off-grid station sends to ask any station in earshot to fetch internet data for it. It carries the kind of data, a session number, a freshness hint and parameters such as a position.Used in: Chapter 29
- Inhibit switch
- A switch in the client's taskbar. Yellow "stop" hand: the station is inhibited: it receives everything and keys the radio for nothing, the operator's own distress call included (the client asks before lifting the inhibit to send one, and before switching it on while an emergency transmission of the operator's is going out). Its own traffic waits and goes when the inhibit is lifted. A clock taking turns with the hand: the station finishes an exchange first; a second click stops at once. Green thumbs up: transmitting is allowed. Every launch of mLink starts inhibited.Used in: Chapter 7
- integrity check (message check)
- The two-byte value (a 16-bit cyclic redundancy check) computed over the sender's callsign, the addressee's callsign and the message before compression. It is tested once, after the whole message is back together and unwrapped; a mismatch is never delivered or acknowledged. The same two bytes serve as the message's name on the air.Used in: Chapter 2, Chapter 16, Chapter 18, Chapter 23, Appendix B
- interleaver
- A fixed shuffle of the bits of a coded frame before transmission, undone by the receiver, so that bits next to each other on the air are far apart in the frame. It adds no redundancy and no air time.Used in: Chapter 11
- internet query
- A record that says a station wants a piece of internet data, such as the weather at a point, once or kept up to date, fetched either by the station itself or by asking over the air.Used in: Chapter 29
- internet source
- A description of one web service a station knows how to use: its address template, headers, which fields to extract, the data type and a refresh interval. A capability, not a request.Used in: Chapter 29
- ionosphere
- Layers of the upper atmosphere ionized by the sun that bend HF signals back to earth, making long-distance skip possible. Its behavior changes with time of day, season and the solar cycle.Used in: Chapter 3
- JSON (JavaScript object notation)
- A human-readable text format for structured data, made of named fields and lists. Every command, answer and event between client and daemon is a JSON object.Used in: Chapter 32
- kept partial
- The receiver's saved copy of an incomplete message: received bytes in place, holes where missing bytes belong. Repair bytes are written into the holes; it is discarded after 10 minutes without a repair.Used in: Chapter 18
- LDPC (low-density parity-check) code
- An error-correcting code defined by a large, sparse set of parity checks and decoded by passing soft beliefs between bits and checks. mLink's bulk frames each carry one 9,720-bit LDPC codeword.Used in: Chapter 2, Chapter 34
- linear stage
- A stage in the audio path, such as a gain or a filter, that treats a quiet signal and a loud one alike: each tone comes out turned up or down by a fixed amount, and nothing new is added. A stage that is not linear (clipping, ALC, AGC) changes the signal according to its level and makes tones that were never sent.Used in: Chapter 4
- link estimate
- A running average of the SNR at which a station has been heard, in which each new reading counts for 40 percent, so that one fade cannot flip the choice of how to send. It is good for five minutes, and a fresh report from the other station of how well it hears you is used in its place.Used in: Chapter 2, Chapter 15, Chapter 17, Chapter 20
- links map
- A station's second-hand picture of who hears whom, built from HELLO frames, relay OFFERs, overheard openers and relay RESULTs. It never creates heard-list entries; a row not refreshed for two hours is dropped.Used in: Chapter 7, Chapter 20, Chapter 24
- list decoding
- Decoding that keeps several candidate answers instead of committing to one at each step; mLink's polar decoder keeps eight and lets the CRC choose.Used in: Chapter 11
- LLR (log-likelihood ratio), soft bit
- A number saying which way a received bit leans and how strongly; in mLink a whole number from -127 to +127, positive meaning 0 and negative meaning 1, near zero meaning unsure.Used in: Chapter 11, Chapter 14
- logical air (frames air)
- A simulated air that decides from measured success rates whether each frame is found and decoded, instead of processing audio. It tests the protocol without the cost of the signal processing.
- longburst
- A message of 157 to 601 bytes to one station, sent as up to four shortbursts, one per transmission, each acknowledged before the next. Used only when the link is too weak for bulk; held to one bulk frame's worth of data.Used in: Chapter 2, Chapter 17
- longburst manifest
- The extra announce frame at the front of a longburst's first transmission, giving the whole message's length, its check and the number of pieces to expect.Used in: Chapter 17
- LoRa (long range)
- A spread-spectrum radio scheme for small, low-power data packets. MeshCore and Meshtastic boards use it, around 910 MHz in the Americas and 869 MHz in Europe in the MeshCore community's suggested settings.Used in: Chapter 7
- Lua
- A small programming language made to run inside other programs. mLink's applets are written in it (version 5.4).Used in: Appendix E
- MAC (medium access control)
- The layer of a radio network that decides who transmits when. In mLink it is the only part of the daemon that decides whether, when and on which channel a transmission goes out.Used in: Chapter 31
- Maidenhead grid locator
- The amateur-radio way of naming a place with letters and digits, such as DM43: two letters for a 20 by 10 degree field, two digits for a 2 by 1 degree square, and optional further pairs for finer squares. Every PRESENCE carries four characters of it.Used in: Chapter 5, Chapter 30
- A message with a subject and recipients that can carry anything: attachments, forms, map objects, internet data, long text. The mailserver can hold it for a recipient who is off the air.Used in: the Preface
- mail key lease
- The condition under which a cluster member holds the station's shared mail key: renewed by every authenticated contact with another member, discarded after seven days without one or on leaving the cluster.Used in: Chapter 33
- mailkey
- The 32-byte secret a registered station shares with the mailserver. Both ends work it out from public keys they have swapped; it is never transmitted. It keys the station's signed requests to the server and the sender tag on its mail.Used in: Chapter 27
- mailserver (CMS, central mail server)
- The radio-less mLink program on an internet host that keeps a mailbox for every base callsign, shared by all its SSIDs. Gateways deposit mail into it and fetch mail out of it for stations on the air; it also exchanges internet email and runs mailing lists and chat rooms.Used in: Chapter 1, Chapter 5, Chapter 7, Chapter 27
- matched filter
- A search that slides a copy of a known waveform along the received audio, multiplying and summing at each position. Noise mostly cancels; the known waveform piles up into a sharp peak, so it can be found even under a lot of noise.Used in: Chapter 15
- Mayday
- The international voice distress call, meaning immediate threat to life. In mLink it is the 'immediate' severity class.Used in: Chapter 25
- member number
- A Virtual Net member's position on the roster, from 1 to 127, handed out in joining order and never reused. It sets the member's slot in a roll call.Used in: Chapter 24
- members first
- While a Virtual Net is alive on the frequency, stations helping their own net's traffic (relay offers, couriers, mailbox answers) take the early half of the usual answer slots and everyone else the late half.Used in: Chapter 24
- message
- The umbrella word: anything an operator has put information into and sent out, such as a chat message, a mail, a bulletin to a net or a distress call. It never means only chat or only mail.Used in: the Preface
- message lifetime
- How long a station keeps working on a message it cannot deliver yet before it takes stock: 15 minutes or the contact horizon, whichever is longer. When it runs out, a deferred mail gets a new note and another lifetime, never a failure; a directed chat message is instead marked expired and not tried again.Used in: Chapter 22
- min-sum decoding
- A cheap approximation used in belief propagation: a check's reply takes the product of its other members' signs and the smallest of their confidences.Used in: Chapter 11
- mLink epoch
- The reference instant, 2020-04-20 00:00:00 UTC, from which every time sent on the air is counted, in most fields as whole seconds. Inside the station and toward clients, ordinary Unix time is used instead.Used in: Chapter 23, Appendix B
- multipath
- A signal arriving by several routes of different length, so the receiver hears it plus delayed echoes. On HF skywave the echoes typically trail by 0.5 to a few milliseconds, occasionally up to about 10 ms.Used in: Chapter 3
- NB8FSK (narrow-band 8-tone frequency-shift keying)
- mLink's emergency modem: one of eight tones 6.25 Hz apart between 303 and 347 Hz, 6.25 tones per second, 3 bits per tone. Slow and narrow so it can be decoded far below the noise.Used in: Chapter 12, Chapter 25
- net control
- The station that runs a Virtual Net: it sends the heartbeat once a cycle (normally every five minutes), keeps the roster, calls roll calls and sends bulletins. It carries no authority, and a member takes over if it goes quiet.Used in: Chapter 7, Chapter 24
- net tag
- Five bits folded from a Virtual Net's name, carried by most of the net's frames to say which net they belong to. It only narrows a frame down: no frame is acted on by the tag alone.Used in: Chapter 24
- noise reduction
- A receiver feature (DNR, NR) that keeps what sounds like a voice or a steady tone and turns down what sounds like hiss. A signal of many carriers sounds like hiss to it, so it is turned off for mLink.Used in: Chapter 4
- OFDM (orthogonal frequency division multiplexing)
- Sending data on many closely spaced carriers at once, each changing slowly, built and separated with one FFT per symbol. mLink's bulk modem is OFDM with 28 carriers (24 data, 4 pilots) between 1617 and 2883 Hz.Used in: Chapter 2, Chapter 14, Chapter 34, Appendix F
- OmniRig
- A Windows program that shares one radio between programs. Its public library of rig files, written by the amateur community, is the base format mLink's rig files use.Used in: Appendix D
- open pickup
- The mailserver rule that any registered station may list and fetch any station's mailbox, so any gateway can deliver anyone's mail. Only a reported delivery moves a mail on, and the server records which station reported it.Used in: Chapter 27
- opener
- The BULK-family frame (OPENER) that opens a bulk transfer: frame count, top code rate, addressee and message identifier. Hearing it also tells other stations how long the bulk region will be busy.Used in: Chapter 2, Chapter 15, Chapter 16, Chapter 17, Chapter 18, Chapter 21
- operator account
- A named person at a station, with a password, a role, an enabled switch and an optional tactical position. Accounts are station-wide across a cluster.Used in: Chapter 7, Chapter 9
- orthogonal (carriers)
- Signals that can be added together and later separated perfectly. OFDM carriers spaced exactly one over the FFT window length apart are orthogonal: each one reads as zero at every other carrier's frequency.Used in: Chapter 14
- outbox
- The station's durable record of everything it has been asked to send, one row per message, with a state the operator can watch, such as "Waiting its turn", "Delivered to" or "Waiting for a relay".Used in: Chapter 2, Chapter 8
- owner (Virtual Net)
- The station that opened a Virtual Net, or was handed it, or took it over. When a split heals, the owner's net continues and a stand-in hands back to it. The owner ranks the alternates and sets the cycle period and the net type, and may let another station run the net. It carries no authority beyond that.Used in: Chapter 24
- Pan-Pan
- The international voice urgency call: urgent, but no immediate threat to life. In mLink it is the 'urgent' severity class.Used in: Chapter 25
- parity bit
- An extra bit chosen so that a group of bits contains an even number of 1s; if one bit in the group flips, the count turns odd and the error shows.Used in: Chapter 11
- parity-check matrix (H)
- The table that defines an LDPC code: one row per check, one column per bit, with a 1 wherever a check includes a bit. A codeword is valid when every check sums to even.
- Part 97
- The part of the US FCC rules that governs the amateur radio service. Among other things it forbids messages encoded for the purpose of obscuring their meaning.Used in: Chapter 28
- passband
- The range of audio, roughly 0 to 3000 Hz, that an SSB rig turns into radio and back. Everything mLink sends is audio in this range.Used in: Chapter 3
- pausing the air
- Stopping the simulated air at an exact on-air moment so a test script can act there (submit a message, stop a station) and then resume, with the script's own delay costing no time on the air.Used in: Chapter 35
- payload kind
- The one-byte tag, just inside the envelope byte, that says what a message's content is (text, opaque data, mail, map overlay, certificate, internet response and so on), so the receiving station hands it to the right part of the station.Used in: Chapter 23, Chapter 30
- PBKDF2 (password-based key derivation function 2)
- A standard way of storing a password as a one-way fingerprint by mixing it with random salt and hashing it many times over. mLink uses 100,000 rounds of HMAC-SHA-256.Used in: Chapter 9
- pickup broadcast
- A mail sent to the all-stations address 0CQCQCQ while its recipients are real callsigns or outside addresses. It means "anyone who can, take this to the mailserver": any gateway that hears it deposits it, and any other station may carry it onward later.Used in: Chapter 26
- pilot carrier
- An OFDM carrier that sends a fixed, known value instead of data so the receiver can measure how the path changed that part of the spectrum. mLink's bulk modem has four in every symbol, seven carriers apart, each moving up one carrier per symbol (scattered pilots), so every carrier is a pilot once in seven symbols.Used in: Chapter 14
- POI (point of interest)
- A marker you place on the World Map, with a label, notes, group, symbol and optional expiry. The station stores POIs, so everyone connected to it sees them.Used in: Chapter 7
- polar code
- An error-correcting code built by mixing bits in pairs, over and over, until each position is either very reliable or nearly useless; data goes only on the reliable positions. mLink's announce and emergency frames use one: 11 bytes and a CRC (16 bits on announce frames, 24 on emergency frames) in 184 coded bits, decoded from soft bits.Used in: Chapter 11, Chapter 12, Chapter 13
- pop-up notice
- A short notice in the client that appears just above the taskbar and fades after a few seconds. Clicking dismisses it; a notice marked with a small arrow also opens the applet it concerns.Used in: Chapter 7
- posture (one person / separate passwords / organization)
- Which of three situations a station is in, worked out automatically: one person (no accounts and no technician or administrator password), separate passwords (no accounts, but such a password is set) or organization (one or more enabled accounts). The client words everything about access to match.Used in: Chapter 9
- preamble (sync)
- The known waveform at the start of every frame whose jobs are to say where the frame begins and to give its phase. Each region has its own: a chirp for emergency, twenty QPSK symbols for announce, a two-halved OFDM symbol for bulk.Used in: Chapter 13, Chapter 15
- PRESENCE
- The announce frame that opens every ordinary mLink transmission: the station's packed callsign, four flags about what it can do, and 28 bits whose meaning the frame's type byte names (a beacon's grid locator and operator bit, a whole acknowledgment, or the ask before a long message and its answer). A PRESENCE on its own is a beacon.Used in: Chapter 1, Chapter 16, Chapter 20, Chapter 24, Chapter 25, Chapter 29, Chapter 30
- PTT (push to talk)
- The line or command that switches a transceiver from receive to transmit. mLink can key a radio by CAT command, by a serial-port control line, or by VOX.Used in: Chapter 3, Chapter 5, Chapter 16
- QPSK (quadrature phase-shift keying)
- Sending two bits per symbol by setting a tone to one of four phases a quarter-turn apart. mLink's announce modem is QPSK at 200 symbols per second.Used in: Chapter 13, Chapter 34, Appendix F
- QSL probe
- A short [presence][qsl] transmission that asks the addressee whether a message arrived: sent when an expected reply or checkpoint never came, and to a station silent in its reply slot. It carries no data; the addressee repeats whatever verdict it holds, its ACK included when it already has the message, or stays silent.Used in: Chapter 18, Appendix F
- random back-off
- A wait of random length, up to a set limit, before a retry or before acting on a moment many stations share, so that they do not all key together. In mLink most limits grow with the number of stations heard in the last 30 minutes, and each wait is picked fresh for each event.Used in: Chapter 19
- rate ladder
- The rule that a bulk frame's code rate follows from its position in the transfer: frame 0 at rate 1/2, frame 1 at 3/4, every later frame at 5/6, and never above the ceiling announced in the opener.Used in: Chapter 17
- raylib
- A free library for drawing, sound and input, made for games. The mLink client draws its windows with it, and applets reach almost all of it through their rl library.Used in: Appendix E
- reactive beacon
- A PRESENCE sent as an answer to a geopoll. Each station answers in a time slot and on an announce channel fixed by its own callsign, and stays quiet once three other stations have answered.Used in: Chapter 20
- receipt roll
- A roll call that follows a bulletin: its ROLL carries a tag made from the bulletin's message id, and each member's check-in says whether it holds that bulletin.Used in: Chapter 24
- Reed-Solomon code (RS)
- An error-correcting code that works on whole bytes. RS(23,11), 11 bytes of frame plus 12 parity bytes, repairs up to 6 damaged bytes anywhere in the block; mLink measures its polar code against it, and no mLink frame uses it on the air.Used in: Chapter 11
- region
- The part of a channel's audio passband that belongs to one function and one modem: emergency (300-350 Hz), announce (350-1,500 Hz) or bulk (1,500-2,900 Hz).Used in: the Preface, Chapter 10, Chapter 15, Chapter 25
- relay
- Delivery of a message by a third station when the originator cannot reach the destination directly. It is asked for only after a direct attempt meets silence, and uses the REQUEST, OFFER, SELECT, FOR and RESULT frames.Used in: Chapter 2, Chapter 21, Chapter 24
- reply slot
- A fixed 1.2-second turn after a mail sent to several stations at once, in which one station the mail names confirms it with an ACK. The stations answer in the order the mail's To and Cc lists name them; only the first eight get a slot.Used in: Chapter 26
- reply window
- The 5 seconds a sender listens for an ACK or dNAK after its transmission ends. If all three announce channels are reserved by other stations at the moment it would close, it is moved to 5 seconds after the first of those reservations ends.Used in: Chapter 18
- reserved addressee
- An addressee beginning with 0, which no licensed station can hold, used as a destination meaning more than one station: 0CQCQCQ for everyone, 0CQQTH for everyone with the attention of those in a stated area, and 0 plus a net name for the members of that net.Used in: Chapter 16, Chapter 24, Chapter 30
- rig file
- A small text file that describes one radio to mLink: its control commands, its settings, how far it has been tested. A new radio needs a new rig file, not a new mLink.Used in: Appendix D
- RIT (receiver incremental tuning)
- A rig control that shifts the receive frequency by a small amount without moving the transmit frequency. Its transmit counterpart is XIT. To correct its own frequency error the station moves the dial instead, which shifts both together.Used in: Chapter 15
- role
- What a signed-in session may change: operator (own traffic, reading, emergency), technician (how the station operates on the air) or administrator (accounts, keys, cluster membership). Each role includes the ones below it.Used in: Chapter 7, Chapter 9
- roll call (Virtual Net)
- Net control sends one ROLL frame and each member answers with one CHECKIN in its own numbered 1.2-second slot, followed by a TALLY of who was not accounted for, a short tail of second tries for the missing, and three open slots for stations with no number yet.Used in: Chapter 24
- root-raised-cosine (RRC) shaping
- A smooth pulse shape for each symbol, split between transmitter and receiver, that keeps a signal narrow while letting neighboring symbols overlap without disturbing each other's centers. mLink's announce modem uses a roll-off of 0.35, giving a 270 Hz signal.Used in: Chapter 13
- roster (Virtual Net)
- Net control's list of a Virtual Net's members: callsign, member number and a few marks. It reaches the members up to three entries at a time behind each heartbeat; a member can also learn rows from the check-ins it hears, or ask another member for the whole list.Used in: Chapter 24
- ROSTER REQUEST
- A single frame with which a station asks a member of its net (one by number, or any) for the whole roster, for the net's standing orders, or for both. Each answer is one ordinary directed message.Used in: Chapter 24
- RTS (request to send)
- The one-frame ask a station sends before a long message to one station (two bulk frames or more, or a longburst): it names the addressee by its station ID and says how many frames the first transmission holds. Stations that hear it keep off that channel for 7.02 s. Wi-Fi's frame of the same name does the same job. Not the RTS line of a serial port, which can key a radio.Used in: Chapter 2, Chapter 16, Chapter 18, Chapter 19, Appendix B
- rung (FmLink fast signal)
- One of the fast signal's three speeds: rung 0 is QPSK at code rate 1/2, rung 1 QPSK at 5/6, rung 2 8PSK at 5/6. The receiver chooses the highest rung a transfer may use.Used in: Chapter 34
- Safety Critical net
- One of the two types of Virtual Net; the other, the default, is Casual. In a Safety Critical net, net control says again every message a member sends to the net, and a member speaks for each station that cannot hear net control: it repeats net control's heartbeat every cycle and relays that station's net messages both ways.Used in: Chapter 24
- sample clock
- In simulation, a station's sense of time worked out from the audio it has used up rather than from the computer's clock: a second is 12,000 samples. Because everything counts time this way, a busy computer makes a run slower but never changes its outcome.
- sample rate
- How many times per second a sound card measures (or produces) the audio voltage. mLink processes everything at 12,000 samples per second, converting automatically if the card runs faster.Used in: Chapter 3
- say-again repair
- The single repair round for a broadcast: a listener missing frames sends a delayed request shaped like a dNAK, the sender collects requests for 22 seconds and sends once more every frame anyone asked for.Used in: Chapter 19
- Schmidl-Cox preamble
- A sync symbol whose second half repeats its first, so a receiver can find it by comparing the signal with itself and can also measure frequency error. Every mLink bulk frame starts with one.Used in: Chapter 14
- seat
- One client connected to a station, with its operator's name. Several seats can work one station at once.Used in: Chapter 9
- seed
- The one number from which every random choice in a simulated run is made. The same seed gives the same events.Used in: Chapter 35
- segment
- One transmission of a long bulk transfer. A transfer longer than 10 frames is sent as segments of at most 10 frames, each after the first opened by a SEG-OPENER.Used in: Chapter 18
- sender tag (mail tag)
- Two bytes at the end of a mail, computed with the author's mailkey, that let the mailserver check who wrote a mail that another station hands in. Not a signature: only the server can check it.Used in: Chapter 27
- session
- A signed-in client's standing with the daemon, identified by a session number. It carries the role and subscriptions and expires after 30 minutes without a command.Used in: Chapter 32
- SHA-256 sum
- A 64-character fingerprint computed from every byte of a file; changing any byte changes it. A download whose sum matches the published one arrived intact.Used in: Chapter 5
- shortburst
- A message of up to 156 bytes sent as up to 16 announce frames in one transmission, behind PRESENCE and a shortburst opener. Frame 0 carries the message length and the check.Used in: Chapter 2, Chapter 16, Chapter 17, Chapter 29
- simulated air (fake over the air, fOTA)
- mLink's test harness: real station programs connected through a channel mixer instead of radios, so a test controls every path, the noise and the interference, and keeps an exact record of what was on the air.Used in: Chapter 5
- slot (roll call)
- The 1.2 seconds of a roll call that belong to one member number. The length is a constant every station knows, so it is carried on no frame, and a member keys its check-in exactly at the start of its own slot.Used in: Chapter 24
- SNR (signal-to-noise ratio)
- How strong a received signal is compared with the noise around it, usually in decibels. Meaningless without a stated noise bandwidth; mLink always uses 3 kHz (SNR@3k).Used in: Chapter 3
- SNR@3k
- Signal-to-noise ratio measured against the noise in a 3,000 Hz SSB bandwidth. Every SNR figure in mLink and in this book uses this one yardstick; it is within 1 dB of the figures FT8-style programs report.Used in: the Preface, Chapter 2, Chapter 3, Chapter 5, Chapter 7, Chapter 11, Chapter 12, Chapter 13, Chapter 15, Chapter 17, Chapter 20, Chapter 21, Chapter 24, Chapter 26, Chapter 34, Chapter 35, Appendix A, Appendix F
- SOS beacon
- What declaring an emergency starts: the station transmits the emergency frames at once and repeats them on its own schedule until the operator cancels, a new declaration replaces them, or an acknowledgment is heard. It survives a restart.Used in: Chapter 25
- SOS mailbox
- A reserved mailbox on the mail server that archives every emergency incident deposited by gateway stations. Copies also go to subscribers of the reserved 'sos' mailing list, the dispatchers.Used in: Chapter 25, Chapter 27
- speech processor
- A radio's compressor for voice: it lifts the quiet parts of the audio and holds down the loud ones to raise the average power. On a data signal it reshapes the envelope, so it is turned off for mLink.Used in: Chapter 4
- SQLite
- A widely used database engine that keeps a whole database in one ordinary file. The station daemon keeps all its durable records in one SQLite file.
- stand-in
- A member that runs a Virtual Net as net control while the net's owner is out of earshot, or because the owner asked it to. Its heartbeats say so. An ordinary stand-in hands the net back as soon as it hears the owner, and the numbers it gave out are provisional.Used in: Chapter 24
- standard channel
- A simulated HF path with a fixed echo delay and fading rate, defined by international radio bodies so that different modems can be tested on the same path. Good is 0.5 ms and 0.1 Hz; moderate is 1 ms and 0.5 Hz; poor is 2 ms and 1 Hz.
- standing orders (Virtual Net)
- One mail addressed to a Virtual Net, posted by its owner or its net control, that every member keeps: what members are to know and do for as long as the net runs. Every roster entry names the current copy, and a member that lacks it asks and is handed it by another member.Used in: Chapter 24
- station daemon (mlinkd)
- The background program that runs an mLink station. It owns the sound card and radio, contains the modems and the protocol, keeps the station's database, and makes every on-air decision. Clients connect to it; it runs whether or not any client is open.Used in: Chapter 1, Chapter 2, Chapter 5, Chapter 7, Chapter 31
- station ID
- A station's two-byte short name on the air: the CRC-16 of the six packed bytes of its callsign. The ask before a long message (RTS) and its answer (CTS) name the other station this way. Two callsigns can share one. It is not the legal station identification, which is the full callsign.Used in: Chapter 16, Chapter 19
- station manager
- The daemon's record keeper: the part that stores and retrieves everything in the station database. It never acts on anything itself.Used in: Chapter 31
- station password
- The one password every station has. With no accounts it opens the station with full control; once accounts exist it only admits walk-up guests, and only if the administrator allows them. On a new station it is mLink.Used in: Chapter 9
- stream
- A named feed of live updates the daemon publishes, such as mail or stations. A client subscribes by name and is sent an event whenever there is news.Used in: Chapter 32
- synchronizing sweep (chirp)
- The 0.96 s tone that glides from 300 to 350 Hz at the start of every emergency frame. Receivers search for it to find where a frame begins; no emergency data can imitate it.Used in: Chapter 12
- tactical overlay
- The shared set of map objects (points, circles, lines, areas, bearing lines) that stations send to each other so every map shows the same operational picture.Used in: Chapter 7, Chapter 30
- TALLY
- Net control's frame at the end of a roll call saying which member numbers were not accounted for. It comes in four kinds (a list of the missing, a list of the heard, and two maps of one bit per number) and net control sends whichever says it in the fewest frames. A final TALLY ends the roll call.Used in: Chapter 24
- Tanner graph
- A picture of an LDPC code with bits as circles, checks as squares and a line wherever a check includes a bit. The decoder passes messages along these lines.Used in: Chapter 11
- temporal binding
- Crediting a frame that carries no callsign to the station whose PRESENCE was heard just before it on the same channel, or, for bulk frames, through the timing set up by the opener that announced them.Used in: Chapter 16
- tentative detection
- The receiver's note that a preamble has been found on a channel: where it starts, how well it scored and, for announce frames, its phase. It is held, and may be replaced by a better-aligned one, until the whole frame has been recorded and can be handed to a decoder. Each channel has room for one; the emergency detector keeps up to sixteen.Used in: Chapter 15
- test queue
- The service that runs a contributor's builds and tests on compute machines, one job per machine, and returns a report with every wall time and the failures sorted into new and known.
- thread
- One independent line of work inside a running program. The station daemon gives each slow or time-critical job its own thread so none can hold up the others.
- tombstone (map object)
- A short record that withdraws a map object: it names the object's number, and every station that receives it deletes its copy.Used in: Chapter 30
- transmission
- One push-to-talk turn: the radio keys, a chain of frames goes out back to back, and the radio unkeys. The unit the mLink protocol reasons about.Used in: Chapter 2, Chapter 16
- transmission policy
- The ordered rule table a station uses to choose shortburst, longburst, bulk or 'unsupported' for each message, from its size, the link estimate to the addressee, whether it is a broadcast, and whether the bulk region is reserved.
- tray
- The right-hand end of the client's taskbar: the status icons (the transmit switch, link to the station, what it is doing, mail, chat, emergency, updates), the notifications bell with its count, the identity cell and the UTC clock, plus an Abort button while something is queued or on the air. In the phone layout the bell and the icons sit in the top bar.Used in: Chapter 7
- turnaround
- The 150 ms an addressee adds, on top of half a second of settling time after the computed end of the sender's transmission, before it keys its reply, so that the sender is listening again.Used in: Chapter 18
- type byte
- The first byte of an announce frame. Its high four bits name the frame family and its low four bits the subtype within that family.Used in: Chapter 16
- UDP (user datagram protocol)
- A basic internet protocol that sends self-contained packets (datagrams) with no connection to set up. Client and daemon talk in UDP datagrams.Used in: Chapter 32
- USB (upper sideband)
- The SSB mode in which an audio tone of f Hz is transmitted f Hz above the dial frequency. mLink runs on upper sideband, in the radio's data mode where it has one.Used in: Chapter 3
- Virtual Net
- An optional net on an mLink channel, opened by an operator under a name of up to eight characters, with an owner, a net control, a roster of numbered members and roll calls. Stations outside it work exactly as they do without one.Used in: Chapter 24
- VOX (voice-operated switch)
- Keying the transmitter automatically when audio arrives. Slow to react, so a station declared as VOX-keyed sends a short leader tone before each transmission.Used in: Chapter 3, Chapter 5, Chapter 31, Chapter 34
- VOX leader
- On the FM profile only, a tone the station sends before every transmission when the radio is keyed by VOX, so the transmitter is fully keyed and the far receiver open before the first frame. 800 ms by default. HF is never keyed by VOX.Used in: Chapter 5, Chapter 34
- walk-up guest
- Someone who signs in to a station that has accounts using the station password and a name that is not an account. A guest gets the operator role, and only while the administrator allows guests.Used in: Chapter 9
- warm standby
- A second copy of the mailserver that keeps pulling a fresh copy of the primary's database and refuses normal requests until an operator promotes it by restarting it as a primary.Used in: Chapter 27
- waterfall (cliff)
- The steep curve of decode success against SNR typical of long codes: over about two decibels a bulk frame goes from never decoding to almost always.Used in: Chapter 11
- WebAssembly
- A format that lets compiled programs run inside a web page. The mLink web client is the desktop client built this way.
- WebSocket
- A standard two-way message connection that a web browser can open to a server. Browsers reach the station daemon through one.
- WebSocket bridge
- A small separate program, started by the daemon, that relays between browsers' WebSocket connections and the daemon's UDP interface, and serves the web client's files.Used in: Chapter 5, Chapter 32
- WWV and WWVH
- The two time-and-frequency stations of the U.S. National Institute of Standards and Technology (NIST), WWV near Fort Collins, Colorado and WWVH on Kauai, Hawaii. Both broadcast on 5, 10 and 15 MHz, among other frequencies, a carrier held to an atomic standard, a tick every second and the time of day.Used in: Appendix G
- zstd (Zstandard)
- An openly published, general-purpose lossless compression algorithm. mLink compresses every message with it whenever that makes the message strictly smaller.Used in: Chapter 23
Further Reading
I.1 Signals and modems
- T. M. Schmidl and D. C. Cox, "Robust Frequency and Timing Synchronization for OFDM," IEEE Transactions on Communications, vol. 45, no. 12, December 1997.
- The preamble trick mLink's bulk receiver uses to find the start of every OFDM frame: a symbol whose two halves are identical, so the receiver can spot it by comparing the signal with a delayed copy of itself. Goes with and .
- J. G. Proakis and M. Salehi, Digital Communications, 5th edition, McGraw-Hill, 2008.
- The standard graduate textbook. It covers FSK, PSK, pulse shaping, OFDM, fading channels and coding under one roof. If one of the modem chapters left you wanting the equations, look here first. Goes with , Chapter 13, Chapter 14 and .
I.2 Error-correcting codes
- I. S. Reed and G. Solomon, "Polynomial Codes Over Certain Finite Fields," Journal of the Society for Industrial and Applied Mathematics, vol. 8, no. 2, pp. 300–304, 1960.
- The short paper that introduced Reed–Solomon codes, the classic code for short frames and the yardstick mLink measures its polar code against. Goes with Section 11.3.
- E. Arıkan, "Channel Polarization: A Method for Constructing Capacity-Achieving Codes for Symmetric Binary-Input Memoryless Channels," IEEE Transactions on Information Theory, vol. 55, no. 7, pp. 3051–3073, 2009.
- The paper that introduced polar codes. mLink's announce and emergency frames each carry one polar codeword (23 bytes carrying 11). Goes with Section 11.7.
- I. Tal and A. Vardy, "List Decoding of Polar Codes," IEEE Transactions on Information Theory, vol. 61, no. 5, pp. 2213–2226, 2015.
- The list decoder with a CRC to pick the answer, which made polar codes strong at short lengths; mLink's decoder keeps eight candidates this way. Goes with Section 11.7.5.
- M. Rowshan and E. Viterbo, Polar Codes: From Theory to Practice, Wiley, 2026.
- A practical textbook: construction, shortening, systematic encoding and list decoding, each step the way mLink's short code uses it. Goes with Section 11.7.
- R. G. Gallager, Low-Density Parity-Check Codes, MIT Press, 1963.
- The book of Gallager's doctoral thesis, where LDPC codes and iterative decoding were first described. It was largely forgotten for thirty years because the computers of the day couldn't decode them. mLink's bulk frames each carry one LDPC codeword. Goes with Chapter 11.
- D. J. C. MacKay, "Good Error-Correcting Codes Based on Very Sparse Matrices," IEEE Transactions on Information Theory, vol. 45, no. 2, March 1999; and Information Theory, Inference, and Learning Algorithms, Cambridge University Press, 2003.
- MacKay's rediscovery of LDPC codes showed they come close to the Shannon limit, which is where the steep "waterfall cliff" in bulk decoding comes from. His book is readable, and the author has made it free to read online. Its chapters on message passing are the gentlest introduction to how an LDPC decoder thinks. Goes with Section 11.4.4.
- T. J. Richardson and R. L. Urbanke, "Efficient Encoding of Low-Density Parity-Check Codes," IEEE Transactions on Information Theory, vol. 47, no. 2, February 2001.
- How to encode an LDPC code quickly, without the heavy matrix arithmetic the straightforward method needs. It's the practical half of the story that makes long codewords like mLink's 9,720-bit one cheap to produce, and it is the method mLink's bulk encoder uses. Goes with .
I.3 Sharing a channel
- IEEE Std 802.11, Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications (any edition; for example 802.11-2020).
- The Wi-Fi standard. Its distributed coordination function (DCF) is the best-known example of listen-before-talk with random back-off, and its network allocation vector (NAV) is the same idea as mLink's defer: a station that hears a reservation stays quiet for the time it announces. mLink borrows the idea, not the frame formats. Goes with .
I.4 Inside a payload
- Y. Collet and M. Kucherawy, Zstandard Compression and the 'application/zstd' Media Type, RFC 8878, 2021; and the reference implementation at facebook.github.io/zstd.
- The compression mLink applies to a message before it goes on the air, including a pre-trained dictionary so that even short texts shrink. Goes with Section 23.5.
I.5 Time and frequency stations
- NIST, "WWV and WWVH broadcast format," https://www.nist.gov/pml/div688/grp40/wwv_format
- NIST's own description of what the two stations send: the second ticks and their pitches, the silent zones, the minute and hour tones, and the other audio tones. Goes with Section G.2.
- Michael A. Lombardi, NIST Time and Frequency Services, NIST Special Publication 432, 2002 edition, chapter 3, "WWV/WWVH Time Code," https://www.nist.gov/sites/default/files/documents/calibrations/sp432-02.pdf
- The 100 Hz time code: pulse widths, position markers, and the layout of minutes, hours, day, year and UT1 in the minute's 60 seconds. Goes with and .
I.6 Rules and the neighbors
- U.S. Code of Federal Regulations, Title 47, Part 97: Amateur Radio Service; in particular §97.113 (prohibited transmissions) and §97.119 (station identification).
- The rules every U.S. mLink station operates under. §97.119 is the identification rule that the callsign at the front of a transmission satisfies. §97.113 bears on how encryption and message content are handled. Operators elsewhere should read their own administration's equivalent. Goes with Section 16.8 and Section 28.1.
- Winlink Global Radio Email documentation (winlink.org).
- The established amateur radio email system, and the obvious thing to compare mLink with. Reading how Winlink stations connect to gateways and pass mail makes it clearer what mLink does differently: a shared channel instead of connected sessions, and mail that can move between stations without a gateway. Goes with Chapter 1, and .