Internet of Things (IoT) and AI

Chapter 3
IoT Networking and Communication Protocols

Bachelors Program in AI & ML
Internet of Things (IoT) and AI   •   Bachelor

IoT Networking and Communication Protocols

Introduction and Context

The Internet of Things (IoT) connects physical objects—sensors, actuators, machines, vehicles, appliances, and infrastructure—to digital systems. These objects generate data, exchange commands, and increasingly support artificial intelligence (AI) applications such as predictive maintenance, anomaly detection, demand forecasting, and autonomous control.

Networking is the foundation of IoT. A sensor may be highly accurate, but it has little practical value if it cannot communicate reliably, efficiently, securely, and economically. IoT networking differs from conventional computer networking because devices may have limited memory, processing power, battery capacity, bandwidth, and computational capability. Many devices also operate in locations where physical access is difficult or where radio interference is significant.

Network design therefore requires more than selecting the fastest protocol. Engineers must balance range, latency, throughput, reliability, energy consumption, scalability, security, deployment cost, and regulatory constraints.

Learning Objectives

After completing this chapter, students should be able to:

1. Explain major IoT network topologies and their trade-offs.

2. Compare RFID, NFC, BLE, Wi-Fi, Zigbee, Thread, Matter, LoRaWAN, cellular IoT, and 5G.

3. Distinguish data-link, network, transport, and application-layer protocols.

4. Select MQTT, CoAP, HTTP, or publish–subscribe communication for an IoT application.

5. Analyze IoT designs using range, latency, bandwidth, reliability, power, cost, and security.

6. Explain how networking choices affect AI-enabled IoT systems.

1. IoT Communication Architecture

An IoT system commonly contains four logical layers:

  • Device layer: Sensors, actuators, RFID tags, cameras, controllers, and embedded processors.
  • Connectivity layer: Wired or wireless links that transfer data.
  • Edge and platform layer: Gateways, message brokers, storage, device management, and analytics.
  • Application layer: Monitoring, automation, optimization, and AI services.

A gateway may translate between protocols. For example, a battery-powered Zigbee sensor can communicate with a gateway, while the gateway uses Wi-Fi or Ethernet to reach a cloud platform. This arrangement reduces the communication burden on the sensor and enables local processing.

Communication can be:

  • Device-to-device: Devices exchange data directly.
  • Device-to-gateway: A local gateway aggregates and processes device traffic.
  • Device-to-cloud: Devices connect directly to an Internet service.
  • Back-end data sharing: Multiple applications use data from a common platform.

IoT traffic is often small but frequent. A temperature sensor may send only a few bytes every minute, whereas a camera can require continuous high-bandwidth transmission. Consequently, there is no universally best IoT network.

2. Network Topologies

2.1 Star topology

In a star, each device communicates with a central hub, access point, or base station. Wi-Fi networks, cellular networks, and many low-power networks use a star-like structure.

Advantages include simple device management, straightforward addressing, and easy traffic monitoring. A failure of one device usually does not affect others. The principal weakness is dependence on the central node: if it fails, communication may stop for the entire local network. Devices at the edge may also require higher transmit power.

2.2 Mesh topology

In a mesh, nodes can forward traffic for other nodes. Zigbee and Thread commonly use mesh networking. Meshes can extend coverage and provide alternate routes when a link fails.

However, routing increases protocol complexity, memory requirements, and energy consumption. A battery-powered node that forwards traffic may deplete its battery more rapidly. Mesh networks therefore require suitable routing strategies and careful placement of mains-powered routers.

2.3 Tree and cluster topologies

A tree organizes nodes hierarchically. Clustered designs group devices around local coordinators, which communicate with a higher-level gateway. These structures simplify large deployments but can create bottlenecks or single points of failure at upper levels.

2.4 Point-to-point and broadcast

Point-to-point communication connects two endpoints, as in some RFID readers or Bluetooth links. Broadcast communication sends a message to multiple receivers, but it may introduce congestion and security concerns if access is not controlled.

