Files
MeshCore/docs
Robert Ekl f5b6ff4c14 docs: fix channel index range, secret semantics and payload limit
Three factual errors in companion_protocol.md:

- The channel-datagram payload cap was given as 163 (MAX_FRAME_SIZE - 9 when
  MAX_FRAME_SIZE was still 172). It went 172 -> 176 in 62f1b11d, but simply
  updating the arithmetic to 167 would be worse than the stale value: 167 is
  only the host-frame bound (MyMesh.cpp:1265). The radio-side bound is
  MAX_GROUP_DATA_LENGTH = 184 - 16 - 3 = 165 (MeshCore.h:21, enforced at
  BaseChatMesh.cpp:544). A 166- or 167-byte payload passes the frame check,
  fails the radio check, and comes back as ERR_CODE_TABLE_FULL -- which this
  same doc describes as "retry later", so a conforming client would retry a
  permanently failing send forever. Documents 165 as the limit to enforce and
  calls out the 166-167 band explicitly.

- Channel index was documented as 0-7 throughout. The bound is
  MAX_GROUP_CHANNELS (BaseChatMesh.cpp:927,936), which is 40 on most current
  variants, 8 on some and 1 on others. Clients should read max_channels from
  byte 3 of PACKET_DEVICE_INFO instead. Index 0 is pre-populated with the
  built-in Public channel but is not reserved.

- The secret field was documented as "all zeros" for public channels. The
  firmware always hashes a real 16-byte key; the public channel ships with
  izOH6cXN6mrJ5e26oRXNcg== (companion_radio/MyMesh.cpp:111,1040). An all-zero
  secret is not a private channel and not an inert one: SHA256 over 16 zero
  bytes is a fixed global constant, giving a well-known channel with an
  all-zero AES key. searchChannelsByHash skips unnamed slots for exactly this
  reason (BaseChatMesh.cpp:392-401), but a named slot with a zero secret is
  not skipped and will absorb null-key group traffic from any node. Now
  documented as something not to do.
2026-09-02 11:38:06 -05:00
..
2026-03-31 00:51:15 +13:00
2026-02-04 00:59:13 +13:00
2026-02-04 00:59:13 +13:00
2026-02-12 17:12:23 +13:00
2026-08-28 13:12:59 +10:00
2026-07-06 02:04:56 +12:00