Tool/software: TI C/C++ Compiler
Hello,
I have a pairing/bonding issue with iOS peripheral when CC2540 acts as central. I am using BLE Stack 1.4.2 on CC2540 USB Dongle. I have customized the BLECentral example in order to discover my own device and services.
I need to pair and bond the iOS peripheral without a passkey and I mus have the auto-reconnect if the devices get disconnected.
I am using the following settings.
#define PAIRING_MODE GAPBOND_PAIRING_MODE_INITIATE
#define MITM_MODE FALSE
#define BONDING_MODE TRUE
#define IO_CAPABILITIES GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT
On the iOS side, my own services/characteristics are not encrypted, however, I believe the Battery Service is encrypted and cannot be changed.
According to the attached snapshot taken from TI Packet Sniffer, the pairing fails with message “SM_Pairing_Failed” issued from the peripheral. Every time a pairing dialogue pops up on the iPhone, however, my device is added to the iPhone’s pairing list. I have absolutely no problem with Android and pairing/bonding/auto-reconnect work well.
I also tested the PAIRING_MODE to GAPBOND_PAIRING_MODE_NO_PAIRING case. I will not have the bonding, hence, auto-reconnect.
Any help's appreciated.
Thanks