3. Evaluating IoT Networks

Important evaluation dimensions are:

  • Range: Physical communication distance under specified environmental conditions.
  • Latency: Time between sending and receiving a message. Control applications generally require lower latency than periodic monitoring.
  • Throughput: Quantity of data delivered per unit time, commonly expressed in bits per second.
  • Reliability: Probability that data reaches its destination correctly and within an acceptable time.
  • Energy consumption: Especially important for battery-powered devices.
  • Scalability: Ability to support increasing numbers of devices and messages.
  • Cost: Includes radio modules, infrastructure, spectrum access, installation, maintenance, and subscription fees.
  • Security: Protection of confidentiality, integrity, authenticity, availability, and privacy.

A useful engineering principle is that advertised maximum data rate is not the same as application throughput. Protocol overhead, retransmissions, interference, distance, duty-cycle regulations, and shared-medium contention reduce practical performance.

For a battery-powered device, a simplified energy estimate is:

E = VIt

where E is energy in joules, V is voltage in volts, I is current in amperes, and t is time in seconds. This equation assumes approximately constant voltage and current. Real devices also consume energy in sleep, receive, processing, and retransmission states. Thus, a more realistic estimate sums energy across operating states:

E_total = Σ(V Iᵢ tᵢ)

where each state i may represent transmission, reception, processing, or sleep. Reducing radio-on time often provides a major battery-life benefit.

4. Short-Range Identification and Personal-Area Technologies

4.1 RFID

Radio-frequency identification (RFID) identifies objects using tags and readers. Passive tags obtain energy from the reader’s radio field, while active tags contain their own battery. RFID is widely used for inventory, access control, logistics, library systems, and industrial tracking.

RFID systems may operate at low frequency, high frequency, or ultra-high frequency bands. Characteristics differ by frequency, antenna design, materials, and regulatory environment. RFID is primarily an identification technology rather than a general-purpose Internet protocol. A reader or gateway normally forwards tag information to an enterprise system.

Strengths include low-cost passive tags and rapid identification of multiple objects. Limitations include short or moderate range, sensitivity to metal and liquids, limited tag computation, and privacy concerns when tags can be read without the owner’s awareness.

4.2 NFC

Near-field communication (NFC) is a very short-range technology commonly used for contactless payments, access badges, device pairing, and configuration. Its short operating distance can support intentional interaction, but it is unsuitable for wide-area sensing. NFC can also provide a convenient method for commissioning an IoT device securely by transferring credentials during a close physical interaction.

4.3 Bluetooth Low Energy

Bluetooth Low Energy (BLE) is designed for low-power personal-area communication. It supports advertising, discovery, connections, and application profiles. Sensors such as wearables, beacons, medical devices, and asset trackers frequently use BLE.

BLE generally offers low energy consumption and broad smartphone support. Its limitations include constrained range relative to wide-area technologies and possible interference in crowded unlicensed spectrum. BLE Mesh can support many-to-many communication, although network planning and power roles must be considered.

5. Local and Building-Area Wireless Networks

5.1 Wi-Fi

Wi-Fi provides relatively high throughput and integrates easily with IP networks and existing Internet infrastructure. It is suitable for cameras, appliances, industrial terminals, and devices that can use mains power or be recharged regularly.

Its disadvantages include comparatively high energy consumption, contention in busy environments, and reduced range through walls and industrial obstructions. Wi-Fi generations improve efficiency, capacity, and latency, but deployment still requires access-point planning and strong security configuration.

5.2 Zigbee

Zigbee is a low-power wireless technology commonly used in home automation, lighting, sensing, and industrial monitoring. It typically uses a mesh network with end devices, routers, and a coordinator or border gateway. Zigbee is effective when many low-data-rate devices must cover a building or local site.

Mesh routing can improve coverage, but routers must remain powered or have sufficient energy. Interoperability can also depend on profiles, product ecosystems, and certification.

5.3 Thread

