This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Windows 10 pairing no bond

Hello Nordic Support Team,

I have a problem with establish encryption connection between nRF52 device and Windows 10.

My nRF52 Device supports pairing, but not bonding:

ble_gap_sec_params_t secParam;
secParam.bond = 0;
secParam.mitm = 0;
secParam.lesc = 0;
secParam.keypress = 0;
secParam.io_caps = BLE_GAP_IO_CAPS_NONE;
secParam.oob = 0;
secParam.min_key_size = 7;
secParam.max_key_size = 16;
secParam.kdist_own.enc = 0;
secParam.kdist_own.id = 0;
secParam.kdist_own.sign = 0;
secParam.kdist_own.link = 0;
secParam.kdist_peer.enc = 0;
secParam.kdist_peer.id = 0;
secParam.kdist_peer.sign = 0;
secParam.kdist_peer.link = 0;

And Device requires encryption for some attributes:

BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm);

So in order to read these attributes GAP Central should perform pairing procedure. Android client, nRF Connect for PC pair with Device without any problem, but windows client (UWP app, Windows.Device.Bluetooth namespace API) sends Pairing Failure command after receiving Pairing Response command with 0x08 Reason code (Unspecified reason). I try to execute PairAsync with all PairingProtectionLevel argument - the result is the same.

var customPairing = _device.DeviceInformation.Pairing.Custom;
customPairing.PairingRequested += (s, e) => 
{
	e.Accept();
};

var pairResult = customPairing.PairAsync(DevicePairingKinds.ConfirmOnly, DevicePairingProtectionLevel.None).AsTask().Result;

On the forum I found suggestion that Windows doesn't support pairing without bonding. But I can't found proof for it. What do you know about it?

I may disable encryption on Device and communication works good, but I would like to solve this problem on client side.

Regards,

Konstantin

pairing_failure.pcapng

Related