/api/v1/datapathStatus#
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
acquiredrequiredboolean
True while the daemon holds the modem data path.
Request
curl "http://192.168.2.1:8080/api/v1/datapath"import requests
BASE_URL = "http://192.168.2.1:8080"
response = requests.get(f"{BASE_URL}/api/v1/datapath")
response.raise_for_status()
print(response.json())let base_url = "http://192.168.2.1:8080";
let response = reqwest::Client::new()
.get(format!("{base_url}/api/v1/datapath"))
.send()
.await?
.error_for_status()?;
let body: serde_json::Value = response.json().await?;
println!("{body:#}");Response
{
"acquired": true
}/api/v1/datapath/captureCapture#
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
blocksrequiredinteger
Number of consecutive blocks to collect. A capture that cannot obtain them all is refused, not truncated.
warmupinteger
Blocks to collect and discard before the measured window starts, to skip the acquisition transient. Zero by default.
timeout_ms integer · int64
Give up after this many milliseconds.
releaseboolean
Release the modem data path when the capture is done (default true).
Responses
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.binimport requests
BASE_URL = "http://192.168.2.1:8080"
response = requests.post(
f"{BASE_URL}/api/v1/datapath/capture",
json={
"blocks": 0,
"warmup": 0,
"timeout_ms": 0,
"release": True,
},
)
response.raise_for_status()
data = response.contentlet base_url = "http://192.168.2.1:8080";
let response = reqwest::Client::new()
.post(format!("{base_url}/api/v1/datapath/capture"))
.json(&serde_json::json!({
"blocks": 0,
"warmup": 0,
"timeout_ms": 0,
"release": true
}))
.send()
.await?
.error_for_status()?;
let bytes = response.bytes().await?;/api/v1/datapath/disableDisable#
Disable the data path.
Stops exchanging data with the modem. enabled in the reply is read back after
the release.
Responses
200OKapplication/json
enabledrequiredboolean
Request
curl -X POST "http://192.168.2.1:8080/api/v1/datapath/disable"import requests
BASE_URL = "http://192.168.2.1:8080"
response = requests.post(f"{BASE_URL}/api/v1/datapath/disable")
response.raise_for_status()
print(response.json())let base_url = "http://192.168.2.1:8080";
let response = reqwest::Client::new()
.post(format!("{base_url}/api/v1/datapath/disable"))
.send()
.await?
.error_for_status()?;
let body: serde_json::Value = response.json().await?;
println!("{body:#}");Response
{
"enabled": true
}/api/v1/datapath/enableEnable#
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
enabledrequiredboolean
Request
curl -X POST "http://192.168.2.1:8080/api/v1/datapath/enable"import requests
BASE_URL = "http://192.168.2.1:8080"
response = requests.post(f"{BASE_URL}/api/v1/datapath/enable")
response.raise_for_status()
print(response.json())let base_url = "http://192.168.2.1:8080";
let response = reqwest::Client::new()
.post(format!("{base_url}/api/v1/datapath/enable"))
.send()
.await?
.error_for_status()?;
let body: serde_json::Value = response.json().await?;
println!("{body:#}");Response
{
"enabled": true
}/api/v1/datapath/flushFlush#
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
blocksinteger
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.
Responses
200OKapplication/json
useful_bytes requiredinteger
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.
tx_chain_running boolean · nullable
Whether the modem's transmit path is open. Absent when the daemon cannot determine it.
Request
curl -X POST "http://192.168.2.1:8080/api/v1/datapath/flush" \
-H "Content-Type: application/json" \
-d '{
"blocks": 0
}'import requests
BASE_URL = "http://192.168.2.1:8080"
response = requests.post(
f"{BASE_URL}/api/v1/datapath/flush",
json={
"blocks": 0,
},
)
response.raise_for_status()
print(response.json())let base_url = "http://192.168.2.1:8080";
let response = reqwest::Client::new()
.post(format!("{base_url}/api/v1/datapath/flush"))
.json(&serde_json::json!({
"blocks": 0
}))
.send()
.await?
.error_for_status()?;
let body: serde_json::Value = response.json().await?;
println!("{body:#}");Response
{
"useful_bytes": 0,
"tx_chain_running": true
}/api/v1/datapath/loopbackLoopback#
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
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.binimport requests
BASE_URL = "http://192.168.2.1:8080"
response = requests.post(
f"{BASE_URL}/api/v1/datapath/loopback",
data=open("payload.bin", "rb").read(),
headers={"Content-Type": "application/octet-stream"},
)
response.raise_for_status()
data = response.contentlet base_url = "http://192.168.2.1:8080";
let response = reqwest::Client::new()
.post(format!("{base_url}/api/v1/datapath/loopback"))
.header("Content-Type", "application/octet-stream")
.body(std::fs::read("payload.bin")?)
.send()
.await?
.error_for_status()?;
let bytes = response.bytes().await?;/api/v1/datapath/measureMeasure#
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
verdictrequiredstring
BytePerfect | Degraded | NoCorrelation.
rotation_slip requiredboolean
A byte was lost or inserted at a block boundary. Reported separately because it is not a demodulation error.
blocksrequiredarray of BlockMatchDRO
Per-block results. Read these before overall_ratio: an aggregate can hide a
per-block pattern.
BlockMatchDRO · 5 fields
indexrequiredinteger
matchedrequiredinteger
totalrequiredinteger
rotationrequiredinteger
ratiorequirednumber · double
overall_ratio requirednumber · double
worst_block_ratio requirednumber · double
capture_bytes requiredinteger
warmuprequiredinteger
Blocks collected and discarded before the measured window.
Request
curl -X POST "http://192.168.2.1:8080/api/v1/datapath/measure" \
-H "Content-Type: application/octet-stream" \
--data-binary @payload.binimport requests
BASE_URL = "http://192.168.2.1:8080"
response = requests.post(
f"{BASE_URL}/api/v1/datapath/measure",
data=open("payload.bin", "rb").read(),
headers={"Content-Type": "application/octet-stream"},
)
response.raise_for_status()
print(response.json())let base_url = "http://192.168.2.1:8080";
let response = reqwest::Client::new()
.post(format!("{base_url}/api/v1/datapath/measure"))
.header("Content-Type", "application/octet-stream")
.body(std::fs::read("payload.bin")?)
.send()
.await?
.error_for_status()?;
let body: serde_json::Value = response.json().await?;
println!("{body:#}");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
}/api/v1/datapath/transmitTransmit#
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
packetsrequiredarray 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".
framingobject
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.
forceboolean
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
packetsrequiredinteger
useful_bytes requiredinteger
Useful bytes queued, before expansion to the wire format.
wire_bytes requiredinteger
Bytes written to the transmit path after expansion to the wire format (four per useful byte).
boundaries_preserved requiredboolean
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_bytes requiredinteger
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.
chainChainStateDRO · nullable
force: true to transmit anywayRequest
curl -X POST "http://192.168.2.1:8080/api/v1/datapath/transmit" \
-H "Content-Type: application/json" \
-d '{
"packets": [
{}
],
"framing": {},
"force": true
}'import requests
BASE_URL = "http://192.168.2.1:8080"
response = requests.post(
f"{BASE_URL}/api/v1/datapath/transmit",
json={
"packets": [
{},
],
"framing": {},
"force": True,
},
)
response.raise_for_status()
print(response.json())let base_url = "http://192.168.2.1:8080";
let response = reqwest::Client::new()
.post(format!("{base_url}/api/v1/datapath/transmit"))
.json(&serde_json::json!({
"packets": [
{}
],
"framing": {},
"force": true
}))
.send()
.await?
.error_for_status()?;
let body: serde_json::Value = response.json().await?;
println!("{body:#}");Response
{
"packets": 0,
"useful_bytes": 0,
"wire_bytes": 0,
"boundaries_preserved": true,
"tx_chain_running": true,
"block_useful_bytes": 0,
"chain": {}
}