CoreBluetooth fails to error correctly with BT peripheral with cleared PIN

Originator:mcstoufer
Number:rdar://20176242 Date Originated:3/16/2015
Status:Open Resolved:
Product: Product Version:
Classification: Reproducible:
 
Summary:
There is a condition in CoreBluetooth that does not return a sufficiently correct error when a BT peripheral reconnects after it has had it's BT PIN cleared.

Steps to Reproduce:
Preconditions:
1. Ensure that the iOS -> Settings -> Bluetooth -> My Devices does not have an entry for this BT peripheral.

Steps:
1. Set a PIN on a BT peripheral with whatever method is appropriate.
2. Pair this peripheral with an iOS app that supports CB.
3. Attempt to read info from peripheral. iOS will intercept this and prompt for PIN.
4. Provide proper PIN.
5. Quit iOS App.
6. Clear PIN from peripheral with whatever method is appropriate.
7. Start iOS app again and attempt a new pairing with peripheral.
8 . Attempt to read the same info as in step 3.


Expected Results:
CB should return an error here with sufficient info to inform iOS app that the failed read occurred due to a PIN not being provided in initial pairing sequence.

Actual Results:
A general error is returned for a failed read. There are numerous failures of CB connectivity that will raise this same error.

Version:
iOS 7.1.2 and later

Notes:


Configuration:
Any current Apple mobile hardware

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!