1 of 42

Internet of Things

Lecture 3 - Communication Protocols

2 of 42

Internet of Things (IoT)

2

Internet-connected devices such as sensors, appliances, RFID devices, actuators, instruments etc.

Mainly works with IPv6 instead on IPv4

Powered mainly by sensors nodes (motes) which are low-cost, small-size and power-efficient

Every node has an address that can be accessed from (theoretically) anywhere

Real-time guarantee

Lecture 3 - Communication Protocols

3 of 42

IoT Network Stack

3

Source: https://www.mdpi.com/2079-9292/9/1/111/htm

4 of 42

Physical / Data Link Layer

4

5 of 42

Physical / Data Link Layer

5

Lecture 3 - Communication Protocols

802.11 - Wi-Fi

802.15.1 - BLE

RFID

802.15.4 – Low Data Rate WPAN

6 of 42

Physical / Data Link Layer

6

Source: K. Lounis, M. Zulkernine: Attacks and Defenses in Short-Range Wireless Technologies for IoT

7 of 42

IEEE 802.15.4

  • Standard for low power IoT networks
  • Physical & data link layers
  • Base for ZigBee, Thread, WirelessHART
  • 6LoWPAN relies on it (IPv6 addresses)
  • Multiple topologies (star, mesh)
  • 64-bit or 16-bit MAC addresses

7

Lecture 3 - Communication Protocols

8 of 42

IEEE 802.15.4

  • Small frame size - 127 bytes (102 bytes payload)
  • Data rate up to 250Kbps
  • Range:
    • Usually between 10m and 30m
    • Some strong transceivers
      • Hundreds of meters / 1 Km
      • Outdoor, line of sight
      • ZigBee Pro

8

Lecture 3 - Communication Protocols

9 of 42

IEEE 802.11 Wi-Fi

  • 2.4GHz, 5GHz, 6GHz unlicensed radio bands
  • WiFi 7 - 46Gbps
  • CSMA/CA
    • Avoid collisions
    • Exponential back-off algorithm
  • Configurations: Infrastructure, Ad Hoc, Bridge, Repeater

9

Source: https://www.usiglobal.com/en/blog/wifi7-future-of-wireless-connectivity

10 of 42

IEEE 802.11 Wi-Fi

  • Infrastructure
    • AP is coordinator
    • Clients are associated & authenticated
    • BSSID = MAC address of AP
    • BSS = Wi-Fi network
    • SSID = network name
    • ESS
      • multiple APs - multiple BSSs
      • same SSID = ESSID

10

Lecture 3 - Communication Protocols

11 of 42

IEEE 802.11 Wi-Fi - Infrastructure

11

Source: https://layerlogix.com/wireless-lan-terms-explained/

12 of 42

IEEE 802.11 Wi-Fi

  • Bridge & Repeater extends range
  • Ad Hoc
    • Flexible network infrastructure (mesh)
    • Any device can be station / coordinator
    • Network - IBSS
    • Network name - SSID

12

Lecture 3 - Communication Protocols

13 of 42

Bluetooth

  • Based on IEEE 802.15.1 standard
  • Short range
  • 2.4GHz unlicensed radio band
  • FHSS to reduce interference
  • Bluetooth 6.2 in Nov. 2025
    • centimeter-level location accuracy
    • low audio lantency
    • energy efficiency
    • fast & stable LE connections

13

Lecture 3 - Communication Protocols

14 of 42

Bluetooth

  • Pairing mechanism
    • Associate & authenticate
    • Master (central) initiates -> slave (peripheral) accepts
  • Multiple devices connected to the same master => piconet
  • 48-bit address

14

Lecture 3 - Communication Protocols

15 of 42

BLE

  • From 2010 - Bluetooth 4.0 => BLE
  • Bluetooth Smart (BLE single mode)
    • Includes BT Smart stack
    • Not compatible with classic BT
  • Bluetooth Smart Ready (BLE dual mode)
    • Includes both classic and Smart stacks
    • Compatible with classic BT and with BT Smart

