iPhone: How to erase/wipe out bluetooth 4.0 data

ぃ、小莉子 提交于 2019-12-12 09:39:12

问题


I am having some major trouble with my Bluetooth Low Energy application sometimes dont manage to connect to my device (described in thread).

I need to wipe out all stored data from previous connections before running my application, and as far as I know, this can only be done by rebooting the phone. Is there any other way, preferably programatically, to do this?

Thank you


回答1:


I am having the same issue and have found the steps to reproduce it.

It is 100% reproducible when you transmit data to the peripheral with

[peripheral writeValue:x forCharacteristic:y type:CBCharacteristicWriteWithoutResponse];

while the peripheral goes out of range and disconnects. After this happens no more services are returned by BLE devices, and only a reboot fixes the problem. This doesn't happen if the peripheral goes out of range and comes back in without transmitting data to it or if

[peripheral writeValue:x forCharacteristic:y type:CBCharacteristicWriteWithResponse];

is used...

Other disconnects don't seem to affect it, such as powering down the peripheral and powering it back up while in range even while transmitting data...

I know this isn't an answer but it looks like I can't comment for some reason.

Hope this helps debugging though.



来源:https://stackoverflow.com/questions/11574805/iphone-how-to-erase-wipe-out-bluetooth-4-0-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!