cancel
Showing results for 
Search instead for 
Did you mean: 

Update stale or lost BLE pairing information on current iOS version.

RonnyBergner
Associate

Greetings,

in one of my current projects i am using a STM32WB55 as peripheral which requests a secure connection with the host (bonding mode = 1). When the connection is newly established, everything works as expected - the "pairing" dialogue pops up once and when the procedure completed, the connection works. With Android there is no further problem.

But iOS causes inconvenient behavior by not automatically re-pair when the information got stale or lost. I didn't find a way to at least reopen the pairing dialogue on a secured connection. iOS terminates the connection as soon as it receives a "key missing" error and there seems to be no way to let it re-pair. The user has to "forget" my device and restart the pairing procedure manually...

 

However some approachers at least caused different behaviour:

  1. Set the bonding mode to 0 in the authentication requirements.
  2. If not done already remove the pairing information in iOS by forgetting the device.
  3. Do one of the following:
    1. issue aci_gap_slave_security_req() at the connection complete event and/or
    2. have a characteristic that needs authenticaton
  4. Either way causes iOS to open the pairing dialogue by returning an "insufficient authentication" response

The problem is: iOS is not storing the pairing information with this procedure and always requests pairing when connecting to my device.

 

How to handle that pairing by iOS is required just once for a secure connection and, if not auto update the pairing information, at least let the pairing dialogue pop open when the information is stale or lost? Can i change the response when iOS tries to pair using a stale key?

0 REPLIES 0