15

Lecture 3 - Communication Protocols

16 of 42

BLE

16

Source: https://embeddedcentric.com/introduction-to-bluetooth-low-energy-bluetooth-5/

Lecture 3 - Communication Protocols

17 of 42

Network Layer

17

18 of 42

Network Layer Protocols

18

IPv4

Exhausted in 2011

32-bit address

IPv6

128-bit addresses

6LoWPAN*

Adaptation layer

Header compression

Fragmentation

Lecture 3 - Communication Protocols

*For 802.15.4 networks

19 of 42

Why IPv6?

  • Pros
    • Large number of IoT nodes
    • Stateless
    • No NAT necessary
    • Location aware addressing
  • Cons
    • Address length
    • Complying with IPv6 requirements (IPSec)

19

Lecture 3 - Communication Protocols

20 of 42

IPv6 over IEEE 802.15.4

  • IPv6
    • MTU is 1280 bytes
    • Reflects technology advancement
  • IEEE 802.15.4
    • Frame size is 127 bytes
    • Maximum bandwidth 250 Kbps
    • 64 bits or 16 bits MAC addresses
    • Minimize header overhead & memory consumption

20

Lecture 3 - Communication Protocols

21 of 42

Main challenges - IPv6 over 802.15.4

  • IPv6 MTU is 10 times larger
    • Headers: IPv6 - 40 bytes, TCP - 20 bytes, UDP - 8 bytes
    • Solution: fragmentation & header compression
  • Low power and lossy networks
    • Solution: adaptive, responsive, energy efficient network layer

21

Lecture 3 - Communication Protocols

22 of 42

6LoWPAN - IETF RFC 6282

  • 6LoWPAN Working Group from IETF => RFC 6282
  • Encapsulation of IPv6 packet into 802.15.4 frame
  • Header compression
    • Elimination of header fields that can be derived from other headers
    • Stateless and shared context-based compression
  • Fragmentation
  • Stateless auto-configuration
    • Nodes generate their own IPv6 address

22

Lecture 3 - Communication Protocols

23 of 42

RPL - RFC 6550

  • Routing Protocol for Low power and lossy networks
  • IETF ROLL WG => RFC 6550
  • Low-power and lossy networks
  • For 6LoWPAN networks
  • Over IEEE 802.15.4 (and others)

23

Lecture 3 - Communication Protocols

24 of 42

RPL - RFC 6550

  • Distance-vector
  • Source routing
  • Communication:
    • multipoint-to-point
    • point-to-multipoint
    • point-to-point

24

Lecture 3 - Communication Protocols

25 of 42

Transport Layer

25

26 of 42

Transport Layer Protocols

26

TCP

    • Error Control
    • Flow Control
    • Congestion Control
    • Acknowledgements
    • Reliable Protocol

UDP

    • No Acknowledgements
    • Stateless Protocol
    • Simple to implement
    • Consumes less resources
    • Usually for Multimedia Data
    • IoT-friendly

Lecture 3 - Communication Protocols

27 of 42

UDP vs. TCP

27

28 of 42

Application Layer

28

29 of 42

Application Layer Protocol

29

HTTP – HyperText Transfer Protocol

CoAP – Constrained Application Protocol

WebSocket

MQTT – Message Queue Telemetry Transport

XMPP – eXtensible Messaging and Presence Protocol

DDS – Data Distribution Service

AMQP – Advanced Message Queuing Protocol

Lecture 3 - Communication Protocols

30 of 42

HTTP - Hypertext Transport Protocol

  • IETF
  • Used in Internet
  • IoT - less constrained devices
  • GET, PUT, POST, DELETE, HEAD, TRACE, OPTIONS commands
  • IoT - subset of commands

30

Lecture 3 - Communication Protocols

31 of 42

