AnsweredAssumed Answered

QN9021 fails to bond where QN9020 succeeds

Question asked by Doug Brunner on Jun 27, 2017
Latest reply on Jun 28, 2017 by James Zhang

I'm having trouble with what appears to be a hardware or firmware difference between the QN9020 on my MiniDK dev board and the QN9021 on my application board, which is affecting BLE connectivity with some devices (so far it's failed on my Google Pixel, and succeeded with Nexus 6, Kindle Fire, and iPod). My application is based on the Quintic private profile example, and it's set up to require unauthenticated pairing before accessing the value characteristics in the attribute database. I'm building with SDK 1.3.9, which is the latest version I was able to get hold of - seems like the SDK downloads have disappeared from NXP's website. I enabled UART logging to try to get a better idea of what's happening, loaded the same binary on the MiniDK dev board and my application board, and configured them so the BLE stack would be set up the same way by my application code. All previous bondings were deleted from both the QN902x's and the Pixel before each attempt.

 

Here's the MiniDK board's output when I booted, connected from the Pixel using nRF Connect (the same app I've used on all the test devices), attempted successfully to read a characteristic, and then disconnected:

QN BLE is ready.
Advertising start.
Advertsing parameter updated.
Connection with 5AED9D706DB2 result is 0x0.
IRK request indication idx is 0.
Slave update failed.
Update parameter complete, interval: 0x6, latency: 0x0, sup to: 0x7d0.
Update parameter complete, interval: 0x24, latency: 0x0, sup to: 0x7d0.
Accept Bond request indi received from 5AED:9D:706DB2.
Update parameter complete, interval: 0x6, latency: 0x0, sup to: 0x7d0.
LTK request indication idx is 0, auth_req is 0.
Key 1 indication idx is 0.
Key 2 indication idx is 0.
Key 4 indication idx is 0.
Bond request complete handle: 0000, bonded: 1, status: 0x00.
Update parameter complete, interval: 0x24, latency: 0x0, sup to: 0x7d0.
Disconnect with 5AED9D706DB2 reason is 0x13.
Advertising start.
Advertsing parameter updated.

However, when I tried the QN9021:

QN BLE is ready.
Advertising start.
Advertsing parameter updated.
Connection with 5AED9D706DB2 result is 0x0.
IRK request indication idx is 0.
Slave update failed.
Update parameter complete, interval: 0x6, latency: 0x0, sup to: 0x7d0.
Update parameter complete, interval: 0x24, latency: 0x0, sup to: 0x7d0.
Accept Bond request indi received from 5AED:9D:706DB2.
Bond request complete handle: 0000, bonded: 0, status: 0x04.
Update parameter complete, interval: 0x6, latency: 0x0, sup to: 0x7d0.
Disconnect with 5AED9D706DB2 reason is 0x13.
Advertising start.
Advertsing parameter updated.

It looks like the status code 0x04 from the bond request complete handler is SMP_PAIR_ERR_CFM_VAL_FAILED (confirm value failed). This is consistent with the result when I attempt to initiate bonding from the Android system settings app: a popup appears saying that it could not pair due to an incorrect PIN or passkey (even though the QN9021 is set up for "Just Works" pairing by virtue of being configured for no input/no output).

 

I'm very confused, because my understanding is that the 9020 and 9021 are the same except for pinning. Does anyone know of a reason why this would fail (hopefully with a workaround ), or some other test that might be helpful in diagnosing the problem?

Outcomes