There seems to be some inconsistency around the expected success response for SEND_CHANNEL_MESSAGE / CMD_SEND_CHANNEL_TXT_MSG.
The Companion protocol docs on docs.meshcore.io say it returns PACKET_MSG_SENT (0x06) on success.
The older Companion Protocol wiki instead documents CMD_SEND_CHANNEL_TXT_MSG as returning RESP_CODE_OK (0x00) on success.
The current firmware also returns RESP_CODE_OK for channel messages:
if (success && sendGroupMessage(...)) {
writeOKFrame();
}
At the same time, CMD_SEND_TXT_MSG (0x02) for direct/contact messages returns RESP_CODE_SENT (0x06) on success.
So currently:
docs.meshcore.io: channel message → SENT (0x06)
- GitHub wiki: channel message →
OK (0x00)
- firmware
CMD_SEND_CHANNEL_TXT_MSG: → OK (0x00)
- firmware
CMD_SEND_TXT_MSG: → SENT (0x06)
I'm not sure whether the different response between direct and channel messages is intentional, or whether one of the implementations/docs is outdated, but it would be good to clarify what the intended response for SEND_CHANNEL_MESSAGE is.
There seems to be some inconsistency around the expected success response for
SEND_CHANNEL_MESSAGE/CMD_SEND_CHANNEL_TXT_MSG.The Companion protocol docs on docs.meshcore.io say it returns
PACKET_MSG_SENT(0x06) on success.The older Companion Protocol wiki instead documents
CMD_SEND_CHANNEL_TXT_MSGas returningRESP_CODE_OK(0x00) on success.The current firmware also returns
RESP_CODE_OKfor channel messages:At the same time,
CMD_SEND_TXT_MSG(0x02) for direct/contact messages returnsRESP_CODE_SENT(0x06) on success.So currently:
docs.meshcore.io: channel message →SENT (0x06)OK (0x00)CMD_SEND_CHANNEL_TXT_MSG: →OK (0x00)CMD_SEND_TXT_MSG: →SENT (0x06)I'm not sure whether the different response between direct and channel messages is intentional, or whether one of the implementations/docs is outdated, but it would be good to clarify what the intended response for
SEND_CHANNEL_MESSAGEis.