chwi
chwi

Reputation: 2802

iPhone: How to erase/wipe out bluetooth 4.0 data

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

Upvotes: 5

Views: 2132

Answers (1)

peterson79
peterson79

Reputation: 31

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.

Upvotes: 3

Related Questions