M17: compute the stream packet CRC on outbound frames
xlxd rebuilds every M17 stream packet it relays and wrote 0x0000 in the
CRC field. Add the M17 CRC-16 (poly 0x5935, init 0xFFFF, no reflection,
no final XOR) to CCRC and append it, big-endian, over bytes 0..51 of
every voice, last-frame and synthetic EOT packet.
M17: accept any unencrypted voice stream TYPE
Inbound stream packets were accepted only when the low byte of TYPE was
exactly 0x05, so a stream declaring GNSS or extended callsign META, or a
non-zero CAN, had every packet dropped without a log line and the whole
transmission was lost. Decode the full 16-bit TYPE and accept any stream
whose data type is voice (Codec2 3200) with no encryption, whatever its
META, CAN or signed bit. Unsupported streams (encrypted, voice+data,
data, packet mode) are still dropped, now with one log line per stream.
Signed streams carry their signature in the last four frames. xlxd
re-encodes every stream, so the signature cannot be passed on: the
three signature-only frames are dropped, the final frame is sent as
Codec2 silence, and the stream goes out unsigned.
M17: number inbound frames from the packet stream counter
Inbound M17 frames took their packet ID from the M17 frame number
(FN * 2, truncated to 8 bits). The D-Star side numbers frames modulo
21, and 256 is not a multiple of 21, so every 5.12 s D-Star listeners
received a 4-frame superframe and an early sync frame, restarting the
slow data. Leave the packet ID undefined, as other non-D-Star modes do,
so the packet stream numbers frames from its own continuous counter.
YSF: reassemble multi-frame Wires-X commands
A Wires-X command can span several data frames (FN 1..FT). Each frame
was decoded into a buffer local to the call, so the frames were never
combined: the final frame was CRC-checked without the earlier frames'
bytes, and a non-final frame was decoded as a whole command with no CRC
check. Two-frame requests, such as the FT2D's ALL_REQ for Search/All,
were dropped and the module list never appeared.
Reassemble each command per source (IP:port) in a zeroed buffer,
accepting frames only in sequence, with the same FT and no more than
1 s apart. A command is decoded once, on its final frame, after the end
marker and CRC check, which now only looks at the bytes received.
Frames 3 onwards use the 40-byte layout of G4KLX's YSFGateway; the
previous 20-byte stride overwrote frame 2's data.
xlxd.interlink: remove the REF030, XRF030 and DCS030 examples.