Skip to content

1.6 A first look at connectivity options

Stage 2 of the Information Value Loop (Communicate, Section 1.1) requires moving digital readings from the point of capture to the point of aggregation, analysis, and actuation. A persistent misconception among beginners is that one networking technology (such as Wi-Fi or 5G) will eventually replace all the others.

Physical laws make a single universal network impossible. By the Shannon–Hartley theorem1 and free-space path-loss equations, range, data rate (bandwidth), and transmit power consumption form a strict engineering triangle:

  • If you want high data rates (tens to hundreds of megabits per second for video or bulk telemetry), you need wide channel bandwidth and high signal-to-noise ratio, which either limits range or demands 100 mA to 350 mA of continuous radio current (Wi-Fi, 4G/5G broadband).
  • If you want multi-year coin-cell battery life, you must keep peak radio current low (5 mA to 15 mA), transmit tiny frames (10 B to 127 B), and turn the receiver off almost all the time (BLE, IEEE 802.15.4 / Thread / Zigbee).
  • If you want multi-kilometre range on a battery without cellular subscription fees, you must trade away data rate, dropping throughput to hundreds of bits per second to tens of kilobits per second using narrowband or chirp spread-spectrum modulation in sub-gigahertz bands (LoRaWAN).

Figure 1.10 places the links from this section on one map. Choose the node’s power source, then click to place a requirement (for example, a field sensor 8 km from its gateway) to see which links can meet it.

Figure 1.10

Range, data rate and power

Click the chart to place a requirement (the range and data rate a node needs), or click a technology for its figures.

Links
Node power source
1 cm10 cm1 m10 m100 m1 km10 km100 km100 bit/s1 kbit/s10 kbit/s100 kbit/s1 Mbit/s10 Mbit/s100 Mbit/s1 Gbit/s10 Gbit/sData rateRange (per link or per hop)NFCBLE802.15.4 (Thread, Zigbee)Wi-FiLoRaWANLTE-M, NB-IoT4G / 5G broadband
Click the chart or choose a preset to place a requirement.

Click a technology on the chart to see its figures from Table 1.1.

Typical physical-layer figures. Application throughput is lower, and mesh networks reach further than one hop.

Figure 1.10. Range against data rate for the wired buses and wireless networks in this section (Table 1.1). Each link trades range, data rate and transmit power, and no single technology covers the whole map.

In a meta-review of 95 Internet of Things survey papers published over a decade (A Survey on Trend and Classification of Internet of Things Reviews, IEEE Access, 2020), Mohd Aman et al.2 show that connected systems consistently organise communication across a layered stack (from the perception/sensing layer, through the network/transport layer, to the application layer) and split physical links by scale: intra-board buses, wired industrial fieldbuses, short-range wireless, and long-range wide-area networks.

This section maps those four physical scales so you can see how Parts II and IV of this book fit together.

1. Board-level buses: inside the enclosure (Chapter 8)

Section titled “1. Board-level buses: inside the enclosure (Chapter 8)”

When a sensor chip (such as the DS3231 Real-Time Clock or the ADXL345 accelerometer in your lab kit) sits a few centimetres away from an ESP32 or a Raspberry Pi on a PCB or breadboard, adding a radio or an Ethernet transceiver is unnecessary overhead. Instead, components communicate over synchronous or asynchronous CMOS logic lines (3.3 V or 1.8 V):

