wwdc2019 core bluetooth

What’s New in Core Bluetooth

https://developer.apple.com/videos/play/wwdc2019/901/

BR/EDRデバイスに拡張。 technology, privacy, tool

LE 2Mbps iPhone8, Apple TV 4K, Apple Watch Series4

Throughput (kbps) Write With Response: 2.5 Write Without Response: 37 +Larger MTU: 48 +Extended Data Length: 135 +LE L2CAP: 197 +15ms Interval 394 +LE 2Mbps: 670

Advertising Extension, extended advertisement payload up to 124 bytes Extended Scan,

New API to query for platform support class func supports(_ features: CBCentralManager.Feature) -> Bool static var extendedScanAndConnect: CBCentralManager.Feature { get }

Extended Connections, Supports connections to connectable extended advertisements Improve existing connection exchange protocol

Legacy Connections ADV -> スキャン、 Conn_indication, NoACK, Wakes Host Processor

Extended Connections, ExtADV -> Advertiser, connection_request, connection_response (Wakes host processor),

CoreBluetooth support for BR/EDR CoreBluetooth2018, いわゆる2つの分離独立スタック構成。 GATT over BR/EDR

Registering for connection events Connection registration by the Central Register by Service Register by Peripheral open class CBCentralManager: CBManager { func registerForConnectionEvents(options:[CBConnectionEventMatchingOption:Any]?) } extension CBConnectionEventMatchingOption { public static let serviceUUIDs: ConnectionEventMatchingOption public static peripheralUUIDs: ConnectionEventMatchingOption }

Outgoing Connection let central= CBCentralManager(…) central?.connect(myPeripheral, options: nil) デバイスがフォアグラウンドに遷移した時に、BR/EDRのデバイスに接続を試みる。Page/ Page Scan

Core Bluetooth Dual-Mode Improving Dual-Mode paring BR/EDRとBLEを両対応すると、そのペアリング/ボンディングは、BR/EDR, BLEそれぞれで、1つのデバイスなのに合計2つの項目が表示される。

Cross Transport Key Derivation 4.2 SIG 規格にある仕組み。 Single pairing process Same CBPeripheral identifier

BR/EDRでの接続、Inquiry Scan/Inquiry Response、ではなく、BLEのアドバタイジング、スキャンで。 BLEで一度ペアリングして鍵交換。さらにBR/EDRの鍵交換をBLE上で。

Bridging Low Energy proximity triggers BR/EDR

Privacy Update User Authorization background advertization, 許可なしにアドバタイズできてたのが、許可が必要。 スタンドアロンではないiOS/Watchアプリは、Bluetoothの設定を共有する。1度許可を出せば、改めて別のデバイスで許可を出す必要はない。(スタンドアロンを除く)

Adoption info.plist で許可設定を追加する。 CBManagerAuthorization

Accessory Notification ANCS Privacy Update ユーザパーミションが必要になる。

New ANCS Privacy API public let CBConnectPeripheralOptionRequiresANCS: String

Best Practices Invoke Core Bluetooth APIs only when required.

Packet Logger Live Capture デバイスを起動して、そのログをリアルタイムでMac側で見られる。複数のiOSデバイスの接続も可能。 BLEロギングプロファイルを入れて。

感想

GATT over BR/EDRは規格で見かけても、どこで使うのだろう?と思っていましたが、まさかiOS13で対応すると、少し驚きでした。

BLE proximityでBR/EDRの接続をトリガーするとありますから、iOSデバイスのBluetoothアクセサリのデバイス発見は、完全にBLE側に寄せるんでしょうね。デュアルモードデバイスへの完全移行を印象付けるセッションでした。

BLEのアドバタイジング拡張への対応は、好ましいというよりも、今後は不可欠になると思われます。休日の都会の、ファミリーレストランなどで、BLEのアドバタイジングのチャンネルをスニフィングしたら、その場にいる人たちのiPhoneが盛んにアドバタイジングするから、とてもひどいことになっています。とても接続に使える状況ではありません。これを回避するためにも、アドバタイジング拡張への対応つまりBT5は必須になるでしょう。