All docsStellar LinkRF bench · by Stellar Systems v0.4.0

API Reference

Datapath

Modem data path: transmit, capture and loopback measurement

GET/api/v1/datapath

Status#

Get the data path state.

Reports whether the modem data path is enabled (acquired). Returns 404 when the device has no modem data path.

Responses

200OKapplication/json
acquiredrequired

boolean

True while the daemon holds the modem data path.

Request

curl "http://192.168.2.1:8080/api/v1/datapath"

Response

{
  "acquired": true
}
POST/api/v1/datapath/capture

Capture#

Collect blocks raw received blocks and return them as application/octet-stream.

The bytes are in the modem wire format: each useful byte occupies the least significant byte of a 32-bit little-endian word.

Request body application/jsonrequired

blocksrequired

integer

Number of consecutive blocks to collect. A capture that cannot obtain them all is refused, not truncated.

≥ 0

warmup

integer

Blocks to collect and discard before the measured window starts, to skip the acquisition transient. Zero by default.

≥ 0

timeout_ms

integer · int64

Give up after this many milliseconds.

≥ 0

release

boolean

Release the modem data path when the capture is done (default true).

Responses

200Raw received blocks, concatenated, in the modem wire format
503No modem data path in this daemon
504The chain did not sustain the requested blocks

Request

curl -X POST "http://192.168.2.1:8080/api/v1/datapath/capture" \
  -H "Content-Type: application/json" \
  -d '{
  "blocks": 0,
  "warmup": 0,
  "timeout_ms": 0,
  "release": true
}' \
  -o response.bin
POST/api/v1/datapath/disable

Disable#

Disable the data path.

Stops exchanging data with the modem. enabled in the reply is read back after the release.

Responses

200OKapplication/json
enabledrequired

boolean

Request

curl -X POST "http://192.168.2.1:8080/api/v1/datapath/disable"

Response

{
  "enabled": true
}
POST/api/v1/datapath/enable

Enable#

Enable the data path.

Starts exchanging data with the modem, so that packets can be transmitted and received data is collected. The state is read back from the device: an error is returned if the data path did not take hold.

Responses

200OKapplication/json
enabledrequired

boolean

Request

curl -X POST "http://192.168.2.1:8080/api/v1/datapath/enable"

Response

{
  "enabled": true
}
POST/api/v1/datapath/flush

Flush#

Transmit whatever is buffered, padded out to a full block.

A caller sending at a low rate must call this: only full blocks are transmitted, so a few packets stay buffered until flushed. There is no automatic flush timer, because the padding is transmitted too.

Request body application/jsonrequired

blocks

integer

How many blocks to emit (default 1). Use 2 whenever you expect the data to come back through a loopback: a received block is returned only when entirely full, and the first frame after acquisition is lost, so a single flushed block never completes on the receive side.

≥ 0

Responses

200OKapplication/json
useful_bytesrequired

integer

Useful bytes handed to the transmit path, padding included. Zero means nothing was pending.

This does not prove the bytes were transmitted: see tx_chain_running.

≥ 0

tx_chain_running

boolean · nullable

Whether the modem's transmit path is open. Absent when the daemon cannot determine it.

404No modem data path in this daemon

Request

curl -X POST "http://192.168.2.1:8080/api/v1/datapath/flush" \
  -H "Content-Type: application/json" \
  -d '{
  "blocks": 0
}'

Response

{
  "useful_bytes": 0,
  "tx_chain_running": true
}
POST/api/v1/datapath/loopback

Loopback#

Transmit a payload while capturing: a complete loopback capture in one call.

The request body is the raw payload, transmitted byte for byte. The reply is the raw capture in the modem wire format. Query parameters set the number of blocks, the warm-up, the timeout and whether to release the data path.

Request body application/octet-streamrequired

string · binary

Responses

200Raw received blocks captured while transmitting, in the modem wire format
504The chain did not sustain the requested blocks

Request

curl -X POST "http://192.168.2.1:8080/api/v1/datapath/loopback" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @payload.bin \
  -o response.bin
POST/api/v1/datapath/measure

Measure#

Transmit a payload, capture, and compare: a complete loopback measurement with its verdict.

