←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Notes

Media Access Control (MAC) in IoT: IEEE 802.15.4, BLE & LoRaWAN

Study material and explanations for Unit 3

Media Access Control (MAC) in IoT: IEEE 802.15.4, BLE, and LoRaWAN

What is Media Access Control (MAC) in IoT? (In Simple Words)

Imagine a classroom where 50 students start shouting their answers at the exact same second. Nobody can hear anything because all voices collide and create pure noise! The teacher has to establish a rule: “Raise your hand, check if someone else is speaking, and talk one by one.”

In wireless IoT networks, hundreds of sensors share the exact same radio airwaves. If two nearby sensors transmit data at the exact same moment, their radio signals collide in the air and destroy both packets!

The Media Access Control (MAC) sub-layer decides which device gets to transmit over the wireless channel, when, and for how long — while using the minimum amount of battery power!


1. Contention-Based vs. Scheduled-Based MAC Protocols

The Two MAC Channel Access Paradigms
1. Contention-Based (Random Access)
Devices compete for the channel using CSMA/CA (Listen before talk).
Simple and flexible, but packet collisions can happen during heavy traffic.
2. Scheduled-Based (Time-Slotted)
Uses TDMA (Time Division Multiple Access).
Each device gets its own fixed time slot.
Zero collisions, but devices must keep their internal clocks perfectly synced.

2. The Main Standard: IEEE 802.15.4 MAC Layer

The IEEE 802.15.4 standard is the worldwide wireless standard for low-power, low-data-rate sensor networks (the foundation of Zigbee and 6LoWPAN).

It works in two main modes:

A. Non-Beacon Enabled Mode (Simple CSMA/CA):

  • Uses Unslotted CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance):
    1. Listen: The sensor node checks if anyone else is transmitting on the radio frequency.
    2. Send: If the channel is free and silent, it sends its data packet immediately.
    3. Wait: If the channel is busy, it waits for a short random time and checks again.
  • Advantage: Great for battery life. Nodes sleep 99% of the time and wake up only when something happens (e.g. motion detected).

B. Beacon-Enabled Mode (Superframe Structure):

  • A master coordinator node sends regular synchronization signals called Beacons.
  • The time between beacons is organized into a Superframe divided into 16 time slots:
    1. Contention Access Period (CAP): Normal sensors compete to send data using CSMA/CA.
    2. Contention Free Period (CFP): The master assigns reserved Guaranteed Time Slots (GTS) to emergency sensors (e.g. fire alarms or ICU monitors) with zero risk of collision!
    3. Inactive (Sleep) Period: All sensors and the coordinator shut off their radios and sleep together to save battery.

Parameter IEEE 802.15.4 (Zigbee) Bluetooth Low Energy (BLE) LoRaWAN Wi-Fi (802.11ah HaLow)
Radio Frequency 2.4 GHz, 868/915 MHz 2.4 GHz ISM Band Sub-GHz (865-867 MHz in India) Sub-GHz (865 MHz)
Typical Range 10 to 100 meters 10 to 50 meters Up to 10 to 15 km! Up to 1 km
Data Rate 250 kbps 1 to 2 Mbps 0.3 to 50 kbps (Small packets) 150 kbps to 15 Mbps
Channel Access CSMA/CA & Slotted GTS Frequency Hopping & TDMA Pure ALOHA / Scheduled CSMA/CA with sleep modes
Battery Life Very High (Months/Years) Ultra-High (Years on coin cell) Ultra-High (Up to 10 Years) Moderate
Network Type Mesh, Star Star, BLE Mesh Star-of-Stars Star
Best Used For Home automation & smart lights Fitness bands & heart monitors Long-range farm & water meters Security cameras

4. LoRaWAN MAC Classes (Class A, B, and C)

LoRaWAN defines three device classes depending on how much battery power is available:

  • Class A (Battery-Optimized): Default mode. The device sleeps almost all the time. When it wakes up, it transmits an uplink packet and then briefly opens two receive slots to listen for replies before going back to deep sleep.
  • Class B (Scheduled Listening): Opens extra scheduled receive windows at fixed intervals, synchronized with gateway beacons.
  • Class C (Always Listening): Keeps its receiver turned ON continuously. It consumes more power and is used for devices with constant AC power (like smart city streetlights).

💡 DAVV Exam Preparation Tips

5-Mark Question: “Explain CSMA/CA in the context of IoT Media Access Control. How does it prevent collisions?”

  • Full Form: Carrier Sense Multiple Access with Collision Avoidance.
  • How it Works: “Listen before talk.” The sensor checks if the radio channel is quiet before sending. If busy, it waits for a random backoff time.
  • Why Avoidance (CA) instead of Detection (CD): In wireless, radios cannot transmit and listen at the same time, so they must avoid collisions before sending.

10-Mark Question: “Explain the IEEE 802.15.4 MAC layer architecture. Describe the Beacon-Enabled Superframe structure with Contention Access Period (CAP) and Guaranteed Time Slots (GTS). Compare IEEE 802.15.4, BLE, and LoRaWAN.”

  • Draw and explain the 16-slot Superframe: Beacon → CAP (competing slots) → CFP / GTS (reserved priority slots) → Inactive sleep period.
  • Explain Non-beacon mode (pure CSMA/CA) vs. Beacon-enabled mode.
  • Include the 7-row comparison table covering frequency, range, speed, battery life, and use cases.