Thread is an IPv6-based, low-power mesh networking technology designed for home and building devices. It uses IEEE 802.15.4 radios and supports secure IP connectivity through Thread border routers. Thread separates the local mesh network from application-layer semantics, allowing application protocols such as Matter to operate above it.

Thread offers self-healing mesh behavior and low power consumption. It is not itself a complete application ecosystem; device functions and data models are supplied by higher-layer protocols.

5.4 Matter

Matter is an application-layer interoperability standard for smart-home and building devices. It can operate over Ethernet, Wi-Fi, and Thread, and can use Bluetooth during commissioning. Matter defines device types, commands, data models, security procedures, and interoperability expectations.

The distinction between Thread and Matter is important: Thread provides a network transport, whereas Matter defines how compatible application devices describe and control functions. Matter can therefore use more than one underlying network technology.

6. Wide-Area IoT Connectivity

6.1 LoRaWAN

LoRaWAN is a low-power wide-area networking (LPWAN) protocol designed for long-range communication and small payloads. End devices communicate with gateways, which forward traffic to a network server. The architecture is generally star-of-stars rather than a multi-hop mesh.

LoRaWAN is useful for agriculture, environmental monitoring, metering, smart cities, and asset tracking. It supports long battery life and broad coverage, but usually offers low data rates and is not intended for continuous audio, video, or stringent real-time control. Capacity planning must consider airtime, collisions, regional regulations, payload size, and device class.

6.2 Cellular IoT

Cellular IoT uses mobile-operator infrastructure. LTE-M is suited to mobile or moderately higher-throughput IoT applications, while NB-IoT emphasizes low-power, wide-area sensing with narrow bandwidth. Cellular technologies offer professionally managed coverage, device authentication through operator systems, and mobility support.

Their disadvantages may include subscription costs, dependence on operator availability, coverage gaps, and higher module or energy costs than some local technologies. Private cellular networks can provide organizations with greater control at industrial sites.

6.3 5G

5G supports enhanced mobile broadband, massive machine-type communication, and ultra-reliable low-latency communication as broad service objectives. In IoT, 5G can support industrial automation, connected vehicles, robotics, augmented reality, and high-density sensing.

Actual performance depends on spectrum, network configuration, device category, deployment density, and service-level agreements. A label of “5G” alone does not guarantee a particular latency or reliability level. Network slicing, edge computing, and private 5G may allow traffic to be separated and processed near the source, but these capabilities increase architectural and operational complexity.

7. Application-Layer Protocols and Messaging Models

7.1 MQTT

Message Queuing Telemetry Transport (MQTT) is a lightweight application-layer protocol based on publish–subscribe messaging. Devices publish messages to named topics, and subscribers receive messages from a broker. Publishers and subscribers do not need direct knowledge of one another.

MQTT is well suited to telemetry, event notification, and cloud-connected devices. Its broker can manage sessions, authentication, access control, retained messages, and quality-of-service levels. MQTT quality of service includes:

  • QoS 0: At most once; no protocol-level delivery guarantee.
  • QoS 1: At least once; duplicates are possible.
  • QoS 2: Exactly once protocol exchange, with greater overhead.

Applications using QoS 1 must tolerate duplicate messages, commonly by using message identifiers, timestamps, or idempotent operations. MQTT normally runs over TCP, with TLS commonly used for confidentiality and authentication.

7.2 CoAP

The Constrained Application Protocol (CoAP) is designed for constrained devices and networks. It follows a REST-like model with resources and methods such as GET, POST, PUT, and DELETE. CoAP commonly uses UDP and supports confirmable messages, non-confirmable messages, retransmission, resource discovery, and proxying.

CoAP is appropriate for direct device interaction, local control, and constrained environments. Because UDP does not provide TCP’s general stream reliability, reliability must be handled by CoAP mechanisms or by the application. DTLS or equivalent security mechanisms may protect communication.

7.3 HTTP

