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

  • 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.

  • Can i store the pairing information in my peripheral. I have an EEPROM memory. What pairing information i need to store. And when i power on again my peripheral i need to use the stored pairing data. What changes i need to make to my code.

  • By default DM uses p_storage to save bond info++ in flash. If possible I think it is more convenient to just use the device manager as is. If you want to save it in eeprom instead you have to do a lot of modifications to the device manager.

Related