Table of Contents

Node <-> Gateway protocol

Initialisation

When a node starts, it sends a NodeStarted message containing a generated signature and a boolean indicating if it requires a new NodeId to be assigned to it. If it does, the gateway assigns a new NodeId and send a NodeConfig command containing the signature and the new NodeId. The signature is used to avoid that different nodes having the same nodeId keep on having the same by processing the same ConfigCommand.

Message Type

Message type is used to indicate the structure of the message need to parse it.

Message type is composed of 8 bit. Two first bits indicate wether the message is a query, a command or a report (KK). The rest of the byte is used to define the message type (TTTTTT).

KK TTTT Meaning Description
0 Report When one node want to send information to another. Might be the response to a Query
0 NodeInfo General node information such as software version, uptime, battery level or send error count
1 PulseReport Number of pulse detected since last sent message
2 Environment data Temperature, humidity, …
3 NodeStarted Sent by nodes when they boot to initialise
1 Query When one node want to ask information to another
2 Command When one node want another one to perform an operation
0 UpdateConfig Used by gateway to indicate its new config to a node