Opportunistic Xbee optimization in a mobile mesh network.
Go to file
Adrien Marquès e3a3562177 add 'node' code base | fix well 2018-12-01 18:38:00 +01:00
node/main add 'node' code base | fix well 2018-12-01 18:38:00 +01:00
well/main add 'node' code base | fix well 2018-12-01 18:38:00 +01:00
.gitignore init readme | init well codebase 2018-12-01 18:26:27 +01:00
README.md rename 'data' structure into 'message' 2018-12-01 18:36:02 +01:00
protocol.h rename 'data' structure into 'message' 2018-12-01 18:36:02 +01:00

README.md

| Opportunistic ZigBee |

I. Overview

This project aims to design and optimize a solution for an optimistic network using Arduino and XBee.

The base scenario takes place in a mesh network of similar nodes ; each being subject to real-time motion. Every node has to transmit logging data (i.e. periodically) to a special node : the **well ** ; the well is unique in the network and is the only one that actually receives data, every other node has the same source code and behavior.

Main goals :

  1. Optimize network usage : limit duplicates and retransmissions
  2. Maximize relative space-awareness throughout time : avoid losses and retransmissions
  3. [TODO]

Vocabulary

  • distance - the relative distance to the well. The well has a distance of 0, its direct neighbors a distance of 1 and so on.

  • wave - a distance propagation of distances throughout the network that share a common source.


II. File structure

The code is split over 2 sub-projects :

  • the well, located inside well/main/.
  • nodes, located in the node/main folder.

The project bundles its required libraries - for compatibility purposes - inside the libraries/ folder. Symbolic links make them available for each sub-project.


III. Algorithm

1) Data structure

Every communication follows a consistent data format which can be split into 2 types ; the first byte (i.e. called opcode) allows receivers to identity the data type.

Discover Request

The discover data format is used to propagate the relative distances throughout the network. The well is the only node that can initiate a discover request, other nodes only make sure of the propagation.

struct discover {
    uint8_t opcode; // opcode = 0
    uint8_t wave;   // id de la wave
    uint8_t dist;   // current node's distance
};
Data Message

The data format is sent by nodes to submit messagesca to the well.

struct message {
    uint8_t opcode; // opcode = 1
    uint8_t dist;   // distance of the last sender
    uint8_t ttl;    // time to live default = 10
    uint8_t size;   // size of message in bytes
    uint8_t data[]; // actual message
};

2) Well

The well features 2 routines :

  1. Send discover requests periodically
  2. Listen for incoming data.

3) Nodes

[TODO]