Core Networking · Study deck

MAC Protocols: Sharing the Channel

Picture twenty battery sensors trying to report through one receiver after power returns.

Packet Pete is your guide for this deck.

fund
Packet Pete, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: Step two does the real work, because the gateway answers out loud, so the hidden node hears a grant it could never have worked out by listening for the sender.
  • Explain: Carrier sensing before transmission also only proves the channel looked clear to the sender, not that it will stay clear at the receiver—the hidden-terminal problem covered below.
  • Explain: In an IoT network the medium might be a Wi-Fi channel, an IEEE 802.15.4 channel, a sub-GHz LPWAN channel, or a wired bus.
  • distinguish hidden-terminal collisions from exposed-terminal over-deferral
iotclass.org

Major section

Start With Who Gets to Talk

IEEE 802.15.4 is one low-power radio and channel-sharing standard.

  • Its name alone does not say how the installed devices behave when they all want the channel.
  • An idle channel at one sender is not proof that the receiver is free.
  • This opening does not say that one access method always wins.

Key terms

MAC protocols
MAC protocols are the rules that decide who may transmit, who must listen, and how the network recovers when two devices choose the same moment.
iotclass.org

Major section

Start With Who Gets to Talk (continued)

The network can retry and report, but the device needs a known rule for a missed deadline.

  • Practitioner compares random, listen-before-send, and scheduled choices.
  • If the hard moment no longer fits the promise, change the rule or narrow the promise before release.
  • For IoT design, the question is practical before it is theoretical.
iotclass.org

Major section

MAC Rules Decide Who Transmits

Medium Access Control, or MAC, is the data-link responsibility that controls access to a shared medium.

  • In an IoT network the medium might be a Wi-Fi channel, an IEEE 802.15.4 channel, a sub-GHz LPWAN channel, or a wired bus.
  • A good MAC choice is not simply a protocol name.

Key terms

MAC evidence
MAC evidence is local but it shapes the whole system.
IEEE 802.15.4
IEEE 802.15.4 is worth naming because it is a real, deployed protocol that does not sit neatly in one MAC family.
Conceptual CSMA/CA loop; the exact CCA order, backoff update, retry limit, and acknowledgement behaviour are defined by the selected MAC profile. Open the full-size loop.
Conceptual CSMA/CA loop; the exact CCA order, backoff update, retry limit, and acknowledgement behaviour are defined by the selected MAC profile. Open the full-size loop.
iotclass.org

Major section

MAC Rules Decide Who Transmits (continued)

The MAC decision is local and immediate: listen, wait, transmit, acknowledge, retry, or sleep.

  • CSMA/CA shares a channel by listening and backing off.
  • TDMA shares a channel by assigning time.
  • ALOHA-style access transmits with minimal coordination and accepts collisions when traffic is sparse enough.
  • MAC evidence is local but it shapes the whole system.
iotclass.org

Major section

MAC Rules Decide Who Transmits (continued)

Carrier sensing, random backoff, acknowledgements, and bounded retries help them share moderate traffic without a central schedule.

  • A door sensor sending a rare alarm can tolerate a different access rule from a motor controller that must report in a bounded time window.
  • Wireless radios cannot do this cheaply.
  • A missing acknowledgement is not a verdict.
iotclass.org

Major section

MAC Rules Decide Who Transmits (continued)

A battery node that wakes for a few milliseconds cannot afford long idle listening, while a powered gateway can coordinate schedules, acknowledgements, and retries.

  • A defensible design names the local access rule, the expected traffic shape, the devices that cannot hear one another, and the field evidence that will trigger retesting.
  • Every shared-medium MAC design answers the same question with one of three strategies: let transmissions collide and accept the loss, detect a collision while it happens and stop early, or avoid collisions before they start.
  • Access can become predictable and idle listening can fall when synchronization and slot allocation are maintained.
iotclass.org

Major section

MAC Rules Decide Who Transmits (continued)