HTTP - Hypertext Transport Protocol

  • Stateless
    • Request-response pairs
    • Each request is different than others
  • HTTP client = app, browser
  • HTTP server = IoT node
  • Over TCP

31

Lecture 3 - Communication Protocols

32 of 42

CoAP - Constrained Application Protocol

  • IETF RFC 7252
  • Low power and lossy networks
  • Machine-to-Machine (M2M)
  • Similar to HTTP
    • Request-response model
    • GET, POST, PUT, DELETE
    • CoAP <-> HTTP

32

Lecture 3 - Communication Protocols

Source: Tariq, M.A.; Khan, M.; Raza Khan, M.T.; Kim, D. Enhancements and Challenges in CoAP—A Survey. Sensors 2020, 20, 6391.

33 of 42

CoAP - Constrained Application Protocol

  • Over UDP
  • Multicast, low overhead
  • Resource discovery
    • discover capabilities
  • Interrogate nodes
  • CoAP server - IoT node
  • CoAP client - app, browser

33

Lecture 3 - Communication Protocols

Source: Seoane, Victor, et al. "Performance evaluation of CoAP and MQTT with security support for IoT environments." Computer Networks 197, 2021

34 of 42

Copper - CoAP

34

Lecture 3 - Communication Protocols

Source: https://www.opensourceforu.com/2016/09/coap-get-started-with-iot-protocols/

35 of 42

MQTT - Message Queue Telemetry Transport

  • Lightweight
  • Publisher-subscriber model
    • Nodes publish data to the MQTT broker (topic)
    • Clients subscribe to the broker to receive data
  • Over TCP (also UDP)
  • Resource constrained devices
    • Energy efficient
  • IoT apps, automotive

35

Lecture 3 - Communication Protocols

36 of 42

MQTT - Message Queue Telemetry Transport

  • Communication models:
    • One-to-many
    • Many-to-one
    • Many-to-many
  • QoS levels
  • Flexible, scalable

36

Lecture 3 - Communication Protocols

Source: https://www.electronicwings.com/nodemcu/nodemcu-mqtt-client-with-arduino-ide

37 of 42

Web Sockets

  • Sockets
  • Full duplex communication
  • Sending messages between client and server
  • Handshake
  • TCP-based
  • Less constrained nodes
  • Client can be a browser, IoT device, mobile application etc.

37

Source: https://www.pubnub.com/learn/glossary/what-is-websocket/

38 of 42

XMPP – eXtensible Messaging and Presence Protocol

  • Jabber
  • Designed for instant messaging
  • Client-server and server-server architecture
  • Real-time communication
  • Streaming of XML data
  • Audio, video, messaging, gaming, chat

38

Lecture 3 - Communication Protocols

Source: Alvear, Oscar & Calafate, Carlos & Cano, Juan-Carlos & Manzoni, Pietro. (2018). Crowdsensing in Smart Cities: Overview, Platforms, and Environment Sensing Issues. Sensors. 18. 460. 10.3390/s18020460.

39 of 42

DDS – Data Distribution Service

  • For real-time systems, critical data
  • M2M
  • Publisher-subscriber model
    • Multiple publishers
    • Multiple subscribers
  • QoS and configurable reliability
  • Security
  • Real-time apps

39

Source: https://www.researchgate.net/publication/293489014_Tailoring_DDS_to_Smart_Grids_for_Improved_Communication_and_Control

40 of 42

AMQP – Advanced Message Queuing Protocol

  • Message-oriented middleware
  • Publisher-subscriber model
    • Broker, publishers, consumers
  • Message queues
  • Message routing
  • Point-to-point
  • Security, reliability

40

41 of 42

AMQP – Advanced Message Queuing Protocol

  • Publisher sends to exchange server
  • Consumer subscribes to message queue
  • Messages pushed by brokers or pulled by consumers

41

Source: https://support.smartbear.com/readyapi/docs/testing/amqp.html

42 of 42

The End

42

Lecture 3 - Communication Protocols