This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Read encrypted characterisitc with peer manager failes

Hi

I've playing around with the new peer manager a while. I used the example "ble_app_hrs_rscs_relay_pca10028.uvprojx" from the SDK10. After a first fix (see Link) in the peer manager a bonding can be established successfully.

After the fix a connection with iOS is possible. The next step is to make some characteristics to require encryption. I changed the access to characteristics in the function "services_init" from BLE_GAP_CONN_SEC_MODE_SET_OPEN to BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM. The behavior i got after this change is not what i expected and it differs between iOS LightBlue App and Master Control Panel.

With Master Control Panel: I can connect the peripheral, but an attempt to bond failes after a timeout. Discovering the characterisitcs is possible, but the protected values can't be read.

With iOS: After connecting the device with LightBlue App the characteristics are visible, but the value can't be read. I would expect the iOS device to ask if i'll pair (just wurks pairing) with it as it did with device manager.

Steps to reproduce:

  1. Patch the peer manager for the Unable To Connect bug (see link above)

  2. Open the "ble_app_hrs_rscs_relay_pca10028.uvprojx" example

  3. Change the access to characteristics in the function "services_init" from BLE_GAP_CONN_SEC_MODE_SET_OPEN to BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM.

  4. Try to access the characteristics with protection level.

Best Regards Adrian