HTTP is the dominant Web application protocol and is supported by nearly every cloud platform and programming environment. It is convenient for APIs, dashboards, configuration, and integration with enterprise systems. HTTP usually uses TCP and TLS.

Its headers, connection behavior, and request–response model can impose more overhead than MQTT or CoAP for very constrained devices. Nevertheless, HTTP may be the best choice where interoperability, simplicity of cloud integration, and developer familiarity are more important than minimum energy use.

7.4 Request–response and publish–subscribe

In request–response, a client asks for a resource or operation and a server returns a response. This model is intuitive for configuration and querying.

In publish–subscribe, producers publish events to a broker or topic and consumers subscribe. This decouples producers from consumers and supports multiple applications, but introduces broker dependence, topic governance, and additional operational components.

The choice should reflect communication patterns rather than fashion. A small sensor reporting periodic readings to several analytics services is a strong MQTT candidate. A constrained actuator exposing local resources may suit CoAP. A public enterprise API may favor HTTP.

8. Protocol Selection Framework

A practical selection process is:

1. Define payload size, message frequency, mobility, and response deadlines.

2. Identify physical conditions: distance, walls, interference, terrain, and available power.

3. Determine whether communication is local, site-wide, or geographically distributed.

4. Select a radio and network architecture.

5. Select the application protocol and messaging model.

6. Assess security, regulatory, maintenance, and lifecycle requirements.

7. Test the design under realistic traffic and environmental conditions.

For example, a battery-operated soil sensor on a remote farm may use LoRaWAN because its payload is small and its range requirement is large. A wearable communicating with a smartphone may use BLE. A video doorbell generally requires Wi-Fi or cellular connectivity because its bandwidth requirement is high. A smart-home light may use Thread with Matter where interoperable, low-power local control is required.

9. Security, Governance, and Reliability

IoT networks expand the attack surface because devices may be physically exposed, infrequently updated, or deployed for many years. Essential controls include:

  • Unique device identities rather than shared default passwords.
  • Mutual authentication where appropriate.
  • Encryption in transit and, for sensitive data, at rest.
  • Secure boot and signed firmware.
  • Regular patching and vulnerability management.
  • Network segmentation and least-privilege access control.
  • Logging, monitoring, and anomaly detection.
  • Secure decommissioning and credential revocation.

Reliability also requires local fallback behavior. A heating controller should not become unsafe merely because cloud connectivity fails. Edge devices may cache data, apply local rules, and reconnect using backoff strategies.

Privacy is significant when IoT data reveals location, health, occupancy, behavior, or productivity. Organizations should minimize collection, define retention periods, obtain appropriate consent, and comply with relevant data-protection and sector regulations. Radio use must also comply with national spectrum rules.

10. IoT Networking for AI Applications

AI systems depend on the quality, timeliness, and representativeness of sensor data. Networking influences AI in several ways:

  • Latency: Time-critical inference may need to occur at the edge.
  • Bandwidth: Cameras and microphones may require local compression or feature extraction.
  • Data quality: Packet loss and clock errors can corrupt training data.
  • Energy: Federated or incremental learning must account for device resources.
  • Security: Manipulated sensor data can cause model poisoning or unsafe decisions.

Edge AI can reduce bandwidth by transmitting features, events, or decisions instead of raw data. However, local inference requires capable hardware and model-update governance. A robust architecture distinguishes between ordinary telemetry, urgent alarms, firmware updates, and model distribution, assigning each suitable priorities and security controls.

11. Worked Design Example

Consider a campus environmental monitoring system. Sensors measure temperature, humidity, and air quality every five minutes across six buildings. Each reading is small, battery operation is preferred, and the system must continue collecting data during temporary cloud outages.

A camera-oriented Wi-Fi design would provide unnecessary throughput and would increase battery consumption. A short-range BLE-only design would require many gateways. A wide-area cellular design could work, but recurring subscriptions for every sensor may increase cost.

