MeshCore icon

MeshCore

Interact with a MeshCore device over TCP/WiFi

Utility → Encode Channel Datagram

AI-generated

Summary

Encode a channel datagram into a MeshCore packet frame. Provide the channel secret, an application-defined uint16 data type, and datagram bytes as hex; choose the path hash size to match the mesh so repeaters interpret the route correctly.

Inputs

  • Channel Secret (required) — The 16-byte channel secret as hex, obtained from Channel → Get Channel.
  • Data Type (required) — Application-defined datagram type from 0 to 65535 (uint16).
  • Data (required) — Datagram payload bytes as hex.
  • Path Hash Size — Bytes per hop: 1, 2, or 3. Set this to the mesh's path hash size, available as pathHashSize from Device → Get Device Info.

Output shape

A single item containing the encoded packet frame.

This operation encodes the datagram; it does not send it to the mesh.

Links

Discussion