Close

State Machine to Implement MAC

A project log for Low power mesh networking for small sensor grids

Tiny MQTT-interoperable broadcast mesh networking with simple radios

DanielDaniel 06/08/2017 at 00:480 Comments

I've added some code to work on the MAC (media access control) protocol, linked from the project page. The purpose of the MAC is to keep track of when the radio should listen or transmit. The implementation is a very simple state machine that takes a single tick(time) event and transitions between states for idle, tx, and rx. We send commands to the radio when entering and leaving states, and can easily avoid trying to transmit when we should be receiving and vice versa.

The state machine is based on this popular C++ implementation by .

Discussions