Expand description
3GPP TS 27.010 (GSM 07.10) basic-option frame encode/decode.
Frame: F9 | address | control | length (1–2 octets, EA) | info | FCS | F9.
No byte stuffing: the length field delimits the info, so payload bytes may be 0xF9.
FCS is CRC-8 (reflected poly 0x07, i.e. 0xE0) over address+control+length; for UI
frames the info field is included too.
Structs§
- Decoded
Frame - Deframer
- Streaming deframer: keeps partial frames across reads and resyncs on garbage.
Constants§
- DEFAULT_
MAX_ RX_ INFO - Default receive limit for the info field: room for a 1500-byte IP packet in PPP
framing. A corrupt length octet (noise, a lost flag) then costs one dropped frame,
not a stall until 32 KiB more arrive. Raise it with
Deframer::with_max_infowhenAT+CMUXsets a larger N1. - DISC
- DM
- FLAG
- MAX_
INFO - Largest info field the basic option can describe: the 2-octet length field holds 15 bits (27.010 §5.2.1.5).
- PF
- SABM
- Frame types (control field with the P/F bit cleared).
- TX_N1
- Info bytes per transmitted frame. Basic option defaults N1 to 31 unless
AT+CMUXsets it, so 31 is the only size every modem accepts. - UA
- UI
- UIH
Functions§
- decode_
address - encode_
address - encode_
frame - One frame.
cris the address C/R bit; as initiator we set it on commands and UIH. - encode_
uih - UIH data frames for
payload, split intoTX_N1-sized info fields. - fcs