LoRa packet size in meshtastic

As the maximum payload length is 240, is the maximum packet size 256 bytes including preamble and flag bits? As I calculated, from https://meshtastic.org/docs/software/other/mesh-alg for Layer 1: Non reliable zero hop messaging total preamble + header = 20 bytes. If so, then maximum packet size becomes 260 bytes. Tell me where I am wrong?

1 Like

New location for that page is here. Seems like a good question for @geeksville.

1 Like

I think the correct doc link is here: Mesh broadcast algorithm | Meshtastic

Where did you see that the maximum payload length is 240? The low level header is 16 bytes, and the max packet size is 256 bytes. However, what is inside the remaining space is a Data protobuf. That protobuf has a small but payload specific overhead and the data bytes you’ve sent.

If you subtract the max packet size from the header it becomes (256-16) = 240. Also in the meshtastic API one variable PAYLOAD_LEN = 240. Here is the link: meshtastic.mesh_pb2 API documentation

1 Like

thanks, I’ve fixed the docs and the value.

1 Like

I would like to inform you that, whenever I tried sending packet more than the size of the 223 not all the time my packet got Ack=success. It majorly fails or the device take reboot. Another question is, Can you tell me the break up of all the nodes and the break up as in Mesh broadcast algorithm | Meshtastic because 237+16+3 = 256, but where these 3 bytes are used?