BusSignal WiresTypical SpeedTopologyEngineering Role in EEN1071
I²C (Inter-Integrated Circuit)2 (SDA, SCL, open-drain with pull-ups)100 kbit/s (Standard), 400 kbit/s (Fast), up to 3.4 Mbit/sMulti-controller, multi-target (7-bit address space: 112 usable addresses)Low-pin-count board sensors (DS3231 RTC in Assignment 1, ADXL345 IMU, BME280); ESP32 acting as an I²C target for the Pi. Bounded by bus capacitance (400 pF).
SPI (Serial Peripheral Interface)3 + N (SCLK, MOSI, MISO, plus one CS per target)1 Mbit/s to 50 Mbit/s+ (push-pull)Single controller, multiple targets via dedicated chip-select linesHigh-speed full-duplex streams: external ADCs (MCP3208 in Chapter 7), fast IMU FIFO burst reads, CAN controllers (MCP2515), small displays.
UART (Universal Asynchronous Receiver/Transmitter)2 (TX, RX, point-to-point)9600 Bd to 3 MBd (115200 8N1 standard)Point-to-point full-duplex (no shared clock wire)Bootloader/kernel serial consoles (/dev/serial0), GPS modules, cellular/LoRa AT-command modems, external co-processor links.
I³C (MIPI Improved Inter-Integrated Circuit)2 (SDA, SCL, switches open-drain to push-pull)12.5 Mbit/s (SDR), up to 25 Mbit/s+ (HDR)Multi-target with dynamic address assignment and in-band interruptsModern successor to I²C on newer IMUs and sensor hubs; can share the bus with legacy I²C targets (with restrictions), and I³C targets signal interrupts in-band without extra wires.

2. Wired industrial fieldbuses: across the vehicle or factory (Chapter 18)

Section titled “2. Wired industrial fieldbuses: across the vehicle or factory (Chapter 18)”

Single-ended 3.3 V buses like I²C and SPI are designed for trace lengths of 10 cm to 50 cm. If you run a 3.3 V I²C wire across a 10 m factory conveyor or alongside an electric vehicle motor inverter, capacitive loading rounds off the clock edges and electromagnetic interference (EMI) induces voltage spikes that corrupt bits or destroy GPIO pins.

For wired runs from a few metres up to a kilometre in electrically noisy environments, connected embedded systems switch to differential signalling over twisted-pair cabling, where the receiver measures the voltage difference ((Vdiff = V₊ − V₋)) between two wires so that common-mode noise injected equally onto both wires cancels out:

  • CAN (Controller Area Network), CAN FD, and CAN XL (Chapter 18): Originally developed by Bosch for automotive multiplexing, Classical CAN (CAN 2.0)3 runs at up to 1 Mbit/s with 8-byte payloads over a two-wire differential bus (CAN_H, CAN_L) terminated with 120 Ω resistors. It uses non-destructive bitwise arbitration (dominant 0 overwrites recessive 1), guaranteeing that the highest-priority safety message (lowest arbitration ID) wins the bus with zero collision delay. CAN FD (Flexible Data-Rate) increases the payload to 64 bytes and boosts the data-phase bit rate to 2–8 Mbit/s, while CAN XL scales payloads to 2048 bytes at up to 20 Mbit/s. Both the Raspberry Pi (via an MCP2515 SPI controller and Linux SocketCAN) and the ESP32 (via its built-in TWAI controller) speak Classical CAN in Chapter 18; neither supports CAN FD, which on the Pi needs a controller such as the MCP2518FD.
  • RS-485 (TIA/EIA-485) and Modbus RTU (Chapter 18): A differential physical layer supporting up to 32 (or 256 with modern transceivers) nodes over 1200 m of twisted-pair cable, widely paired with the simple controller/responder Modbus register protocol to read industrial PLCs, three-phase energy meters, and variable-frequency motor drives.

3. Short-range and long-range wireless networks (Chapters 15, 17, and 18)

Section titled “3. Short-range and long-range wireless networks (Chapters 15, 17, and 18)”

When cabling is impractical (on rotating machinery, wearable medical patches, retrofitted buildings, or agricultural fields), we move to radio links governed by the IEEE 802 standards committee, the Bluetooth Special Interest Group (SIG), the Connectivity Standards Alliance (CSA), the LoRa Alliance, and 3GPP.

Table 1.1 summarises the wireless technologies you will encounter in Part IV, with realistic physical-layer parameters for embedded design:

Table 1.1. Comparison of wireless connectivity technologies for connected embedded systems.

