🌐 What is MAC?
MAC (Media Access Control) is a part of the Data Link Layer. It decides how devices share
and use the communication medium without clashing with each other. It's like traffic rules
on a road to avoid accidents (data collisions).
🧩 Classification of MAC Protocols
MAC protocols are mainly classified into 4 categories:
🔹 1. Contention-Based Protocols Without Reservation/Scheduling
⚙️ Working:
Devices fight (contend) for the medium to send data.
No prior reservation, they just sense if the medium is free and then send.
If two or more send at the same time → Collision happens → Devices wait and retry.
✅ Features:
Simple and easy to implement
No guarantees for delivery or timing
Good for dynamic, unpredictable traffic
📚 Types:
Sender-Initiated: Sender decides when to send (e.g., CSMA)
Receiver-Initiated: Receiver signals when ready to receive
🔁 Examples:
CSMA/CD (Ethernet)
CSMA/CA (Wi-Fi)
🔹 2. Contention-Based Protocols With Reservation Mechanisms
⚙️ Working:
Devices book a slot to send data.
A central controller or node polls each device to give permission.
✅ Features:
Bandwidth is reserved
Can provide guarantees (QoS)
Less collision, better for consistent traffic
⏰ Types:
Synchronous: Time-based, devices are clock-synchronized
Asynchronous: Devices send at different times, using time info to schedule the
transmission
🧠 Think of:
Like a teacher calling each student to speak — one by one.
🔹 3. Contention-Based Protocols with Scheduling Mechanisms
⚙️ Working:
Each device gets a fixed time slot, frequency, or code.
Data transmissions happen without overlap.
✅ Features:
Predictable timing, no collisions
Good for critical systems (like industrial or sensor networks)
Needs strict scheduling, best for steady data flow
🧠 Think of:
Like a railway timetable — everyone has their fixed time.
🛰️ Examples:
TDMA, FDMA, Bluetooth polling, cellular networks
🔹 4. Hybrid Protocols
⚙️ Working:
Mix of two or more techniques.
Some part of the time/frequency is scheduled, the rest is contention-based.
✅ Features:
Combines flexibility + efficiency + reliability
Handles both guaranteed and non-guaranteed data
Adaptable to changing traffic conditions
❗Note:
More complex to design and configure
🧠 Think of:
Like an airport: some flights are scheduled, others are flexible depending on demand.
Examples:
IEEE 802.15.4 (Zigbee)
Wi-Fi with HCCA
🔚 Summary Table
Type How it Works Guarantees? Example
Contention Devices send ❌ No CSMA/CD,
Without anytime, retry if CSMA/CA
Reservation failed
Contention With Devices take turns ✅ Yes Polling systems
Reservation via central
controller
With Scheduling Fixed slots/times ✅ Yes TDMA, Bluetooth
assigned polling
Hybrid Mix of fixed and ✅/❌ Mixed Zigbee (beacon
flexible access mode), Wi-Fi HCCA
🔷 Introduction
B-MAC (Berkeley Media Access Control) is a low-power, flexible, and adaptive MAC protocol
designed specifically for Wireless Sensor Networks (WSNs). Developed by the University of
California, Berkeley, it is known for its energy-efficient operation using preamble sampling,
also known as Low Power Listening (LPL).
🔷 Need for B-MAC
Wireless sensor nodes are typically battery-powered and deployed in large numbers.
Therefore, minimizing energy consumption is critical. Traditional MAC protocols waste
energy due to idle listening, overhearing, and collisions. B-MAC addresses this by using
asynchronous channel access and low-power operations, making it highly suitable for WSNs.
🔷 Key Features of B-MAC
1. ✅ Asynchronous Communication
No global time synchronization is required.
Nodes operate independently, reducing complexity.
2. ✅ Preamble Sampling (Low Power Listening - LPL)
Nodes periodically wake up to check if the channel is active.
If no activity is sensed, they go back to sleep.
3. ✅ Configurable Parameters
Developers can tune preamble length, sleep time, and sampling intervals.
4. ✅ Channel Assessment
Uses Clear Channel Assessment (CCA) to check if the medium is free before
transmitting.
5. ✅ Flexible Architecture
Can be integrated with upper-layer protocols easily.
Supports cross-layer optimization.
🔷 Working of B-MAC
The operation of B-MAC is based on two key mechanisms:
🟢 1. Low Power Listening (LPL)
Each node periodically wakes up and samples the channel to detect activity.
If the channel is idle, the node returns to sleep.
If the channel is busy, the node stays awake to receive the data.
🟢 2. Long Preamble Transmission
When a sender wants to transmit:
It sends a long preamble before actual data.
The preamble must be longer than the sampling interval of the receiver.
The receiver, upon detecting the preamble during sampling, stays awake and receives
the data.
📊 Illustration: Timing Diagram
plaintext
CopyEdit
Time →
Sender |------ Long Preamble ------|--- DATA ---|
Receiver |--Sleep--|Check|--Sleep--|Check|--Receive|
The receiver's sampling must catch the preamble.
Once detected, the receiver remains awake for data reception.
🔷 Advantages of B-MAC
🔋 High energy efficiency (saves power by avoiding idle listening)
⚙️ No need for synchronization
🔄 Adaptable to various traffic patterns
🛠️ Simple to implement and configure
🌐 Scalable for large WSN deployments
🔷 Disadvantages of B-MAC
⏱️ Long preambles can cause channel congestion under high traffic.
⚡ Increased latency due to periodic sampling.
💬 Does not support QoS (Quality of Service) guarantees.
📶 Preamble collisions may occur when multiple senders transmit at the same time.
🔷 Applications of B-MAC
🌱 Environmental Monitoring
🏥 Healthcare and Medical Sensor Networks
🚜 Agricultural Automation
🏠 Smart Homes and IoT Devices
🔷 Comparison with Other MAC Protocols
Feature B-MAC S-MAC TRAMA
Synchronization Not needed Required Required
Energy Efficiency High Medium High
Collision Preamble RTS/CTS Time Slot-based
Avoidance
Complexity Low Moderate High
🔷 Conclusion
B-MAC is a simple yet powerful MAC protocol tailored for energy-efficient operation in
wireless sensor networks. Its use of asynchronous preamble sampling makes it ideal for low-
duty cycle networks, although it may not be optimal in high-traffic or QoS-sensitive
environments. With its modular, flexible design, B-MAC continues to be a foundational
protocol in the field of WSNs.
🔷 Introduction
TRAMA (Traffic-Adaptive Medium Access) is a TDMA-based (Time Division Multiple Access)
energy-efficient MAC protocol for wireless sensor networks (WSNs). It is designed to avoid
collisions, adapt to changing traffic, and save energy by allowing nodes to turn off radios
when not transmitting or receiving.
It operates in a scheduled manner, where nodes negotiate and allocate time slots based on
traffic priority, ensuring deterministic and collision-free communication.
🔷 Need for TRAMA
In wireless sensor networks, energy consumption is crucial. Traditional contention-based
protocols like CSMA may lead to:
Collisions
Idle listening
Overhearing
TRAMA solves these by:
Assigning exclusive time slots to nodes
Allowing nodes to sleep when not in use
Ensuring that only one transmitter per slot is active in a region
🔷 Key Objectives of TRAMA
🌐 Collision-free communication
🔋 Energy saving via radio-off periods
🔄 Traffic adaptiveness – changes with network load
⏳ Scalability and fairness
🔷 Working Phases of TRAMA
TRAMA works in three major components:
🟢 1. Neighbor Protocol (NP)
Nodes discover one-hop and two-hop neighbors.
Exchange HELLO messages.
Used for topology awareness and schedule computation.
🟢 2. Schedule Exchange Protocol (SEP)
Nodes share their future transmission schedule.
Each node tells neighbors when it wants to transmit.
Prevents slot conflicts and ensures collision-free access.
🟢 3. Adaptive Election Algorithm (AEA)
Determines which node gets the right to transmit in a given time slot.
Uses priorities based on:
Node ID
Data traffic
Random backoff (in case of tie)
Other nodes sleep or receive based on this decision.
🔁 Time Frame Structure
TRAMA divides time into slots, where each time slot is assigned to:
One transmitting node
Specific receiving node(s)
Or marked as unused, allowing sleep
📘 Illustrative Diagram
less
CopyEdit
Time →
Slot 1 | Slot 2 | Slot 3 | Slot 4 | ...
Node A | Node B | Sleep | Node A |
Node B | Sleep | Node C | Sleep |
Only one transmitter per time slot in a given area.
Unused slots → nodes turn off radio to save energy.
🔷 Advantages of TRAMA
✅ Collision-free communication
✅ Adapts to traffic patterns (high/low load)
✅ Energy-efficient (nodes sleep when idle)
✅ Supports QoS (with priority-based transmission)
✅ Reliable for delay-sensitive or real-time applications
🔷 Disadvantages of TRAMA
❌ Complex to implement (needs neighbor info and scheduling)
❌ Synchronization overhead
❌ Slow convergence in dynamic topologies
🔷 Comparison with Other MAC Protocols
Feature TRAMA S-MAC B-MAC
Type Scheduled Scheduled Contention
Energy Efficiency High Medium High
Synchronization Required Required Not needed
Channel Access TDMA (slots) CSMA + sleep Long preamble
Scalability Good Medium Excellent
Collision Yes Partial No
Avoidance
🔷 Applications of TRAMA
📡 Industrial monitoring systems (require timing guarantees)
🧠 Healthcare monitoring networks
🌱 Environmental data collection
🚀 Satellite or space sensor networks
🏭 Smart factory automation systems
🔷 Conclusion
TRAMA is a robust, traffic-aware MAC protocol tailored for WSNs that need collision-free,
scheduled, and energy-efficient communication. Although it introduces complexity due to
schedule management, it offers excellent performance in terms of energy conservation,
reliability, and traffic handling. TRAMA is well-suited for mission-critical and time-sensitive
WSN applications.
SPIN – Sensor Protocols for Information via Negotiation
(20-Marks Detailed Explanation)
1. Introduction:
SPIN is a data-centric and negotiation-based routing protocol designed for Wireless Sensor
Networks (WSNs). Traditional routing protocols often waste energy by sending redundant
data or failing to consider node energy levels. SPIN addresses this by using metadata
negotiation and resource-awareness, ensuring efficient data dissemination.
SPIN = Sensor Protocols for Information via Negotiation
Developed to overcome flooding issues such as redundancy, resource blindness, and
implosion.
Nodes in SPIN negotiate before transmitting actual data, thus saving energy and
bandwidth.
2. Key Concepts:
a. Meta-Data:
Descriptive information about the actual data.
Used in SPIN to avoid redundant data transmission.
Example: Instead of sending a whole image, SPIN first advertises “I have an image of fire
detected at (x,y).”
b. Resource Adaptiveness:
Nodes make decisions based on their available resources like energy.
If a node is low on energy, it may choose not to forward data.
3. Protocol Phases:
SPIN uses a three-stage negotiation protocol:
1. ADV (Advertisement):
When a node has new data, it broadcasts an ADV message containing metadata.
This informs neighbors about the data without sending it.
2. REQ (Request):
Nodes that don’t have that data and are interested will respond with a REQ message.
3. DATA:
Upon receiving REQ, the original node sends the actual DATA message.
4. Example Workflow:
Let's say Node A senses an event:
Node A → (ADV) → Node B: “I have new data”
Node B → (REQ) → Node A: “Please send me the data”
Node A → (DATA) → Node B: Sends the data
Now Node B can do the same ADV process with other neighbors, but avoids sending the same
data if they already have it (using metadata checks).
5. Types of SPIN Protocols:
1. SPIN-1:
Basic version with ADV, REQ, DATA stages.
2. SPIN-2:
Energy-aware version.
Nodes check energy levels before participating in data exchange.
6. Advantages of SPIN:
Feature Description
Energy Efficiency Reduces unnecessary data transmission.
Negotiation Avoids implosion and data redundancy.
Scalable Works well in larger WSNs.
Simple Lightweight and easy to implement.
Adaptive Responds to node energy levels and
avoids overloading nodes.
7. Limitations / Disadvantages:
Issue Description
Not Reliable for Delivery No guarantee that data reaches the base
station.
Assumes All Nodes Are Interested If no node requests the data, it may be
lost.
Not Suitable for Mission-Critical Apps Lacks reliability mechanisms needed in
emergency systems.
8. Diagram: SPIN Data Exchange
lua
CopyEdit
+--------+ ADV +--------+
| Node A | ------------> | Node B |
+--------+ +--------+
| REQ
+--------+
| Node A |
+--------+
| DATA
+--------+
| Node B |
+--------+
9. Applications:
Environmental Monitoring: Fire detection, pollution tracking.
Disaster Management: Sensor networks during earthquakes or floods.
Military Surveillance: Energy-efficient battlefield monitoring.
Smart Agriculture: Soil and weather monitoring.
10. Conclusion:
SPIN is a pioneering protocol in data-centric routing for WSNs. Its innovative use of metadata
and negotiation-based transmission leads to energy savings, reduced redundancy, and
scalable communication. While it’s not suitable for critical applications that demand
guaranteed delivery, it’s highly effective in environments where efficiency and simplicity are
key.
✅ COUGAR (Query-Based Routing Protocol) – 20 Marks
1. Introduction:
COUGAR views the sensor network as a distributed database system. Instead of just
collecting data, the system supports declarative queries (like SQL). The sink node acts like a
user submitting a query, and the protocol processes that query by coordinating with sensor
nodes.
Developed at Cornell University.
Allows complex data queries using in-network processing.
2. Key Concepts:
Declarative Queries: Queries are defined using high-level languages (e.g., SQL-like
syntax).
Leader Nodes: Some nodes are selected as leaders to collect and aggregate data from
other nodes.
In-Network Data Aggregation: Processing happens within the network, reducing
redundant transmissions.
3. Working Mechanism:
🟡 Step 1: Query Plan Formation
Sink node defines the query and generates a query plan.
The plan includes data sources, required operations, and aggregation steps.
🟡 Step 2: Leader Node Selection
A leader node is chosen (either dynamically or statically).
The leader collects and aggregates data from its nearby sensor nodes.
🟡 Step 3: Data Aggregation
Sensor nodes collect raw data and send it to the leader node.
The leader performs aggregation (e.g., average temperature).
🟡 Step 4: Response Transmission
Aggregated result is sent from the leader node to the sink.
4. Example:
Query: “Find the average temperature in sector A every 10 minutes.”
Sink sends this query to the network.
A leader node in sector A is selected.
Nodes in that area send their temperature readings to the leader.
Leader computes average and sends it to the sink every 10 mins.
5. Advantages:
Feature Benefit
Supports Complex Queries Users can ask rich, meaningful queries.
Reduces Communication In-network aggregation reduces data
traffic.
Flexible Query Processing Allows change of query logic dynamically.
6. Disadvantages:
Issue Explanation
Leader Node Bottleneck Overloading or failure of leader affects
performance.
Extra Overhead Managing query plans and leader
selection needs extra resources.
Synchronization Needed Nodes must be time-synchronized for
periodic queries.
7. Applications:
Smart cities.
Environmental monitoring.
Habitat tracking.
Surveillance systems.
8. Diagram:
yaml
CopyEdit
Sink
Sends Query Plan
↓
Leader Node ← Receives data ← Sensor Nodes
Aggregated Data
Sink
9. Conclusion:
COUGAR introduces a database approach to sensor networks, enabling intelligent and
efficient query-based communication. It is suitable for applications requiring periodic and
complex queries but needs careful management of leader nodes and query plans.
✅ ACQUIRE (Active Query Forwarding in Sensor Networks) –
20 Marks
1. Introduction:
ACQUIRE is a query-based routing protocol designed for on-demand information retrieval in
large sensor networks. It is useful when queries are complex and may require data from
multiple nodes. It uses flooding intelligently to gather complete answers.
2. Key Concepts:
Query Forwarding: Queries are propagated through the network until they can be fully
or partially answered.
Local Caching: Nodes store answers to frequently asked queries.
Hop-by-Hop Resolution: Each node attempts to answer the query based on its local data
and cache.
3. Working Mechanism:
🟡 Step 1: Query Initialization
The sink initiates a complex query and sends it into the network.
🟡 Step 2: Query Forwarding
The query is forwarded through multiple nodes.
Each intermediate node checks its data or cache to partially or fully answer the query.
🟡 Step 3: Data Collection
If the full answer is not found, the query continues to be forwarded.
🟡 Step 4: Result Backtracking
Once the full answer is assembled, it is sent back to the sink through the reverse path.
4. Example:
Query: “Find temperature from sector A, humidity from sector B, and soil moisture from
sector C.”
The query is sent by the sink.
Nodes across the sectors fill in parts of the query based on the data they hold.
The complete answer is returned to the sink.
5. Advantages:
Feature Benefit
Supports Complex Queries Can handle multi-attribute, multi-location
queries.
Data Caching Reduces repeated communication.
Distributed Query Resolution Reduces load on any single node.
6. Disadvantages:
Issue Explanation
Flooding Increases Energy Use If not managed, it may waste energy.
Latency Query resolution may take time if many
hops are needed.
Not Suited for Time-Critical Applications Due to on-demand behavior.
7. Applications:
Smart farming (monitoring multiple parameters).
Disaster management.
Geological monitoring.
8. Diagram:
mathematica
CopyEdit
Sink → Query Flood →
Node A → Partial Answer
Node B → Partial Answer
Node C → Completes Query
← Final Answer Sent Back to Sink
9. Conclusion:
ACQUIRE is ideal for complex, on-demand information retrieval in WSNs. It provides
flexibility by allowing nodes to actively participate in query resolution. While powerful, it
requires careful management to avoid excessive energy use.