We have a device that uses a bonded connection and talks to an iOS app. When we call to access the characteristic that is set up as requiring authorization the BLE pairing confirmation dialog pops up. Since the device doesn’t have any UI it only asks for Confirm/No. This all works as expected.
Now if we get back a didWriteValueForCharacteristic with no error it’s assumed that the pairing worked, the user tapped “Confirm" and we are good to go. However, if the user taps “No” or something else happens we’d get an error value and we could handle it appropriately.
Once we get a confirmation on this, we transition to a different view controller and proceed with the application.
The problem is that sometimes the iOS Pairing Dialog box shows up quickly then disappears before the user had had a chance to tap on it. In that case the pairing is not done, but we don’t get an error returned from didWriteValueForCharacteristic. In this situation we’re in a sort of half-bonded state that we can’t get out of.
If you try writing to the characteristic again, you just get an error returned and nothing short of resetting the whole device to factroy settings and forgetting the device on the iOS side works.
Anybody else seen anything like this, where the pair confirm dialog quickly goes away?
Thanks, Ramin
|