feat: example scripts (simple_rx, simple_tx, ping_pong) with shared donglora.py helper

This commit is contained in:
swaits committed 2026-03-29 20:42:58 -06:00
1 parent f56ddf196a
commit 8790ebfd7b
9898 files changed
+271434

No files matched your search

+203
View File
@@ -0,0 +1,203 @@
"""DongLoRa host library — connect, configure, send/receive LoRa packets.
This is a minimal helper for the example scripts. It implements the
DongLoRa USB protocol (COBS-framed postcard) just enough to be useful.
See docs/PROTOCOL.md for the full specification.
"""
# /// script
# requires-python = ">=3.10"
# dependencies = ["cobs", "pyserial"]
# ///
import glob
import struct
import subprocess
import serial
import time
from cobs import cobs
# ── USB device discovery ──────────────────────────────────────────
USB_VID_PID = "1209:5741"
def find_port() -> str | None:
"""Find the DongLoRa serial port by USB VID:PID."""
for path in sorted(glob.glob("/dev/ttyACM*")) + sorted(glob.glob("/dev/ttyUSB*")):
try:
result = subprocess.run(
["udevadm", "info", "--query=property", f"--name={path}"],
capture_output=True, text=True, timeout=2,
)
props = dict(
line.split("=", 1) for line in result.stdout.splitlines() if "=" in line
)
vid = props.get("ID_VENDOR_ID", "").lower()
pid = props.get("ID_MODEL_ID", "").lower()
if f"{vid}:{pid}" == USB_VID_PID:
return path
except Exception:
continue
ports = sorted(glob.glob("/dev/ttyACM*"))
return ports[0] if ports else None
def wait_for_device() -> str:
"""Block until a DongLoRa device appears."""
print("Waiting for DongLoRa...", end="", flush=True)
while True:
port = find_port()
if port:
print(f" found {port}")
time.sleep(0.3)
return port
print(".", end="", flush=True)
time.sleep(0.5)
# ── COBS framing ─────────────────────────────────────────────────
def cobs_encode(data: bytes) -> bytes:
return cobs.encode(data) + b"\x00"
def read_frame(ser: serial.Serial) -> bytes | None:
"""Read one COBS frame. Returns decoded bytes or None on timeout."""
buf = b""
while True:
b = ser.read(1)
if not b:
return None
if b == b"\x00":
break
buf += b
if not buf:
return None
try:
return cobs.decode(buf)
except cobs.DecodeError:
return None
# ── Postcard encoding ────────────────────────────────────────────
def varint(n: int) -> bytes:
out = []
while n >= 0x80:
out.append((n & 0x7F) | 0x80)
n >>= 7
out.append(n & 0x7F)
return bytes(out)
def zigzag(n: int) -> bytes:
return varint((n << 1) ^ (n >> 31) if n >= 0 else ((-n - 1) << 1) | 1)
def decode_varint(data: bytes) -> tuple[int, bytes]:
n, shift = 0, 0
for i, b in enumerate(data):
n |= (b & 0x7F) << shift
shift += 7
if not (b & 0x80):
return n, data[i + 1:]
return n, b""
def decode_zigzag(data: bytes) -> tuple[int, bytes]:
n, rest = decode_varint(data)
return (n >> 1) ^ -(n & 1), rest
# ── Command encoding ─────────────────────────────────────────────
def encode_config(cfg: dict) -> bytes:
"""Encode a RadioConfig dict to postcard bytes."""
out = varint(cfg["freq_hz"])
out += varint(cfg["bw"])
out += varint(cfg["sf"])
out += varint(cfg["cr"])
out += varint(cfg["sync_word"])
out += zigzag(cfg["tx_power_dbm"])
return out
def encode_command(cmd: str, **kwargs) -> bytes:
"""Encode a command name + kwargs to postcard bytes."""
commands = {
"Ping": 0, "GetConfig": 1, "SetConfig": 2, "StartRx": 3,
"StopRx": 4, "Transmit": 5, "DisplayOn": 6, "DisplayOff": 7,
}
idx = commands[cmd]
out = varint(idx)
if cmd == "SetConfig":
out += encode_config(kwargs["config"])
elif cmd == "Transmit":
config = kwargs.get("config")
if config is None:
out += b"\x00"
else:
out += b"\x01" + encode_config(config)
payload = kwargs["payload"]
out += varint(len(payload)) + payload
return out
# ── Response decoding ────────────────────────────────────────────
def decode_response(data: bytes) -> dict:
"""Decode a postcard-encoded response into a dict."""
if not data:
return {"type": "Empty"}
variant = data[0]
rest = data[1:]
if variant == 0:
return {"type": "Pong"}
elif variant == 1:
return {"type": "Config", "raw": rest.hex()}
elif variant == 2:
rssi, rest = decode_zigzag(rest)
snr, rest = decode_zigzag(rest)
plen, rest = decode_varint(rest)
return {"type": "RxPacket", "rssi": rssi, "snr": snr, "payload": rest[:plen]}
elif variant == 3:
return {"type": "TxDone"}
elif variant == 4:
return {"type": "Ok"}
elif variant == 5:
code = rest[0] if rest else -1
return {"type": "Error", "code": code}
else:
return {"type": f"Unknown({variant})"}
# ── High-level helpers ───────────────────────────────────────────
def send(ser: serial.Serial, cmd: str, **kwargs) -> dict:
"""Send a command and return the response."""
ser.write(cobs_encode(encode_command(cmd, **kwargs)))
ser.flush()
data = read_frame(ser)
if data is None:
return {"type": "Timeout"}
return decode_response(data)
def connect(port: str | None = None, timeout: float = 2.0) -> serial.Serial:
"""Open a connection to a DongLoRa device."""
if port is None:
port = wait_for_device()
ser = serial.Serial(port, timeout=timeout)
ser.reset_input_buffer()
return ser
# Default radio config: 915 MHz, 125 kHz BW, SF7, CR 4/5
DEFAULT_CONFIG = {
"freq_hz": 915_000_000,
"bw": 7, # 125 kHz
"sf": 7,
"cr": 5, # CR 4/5
"sync_word": 0x1424,
"tx_power_dbm": 14,
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d87fff11980eae9dedc26d282044d4e2a2cb0c5",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d45",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e83a7742a",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d81ca",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"too_short"
],
"packet_hex": "0e",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "too_short"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e059a4de4672cb800",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e03ecae03d3",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e49ccbf3f0ec13ad078fcb388",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"not_meshcore"
],
"packet_hex": "0e12997b64",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e084f1fe9810b1b",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e034457314a00",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e463cdc15",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e818844416b",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d467ff4cb437b3d",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"not_meshcore"
],
"packet_hex": "cd7e890d9cf88609163bc016f16589",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e4929f160f4a2d8",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e08",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e0653d5fdb7c07ec84c",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e4a062c1454644f9c55875e32",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e00df",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0df10177c124c03e",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0efc04cc1ba7a48c103c3f967b",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d42",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"not_meshcore"
],
"packet_hex": "8efc96111f24ffac7370",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d4a93282aac5fe71ee69d9931d1f314",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e40",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK tdirect",
"tags": [
"ack",
"tdirect",
"invalid",
"not_meshcore"
],
"packet_hex": "cfbe",
"valid": false,
"expected": {
"route_type": "tdirect",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e09",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e8a36d3af7e23308bf856a32517f1b83aebaa99ec90d5b596d0edbf8b",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e407f",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d49",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e42ba2a",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d41f9fa2800",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d45060f194b801f43",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d44b407358073d7f46c47a5",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d46fd13897991a6ea56b9",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e0418",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d45c498a900dc5937",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0eca7505",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK tdirect",
"tags": [
"ack",
"tdirect",
"invalid",
"not_meshcore"
],
"packet_hex": "4fd6f34af48c944f0f971684dc536024083e8043009819",
"valid": false,
"expected": {
"route_type": "tdirect",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e495882",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d42b9",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"not_meshcore"
],
"packet_hex": "4d15cd363059094b1738295542f00808ede60b",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e88cd07d77e3b88ca98ad9ce24965c6",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e05c26859",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e4625029ec36c3b718c4a4df23aa2b6",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d8834251257f6e15f2f42ae55717942725a65492a336b00fe",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d81944f9ca1",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e471455d0a76598214e",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e09",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d88c32fc2d43e5182aaf10fb6197a1acbc831",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"too_short"
],
"packet_hex": "0e",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "too_short"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e41",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0dd9c90ce9e2d1",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e44e07365d30c27",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0ddea408635567c297ed",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e485a09bb49132760c4e222b1f5aece44670000",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0defeac9",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e4af1cba4cd74ec04",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d8899365bb6",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK tdirect",
"tags": [
"ack",
"tdirect",
"invalid",
"not_meshcore"
],
"packet_hex": "cfd3d5b2294c7c3daaedfd9e468ed3b2bf34c6dee7",
"valid": false,
"expected": {
"route_type": "tdirect",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e04",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e885874cd50adc6dfbe9ba881502c1894ed3717f7ca",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"not_meshcore"
],
"packet_hex": "4e2d0fce",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK tflood",
"tags": [
"ack",
"tflood",
"invalid",
"not_meshcore"
],
"packet_hex": "8ce464",
"valid": false,
"expected": {
"route_type": "tflood",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e89e2937bd921f72b8e",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e0985",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e00",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"too_short"
],
"packet_hex": "0e",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "too_short"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0ef57c",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e4ae8b4db7407e170",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d42382216",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e01dd",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0dfe3cbc",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"too_short"
],
"packet_hex": "0e",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "too_short"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d466edf746d6070",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e4863815d1d286c212a3a31",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"not_meshcore"
],
"packet_hex": "0efb6ac580ecd52995",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e07740c9ddcd6fad18a",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e0af6b6d5",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK tflood",
"tags": [
"ack",
"tflood",
"invalid",
"not_meshcore"
],
"packet_hex": "4c6c80bcf0",
"valid": false,
"expected": {
"route_type": "tflood",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e8403",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d8984ee6303c920346a044aa03a8cf578999e053e00faca40ddc5d0e6d800",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d4557dcb77172618018b5cbda00",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e4578b25cab0e9d8db1e853",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e87e7aeb251da0e000604286775",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d83c445cd99287a",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"too_short"
],
"packet_hex": "0e",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "too_short"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d85936bbe458600",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d88bc",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d83d15f8c590bca",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e8ae89f9dbd0bf5a2687da672047837ca0b8e4b0dcf999b0cca1ba08d",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK tdirect",
"tags": [
"ack",
"tdirect",
"invalid",
"not_meshcore"
],
"packet_hex": "cfff36714cfe82",
"valid": false,
"expected": {
"route_type": "tdirect",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d45a1692a4fea4d",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e8159c592",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e87ca11aa38203a",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK tflood",
"tags": [
"ack",
"tflood",
"invalid",
"not_meshcore"
],
"packet_hex": "8c0110",
"valid": false,
"expected": {
"route_type": "tflood",
"payload_type": "ACK",
"error": "not_meshcore"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK direct",
"tags": [
"ack",
"direct",
"invalid",
"bad_framing"
],
"packet_hex": "0e00",
"valid": false,
"expected": {
"route_type": "direct",
"payload_type": "ACK",
"error": "bad_framing"
}
}
@@ -0,0 +1,16 @@
{
"description": "Generated invalid: ACK flood",
"tags": [
"ack",
"flood",
"invalid",
"bad_framing"
],
"packet_hex": "0d07b3f9ba",
"valid": false,
"expected": {
"route_type": "flood",
"payload_type": "ACK",
"error": "bad_framing"
}
}
Loaded 100 of 9898 files, more files were not shown because too many files have changed in this diff. Show more