Would be better for iOS to show the Bluetooth pairing popup again after the peripheral removes the bonding record

Originator:max.zou.se
Number:rdar://27633221 Date Originated:01-Aug-2016
Status:Open Resolved:
Product:iOS Product Version:10
Classification: Reproducible:Always
 
Chaoqun Zou03-Aug-2016 10:21 AM

Hi, there is not really related logs for this issue. I am not very sure what you are looking for. Can you please provide some more details?
Apple Developer Relations02-Aug-2016 03:36 AM

Please attach any relevant crash logs, panic logs, stackshots, baseband logs, etc which may have been generated automatically. If none were, install the appropriate logging profile, reproduce the issue, then attach relevant logs.

Profiles and directions are available at:

https://developer.apple.com/bug-reporting/profiles-and-logs/

Please provide your response or results by updating your bug report.  If uploading files, please compress first.
Chaoqun Zou01-Aug-2016 01:28 PM

Area:
Bluetooth

Summary:
This issue relates to #27579701.

The issue happens like this:

(1) Pair the iPhone to the peripheral for the first time and it works fine (our peripheral rejects the read request with Insufficient Authentication correctly and we can see the iOS Pairing popup and Pairing succeeds)
(2) Remove the bonding record of the iPhone from the peripheral (the iPhone still remembers the peripheral)
(3) Use the same iPhone to connect to the device again and our peripheral still rejects the read request with Insufficient Authentication correctly but iOS does not show the Pairing popup anymore
(4) The only way to make iOS show the pairing popup again is to forget the device in Settings - Bluetooth first

I can reproduce the same behaviour between two iPhones (tried iOS 9 and 10 beta). e.g. pair two iphones first, then forget the other party on one phone, when the other phone tries to connect again it can't connect and it does not show the Pairing popup either.

There are some screenshots in #27579701 of the packets capture.

Steps to Reproduce:
(1) Run BLE test app on two iPhones, one as central the other as peripheral. the test app should include at least one characteristic with GATT_PERMIT_AUTHEN_READ and  GATT_PERMIT_AUTHEN_WRITE
(2) From the central role, connect to the peripheral role and try to read that characteristic
(3) there should be a pairing dialog asking for pairing, pair
(4) verify the central can read and write correctly
(5) on the peripheral go to Settings - Bluetooth and forget the central iPhone
(6) use the central iPhone to connect and read the characteristic again, you will see it can't read, but the pairing dialog is not displayed anymore

Expected Results:
In step (6) the central iPhone better to show the Bluetooth Pairing popup again so the user can choose to pair again conveniently.

If there are security or privacy concerns that there might be spoofing attacks, the second Bluetooth Pairing popup can be a bit different from the first one, e.g. 
Title: Bluetooth Pairing Request
Message: "xxx" would like to pair with your iPhone again. {red}If you can't verify whether it is the same device your iPhone has paired to, it might be a malicious device.{red}
Buttons: "Cancel" and "Pair"

I do agree drafting such a message might not be very easy and professionals may have better ideas.


Actual Results:
In step (6) the central iPhone does not show the Pairing popup, and the user has to go to System settings -> Bluetooth to manually forget the peripheral which is not very convenient

Version:
iOS 9.3.3 iOS 10 beta 3

Notes:


Configuration:
iPhone 5S iPad Pro 9.7

Attachments:

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!