Returns the comparison of the received bytes against the payload, per block and overall. Use /datapath/loopback instead to obtain the raw capture.

Request body application/octet-streamrequired

string · binary

Responses

200OKapplication/json
verdictrequired

string

BytePerfect | Degraded | NoCorrelation.

rotation_sliprequired

boolean

A byte was lost or inserted at a block boundary. Reported separately because it is not a demodulation error.

blocksrequired

array of BlockMatchDRO

Per-block results. Read these before overall_ratio: an aggregate can hide a per-block pattern.

BlockMatchDRO · 5 fields
indexrequired

integer

≥ 0

matchedrequired

integer

≥ 0

totalrequired

integer

≥ 0

rotationrequired

integer

≥ 0

ratiorequired

number · double

overall_ratiorequired

number · double

worst_block_ratiorequired

number · double

capture_bytesrequired

integer

≥ 0

warmuprequired

integer

Blocks collected and discarded before the measured window.

≥ 0

504The chain did not sustain the requested blocks

Request

curl -X POST "http://192.168.2.1:8080/api/v1/datapath/measure" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @payload.bin

Response

{
  "verdict": "string",
  "rotation_slip": true,
  "blocks": [
    {
      "index": 0,
      "matched": 0,
      "total": 0,
      "rotation": 0,
      "ratio": 0.0
    }
  ],
  "overall_ratio": 0.0,
  "worst_block_ratio": 0.0,
  "capture_bytes": 0,
  "warmup": 0
}
POST/api/v1/datapath/transmit

Transmit#

Queue packets for transmission.

Returns once the packets are queued, not once they are transmitted. For a sustained feed use the /ws/tx WebSocket rather than one request per packet. A packet is transmitted only when its block is full: call /datapath/flush to send a partial block.

Request body application/jsonrequired

packetsrequired

array of object

Packets to transmit, tagged by protocol: {"protocol":"raw","payload_hex":".."} for bytes built elsewhere, {"protocol":"csp","header":{..},"payload_hex":".."} to have Stellar Link build the packet, likewise "ccsds".

framing

object

How packets are laid out in the byte stream.

{"mode":"stream"} packs them end to end: maximum throughput, but packet boundaries are not preserved — the receiver gets a byte stream cut at the profile's frame length.

{"mode":"slot","slot_len":256,"pad":0} places one packet per slot, so each frame starts on a packet boundary. slot_len must equal the frame length and divide the useful bytes of a block, or the request is refused.

force

boolean

Transmit even though the signal chain is not ready for it.

Off by default. A forced transmit's reply carries the chain state, so it never implies the chain was ready.

Responses

200OKapplication/json
packetsrequired

integer

≥ 0

useful_bytesrequired

integer

Useful bytes queued, before expansion to the wire format.

≥ 0

wire_bytesrequired

integer

Bytes written to the transmit path after expansion to the wire format (four per useful byte).

≥ 0

boundaries_preservedrequired

boolean

True when packet boundaries are preserved end to end. False in stream mode.

tx_chain_running

boolean · nullable

Whether the modem's transmit path is open.

false means the bytes were accepted but the modem discards them: nothing is transmitted. Absent when the daemon cannot determine it.

block_useful_bytesrequired

integer

Useful bytes that fill one block.

A packet is not transmitted until its block is complete, so this is the latency granularity of the transmit path. It is not the current fill level.

≥ 0

chain

ChainStateDRO · nullable

400The framing cannot keep its alignment, or a packet does not fit its slot
404No modem data path in this daemon
409The signal chain is not ready to transmit; the body names the first missing step and the command that clears it. Pass force: true to transmit anyway

Request

curl -X POST "http://192.168.2.1:8080/api/v1/datapath/transmit" \
  -H "Content-Type: application/json" \
  -d '{
  "packets": [
    {}
  ],
  "framing": {},
  "force": true
}'

Response

{
  "packets": 0,
  "useful_bytes": 0,
  "wire_bytes": 0,
  "boundaries_preserved": true,
  "tx_chain_running": true,
  "block_useful_bytes": 0,
  "chain": {}
}

↑↓ to moveEnter to open