Carrier sensing before transmission also only proves the channel looked clear to the sender, not that it will stay clear at the receiver—the hidden-terminal problem covered below.

  • A clear channel lets the frame go, while a busy one sends the sender back to waiting instead of into a collision.
  • After transmission the flow splits on whether an acknowledgement was expected at all, and only then on whether one arrived.
  • The busy-channel branch returns to bounded backoff; the success branch closes only after the selected profile's acknowledgement condition is satisfied.
iotclass.org

Major section

MAC Rules Decide Who Transmits (continued)

Bursty traffic with moderate contention and devices that can sense much of the local channel.

  • Predictable reporting, bounded latency, or duty-cycled devices that can follow a schedule.
  • Very sparse, low-duty-cycle telemetry where coordination would cost more than occasional retransmission.
  • The lesson for MAC selection is not that 802.15.4 is the answer.
iotclass.org

Major section

MAC Rules Decide Who Transmits (continued)

It defines low-rate physical and MAC options used by Zigbee, Thread, and other low-power WPAN stacks, and it targets infrequent, short, low-duty-cycle transmissions so battery devices can sleep almost all the time.

  • One common channel-access rule is CSMA/CA, the same family described above, but 802.15.4 offers it in two forms.
  • A non-beacon-enabled network uses unslotted CSMA/CA: devices sense the channel and back off independently, while a coordinator may still manage association.
  • A beacon-enabled network has a PAN coordinator broadcast periodic beacons that define a superframe.
iotclass.org

Major section

Choose MAC Rules from Evidence

Each sensor sits at the centre of its own range, and the gateway sits where the two ranges overlap.

  • Node A and node C are outside each other's circle, so neither can hear the other.
  • That geometry is the whole failure.
  • Periodic traffic can use schedules; irregular traffic may need contention or event slots.

Key terms

Assuming low average utilization
Assuming low average utilization means collisions will be rare.

Why it matters

That record should be tied to a physical layout, because shelves, machinery, walls, and antenna height can change who hears whom even when every node reports the same configured channel.

Hidden terminals make carrier sensing look successful at the sender while the receiver sees a collision.
Hidden terminals make carrier sensing look successful at the sender while the receiver sees a collision.
iotclass.org

Major section

Choose MAC Rules from Evidence (continued)

Each sensor checks the channel, finds it idle, and is correct about what it can hear.

  • Using a fixed schedule with no event or shared capacity, which may waste slots or delay unpredictable alarms.
  • Hidden terminals may need RTS/CTS, placement changes, more gateways, or scheduled access.
  • Assuming low average utilization means collisions will be rare.
iotclass.org

Major section

Choose MAC Rules from Evidence (continued)

Worst-case wait, backoff distribution, retransmission time, and queueing under bursts.

  • Safety or control messages need bounded access, priority, or a separate path.
  • Sleeping outside a scheduled slot can save power, but missed synchronization can be costly.
  • A warehouse has periodic inventory sensors behind metal shelving.
iotclass.org

Major section

Choose MAC Rules from Evidence (continued)

The average channel load is low, but sensors on opposite aisles cannot hear each other and both can reach the gateway.

  • Basic CSMA/CA without receiver-coordinated reservation may still lose frames because each hidden sensor believes the channel is idle.
  • Improve VisibilityMove gateways, add gateways, or adjust antennas so more nodes can hear each other and the coordinator has cleaner reception.
  • Step one has the sender ask for a stated length of airtime.
RTS/CTS helps when a receiver can warn nodes that the sender cannot hear directly.
RTS/CTS helps when a receiver can warn nodes that the sender cannot hear directly.
iotclass.org

Major section

Choose MAC Rules from Evidence (continued)

Step two does the real work, because the gateway answers out loud, so the hidden node hears a grant it could never have worked out by listening for the sender.

  • In step three that node starts a timer and stays quiet, which is virtual carrier sensing.
  • The closing lines keep the claim honest: the request itself can still collide, and nothing here removes interference or a weak receiver.
  • In IEEE 802.11, an optional RTS/CTS exchange can reserve the medium before a unicast data frame.
iotclass.org

Major section

MAC Collision and Timing Bounds · Hidden and Exposed Terminals

