3

Or, does iOS Bluetooth in the background do a little communication now and then between central and peripheral, and automatically, periodically update peripheral.RSSI, so that it stays current?

Or, is it necessary to call [peripheral readRSSI] with its callback peripheralDidUpdateRSSI?

I've poured over the Apple BTLE docs and googled a lot, but can't find answers to these questions.

4

1 回答 1

2

不,应用程序端没有自动更新 RSSI。只需连接外围设备。发现外围设备的服务。设置CBPeripheralDelegate. 调用readRSSI并等待委托回调。

readRSSI如果您想让 UI 元素保持最新,我建议您设置一个计时器。但是,我建议不要让你的计时器启动速度快于 ~ 2 秒。否则你会得到一堆错误,通知你它无法读取 RSSI。

于 2013-09-13T01:59:57.987 回答