User Tools

Site Tools


This is an old revision of the document!

Guide to Packet Format

Example packet:

  1. Repeat Number: The first byte contains the number of repeats - most commonly this is set to 3 however if you want the packet to go further then you can increase this number. Everytime a packet is repeated the node subtracts 1 from this number, once it reaches 0 the packet will not be repeated.
  2. Sequence Count: this cycles from 'b' to 'z' allowing packets to be distinguished, 'a' is only transmitted on boot of the node.
  3. Data: this is where the main packet data is placed, for example location or temperature. Each data type starts with an identifying character and then each value separated by a comma. E.g.

    For more information see Packet Data Types. The data section is variable in length but ideally the shorter the packet the better.

  4. Path: enclosed within '[' and ']' each node adds its node ID separated by a comma at the end. Each node ID can be up to a maximum of 16 bytes. Nodes only repeat packets that they haven't repeated before (to avoid loops) so before repeating the node needs to check for its node ID in the path section. For example (pseudocode)
    1) detect final ] in string/array
    2) replace ] ,your_ID]
packet_format.1408728978.txt.gz · Last modified: 2020/06/27 23:02 (external edit)