Technology & StandardFrequency BandTypical RangePhysical Data RateTypical TX Current (3.3 V)TopologyTypical Embedded Role
NFC / RFID (ISO/IEC 14443 / 18092)13.56 MHz (HF)< 10–20 cm106, 212, or 424 kbit/sPassive tag (0 mA battery) or ~15–50 mA readerPoint-to-pointZero-power asset tags, contactless commissioning, secure tap-to-pair.
Bluetooth Low Energy (BLE 5.x) (IEEE 802.15.1 heritage / BT SIG)2.4 GHz ISM (40 channels, 2 MHz spacing; 3 adv. channels)10–100 m (more with Coded PHY)1 Mbit/s, 2 Mbit/s (125/500 kbit/s Coded)~5–15 mA peak on nRF52-class parts, about 100 mA on the ESP32 (~10–50 µA avg. with sleep intervals)Star (Central / Peripheral), Broadcast, or BLE MeshCoin-cell wearables, beacons, GATT sensors read by a smartphone or Pi gateway (BlueZ; Chapter 17).
Zigbee 3.0 (IEEE 802.15.4 PHY/MAC + CSA stack)2.4 GHz (16 ch) & 868/915 MHz10–30 m per hop (100 m+ mesh)250 kbit/s (2.4 GHz), 20–40 kbit/s (sub-GHz)~10–25 mA TX (< 5 µA sleepy end device)Self-healing Mesh (Coordinator, Routers, Sleepy End Devices)Smart-home lighting, radiator valves, industrial sensor meshes via zigbee2mqtt (Chapter 17).
Thread 1.4 & Matter (IEEE 802.15.4 + 6LoWPAN / IPv6)2.4 GHz (16 channels, 127 B max PHY frame)10–30 m per hop (100 m+ mesh)250 kbit/s~10–25 mA TX (< 5 µA sleepy end device)Self-healing IPv6 Mesh with Border Router (otbr-agent)Native IPv6 end-to-end mesh with no single point of failure; application interoperability via Matter (Chapter 17).
Z-Wave / Z-Wave LR (ITU-T G.9959)868.4 MHz (EU) / 908.4 MHz (US)30–100 m indoor (1 km+ LR star)9.6, 40, or 100 kbit/s~10–35 mA TXMesh (up to 4 hops) or Long-Range StarSub-GHz smart-home sensors and locks avoiding 2.4 GHz Wi-Fi congestion (Chapter 17).
Wi-Fi 4 / 6 / 6E (IEEE 802.11n/ac/ax)2.4 GHz, 5 GHz, 6 GHz30–100 m72 Mbit/s (1x1 11n) up to 600 Mbit/s – 9.6 Gbit/s~100–350 mA TX peak (reduced avg. via Wi-Fi 6 TWT)Star (Station to Access Point)High-throughput gateways, cameras, and mains- or LiPo-powered ESP32 nodes with direct IP connectivity (Chapter 15).
LoRa / LoRaWAN (Semtech CSS PHY + LoRa Alliance MAC)868 MHz (EU) / 915 MHz (US) licence-exempt ISM2–5 km urban, 15 km+ rural0.3 to 22 kbit/s (LoRa CSS), 50 kbit/s (FSK)~25–120 mA TX (Class A sleeps between uplinks)Star-of-Stars (Nodes → Gateways → Network Server)Multi-year battery field sensors (agriculture, water metering, flood monitoring) with small payloads (Chapter 18).
Cellular IoT: LTE-M & NB-IoT (3GPP Rel. 13+)Licensed cellular bands (700–2100 MHz)Nationwide cellular footprint~300 kbit/s – 1 Mbit/s (LTE-M), ~20–250 kbit/s (NB-IoT)~80–250 mA TX; multi-year battery via PSM and eDRXCellular Star (Node to eNodeB base station)Mobile logistics trackers, smart grid meters, and off-site monitors with no local gateway (Chapter 18).

4. Application protocols: MQTT versus CoAP (Chapter 16)

Section titled “4. Application protocols: MQTT versus CoAP (Chapter 16)”

