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

nRF Connect bonding

I am trying to get nRF Connect 1.0.0 to bond with my sensor (which uses a nRF52832). This works from several other programs (CySmart on Windows, LightBlue on iPhone), but not with nRF Connect. This is the log I see. I tried both Windows 10 and Mac OS X (El Capitan 10.11.6).

image description

The "dongle" is a PCA10040 with the firmware "connectivity_115k2_with_s132_2.0.1.hex". After reading this post I also tried "connectivity_1.0.1_115k2_with_s132_3.0.hex", but this results in nRF Connect throwing errors continuously after connecting to the device (INTERNAL... error).

As I understand it nRF Connect is built on top of the pc-ble-driver which I am currently evaluating. We want to be able to make a secure connection (bond) with our sensor like in this post. This is our goal and I would like to use nRF Connect as a reference.

Update 2016_12_01 #1 The Sensor uses "Just Works" with the following values. I matched these in nRF Connect (and experimented with different ones as well to no avail).

sec_param.bond           = 1;
sec_param.mitm           = 0;
sec_param.lesc           = 1;
sec_param.keypress       = 0;
sec_param.io_caps        = SEC_PARAM_IO_CAPABILITIES;
sec_param.oob            = 0;
sec_param.min_key_size   = 7;
sec_param.max_key_size   = 16;
sec_param.kdist_own.enc  = 1;
sec_param.kdist_own.id   = 1;
sec_param.kdist_peer.enc = 1;
sec_param.kdist_peer.id  = 1;

The log output of nRFConnect is attached: 2016-12-01T19_37_13.857Z-log copy.txt. On the sensor side I receive the following events:

BLE_GAP_EVT_CONNECTED
PM_EVT_CONN_SEC_START: peer_id=65535
BLE_GAP_EVT_SEC_PARAMS_REQUEST

And after 30 seconds or so:

PM_EVT_CONN_SEC_FAILED: peer_id=65535, error=1
BLE_GAP_EVT_AUTH_STATUS: status=0x1 bond=0x0 lv4: 0 kdist_own:0x1 kdist_peer:0x0

I'll try the glucose example tomorrow.

Update 2016_12_02 #1

The "glucose example" has issues as well, but in this case seemingly on the sensor side. Note that it uses different security parameters (MITM, no LESC). I'll try modifying these next, but I am out of time for today.

Log from the peripheral side:

SDH:INFO:sd_ble_enable: RAM START at 0x20002128
APP:INFO:Log level = 4
APP:INFO:GLS Starting...!
APP:INFO:Fast advertising
APP:INFO:Connected
APP:DEBUG:Start encryption
APP:INFO:PM_EVT_CONN_SEC_START
APP:DEBUG:BLE_GAP_EVT_SEC_PARAMS_REQUEST
APP:INFO:BLE_GAP_EVT_PASSKEY_DISPLAY
APP:INFO:Passkey: 083117
APP:INFO:PM_EVT_CONN_SEC_SUCCEEDED
APP:DEBUG:Link secured. Role: 1. conn_handle: 0, Procedure: 2
APP_ERROR:ERROR:Fatal
SDH:INFO:sd_ble_enable: RAM START at 0x20002128
APP:INFO:Log level = 4
APP:INFO:GLS Starting...!
APP:INFO:Fast advertising

Log from the nRF Connect side (attached). image description

Your help is very much appreciated!

Cheers, Dirk

Related