Chapter 7

Bluetooth LE, networks, and protocol reasoning

This chapter explains Bluetooth Low Energy (BLE) §7.1, the short-range radio technology of battery-powered devices, and uses it to show how to reason about a layered network protocol. The first entries follow the protocol from the bottom up: the roles that devices take, advertising and scanning §7.3, the division of a device into a Controller and a Host, the Link Layer §7.6 that schedules every radio exchange, and the Attribute Protocol §7.9 and the Generic Attribute Profile §7.10 (GATT) through which devices read and write each other’s data, together with message sizes and flow control.

The second part covers security: how pairing creates keys, the methods by which a person confirms that the right two devices are pairing, what each method protects against, the keys that bonded devices store, and the private addresses that stop strangers from tracking a device. The final entries are about reasoning across layers: what each kind of acknowledgment proves, how lost and repeated messages are handled, why a protected link does not show who wrote the data it carries, how a peer can use up a device’s connections, and how measured throughput relates to the useful data delivered.

In this chapter

  1. 7.1 Bluetooth Low Energy (BLE)
  2. 7.2 Central and peripheral roles
  3. 7.3 Advertising and scanning
  4. 7.4 BLE Controller and Host
  5. 7.5 Host Controller Interface (HCI)
  6. 7.6 Link Layer
  7. 7.7 Connection interval
  8. 7.8 Supervision timeout
  9. 7.9 ATT
  10. 7.10 GATT
  11. 7.11 GATT characteristic
  12. 7.12 Notification versus indication
  13. 7.13 Write request versus write command
  14. 7.14 MTU and fragmentation
  15. 7.15 L2CAP
  16. 7.16 LE credit-based flow control
  17. 7.17 Pairing
  18. 7.18 Bonding
  19. 7.19 Security Manager Protocol (SMP)
  20. 7.20 LE legacy pairing
  21. 7.21 LE Secure Connections
  22. 7.22 Just Works
  23. 7.23 Passkey entry
  24. 7.24 Numeric comparison
  25. 7.25 Out-of-band (OOB) association
  26. 7.26 MITM attack
  27. 7.27 Encryption key size
  28. 7.28 Long-term key (LTK)
  29. 7.29 Identity resolving key (IRK)
  30. 7.30 Public, static random, and private addresses
  31. 7.31 Resolvable private address (RPA)
  32. 7.32 Company identifier
  33. 7.33 Security level
  34. 7.34 Channel confidentiality versus object authenticity
  35. 7.35 Connection-slot exhaustion
  36. 7.36 Retransmission and duplicate delivery
  37. 7.37 Protocol state machine
  38. 7.38 Cross-layer security
  39. 7.39 Throughput versus goodput
  40. 7.40 Jamming versus protocol DoS