Once a leaf node has an IP connection (either directly over Wi-Fi/Ethernet or through a 6LoWPAN Thread border router on the Raspberry Pi), how should it structure its messages? Rather than inventing brittle custom byte formats over raw TCP or UDP sockets, connected embedded systems rely on two standard IoT application protocols that you will implement in Chapter 16:

  • MQTT (Message Queuing Telemetry Transport): A publish/subscribe protocol running over TCP (and TLS on port 8883), standardised by OASIS (MQTT 3.1.1 and MQTT 5.0)7. Leaf nodes never need to know each other’s IP addresses; instead, publishers send messages to hierarchical named topics (such as een1071/greenhouse/node1/temperature) on a central broker (such as Mosquitto running on your Raspberry Pi gateway), and any number of subscribers (a Qt 6 dashboard, a logger, or an actuator node) receive matching messages automatically. MQTT provides a minimal 2-byte fixed header, three Quality of Service (QoS 0, 1, 2) delivery levels, retained messages, and a Last Will and Testament (LWT) that notifies the system if a node disconnects unexpectedly. (For non-TCP links such as 802.15.4 or BLE, MQTT-SN adapts MQTT to UDP/datagrams.)
  • CoAP (Constrained Application Protocol, RFC 7252):8 A request/response RESTful protocol modelled after HTTP (GET, POST, PUT, DELETE, URI paths, and status codes like 2.05 Content), but shrunk into a 4-byte binary header running over UDP (secured with DTLS or OSCORE). Because CoAP avoids TCP’s three-way connection handshake, a sleepy IEEE 802.15.4 leaf node can wake from deep sleep, transmit a single UDP packet (Confirmable CON or Non-confirmable NON), and return to sleep in milliseconds. CoAP also adds built-in resource discovery (/.well-known/core) and an Observe option (RFC 7641)9 that lets a client subscribe to state changes on a sensor resource.

As a rule of thumb: when distributing telemetry one-to-many across decoupled services via a gateway broker, use MQTT; when addressing or querying constrained, sleepy nodes over UDP/6LoWPAN meshes, use CoAP. Both protocols can carry human-readable JSON during debugging or compact binary CBOR (Concise Binary Object Representation, RFC 8949)10 and Protocol Buffers when air-time and battery energy are tight (Chapter 16).

Concept Match

Match the wired bus to its description

Quiz
Select 0/1

A LoRa node in Europe transmits in the 868 MHz band under a 1% duty-cycle limit (ETSI EN 300 220). How much air time can it use per hour?

Quiz
Select 0/2

Which of the following statements about MQTT and CoAP are correct?

Quiz
Select 0/1

Which layer provides multi-hop mesh routing in a Thread network?

  1. C. E. Shannon, “A Mathematical Theory of Communication,” Bell System Technical Journal, vol. 27, no. 3, pp. 379–423, July 1948, doi: 10.1002/j.1538-7305.1948.tb01338.x. ↩

  2. A. H. Mohd Aman, E. Yadgarova, Z. S. Attarbashi, R. Hassan, and Y. A. M. Al-Khaleefa, “A Survey on Trend and Classification of Internet of Things Reviews,” IEEE Access, vol. 8, pp. 111763–111782, June 2020, doi: 10.1109/ACCESS.2020.3002932. ↩

  3. International Organization for Standardization, Road vehicles — Controller area network (CAN) — Part 1: Data link layer and physical signalling, ISO 11898-1:2024. ↩

  4. IEEE Standards Association, IEEE Standard for Low-Rate Wireless Networks, IEEE Std 802.15.4-2020. ↩

  5. J. Hui and P. Thubert, Compression Format for IPv6 Datagrams over IEEE 802.15.4-Based Networks, IETF Proposed Standard RFC 6282, Sept. 2011. ↩

  6. European Telecommunications Standards Institute (ETSI), Short Range Devices (SRD) operating in the frequency range 25 MHz to 1 000 MHz; Part 1: Technical characteristics and methods of measurement, ETSI EN 300 220-1. ↩

  7. OASIS Standard, MQTT Version 3.1.1 (Oct. 2014) and MQTT Version 5.0 (Mar. 2019), Organization for the Advancement of Structured Information Standards, https://mqtt.org/. ↩

  8. Z. Shelby, K. Hartke, and C. Bormann, The Constrained Application Protocol (CoAP), IETF Proposed Standard RFC 7252, June 2014. ↩

  9. K. Hartke, Observing Resources in the Constrained Application Protocol (CoAP), IETF Proposed Standard RFC 7641, Sept. 2015. ↩

  10. C. Bormann and P. Hoffman, Concise Binary Object Representation (CBOR), IETF Internet Standard RFC 8949, Dec. 2020. ↩