A suitable design is a low-power mesh such as Thread or Zigbee within buildings, with mains-powered routers and a gateway per building. Gateways can forward aggregated data over Ethernet or Wi-Fi. If buildings are widely separated and local infrastructure is difficult to install, LoRaWAN or cellular IoT becomes more attractive. MQTT can carry gateway telemetry to a central broker, while CoAP may support local resource queries.

The design should include local buffering so that readings are stored during an Internet outage and transmitted later. Devices should authenticate to gateways, gateways should use encrypted connections to the broker, and duplicate MQTT messages should be handled safely. AI models can detect abnormal air-quality patterns at the gateway, reducing the need to transmit every raw sample.

The case illustrates that protocol selection is a system-level decision. No single technology simultaneously minimizes cost, power, latency, and infrastructure requirements in every environment.

12. Contemporary Developments and Best Practices

Current IoT deployments increasingly combine heterogeneous networks rather than choosing one universal technology. Matter and Thread encourage interoperability in residential environments; private 5G and edge computing support industrial use; satellite IoT extends coverage to remote regions; and device-management standards improve lifecycle control.

Best practices include:

  • Use open standards where interoperability and long-term support matter.
  • Separate application semantics from network transport.
  • Measure real energy use and radio performance rather than relying only on specifications.
  • Design for loss, duplication, delay, and reconnection.
  • Place gateways and routers strategically.
  • Use time synchronization when sensor fusion or AI training requires aligned data.
  • Plan firmware, certificate, key, and model updates before deployment.
  • Validate security and performance under realistic environmental conditions.
  • Document assumptions, regulatory constraints, and failure modes.

Challenges and Limitations

IoT networking remains difficult because environments are dynamic. Interference changes, batteries age, devices are moved, and software dependencies become obsolete. Mesh networks may suffer from unstable routes; LPWAN systems may have strict airtime limitations; cellular coverage may vary indoors; and cloud dependence may introduce cost, latency, or availability risks.

Interoperability is also imperfect. Devices may support the same nominal standard while differing in profiles, data models, certification, or implementation quality. Finally, reliability, security, and privacy cannot be added solely at the end of a project. They must influence architecture, procurement, testing, and operations from the beginning.

Chapter Summary

IoT networking connects constrained devices to gateways, platforms, and applications. Star, mesh, tree, and hybrid topologies offer different combinations of simplicity, coverage, resilience, and energy use. RFID and NFC are useful for identification and close-range interaction; BLE supports personal-area devices; Wi-Fi provides high local throughput; Zigbee and Thread support low-power local networks; Matter provides application interoperability; LoRaWAN supports long-range, low-data-rate sensing; cellular IoT and 5G provide managed wide-area connectivity.

MQTT uses broker-based publish–subscribe messaging, CoAP provides a constrained REST-style approach, and HTTP offers broad Web and enterprise interoperability. Selection must consider range, latency, bandwidth, reliability, power, cost, security, scalability, and regulation. AI applications make data quality, edge processing, synchronization, and secure model management especially important. Effective IoT engineering is therefore a lifecycle and systems-design problem rather than a simple protocol comparison.

Key Terms

RFID: Technology for identifying objects using radio-frequency tags and readers.

NFC: Very short-range wireless communication used for intentional close interactions.

BLE: Low-power Bluetooth technology for personal-area devices and sensors.

Topology: Arrangement of nodes and communication links in a network.

Mesh network: Network in which nodes can forward traffic for other nodes.

Gateway: Device that connects a local IoT network to another network or service.

LoRaWAN: Low-power wide-area networking protocol for long-range, small-payload communication.

Cellular IoT: IoT connectivity using mobile-operator networks.

5G: Modern cellular technology supporting high throughput, massive device density, and specialized service objectives.

MQTT: Lightweight broker-based publish–subscribe messaging protocol.

CoAP: Constrained application protocol with a REST-like resource model.

HTTP: Web application protocol based on request–response communication.

Publish–subscribe: Messaging model in which publishers send to topics and subscribers receive selected messages.

Latency: Time taken for data to travel and become available at its destination.

