BCM20732S lesmp_sendSecurityRequest() to Previously Bonded iOS 8.0 Device

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

When I use lesmp_sendSecurityRequest() to a iOS 8.0 device that is already bonded, the smp timer never starts, and I never receive the lesmp_regSMPResultCb() callback.  iOS 7.1.2 always starts the smp timer and calls the lesmp_regSMPResultCb() callback.  We rely on the callback to complete our connection setup.  Please advise why the smp timer is not starting and the callback is never called.

0 Likes
1 Solution

According to the spec, sending security request should result in pairing if devices are not bonded, or setting up the encryption, if devices are already bonded.  So if you are already bonded, your application should be waiting for encryption changed callback rather than SMP result callback.  Application can check if it is paired with the device at the time when connection is established, by calling emconninfo_deviceBonded().

It actually works correctly in iOS 8 (and it used to work correctly in iOS 5).  In 6 and 7 when phone received SMP request it would erroneously start pairing even if devices are already paired.

View solution in original post

0 Likes
4 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

I am looking into this one with the software team.

0 Likes
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

I had read that there were certain Bluetooth related bugs in iOS 8.0(iOS 8 Troubles Continue. iPhones Hit By Bluetooth Problems - Forbes) and they have fixed it in iOS 8.1, not sure if its related to that. Could you verify if you had any success with this.

thnx

vik86

0 Likes

According to the spec, sending security request should result in pairing if devices are not bonded, or setting up the encryption, if devices are already bonded.  So if you are already bonded, your application should be waiting for encryption changed callback rather than SMP result callback.  Application can check if it is paired with the device at the time when connection is established, by calling emconninfo_deviceBonded().

It actually works correctly in iOS 8 (and it used to work correctly in iOS 5).  In 6 and 7 when phone received SMP request it would erroneously start pairing even if devices are already paired.

0 Likes
Anonymous
Not applicable

Pair device with iPhone.

Then from a disconnected state call these to attempt to clear out bonded info (this is done to attempt to clear out the pairing info if say we want the device to re-pair with a new phone)

  •   lesmpkeys_removeAllBondInfo();
  •   emconninfo_clearDeviceBondedFlag();
  •   emconninfo_clearLinkEncryptedFlag();

start advertising

Then from iPhone, reconnect to same device.

  • emconninfo_deviceBonded() is false in connection up (expected)
  • lesmp_sendSecurityRequest is sent
  • encryption changed callback not received (not expected). Also no pairing dialog on phone appears.

device stays connected but emconninfo_deviceBonded() remains false.

So now we have a connected device but it is not bonded and no way to get it to bond except removing from iPhone bluetooth menu.

0 Likes