Skip to content
Tutorials Center
My learning

Topics

Lesson 16 of 36 ยท Connectivity Protocols

Short-Range Wireless: Wi-Fi, BLE, Zigbee and Thread

Compare Wi-Fi, Bluetooth Low Energy, Zigbee, Thread, Matter, Z-Wave and NFC for IoT: range, speed, power, mesh networks, path loss and a runnable BLE packet decoder.

Most IoT devices talk wirelessly over short distances, from a few centimeters (NFC) to a hundred meters (Wi-Fi). Each technology makes different trade-offs between speed, range, power and complexity, and none is best for everything. This lesson explains the common ones so you can pick the right radio for a device.

Radio basics every IoT builder needs

  • Frequency bands: 2.4 GHz is shared by Wi-Fi, Bluetooth, Zigbee and Thread, so they can interfere. Sub-GHz bands (868 MHz in Europe, 915 MHz in the US) travel farther and penetrate walls better but allow less data. 5 GHz and 6 GHz carry more data over shorter distance.
  • Range falls with distance and obstacles. Free-space loss grows 20 dB for every ten times the distance, and walls, water and metal add more.
  • Data rate versus power: faster links generally cost more energy per second, though fast links finish sooner.
  • Topology: how devices connect: star (everything to a hub), mesh (devices relay for each other) or point to point.
Python Free-space path loss and received signal strength

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A receiver needs the signal above its sensitivity: around -90 dBm for Wi-Fi, -95 dBm for BLE and -137 dBm for LoRa at low data rates. The lower sensitivity of LoRa is why it reaches kilometers.

Wi-Fi (IEEE 802.11)

Wi-Fi is everywhere and gives high data rates and direct IP connectivity to your router and the internet.

  • Good for: mains-powered devices: smart plugs, cameras, appliances, displays.
  • Weak at: battery life (association and TLS take seconds), crowded 2.4 GHz channels and provisioning headless devices.
  • Details: 2.4 GHz has more range, 5/6 GHz more speed. Most microcontrollers support only 2.4 GHz b/g/n. Wi-Fi 6 adds Target Wake Time, helping battery devices sleep between scheduled wakeups. Wi-Fi HaLow (802.11ah) runs at 900 MHz for long range IoT.

Bluetooth and Bluetooth Low Energy

Bluetooth Classic streams audio and files. Bluetooth Low Energy (BLE) was designed for tiny, infrequent messages with years of battery life, and is in every phone.

  • Advertising: a device broadcasts small packets (up to 31 bytes of payload, more with extended advertising) several times per second. Beacons use only advertising.
  • Connections: a phone (central) connects to a device (peripheral). Data lives in GATT services made of characteristics, such as Heart Rate Service 0x180D or Battery Level 0x2A19.
  • Range: 10 to 50 m typical; Coded PHY extends to hundreds of meters.
  • Bluetooth Mesh: many-to-many for lighting.
  • Good for: wearables, phone-configured devices, tags, medical sensors, setting up Wi-Fi credentials.

A BLE advertising payload is a sequence of AD structures: length, type, data. The decoder below parses a sample packet.

Python Decoding a BLE advertising payload

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Zigbee, Thread and Matter

Zigbee and Thread are low-power mesh networks on 802.15.4 radios (2.4 GHz). Every mains-powered node can relay, so the network extends and heals itself. They need a border router or gateway to reach the internet.

  • Zigbee: mature, huge product range (bulbs, sensors). Devices usually pair with a hub from the same ecosystem or a Zigbee coordinator.
  • Thread: IPv6-based mesh. Every device has an IP address, so it connects to the internet like any other host. Backbone for Matter.
  • Matter: an application standard (backed by major vendors) that runs over Wi-Fi, Thread and Ethernet and lets devices from different brands work together locally. It does not replace the radio; it standardizes how devices are described, paired and controlled.
  • Z-Wave: sub-GHz mesh for home automation with strict certification, so devices interoperate well and avoid 2.4 GHz congestion.
flowchart LR
    Cloud["Internet / cloud"] --- BR["Border router<br/>or hub"]
    BR --- R1["Router node<br/>(mains powered)"]
    BR --- R2["Router node"]
    R1 --- E1["Sleepy sensor"]
    R1 --- R2
    R2 --- E2["Sleepy sensor"]
    R2 --- E3["Light"]

A mesh: routers relay for each other, sleepy end devices attach to the nearest router.

The simulation below finds a route through a mesh and shows self-healing when one router dies.

Python Mesh routing and self-healing

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

When router C dies, the lonely sensor cannot reach anything: mesh needs enough routers. Mesh adds latency and complexity but removes the single point of failure.

NFC and RFID

RFID tags are powered by the reader's radio field, so they need no battery. NFC (13.56 MHz, range about 4 cm) is used for payments, access cards and quick pairing: tap a phone on a device to configure it. Passive UHF RFID reads tags at several meters, popular for inventory.

Comparing the options

Python Pick a short-range radio from the requirements

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Coexistence and practical tips

  • Wi-Fi channels 1, 6 and 11 do not overlap; Zigbee channels can be placed between them.
  • Keep antennas away from metal; use a certified module so you avoid radio-regulatory testing.
  • Provisioning: use BLE or a temporary access point to give a device its Wi-Fi password; Matter standardizes this.
  • Test in the real building: walls, microwaves and crowded apartments change everything.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which technology is designed for tiny, infrequent messages and years of battery life on phones' radios?

    BLE trades speed for very low power and is supported by every smartphone.
  2. 2. What is the advantage of a mesh network such as Zigbee or Thread?

    Router nodes forward traffic, so the network covers more area and survives a failed node.
  3. 3. What is Matter?

    Matter standardizes how devices are described, paired and controlled across ecosystems.
  4. 4. Why do sub-GHz radios reach farther than 2.4 GHz at the same power?

    Free-space loss increases with frequency and lower frequencies diffract around obstacles more easily.

Summary

  • Radio choice balances range, data rate, power and topology; 2.4 GHz is crowded, sub-GHz travels farther.
  • Wi-Fi gives speed and IP but is power-hungry; BLE gives low power and phone access.
  • Zigbee and Thread are low-power meshes; Matter unifies smart-home control; NFC and RFID work at tiny distances.
  • Use certified modules, test in real conditions and plan provisioning.

Next: LPWAN and Cellular IoT