Before the modem can put a signal where you want it, several independent things must be right: the AD9361 calibrated and tuned at the right rate, a profile applied after that tuning, the transmitter fed from the modem, the transceiver in its transmit/receive state, the signal path set to the right target, the transmit output enabled and the datapath claimed. Getting any of them wrong produces a chain that looks healthy and transmits nothing.
The chain layer lists these prerequisites, reads them back from the unit on every request, and establishes the missing ones in the correct order.
Checking the chain#
stellarlinkctl chain status # judged against the unit's configured target
stellarlinkctl chain status --target air # "what would it take to go on air?"GET /api/v1/chain returns the same, with one entry per condition:
| Field | Meaning |
|---|---|
key | The condition's name (below) |
stage | The group it belongs to |
source | board (read from the unit now) or session (tracked by the daemon since it started) |
required, observed | What the target needs, and what was read |
verdict | met, unmet or unknown |
breaks | What goes wrong when it is not met |
A fact that could not be read is unknown, and unknown counts as not met: the chain never
builds a plan on a value it could not confirm.
The conditions#
| Key | Stage | Applies to | Required |
|---|---|---|---|
rf-channel | unprofiled | device loopback, air | The modem receives and transmits on the profile's AD9361 channels (rx.channel, tx.channel, RX1/TX1 by default), read back as applied by the unit. Channel 2 also needs the transceiver to run both channels (2R2T) |
calibrated | unconditioned | device loopback, air | The AD9361's analog calibrations have run since power-up |
rate | unconditioned | device loopback, air | The radio's sample rate is exactly what the active profile's symbol rate needs (at most 13 MSa/s without a profile) |
tuning | unconditioned | device loopback, air | The radio's digital interface is aligned at the current rate |
profile | unprofiled | all | A profile is applied (the named one, when you name one) |
profile-order | unprofiled | device loopback, air | The profile was applied after the last tuning (a tuning overrides part of what a profile sets) |
modulator | misrouted | all | The profile's modulator is the active one |
dac-source | misrouted | device loopback, air | The transmitter takes its samples from the modem |
ensm | misrouted | device loopback, air | The transceiver is in its full-duplex transmit/receive state |
pl-mux | misrouted | all | The internal loopback is selected for the pl target, and deselected otherwise |
device-loopback | misrouted | device loopback, air | The AD9361's digital loopback is closed (device loopback) or open (air) |
tx-egress | not-armed | all | The modem's transmit output is enabled |
datapath | not-armed | all | stellarlinkd holds the modem's datapath |
The overall stage is the stage of the first unmet condition: unconditioned, unprofiled,
misrouted, not-armed, or ready.
Bringing the chain up#
stellarlinkctl chain up --target air --profile rf_loopback
stellarlinkctl chain up --target pl --profile pl_loopbackPOST /api/v1/chain/condition with {"target": "air", "profile": "rf_loopback"} does the same.
With no profile named, the currently applied one is used; with none applied, the request is
refused rather than guessing, because the profile decides the frame length, the coding and the
frequency.
Only the missing steps run, always in this order:
| Step | Runs when | Why here |
|---|---|---|
calibrate | device loopback or air, not calibrated since power-up | It resets the AD9361, so everything else must come after it |
set-ensm | after a calibration, or when the transceiver is not in its transmit/receive state | Required by the tuning; this is also what undoes the RF kill switch |
tune | after a calibration, or when the rate or tuning is wrong | Sets the radio's sample rate (the profile's, or --rate) and aligns the digital interface at that rate. The transmitter sends a test pattern during this step |
apply-profile | after any tune, or when the profile is missing, wrong, older than the tuning, or the unit is not on its channels | A tuning invalidates the profile; the apply also selects the AD9361 channels |
set-mode | after any earlier step, or when the signal path is wrong | A profile apply resets the signal path and the LOs, so the mode is set last |
start-tx | when the transmit output is disabled | |
enable-datapath | when the datapath is not held |
The result lists the steps run and the chain state re-read afterwards. For the air target the
verdict confirms that the internal loopback is deselected, the device loopback is open and the
transmitter is fed by the modem, and reports reaches_the_connector: true.
Manual steps#
The individual steps are available when you need them, but taking them out of order undoes the earlier ones:
stellarlinkctl rf calibrate # resets the transceiver: FIRST, before anything else
stellarlinkctl rf tune --rate 2500000
stellarlinkctl profile apply rf_loopback
stellarlinkctl rf air # or: rf rf (device loopback), rf pl (internal loopback)
stellarlinkctl radio start-tx
stellarlinkctl datapath enablerf air and rf rf refuse when the interface was never tuned or when the profile was applied
before the last tuning; --force overrides the refusal.
Chain targets#
--target | Scenario chain.target | Meaning |
|---|---|---|
pl-loopback or pl | pl | Internal digital loopback: transmitter → channel emulator → receiver, inside the unit. The AD9361 is not used |
device-loopback | device-loopback | Through the AD9361's internal digital loopback, before the mixers. Nothing leaves the unit; LOs, gains and attenuation have no effect |
air | air | Over the RF ports: out through the mixers to TX1 |
The CLI also accepts rf as an alias of the device loopback. Scenarios do not accept it: the
device loopback emits nothing on the RF ports, and naming it "rf" invites the wrong expectation.
Recovering the receiver without a restart#
The receiver's loops can get stuck: symbols flow, the lock flags read true, and no frames are found. A clear resets the gain control, the timing loop and the carrier loop in signal-flow order, leaving their configuration untouched:
stellarlinkctl chain recover # POST /api/v1/chain/recoverIt reports what it cleared; it does not confirm the link is healthy. Check that with a byte-exact loopback or with frame counters that move, never with the lock flags alone.
Scenario runs on the air path do this automatically: after the profile apply, the engine clears the receiver 500 ms after its traffic feed starts, so the loops re-acquire on a live signal. A clear issued before traffic flows does not help. A profile apply also clears the loops.
Scenarios and the chain#
Every scenario run conditions the chain first, for a target derived from its profile
(radio.loopback: true → pl, otherwise air) unless the scenario declares one, and
refuses to start when the target cannot be reached: no run record, no report. See
Scenarios.