Skip to content

Repository files navigation

How does Bluetooth work?

BluetoothClear

How does Bluetooth work?
Your earbuds change frequency 1,600 times a second, dodge Wi-Fi as they go, and agree a secret key in a room full of listeners, all on a few thousandths of a watt. Open one up in 3D and watch the radio hop.

▶ Play with it  ·  Read the 60-second explainer  ·  Watch the 40-second video

Glassbox No. 132 Communication Code: MIT Content: CC BY 4.0 Privacy: explained

In 60 seconds

  1. A radio and a computer in one chip. A wireless earbud holds one chip with a 2.4 GHz radio and a small processor, a quartz crystal to keep time, an antenna about 3 cm long in the stem, a button cell, a tiny loudspeaker and a few microphones. Everything Bluetooth does happens in that chip.
  2. A free band that everyone shares. Bluetooth uses the 2.4 GHz ISM band, from 2,400 to 2,483.5 MHz. Nobody needs a licence there, so Wi-Fi, cordless gadgets and the leak from microwave ovens are all in it too. A Bluetooth signal is only 1 MHz wide, next to Wi-Fi's 20 MHz.
  3. It never stays on one frequency. Classic Bluetooth splits the band into 79 channels and jumps between them 1,600 times a second, in an order both ends work out from the central device's address and clock. If one channel is noisy, only one packet is lost. Adaptive hopping marks busy channels and steers round them, keeping at least 20 in use.
  4. Bits ride on tiny shifts of frequency. A 1 nudges the carrier up by about 160 kHz and a 0 nudges it down: Gaussian frequency-shift keying, at a million bits a second. Faster modes step the wave's phase to carry 2 or 3 bits per symbol. Most devices send just 2.5 milliwatts, so walls and your own body can break the link.
  5. A secret agreed in public. To pair, each device sends a public key and keeps a private one, and both mix the same shared secret from them. A listener who hears everything still cannot make it. Six digits shown on both screens prove that no impostor swapped the keys on the way. After that the link is encrypted.
  6. Sleep to save power, buffer to save the music. Bluetooth Low Energy wakes for a few milliseconds and sleeps the rest, so a coin cell can run a tracker for a year. Music is squeezed by a codec such as SBC to about a quarter of a CD's bit rate, and the earbud keeps a buffer of sound so lost packets can be sent again. That buffer is why Bluetooth audio runs late.

Words worth knowing

Term Meaning
ISM band A slice of radio spectrum set aside for industrial, scientific and medical machines. Low-power radios may use the 2.4 GHz one without a licence.
Frequency hopping Changing the transmit frequency many times a second in an order both ends know. Classic Bluetooth hops 1,600 times a second over 79 channels.
Adaptive frequency hopping Dropping busy channels from the hop pattern and using the clean ones more, while keeping at least 20.
Central and peripheral The central, usually the phone, sets the timing and the hop pattern. Peripherals such as earbuds follow it.
GFSK Gaussian frequency-shift keying: a 1 nudges the carrier frequency up and a 0 nudges it down, with the changes smoothed.
Pairing and bonding Pairing creates a shared secret key between two devices. Bonding stores it so they can reconnect and encrypt without pairing again.
Bluetooth Low Energy A simpler Bluetooth radio with 40 channels, built for devices that send little and must run for months on a small cell.
Duty cycle The fraction of time a radio is awake. A tag that wakes for 3 ms every second has a duty cycle of 0.3%.
Codec A method that squeezes sound into fewer bits before sending and unpacks it at the other end. SBC is the one every Bluetooth audio device supports.

A short history

From a Viking king's rune stone and a film star's patent to five billion new radios a year.

  • 1942 · A film star and a composer patent a hopping radio (Hedy Lamarr and George Antheil, Los Angeles, USA)
  • 1985 · The noisy bands are opened to everyone (Michael Marcus and the US FCC, Washington DC, USA)
  • 1994 · The radio is designed (Jaap Haartsen and Sven Mattisson, Lund, Sweden)
  • 1997 · A code name that stuck (Jim Kardach, Toronto, Canada)
  • 1998 · Five rivals form a club (Ericsson, IBM, Intel, Nokia and Toshiba, Announced worldwide)
  • 2001 · Bluetooth inside the phone (Ericsson, Sweden)
  • 2003 · Hopping learns to dodge Wi-Fi (Bluetooth SIG, Published worldwide)
  • 2006 · Nokia shows a radio for coin cells (Nokia Research Center, Helsinki, Finland)

The full story, with 29 moments, charts, people and 39 sources: glassbox.how/e/bluetoothclear/history. The data lives in history.json.

Video and slides

Made with the Glassbox studio from this box's storyboard (window.glassbox.director). Free to reuse under CC BY 4.0.

Video: How does Bluetooth work?

Carousel slide-1 Carousel slide-2 Carousel slide-3 Carousel slide-4

File What Size
glassbox/reel.mp4 Reel / Short, with captions and soundtrack 1080×1920
glassbox/video.mp4 YouTube video, with captions and soundtrack 1920×1080
glassbox/slide-1…10.jpg Instagram carousel 1080×1350
glassbox/thumb.jpg YouTube thumbnail 1280×720
glassbox/cover.jpg Share card and repo social preview 1200×630
glassbox/history-reel.mp4 “History in 10 moments” Reel / Short 1080×1920
glassbox/history-slide-*.jpg History carousel 1080×1350
glassbox/post.json Post copy and schedule used by the publish kit

Privacy

This box has no accounts and no ads, and it ships its own fonts and libraries. When you run it yourself it sends nothing anywhere. On glassbox.how, the site's /bar.js also loads Glassbox's analytics: Google Analytics to count visits (it asks first in the EU, UK and Switzerland, and stays off when your browser sends Global Privacy Control or Do Not Track) and ClickTrust to detect bots.

It remembers a few things in your own browser only, and never sends them anywhere:

Browser storage key What it holds
bluetoothclear.v1 Which chapters you have opened, your best quiz scores, and sound on or off.

Exactly what each one sees is at glassbox.how/privacy.

Licences

Found a mistake? Open an issue. Corrections happen in public.

Run it

It's plain HTML, CSS and JavaScript. No build step and no dependencies. Run locally, it contacts no other website.

python3 -m http.server 8000

Three.js and the fonts ship in vendor/ and fonts/, so it also works offline.

Then open http://localhost:8000.

How it's built

File What
index.html, css/app.css The page and its styles
js/app.js, js/stage.js, js/ui.js, js/kit.js The shared Glassbox 3D engine: chapters, 3D stage, controls, quiz, video director
js/bt.js BluetoothClear's own helper: radio constants with sources, the hop and channel-map maths, link budget, coin-cell life, drawing boards and the generic 3D models (earbud, phone, speaker, router, oven, tag)
js/chapters/*.js One file per chapter: the 3D model, controls, text, key terms, quiz and video scenes
glassbox.json Title, question, explainer beats, key terms, browser storage and credits shown on glassbox.how
reel in each chapter The storyboard the Glassbox studio records into short videos
glassbox/ The published video, slides, thumbnail and post copy
fonts/, vendor/three/ Self-hosted Geist and Instrument Serif (SIL OFL 1.1) and three.js (MIT)

Releases

Packages

Contributors

Languages