• I was using the wrong connection handle. Dumb mistake. It works great now. The additions to the code base are quite minor.

    Looks like the device is saving the keys as expected so future connections are secured and the connection is seamless.

    So would you guys be interested in me cleaning this up and sending a PR? Is it something you would like to be implemented? If so I think we should decide on how exactly it should work. I would image we would just have the Gatt emit an event on BLE_GAP_EVT_AUTH_KEY_REQUEST and then it would be up to the user to acquire the passkey from the user somehow and submit it back. Right now I just added a gatt.submitPasskey method to the jswrap_bluetooth.c that calls sd_ble_gap_auth_key_reply in bluetooth.c.

    Edit: Looks like the encrypted characteristics are working and notifications are working! But now I see that there is no indication implementation and the main characteristic value I need to watch is only readable via indication.

About

Avatar for user63214 @user63214 started