D-RATS over D-STAR as an SBP mode#
dstar-drats puts D-RATS-style traffic on the air as native D-STAR DV, generated and decoded by SPEEDBIRD itself
(no D-STAR radio firmware in the loop, no GPL code: D-RATS is GPL and is not imported).
Layers#
| Layer | Code | What |
|---|---|---|
| PHY | src/speedbird/drats/dv.py |
D-STAR DV: GMSK 4800 bit/s, BT 0.5, 48 kHz baseband for an FM modulator. RF header (MYCALL, URCALL CQCQCQ, RPT1/RPT2 DIRECT), voice frames = AMBE silence, user bytes in slow-data type 0x3 blocks (the DV data stream Icom radios pass to their data port). 50 user bytes per 420 ms superframe ≈ 950 bit/s raw. RX reuses modes/dstar.py DStarDecoder. |
| Framing | src/speedbird/drats/ddt2.py |
D-RATS DDT2: [SOB] + yEnc(25-byte header !BHBBHH8s8s + payload) + [EOB]; magic 0xDD = zlib / 0x22 = raw; CRC-16/XMODEM; stations padded with ~. |
| Link | src/speedbird/drats/session.py |
DRatsSession (LinkSession): D-RATS chat / ping / echo on session 1; SPEEDBIRD ARQ link on DDT2 session 0xB5 (CONN / CONN_ACK / DATA / ACK / DISC / DISC_ACK, selective repeat, ACK after each burst, data piggybacked on the ACK burst, half duplex with quiet_s). |
| Registration | src/speedbird/modem/families/dstar.py, modem/registry.py, core/decoderdefs.py |
SBP mode dstar-drats, protocol d-rats, Decoders page built-in "SBP D-STAR D-RATS" (FM-D, vhf profile). |
Config#
tnc:
- {radio: ic9700, cmd_port: 8700, kind: modem, protocol: dstar-drats}
# optional session params: level (TX 0..1, 0.5), lead_s (0.15), ack_timeout_s (4), max_tries (8),
# burst_bytes (600), frame_bytes (200), quiet_s (0.7), urcall (CQCQCQ)
The TNC port speaks the same VARA-style host commands as other kind: modem entries (MYCALL, LISTEN, CONNECT,
DISCONNECT, data port), so Pat P2P works between two SPEEDBIRD stations. DRatsSession.chat() / .ping() are the
D-RATS-facing calls (no API route yet).
Radio requirements#
The radio must be in FM / FM-D with a flat data path (9600-baud style, no pre-emphasis / mic filtering), not in DV mode: in DV mode the radio does D-STAR itself and would expect the data on its own serial data port. GMSK 4800 occupies about 6.25 kHz; uncoded slow data needs a strong signal (sim: clean at 20 dB, retries at 12 dB, fails at 8 dB in the 2500 Hz reference).
Status / unverified#
- Verified: unit tests + PairSim link (connect, 2000 B both ways, chat, ping, disconnect) and the host TNC over the
real TX arbiter (
tests/drats/, the TNC test is-m slow). - Unverified on air: decoding by real D-STAR radios (header / slow data from our GMSK through an FM
transmitter), and DDT2 interop with the D-RATS program (yEnc escape set and
~padding are from the published description, marked VERIFY inddt2.py). - Not implemented: D-RATS file transfer / stateful sessions, forms, email; D-RATS ratflector (network) ports; driving a radio's own DV data port (serial) instead of our GMSK.