Under the hood, a MAC protocol is a set of timing and state rules.

  • A contender may sense the channel, choose a random backoff, reserve the medium with control frames, send a data frame, wait for an acknowledgement, expand a retry window, or sleep until a scheduled slot.

Numbers to remember

18%ALOHA channel throughput

Why it matters

A sender waits because it hears a nearby transmission even though its own receiver could have accepted a concurrent frame.

Exposed terminals waste spatial reuse; hidden terminals lose frames. The mitigation priorities are different.
Exposed terminals waste spatial reuse; hidden terminals lose frames. The mitigation priorities are different.
iotclass.org

Major section

Summary · Key Takeaway

MAC protocols decide when a local device may use a shared medium.

  • CSMA/CA fits moderate contention when carrier sensing sees enough of the local channel.
  • TDMA or scheduled access fits predictable traffic, bounded timing, and duty-cycled devices that can follow a schedule.
  • Hidden terminals cause receiver-side collisions; exposed terminals waste spatial reuse.

Why it matters

The defensible design states what the channel-access rule prevents, what it retries, what it cannot see, and when operators must retest the assumption.

iotclass.org

Deck summary

Key takeaways

IEEE 802.15.4 is one low-power radio and channel-sharing standard.

  • The network can retry and report, but the device needs a known rule for a missed deadline.
  • Medium Access Control, or MAC, is the data-link responsibility that controls access to a shared medium.
  • The MAC decision is local and immediate: listen, wait, transmit, acknowledge, retry, or sleep.
  • Carrier sensing, random backoff, acknowledgements, and bounded retries help them share moderate traffic without a central schedule.
iotclass.org

Retrieval practice

Recall check 1 of 3

Packet Pete says: answer from memory, then check your reasoning.

Q1Which MAC choice is the strongest fit for battery-powered sensors that report on a predictable interval and need bounded delivery timing?

APure ALOHA, relying on sparse traffic to bound delivery time.
BUse CSMA/CA without ACKs because its contention avoidance alone keeps packet loss inside the bound.
CCSMA/CA with a routing tree, without bounded access slots.
DScheduled TDMA slots for bounded periodic sensor delivery.
Show answer

Answer: D MAC selection starts with traffic timing, contention, synchronization cost, and energy behavior.

iotclass.org

Retrieval practice

Recall check 2 of 3

Packet Pete says: answer from memory, then check your reasoning.

Q2A Zigbee warehouse network has low average channel load but loses many reports because sensors behind metal shelves cannot hear each other while both can reach the gateway. Which explanation and response are most defensible?

AHidden-terminal collisions; test coordination for the obstructed sensors.
BZigbee network-address exhaustion; assign a larger address range to the obstructed sensors.
CInsufficient cloud storage; enlarge the broker database to prevent radio loss.
DAn exposed-terminal fault; disable acknowledgements to reduce channel occupancy.
Show answer

Answer: A Hidden terminals are diagnosed from receiver-side collisions that carrier sensing at the senders cannot prevent.

iotclass.org

Retrieval practice

Recall check 3 of 3

Packet Pete says: answer from memory, then check your reasoning.

Q3Which evidence best supports a claim that a MAC design is ready for a production IoT deployment?

AA one-hour low-load dashboard record showing that packets arrived during a demo.
BA field MAC record with traffic, reachability, collisions, retries, delay, energy, and retest triggers.
CA network-address record showing every device has the same subnet and gateway.
DA vendor capability record listing acknowledgements, random backoff, and maximum channel rate.
Show answer

Answer: B MAC evidence must connect protocol mechanics to traffic, geometry, timing, energy, and field retest conditions.

iotclass.org

Print reference

Answers

Answer key.

  1. D · MAC selection starts with traffic timing, contention, synchronization cost, and energy behavior.
  2. A · Hidden terminals are diagnosed from receiver-side collisions that carrier sensing at the senders cannot prevent.
  3. B · MAC evidence must connect protocol mechanics to traffic, geometry, timing, energy, and field retest conditions.
iotclass.org