ReadRSSI doesn't call the delegate method

后端 未结 3 979
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-08 15:52

I got a problem since the iOS 8 update, right now my app is connected to a BLE device and periodically reads the RSSI thanks to a timer and the ReadRSSI method.

3条回答
  •  隐瞒了意图╮
    2021-02-08 16:17

    I got the same problem, first thought it might be my fault, but later it turns out to be really weird.

    I wrote similar program, using iPhone to connect to a BLE beacon, and use [CBPeripheral readRSSI] to get the signal strength. Everything goes smooth when the BLE beacon is connected to my iPhone for the first time. But if it got disconnected, and reconnect again, the method readRSSI won't get called any more. Only after I restart the bluetooth on my iPhone, the issue will be resolved.

    I run the program in debug mode, step by step, to my surprise, I found no problem at all. Even I disconnect for so many times and reconnect again, the method readRSSI can still be called properly.

    Hope this may help. I am also waiting for an answer for this strange thing.

提交回复
热议问题