s = 16 : number of slots n = 256 : max number of nodes id : 8-bit id, unique to each node k : The number of cycles it takes to detect another transmission
Slots start at fixed, even intervals.
[#0 |#1 | ... |#F ]
A node will want to transmit once each round,
- If it's already transmitted, won't transmit until next round.
At the beginning of a slot, each node wanting to transmit;
- Starts checking whether another node is busy.
- Waits up to k*( (id+s)%16 ) cycles.
- If it detects another node transmitting, abandons the slot.
- If it's finished waiting, starts transmitting.
If a collision is detected;
- Each node that was transmitting waits (id>>4) slots before trying to retransmit.
If more than X collisions are detected, nodes reduce their probability of trying to transmit.