Schedules
The IEEE802.15.4e schedule is implemented in schedule.c. The schedule is what an application to find a trade-off between energy-efficiency, latency and throughput.
During development, we suggest you hard-code one of the following schedules.
Development Schedule
This is a 9-slot schedule:
slot number | master behavior | slave behavior |
0 | ADV (ch.0) | ADV (ch.0) |
1 | TX to slave (ch.0) | RX from master (ch.0) |
2 | RX from slave (ch.0) | TX to master (ch.0) |
3 | TX to slave (ch.0) | OFF |
4 | RX from slave (ch.0) | OFF |
5 | TX to | TX to |
6 | SERIALRX | SERIALRX |
7 | OFF | OFF |
8 | OFF | OFF |
Its purpose is to cover all possible scenarios:
- ADV in slot 0;
- "normal" communication in slots 1 and 2;
- transmission without an ACK in slot 3 (which should trigger a retransmit);
- idle listen in slot 4;
- broadcast in slot 5;
- slots 6-8 are left for serial activity.
The channel offset is 0 for all slots so that, by deactivating channel hopping, all communication happens on a single channels. Tis makes it easier to debug with a sniffer.
The figure below shows a single 9-slot frame:
(source file at nine_slots_final.prj)
During development, we recommend you implement this frame completely, and activate (i.e. uncomment) the different slots one by one. This way, you'll first make sure that synchronization works with ADV, then add ACK'ing by adding slot 1, etc.
Slotted-Aloha Schedule
This is the simplest schedule to verify connectivity. It is 9 slots long:
slot number | master behavior | slave behavior |
0 | ADV (ch.0) | ADV (ch.0) |
1 | shared TX/RX (ch.0 | shared TX/RX (ch.0) |
2-8 | OFF | OFF |
Slot 0 is used only to exchange ADV messages; slot 1 to exchange data packets. In slot 1, all nodes listen when they have nothing to send. When they have a packet to send, they use CSMA medium access strategy by backing off when no ACK is received.
Streaming Schedule
This is a schedule to show high datarate multi-hop communication. The idea is to alternate Tx and Rx slots and to receive data and forward it in the next slot. By playing with the channel offset, up to 16 transmission can happen at the same time, in the same slot. This allows multi-hop streaming to be demonstrated, even with all the nodes in the same room.
slot number | "even" node | "odd" node |
0 | ADV (ch.0) | ADV (ch.0) |
1 | see figure | see figure |
2 | see figure | see figure |
This also requires assigning hard-coded "rank" to each node in the chain, which is then used to determine the channel offset.
The full 16-hop network would be:
Note: nobody would hard-code routing in a real-world network, this schedule is just meant to demonstrate multi-hop communication even when all nodes are within each other's range.