Throughput: Successfully delivered data per unit time.

Reliability: Ability to deliver correct communication within required conditions.

Edge computing: Processing data near its source rather than exclusively in a distant cloud.

Matter: Application-layer interoperability standard for compatible smart-home and building devices.

Network slicing: Logical separation of network resources for different service requirements.

Review Questions

Short Answer Questions

1. What are two advantages and one limitation of a mesh topology?

2. How does MQTT differ from HTTP in its basic communication model?

3. Why is LoRaWAN unsuitable for continuous high-definition video?

4. Distinguish Thread from Matter.

5. What is the purpose of a gateway in an IoT system?

Long Answer Questions

1. Compare RFID, NFC, BLE, and Wi-Fi in terms of range, power, throughput, and applications.

2. Explain the architecture and operating characteristics of Zigbee, Thread, and Matter.

3. Discuss MQTT QoS levels and explain why QoS 1 can result in duplicate messages.

4. Compare CoAP and HTTP for constrained IoT devices.

5. Explain how security, privacy, and lifecycle management should influence IoT network design.

Analytical / Application Questions

1. Select a network and application protocol for a battery-powered agricultural sensor located several kilometers from a gateway. Justify the choice.

2. Design a communications architecture for a smart building containing sensors, lights, cameras, and cloud analytics. Explain where different protocols should be used.

3. An AI-based machine-monitoring system experiences delayed and duplicated sensor data. Analyze likely networking causes and propose corrective measures.

Multiple Choice Questions with Answers

Question 1

Which topology allows nodes to forward messages for other nodes?

A. Star

B. Mesh

C. Point-to-point

D. Single-bus

Correct Answer: B. Mesh

Question 2

Which technology is primarily designed for very short-range intentional interactions such as contactless payment?

A. NFC

B. LoRaWAN

C. 5G

D. Wi-Fi

Correct Answer: A. NFC

Question 3

What is the principal role of an MQTT broker?

A. Assign radio frequencies to cellular networks

B. Store only video data

C. Receive publications and distribute them to subscribers

D. Convert analog signals into electricity

Correct Answer: C. Receive publications and distribute them to subscribers

Question 4

Which MQTT quality-of-service level permits duplicate delivery?

A. QoS 0

B. QoS 1

C. QoS 2

D. No MQTT level

Correct Answer: B. QoS 1

Question 5

Which statement correctly distinguishes Matter from Thread?

A. Matter is an application-layer standard, while Thread is a low-power network technology

B. Matter is a battery type, while Thread is a cloud database

C. Matter is exclusively a cellular protocol, while Thread is RFID

D. Matter and Thread are identical names for the same protocol

Correct Answer: A. Matter is an application-layer standard, while Thread is a low-power network technology

Question 6

Which technology is most appropriate for long-range, small-payload environmental sensing with low power consumption?

A. LoRaWAN

B. NFC

C. HDMI

D. High-definition Wi-Fi video

Correct Answer: A. LoRaWAN

Question 7

Which protocol uses a REST-like resource model and is designed for constrained devices?

A. CoAP

B. SMTP

C. FTP only

D. DNS exclusively

Correct Answer: A. CoAP

Question 8

Why might edge AI be used in an IoT system?

A. To eliminate all device security requirements

B. To increase the amount of raw data sent to the cloud

C. To reduce latency and bandwidth use by processing near the data source

D. To prevent sensors from collecting data

Correct Answer: C. To reduce latency and bandwidth use by processing near the data source

Question 9

Which factor is especially important when selecting a protocol for a battery-powered sensor?

A. Energy consumption

B. Screen resolution

C. Keyboard layout

D. Printer speed

Correct Answer: A. Energy consumption

Question 10

Which communication model decouples producers from consumers through topics or channels?

A. Publish–subscribe

B. Direct analog coupling

C. Manual file transfer

D. Point-to-point-only polling

Correct Answer: A. Publish–subscribe

Internet of Things (IoT) and AI
Chapter 3 of 14