Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bluetooth Low Energy ことはじめ

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for ssmylh ssmylh
May 23, 2026
1

Bluetooth Low Energy ことはじめ

2026/05/16〜05/18に、友人4人と行った開発合宿@鳴子温泉旅館すがわらでの発表スライドです。

Avatar for ssmylh

ssmylh

May 23, 2026

Transcript

  1. Bluetooth の全体像 Bluetooth は大きく 2 系統ある。 Bluetooth Classic (BR/EDR) Bluetooth

    Low Energy (BLE) 名前は似ているが、得意な用途が違う。 補足: BR = Basic Rate Bluetooth Classic の基本的な通信方式 EDR = Enhanced Data Rate BR を拡張して、より高速にデータ転送できる方式 2
  2. Bluetooth Classic とは Bluetooth 1.0(1999年7月)から続く系統で、Bluetooth 2.0 + EDR は 2004年に登

    場 高スループット向き(音声・連続データ) 接続維持の消費電力は BLE より大きめ 代表例: ヘッドセット、スピーカー、カーオーディオ 用途の中心: 「たくさん流す」通信 3
  3. Classic と BLE の比較 観点 Classic BLE 主目的 連続ストリーミング 小さなデータを効率よく交換

    電力 比較的大きい 小さい 通信モデル 連続転送中心 データ項目の読み書き・通知中心 用途適性 連続転送に適する 低消費電力の小容量通信に適する 用途に応じて、連続転送は Classic、省電力な小容量通信は BLE が向いている。 5
  4. BLE のデータモデル: GATT Service: 機能のまとまり 例: 心拍計なら「Heart Rate Service」 Characteristic:

    実際に読む・書く・通知するデータ項目 例: 現在の心拍数、バッテリー残量 UUID: Service や Characteristic を識別する ID 7
  5. BLE の接続はどう進むか 1. Peripheral がアドバタイズする 2. Central がスキャンして見つける 3. Central

    が接続する 4. Service / Characteristic を探索する 5. read / write / notify を使って通信する この 1〜5 が BLE の基本フロー。 8
  6. Bluetooth 4.0: Legacy Pairing Bluetooth 4.0 の BLE では、LE Legacy

    Pairing が標準だった。 鍵交換は従来方式(STK ベース) Association Model は Just Works / Passkey Entry / Out of Band(OOB) Just Works は MITM 保護が弱い(なりすまし耐性が低い) 各方式: Just Works: 確認ほぼなし Passkey Entry: 数字を入力 OOB: QR / NFC など別経路を使う 補足: STK = Legacy Pairing で最初の暗号化に使う一時鍵 13
  7. Bluetooth 4.2: Secure Connections Bluetooth 4.2 (2014年12月)では LE Secure Connections

    が追加された。 楕円曲線ディフィー・ヘルマン鍵共有(ECDH)ベースの鍵共有を使用 盗聴耐性が向上し、鍵交換の安全性が強化 Association Model は Just Works / Passkey Entry / Numeric Comparison / Out of Band (OOB) 補足: Numeric Comparison: 両端末の 6 桁表示が一致するか確認する方式 ポイント: Numeric Comparison が使える組み合わせでは MITM 耐性を高めやすい 最終的な方式選択は端末の IO 能力と OS 実装に依存する 14
  8. Bluetooth 4.2 を今どう見るか Bluetooth 4.2 は 2014年12月に登場した世代 2026年5月時点の最新は Bluetooth 6.3

    Bluetooth 4.2 の仕様ページは Withdrawn(現行版から取り下げ)表記になってい る ただし BLE 自体は今でも重要で、6.3 は BLE の代替ではない つまり: BLE は現在も使われ続けており、その上に改良が積み重なっている 4.2 は LE Secure Connections を理解する上で重要な世代 15
  9. 4.0 と 4.2 の整理 観点 Bluetooth 4.0 (Legacy) Bluetooth 4.2

    (Secure Connections) 鍵交換 従来方式(STK) ECDH MITM 耐性 方式依存、Just Works は弱い 全体に改善、Numeric Comparison 対応 実運用 端末能力に制約されやすい より安全な選択肢を取りやすい 要点: 4.2 以降でも Just Works になるケースはある 双方の IO 能力が低く、Numeric Comparison / Passkey Entry を成立できない MITM 保護を必須にしていない OOB を使っていない 重要なのは「使われた方式を前提にアクセス制御を設計する」こと 16
  10. まとめ BLE は Classic と目的が違う BLE の基本は アドバタイズ -> スキャン

    -> 接続 -> GATT 通信 セキュリティは Pairing / Bonding / Encryption を分けて考える 未経験の技術や言語に触れながら色々いじるのはやっぱり楽しい 19
  11. 参考資料 Bluetooth SIG: Core Specification https://www.bluetooth.com/specifications/specs/core-specification/ Bluetooth SIG Blog: Pairing

    key generation methods https://www.bluetooth.com/blog/bluetooth-pairing-part-2-key-generation-methods/ Bluetooth SIG Blog: LE Secure Connections - Numeric Comparison https://www.bluetooth.com/blog/bluetooth-pairing-part-4/ 20