nrf52832.
SDK14.2
Segger ES V3.34a
This question is probably best suited to an android forum (possibly).
We have a characteristic which is writable. When written to the peripheral asks our in house application to enter the passkey. The setting for the characteristic are:
BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&cus_init.brand_char_attr_md.cccd_write_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cus_init.brand_char_attr_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&cus_init.brand_char_attr_md.write_perm);
and Security setting...
#define SEC_PARAM_BOND 1 /**< Perform bonding. */
#define SEC_PARAM_MITM 1 /**< Man In The Middle protection not required. */
#define SEC_PARAM_LESC 0 /**< LE Secure Connections not enabled. */
#define SEC_PARAM_KEYPRESS 0 /**< Keypress notifications not enabled. */
#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_DISPLAY_ONLY /**< No I/O capabilities. */
#define SEC_PARAM_OOB 0 /**< Out Of Band data not available. */
#define SEC_PARAM_MIN_KEY_SIZE 7 /**< Minimum encryption key size. */
#define SEC_PARAM_MAX_KEY_SIZE 16 /**< Maximum encryption key size. */
This works great. We only get prompted for the passkey when we try to write to it and the App auto populates the Passkey.
BUT.
On some Android phones/tablets there is a variation in how the Pairing Request is dealt with, sometimes it's in the task bar or pops up a window to enter the Passkey.
Are there any alternatives for 'write' protection or have experienced the same thing and found a fix or workaround in the Android App?
I have also noticed this with nRF Connect Application. On my Samsung Tablet I get a popup with a keypad but on my Oneplus3 phone the pairing request is in the task bar.
I would appreciate anybody's thoughts or ideas.