Skip to content

Comments

docs: fix companion protocol guide mismatches with current firmware#1813

Closed
robekl wants to merge 1 commit intomeshcore-dev:devfrom
robekl:docs_update_protocol_guide
Closed

docs: fix companion protocol guide mismatches with current firmware#1813
robekl wants to merge 1 commit intomeshcore-dev:devfrom
robekl:docs_update_protocol_guide

Conversation

@robekl
Copy link

@robekl robekl commented Feb 24, 2026

Summary

Targeted accuracy fixes in docs/protocol_guide.md to match current companion firmware behavior and BLE transport.

Changes

  • Corrected BLE UUIDs and RX/TX direction for ESP32 companion transport.
  • Added nRF52 BLEUart note to avoid incorrectly applying ESP32 UUID assumptions.
  • Corrected APP_START response expectation from PACKET_OK to PACKET_SELF_INFO.
  • Corrected SET_CHANNEL wire format to 16-byte secret payload (50-byte frame) and documented 66-byte/32-byte secret variant as unsupported.
  • Corrected battery/storage response format to millivolts + used/total storage KB.
  • Removed incompatible SHA-512 channel-secret expansion guidance for companion SET_CHANNEL.
  • Fixed response matching/parsing contradictions (e.g., PACKET_OK size assumption).

Implementation References

  • examples/companion_radio/MyMesh.cpp
    • CMD_APP_START, RESP_CODE_SELF_INFO, CMD_SET_CHANNEL, CMD_GET_BATT_AND_STORAGE
    • MyMesh::handleCmdFrame
    • MyMesh::writeOKFrame
    • MyMesh::writeErrFrame
  • src/helpers/esp32/SerialBLEInterface.cpp
    • SERVICE_UUID, CHARACTERISTIC_UUID_RX, CHARACTERISTIC_UUID_TX
  • src/helpers/nrf52/SerialBLEInterface.cpp
    • Bluefruit BLEUart transport usage

@liamcottle
Copy link
Member

A bunch of these changes will probably have merge conflicts when going into main branch, since some of these docs are already adjusted on main branch. Generally, docs changes are opened against main, and code changes opened against dev. Also, as far as I know, the original protocol guide doc was generated by AI and sent as a PR. So the majority of it was wrong.

@robekl
Copy link
Author

robekl commented Feb 24, 2026

@liamcottle Thanks for the info. I opened a PR against main branch for doc updates: #1823

When one of these is merged, I can close the other

@liamcottle
Copy link
Member

Superseded by #1823

@liamcottle liamcottle closed this Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants