ZOON- LoRa Mesh

Mesh network architecture is a crucial part of IOT and swarm applications. All Zoon models come with built-in mesh functionality that enables you to broadcast the message to all receivers or send to certain Zoon modules.

MESH DATA FORMAT

0x7E , 2 BYTES DESTINATION ID (MSB ORDER), 2 BYTES LENGTH (MSB ORDER), DATA BYTES

 

 

Send DESTINATION ID as 0 to Broadcast data to all ZOON receivers  

 

EXAMPLE C++ Code to convert data bytes to ZOON acceptable mesh format

static uint8_t mesh_buffer[MAX_BUFFER_SIZE+5];
int to_lora_buffer(uint16_t destinationId,uint8_t* data_buffer,int length,uint8_t* mesh_buffer) {
        
    const int start = 5;
    mesh_buffer[0] = 0x7E;  // MESH MARK
    mesh_buffer[1] = destinationId >> 8;  // DESTINATION ID
    mesh_buffer[2] = destinationId & 0xFF;
    mesh_buffer[3] = length >> 8;       // LENGTH
    mesh_buffer[4] = length & 0xFF;

    for (int i = 0; i < length; i++) {
            mesh_buffer[i+start] = data_buffer[i];
        }
    return start + length;
}

Leave a comment

Please note, comments must be approved before they are published

-->