用 Bluetooth Channel Sounding 讓配件有距離與方向感
這場 session 說明 iOS 27 如何透過 Bluetooth Channel Sounding 讓第三方 Bluetooth accessories 取得更可靠的距離估測,並可搭配 Nearby Interaction 與 Camera Assistance 產生方向感。
Channel Sounding 是介於 RSSI 猜距離與 UWB 精準定位之間的新選項:如果配件只有 Bluetooth chipset,也能透過 Core Bluetooth 取得距離,或透過 Nearby Interaction 取得距離加方向。
這支影片幫配件團隊回答四個導入判斷
只用 RSSI 不夠,但配件沒有 UWB
Apple 的定位很清楚:最高精準度仍是 UWB + Nearby Interaction;若配件只有 Bluetooth,Channel Sounding 才是比 RSSI 更適合的距離量測方案。
Core Bluetooth 負責 distance-only
app 先確認裝置支援 .channelSounding,再對已連線的 CBPeripheral 啟動 channel sounding session,透過 delegate 收到以公尺計的距離結果。
Nearby Interaction 加上 camera fusion
若需要方向,使用 NINearbyAccessoryConfiguration,把 Core Bluetooth 的 peripheral identifier 傳入,並在支援時啟用 Camera Assistance 來改善 direction output。
配件端規格會決定體驗能不能成立
accessory 必須支援 Bluetooth 6.3、inline PCT、phase-based ranging 的 mode-0 / mode-2,且 T_FCS interspace timing 至少 100 microseconds。
從配對到距離 / 方向更新的實作流程
先完成配件設定與 Core Bluetooth 連線
影片假設 accessory 已透過 AccessorySetupKit 配對與設定,並且 app 已透過 Core Bluetooth 與 CBPeripheral 連線。
檢查本機 device capability
Core Bluetooth 路線用 CBCentralManager.supportsFeatures(.channelSounding);Nearby Interaction 路線則檢查 NISession.deviceCapabilities.supportsBluetoothChannelSounding。
distance-only:啟動 CB channel sounding session
建立 CBChannelSoundingSessionConfiguration(role: .initiator),對 connected peripheral 呼叫 startChannelSoundingSession,並在 delegate 裡處理 distance。
distance + direction:建立 NI accessory configuration
用 peripheral identifier 建立 NINearbyAccessoryConfiguration,支援時開啟 camera assistance,然後建立 NISession、設定 delegate、run configuration。
把 optional result 與暫停條件設計成產品狀態
distance 與 direction 都可能為 nil;背景時 session 會 pause;Bluetooth 或 Wi-Fi 活動增加時,iOS 可能降低量測頻率。UI 不能假設每次都有穩定輸出。
實務啟發:這是 accessory product decision,不只是 API decision
Channel Sounding 最適合「使用者知道配件就在附近,但需要分辨是哪一個或在哪個方向」的場景,例如溫度探針、工具、tag、健康或家用設備。若只需要是否接近,RSSI 或普通連線狀態可能已足夠;若需要精準室內定位,仍要評估 UWB。
CBChannelSoundingSessionConfiguration、startChannelSoundingSession、didReceive results。Nearby Interaction:NINearbyAccessoryConfiguration、Camera Assistance、NINearbyObjects。風險與測試清單
測試不能只在桌上固定距離做 happy path。要測 moving / stationary motion state、多人與多配件環境、Wi-Fi 與其他 Bluetooth 活動高時的更新頻率、camera assistance 開關差異,以及 distance nil / direction nil 的 UI fallback。
accessory team 還要提早和 chipset / firmware 團隊確認 Bluetooth 6.3 與 phase-based ranging 能力。app 端 API 接上不代表量測品質成立;天線設計、反射環境、配件姿態與電源策略都會影響使用者感知。
- 01Channel Sounding 用 2.4GHz channels 的 phase-based ranging 估測距離,補上 RSSI 不可靠但又沒有 UWB 的中間地帶。
- 02Core Bluetooth 提供 distance-only;Nearby Interaction 加上 Camera Assistance 可提供 distance 與 direction。
- 03導入風險主要在 optional result、foreground-only、量測頻率降低與配件硬體規格,不在 API 呼叫本身。