Table of Contents
Serialisation
Some systems for serialising data that may be useful for sending messages over LoRa.
- Custom format. Most efficient on space but least flexible and most work to reimplement.
- Protobufs - used by Meshtastic.
- BSON - Binary JSON. “BSON can be compared to binary interchange formats, like Protocol Buffers. BSON is more “schema-less” than Protocol Buffers, which can give it an advantage in flexibility but also a slight disadvantage in space efficiency (BSON has overhead for field names within the serialized data).”
- FlatBuffers - https://flatbuffers.dev/
- https://msgpack.org/index.html - used by LXMF / Reticulum
- Direct use of NMEA2000 PGNs?
- NMEA0183 strings?
- BSON SignalK? Probably way too verbose I guess.
Worklog / Deliberations
26 Nov 2023, River
I was tempted to go for a custom protocol because of very limited space, but after talking to someone about it last night I think I have been convinced protobufs or similar is the way to go. He said he worked with protobufs, as used by meshtastic, and with Reticulum, which uses a semi-custom protocol, and found meshtastic more pleasant to work with. Also, he is reïmplementing Reticulum in Rust, and such things are much easier where a protobuf library is already available. Also, it maybe possible to define the messages with protobufs, and still use that definition to serialise to a custom protocol.
Protobufs could also maintain compatibility with Meshtastic which could be useful if meshtastic becomes popular enough that nodes maybe encountered that can relay messages for us.