This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Pairing with iOS

Hi,

I am having a BLE peripheral on NRF51822 chip. I have set to MITM to 0. I want to communicate with an iOS app which will act as central device. When i first connect with the iOS app it asks "Whether you want to pair or not". I then click on pair and the devices get paired. After that i disconnect the BLE connection. Now when i again try to connect it doesnt ask for pairing. I want to ask for pairing everytime i connect and disconnect. How can i do this? Do i need to make changes on the peripheral side or Central side? And also if you can please help us with the changes that need to be made.

Thanks

Parents
  • Why do you want to do this? Unfortunately, from iOS9.x you have to bond with iOS. For some reason they decided not to support pairing anymore (at least not with iOS9.1). Unfortunately this means you have to manually delete the bond data on both your peripheral and central if you want to create a new bond.

Reply
  • Why do you want to do this? Unfortunately, from iOS9.x you have to bond with iOS. For some reason they decided not to support pairing anymore (at least not with iOS9.1). Unfortunately this means you have to manually delete the bond data on both your peripheral and central if you want to create a new bond.

Children
  • Is there anyway programmatically we can delete the bond information when the device loses connection in iOS and peripheral.

  • This is not possible on iOS, and has to be done manually by the end user. On the nRF51; sure, but why do you want to do this?

  • Well, I am developing a glucose application. As i have already mentioned i have removed the security after setting MITM to 0. When i connect with the iOS Nordic glucose app, it connects and asks whether you want to pair. Then, when i write to RACP charatcteristic of the glucose service i am able to write to the characteristic and read data back. Then again i disconnect the device. Now again when i establish the BLE communication, it doesnt asks for the pairing. Now when i try to write to the RACP characteristic it doesnt write. It gives an error Encryption Insufficient. Now i go to settings of iPhone and in bluetooth i select the option of Forget Device. Now if I establish the BLE connection again, the iOS device asks for the pairing and i am able to write to the RACP characteristic. Hence, i needed to know if i can delete the bonding information. As you suggested i can delete the bonding information from the peripheral side, can you guide us how to do that.

  • I am confused. What do you mean they do not support pairing? Maybe this is a newbie question but, isn't pairing the first step of bonding?

  • As per the profile specification a Glucose Sensor shall bond with the collector. You can delete a device by using dm_device_delete. However the iOS device will still have it's keys so you have delete them manually from the bluetooth menu. Note that if you don't follow the profile specification you are not compliant with the bluetooth specification, and you might risk violating IP.

    Antonio: Yes, pairing is part of the bonding process and is supported as part of the this process. Creating a bond is called pairing in iOS, so this can be a bit confusing. So when I say that pairing is not longer supported in iOS 9.x I mean to say that it isn't possible to pair without storing the keys for subsequent connections, i.e. bonding.

Related