Appearance
8.3 — Wi-Fi and Bluetooth in Practice
Both use the same 2.4 GHz band. Both are short range. And they were designed for opposite purposes, which is why they made opposite decisions about almost everything.
Wi-Fi replaces an Ethernet cable: high throughput, mains power assumed, tens of metres. Bluetooth replaces a serial cable: low power, low rate, a few metres, battery-operated at both ends.
1. Wi-Fi
The physical layer
Built on OFDM (Chapter 7.4), with the generations differing mainly in how much bandwidth, how many antennas and how dense a constellation.
| Standard | Name | Band | Max channel | Max rate |
|---|---|---|---|---|
| 802.11b | — | 2.4 GHz | 22 MHz | 11 Mbit/s |
| 802.11g | — | 2.4 GHz | 20 MHz | 54 Mbit/s |
| 802.11n | Wi-Fi 4 | both | 40 MHz | 600 Mbit/s |
| 802.11ac | Wi-Fi 5 | 5 GHz | 160 MHz | 6.9 Gbit/s |
| 802.11ax | Wi-Fi 6 | both + 6 GHz | 160 MHz | 9.6 Gbit/s |
| 802.11be | Wi-Fi 7 | all three | 320 MHz | 46 Gbit/s |
Those headline rates are physical-layer peaks with the maximum number of antennas and perfect conditions. Real throughput is typically 40 to 60% of the figure, because of protocol overhead, contention and the fact that nobody has eight antennas.
Where the improvements actually came from, in order of contribution:
- More bandwidth. 20 → 40 → 80 → 160 → 320 MHz. Linear gain, and the largest single factor.
- More spatial streams. MIMO from 1 to 8. Linear in the number of streams.
- Denser constellations. 64-QAM → 256-QAM → 1024-QAM → 4096-QAM. Only 6 dB per doubling of bits, and it needs very good SNR — 4096-QAM works only within a few metres of the access point.
Wi-Fi 6's genuinely new idea is OFDMA (Chapter 7.4): dividing a channel among several devices simultaneously, rather than giving each the whole channel in turn. In a dense environment with many small transmissions — which describes almost every home — this is worth far more than the raw rate increase, because the overhead per transmission dominates when packets are short.
The bands and their channels
2.4 GHz has 13 channels in most of the world, spaced 5 MHz apart — but each channel is 20 MHz wide, so adjacent channels overlap heavily.
Only channels 1, 6 and 11 are non-overlapping. This is the single most useful practical fact about Wi-Fi, and it means a dense area has exactly three usable channels.
The 2.4 GHz band is also shared with Bluetooth, microwave ovens (which leak at 2.45 GHz), cordless phones, baby monitors and Zigbee. It is crowded to the point of being nearly unusable in flats.
5 GHz has 20 or more non-overlapping 20 MHz channels, much less interference, and shorter range — roughly half that of 2.4 GHz for the same power, from the path loss formula of Chapter 7.1.
Some 5 GHz channels require DFS — dynamic frequency selection — because they are shared with weather and military radar. A device must listen for radar before using the channel and vacate within 10 seconds if it detects any. This is why an access point sometimes changes channel unprompted, and why some channels are unavailable near airports.
6 GHz, opened from 2020, adds 1200 MHz of clean spectrum with no legacy devices. Wi-Fi 6E and Wi-Fi 7 use it, and the range is shorter again.
Access: why Wi-Fi cannot detect collisions
Ethernet uses CSMA/CD — listen, transmit, and detect a collision by noticing that the voltage on the wire is not what you sent.
A radio cannot do that. Its own transmission is perhaps 10^{12} times stronger than any signal it might receive, so it is completely deaf while transmitting.
So Wi-Fi uses CSMA/CA — collision avoidance:
- Listen. If the channel is busy, wait.
- Wait a fixed interframe space after it goes idle.
- Then wait a random number of slots — the backoff, chosen from a contention window.
- Transmit if still idle.
- Wait for an acknowledgement. No acknowledgement means a collision, so double the contention window and retry — binary exponential backoff.
The randomness is what prevents two waiting stations from transmitting simultaneously the moment the channel clears.
The overhead is substantial. Interframe spaces, backoff, preamble, headers and acknowledgement together can exceed the time spent sending the data for a short packet. This is why a nominal 54 Mbit/s link delivers about 25 Mbit/s of TCP throughput, and why frame aggregation — bundling many packets into one transmission — was one of Wi-Fi 4's most valuable additions.
The hidden node problem
Stations A and C can both reach the access point B, but not each other. A transmits; C hears nothing and transmits too; they collide at B and neither knows why.
The fix is RTS/CTS. A sends a short Request To Send; B replies with a Clear To Send that everyone in range of B hears, including C. C now knows to stay quiet, even though it cannot hear A.
The cost is two extra frames per transmission, so it is enabled only for frames above a threshold size, where the protection is worth the overhead.
Association and security
Scanning. Passive — listen for beacons, which access points broadcast about ten times a second. Or active — send a probe request and listen for responses.
A hidden SSID is not security. The name is absent from beacons but appears in every association exchange, so anyone listening for a few seconds sees it.
The security history, and each step exists because the previous one broke:
WEP (1997) — RC4 with a 24-bit initialisation vector. Broken completely by 2001, and crackable in minutes: the IV is too short, so it repeats, and repeated IVs leak the key.
WPA (2003) — an interim fix using TKIP, still RC4 but with per-packet keys. Better, and now also broken.
WPA2 (2004) — AES-CCMP. Still fundamentally sound, and the weakness is in the four-way handshake rather than the cipher. The KRACK attack of 2017 exploited handshake replay and was fixed in software.
WPA3 (2018) — replaces the handshake with SAE (Simultaneous Authentication of Equals), which is resistant to offline dictionary attacks. This is the real improvement: with WPA2, capturing one handshake lets an attacker guess passwords offline at billions per second. With WPA3, each guess requires a fresh interaction with the network, which makes weak passwords far less catastrophic.
WPA3 also adds opportunistic encryption on open networks, so a public hotspot encrypts traffic even without a password — protecting against passive eavesdropping, though not against an active attacker.
Range and the rate ladder
Typical indoor figures:
| Band | Rate | Range |
|---|---|---|
| 2.4 GHz | 54 Mbit/s | 30 m |
| 2.4 GHz | 6 Mbit/s | 90 m |
| 5 GHz | 866 Mbit/s | 10 m |
| 5 GHz | 6 Mbit/s | 45 m |
Rate adaptation picks the highest modulation the current SNR supports (Chapter 7.3), which is why throughput falls in steps as you walk away.
Wall losses, per wall:
| Material | Loss |
|---|---|
| Drywall | 3 dB |
| Wood door | 3 dB |
| Brick | 6–10 dB |
| Concrete | 10–15 dB |
| Metal or foil insulation | 20–30 dB |
| Low-emissivity glass | 25 dB |
The last two matter more than people expect. Foil-backed insulation and metallised window coatings turn a room into a partial Faraday cage, which is why some modern energy-efficient houses have terrible Wi-Fi and no mobile signal indoors.
Mesh systems solve range by adding nodes rather than power. The important design point is the backhaul: a mesh node that relays on the same radio it serves clients with halves the throughput at every hop. A dedicated backhaul radio, or a wired connection, avoids that entirely — which is the difference between a good mesh system and a bad one.
The bars say the whole story. Wi-Fi was built to replace an Ethernet cable, so it optimises throughput and accepts the power cost — a Wi-Fi client stays associated, listens continuously, and drains a battery in hours. Bluetooth Low Energy was built so a coin cell could last a year, so it optimises sleep: the radio wakes for a few milliseconds, exchanges a handful of bytes, and shuts down. Its data rate is a thousand times lower and its battery life is a thousand times longer, and neither of those is an accident.
Which is why your headphones do not use Wi-Fi and your laptop does not stream video over Bluetooth. The right question for any wireless design is never "which is better" but "which of throughput and battery life am I allowed to sacrifice", and section 3 shows what happens when both are in the same crowded band at once.
2. Bluetooth
The physical layer
2.4 GHz, 79 channels of 1 MHz in classic Bluetooth, or 40 channels of 2 MHz in Bluetooth Low Energy.
Frequency hopping, 1600 hops per second in classic Bluetooth — the channel changes every 625 µs.
Why hop. Three reasons, and all three matter:
- Interference avoidance. A hop that lands on an occupied channel loses one packet; the next hop is elsewhere.
- Coexistence with Wi-Fi. Bluetooth's adaptive frequency hopping detects channels that are consistently bad and removes them from the hopping sequence, so it learns to avoid the Wi-Fi channel in use.
- Multipath. A frequency in a deep null is fine at the next hop, which is frequency diversity (Chapter 7.6).
Modulation: GFSK — Gaussian frequency shift keying — which is constant-amplitude and lets the transmitter's amplifier run in saturation at maximum efficiency. That single choice is worth several milliwatts, which is decisive in a device running from a coin cell.
Power classes:
| Class | Power | Range |
|---|---|---|
| 1 | 100 mW | 100 m |
| 2 | 2.5 mW | 10 m |
| 3 | 1 mW | 1 m |
Most devices are class 2, and the 10 m figure is optimistic in practice.
Classic Bluetooth versus Low Energy
They are different protocols sharing a band and a name, and the differences are all consequences of one goal.
| Classic | Low Energy | |
|---|---|---|
| Channels | 79 × 1 MHz | 40 × 2 MHz |
| Connection setup | ~100 ms | ~3 ms |
| Data rate | 1–3 Mbit/s | 125 kbit/s–2 Mbit/s |
| Peak current | ~30 mA | ~15 mA |
| Sleep current | µA | nA |
| Typical battery | days | years |
| Use | audio, file transfer | sensors, beacons, wearables |
The battery difference comes almost entirely from connection setup time. A BLE device wakes, advertises for 3 ms, and sleeps. A classic device takes 100 ms to do the equivalent, so it spends thirty times as long awake for the same transaction.
BLE's advertising is the key mechanism. A device broadcasts a small packet on three dedicated advertising channels — chosen to sit in the gaps between the common Wi-Fi channels 1, 6 and 11 — at an interval it chooses, from 20 ms to 10 seconds.
Worked battery calculation. A temperature sensor advertising every second, awake for 3 ms at 15 mA, sleeping at 1 µA:
I_{avg}=15\times\frac{0.003}{1}+0.001=0.045+0.001=0.046\ \text{mA}
\text{life}=\frac{220\ \text{mAh}}{0.046}=4783\ \text{hours}=6.5\ \text{months}
Advertise every 10 seconds instead:
I_{avg}=0.0045+0.001=0.0055\ \text{mA} \;\Rightarrow\; 4.6\ \text{years}
The advertising interval is the single design parameter that decides battery life, and it trades directly against how quickly the device is discovered.
Audio, and why Bluetooth audio has latency
Classic Bluetooth carries audio using A2DP, which streams compressed audio over a reliable connection.
Codecs, and the honest comparison:
| Codec | Rate | Latency | Notes |
|---|---|---|---|
| SBC | 200–350 kbit/s | 100–200 ms | mandatory, mediocre |
| AAC | 250 kbit/s | 120–200 ms | better at the same rate |
| aptX | 350 kbit/s | 60–80 ms | lower latency |
| aptX LL | 350 kbit/s | ~40 ms | low latency variant |
| LDAC | up to 990 kbit/s | 200 ms+ | highest rate |
| LC3 (LE Audio) | 160–320 kbit/s | ~20 ms | better than SBC at half the rate |
Why the latency exists. Buffering to survive interference, plus the codec's own algorithmic delay, plus the retransmission window. Every one of those is there to prevent dropouts, and removing them trades robustness for responsiveness.
Above about 100 ms, lip sync is visibly wrong in video, which is why video players apply a compensating delay to the picture when they detect a Bluetooth output.
LE Audio with the LC3 codec is the substantial improvement: better quality at half the bit rate, much lower latency, and — the genuinely new capability — broadcast audio, where one transmitter serves unlimited receivers. That enables assistive listening in public venues and shared listening from one phone.
And the hearing aid case is the important one. LE Audio's low power and broadcast support mean hearing aids can receive audio directly from a phone, a television or a public address system, which previously required a separate induction loop system.
Pairing
Legacy pairing used a PIN, usually 0000 or 1234, and was trivially breakable.
Secure Simple Pairing (2.1+) uses elliptic curve Diffie-Hellman key exchange with four association models:
- Just Works — no user interaction, and no protection against an active attacker in the middle, though it does protect against passive eavesdropping.
- Numeric comparison — both devices show a six-digit number and the user confirms they match. This defeats the middleman, because an attacker cannot make both numbers match.
- Passkey entry — one device shows a number, the other requires it typed.
- Out of band — the key is exchanged over NFC or another channel.
The security depends entirely on which model is used, and Just Works is common on devices with no display — which is most of them.
3. Coexistence
Wi-Fi and Bluetooth share 2.4 GHz, and a phone typically runs both simultaneously.
In-device coexistence is handled by the chipset, which time-shares the radio and tells each protocol when it may transmit. This is why Wi-Fi throughput drops noticeably while streaming Bluetooth audio on a device with a shared antenna.
Adaptive frequency hopping lets Bluetooth learn which channels Wi-Fi occupies and avoid them, which recovers most of the loss.
And a microwave oven radiates several watts at 2.45 GHz through an imperfectly sealed door. It affects Wi-Fi channels 8 to 11 most, and the classic symptom is a connection that degrades for exactly the duration of a cooking cycle. Moving to channel 1, or to 5 GHz, resolves it entirely.
4. The other short-range radios
Zigbee / 802.15.4 — 2.4 GHz, 250 kbit/s, mesh networking, very low power. Used in home automation, and its advantage over Bluetooth is that the mesh extends range through intermediate nodes.
Thread — the same radio as Zigbee but carrying IPv6, which means devices are addressable from the internet without a translating gateway. This is the technical basis of Matter, the smart-home standard.
Z-Wave — sub-GHz (868 or 908 MHz), so better range and better wall penetration than 2.4 GHz, and no contention with Wi-Fi. Proprietary and licensed, which limited adoption.
LoRa — sub-GHz, and a completely different point on the trade. Uses chirp spread spectrum to achieve ranges of 2 to 15 km at data rates of 0.3 to 50 kbit/s. The chirp — a signal sweeping in frequency — gives enormous processing gain and works far below the noise floor, exactly as GPS does.
NB-IoT and LTE-M — cellular standards designed for the same job, using the licensed spectrum and existing base stations. Better coverage and reliability; a subscription per device.
The pattern across all of them, worth stating once: every short-range radio is a point on the same three-way trade between range, data rate and power. LoRa buys enormous range with very low rate. Wi-Fi buys high rate with high power. BLE buys low power with short range and low rate. Nothing gets all three, and the physics of Chapter 7.5 is why.
Chapter 8.4 covers the shortest-range radio of all, where the range is measured in centimetres and the receiver has no battery at all.
Every formula above, built from scratch
None of the results in this chapter are worth memorising, because each one can be rebuilt in under a minute from something simpler. What follows is that rebuilding, one result at a time, so the formula and the reason for it sit on the same page as the explanation that needed them.
Wi-Fi and Bluetooth
Non-overlapping 2.4 GHz channels: 1, 6 and 11 only — channels are spaced 5 MHz apart and are 20 MHz wide.
OFDM data rate (Chapter 7.4):
R=\frac{N_{data}\times\log_2M\times r_{code}}{T_{symbol}}
802.11a in 20 MHz: 48\times6\times0.75/4\ \mu\text{s}=54 Mbit/s.
Rise time from RC loading, for pull-up sizing on shared buses — see Chapter 3.F.
Wall losses: drywall 3 dB, brick 6–10 dB, concrete 10–15 dB, metal or low-emissivity glass 20–30 dB.
BLE battery life:
I_{avg}=I_{active}\frac{t_{active}}{T_{advertise}}+I_{sleep}
Worked: 15 mA for 3 ms every 1 s plus 1 µA sleep gives 46 µA and 6.5 months from 220 mAh. Advertising every 10 s gives 5.5 µA and 4.6 years. The advertising interval is the dominant design parameter.
Bluetooth hopping: 1600 hops/s classic, 625 µs per slot, 79 channels of 1 MHz. BLE uses 40 channels of 2 MHz with 3 advertising channels placed in the gaps between Wi-Fi channels 1, 6 and 11.
What the next chapter fixes
Every radio so far needs a power source at both ends. Chapter 8.4 covers the ones that do not — tags with no battery at all, powered entirely by the field of the reader interrogating them, which is the technology in every contactless card and shop security label.