Part Number: CC2340R5
Tool/software:
Hi,
I am a BLE peripheral device and I am doing pairing and bonding with a central device (mobile phone). As I have gone through your documentation, there are only few event masks available for handling pairing states.
BLEAPPUTIL_PAIRING_STATE_STARTED = (uint32_t)BV(0), //!< @ref GAPBOND_PAIRING_STATE_STARTED
BLEAPPUTIL_PAIRING_STATE_COMPLETE = (uint32_t)BV(1), //!< @ref GAPBOND_PAIRING_STATE_COMPLETE
BLEAPPUTIL_PAIRING_STATE_ENCRYPTED = (uint32_t)BV(2), //!< @ref GAPBOND_PAIRING_STATE_ENCRYPTED
BLEAPPUTIL_PAIRING_STATE_BOND_SAVED = (uint32_t)BV(3), //!< @ref GAPBOND_PAIRING_STATE_BOND_SAVED
BLEAPPUTIL_PAIRING_STATE_CAR_READ = (uint32_t)BV(4), //!< @ref GAPBOND_PAIRING_STATE_CAR_READ
BLEAPPUTIL_PAIRING_STATE_RPAO_READ = (uint32_t)BV(5), //!< @ref GAPBOND_PAIRING_STATE_RPAO_READ
BLEAPPUTIL_GENERATE_ECC_DONE = (uint32_t)BV(6) //!< @ref GAPBOND_GENERATE_ECC_DONE
I did testing where my peripheral is initiating pairing request and on my central device (phone) I cancelled the pairing. But BLEAPPUTIL_PAIRING_STATE_COMPLETE stiil gets triggered in my application however. bond is not saved and a disconnection happens after that. Why BLEAPPUTIL_PAIRING_STATE_COMPLETE is getting triggered even if I cancel the pairing? If pairing fails due to some reason, how can I get the error state in my application as I dont see any event?
Please help