BLE: long of passkey to pair in KW41Z

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BLE: long of passkey to pair in KW41Z

1,815 Views
ben_pai
Contributor II

Hi Sir/Miss:

We use SDK2.2_MKW41Z512 to develop BLE, and use example: \wireless_examples\bluetooth\glucose_sensor\freertos\iar

When we enter the 6-digit passkey ('999999') to pair that works normally.

But, we test by entering over 6-digit passkey ('9999991' or '99999912') to pair. It still can enter to read and notify glucose service.

Test environment:

iOS: 11.4

Android 7.0

How to solve it in FW?

Thank you.

Labels (2)
Tags (4)
12 Replies

1,386 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Ben,

Did you clean and build the entire project?

I tested and the KW41 rejects the bonding process. I did not delete the credentials saved previously by the android device.

Mario

0 Kudos

1,386 Views
ben_pai
Contributor II

Hi Mario:

I didn't change the example code anymore.

My test step is as below:

1. Clean and re-build project, and download to KW41Z EVB.

2. Forgot device on smart phone.

3. Use smart phone (iphone or android phone) and 3rd party App (IoT toolbox, lightblue, nRF connect or Cysmart) to test it.

4. KW41Z EVB advertising on.

5. Central find it and pairing then bonded (enter passkey). In this step, I enter 8-digit passkey(99999912) to test it.

Now, I check the iphone that can reject bonding.

But, it still can be bonding on android phone(android 7.0.0).

Thank you.

0 Kudos

1,386 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Ben,

Did you enable the bonding capability and the pairing procedure?

You can find app_preinclude.h

/*! Enable/disable use of bonding capability */
#define gAppUseBonding_d   1

/*! Enable/disable use of pairing procedure */
#define gAppUsePairing_d   1

I tested on android phone (7.0.0).

The phone rejects the bonding and asks for the new passkey.

Regards,

Mario

0 Kudos

1,386 Views
ben_pai
Contributor II

Hi Mario:

Yes, I change the process of pairing as below:

/*! Enable/disable use of bonding capability */
#define gAppUseBonding_d 1//0

/*! Enable/disable use of pairing procedure */
#define gAppUsePairing_d 1//0

/*! Enable/disable use of privacy */
#define gAppUsePrivacy_d 1//0

Thank you.

0 Kudos

1,386 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Ben Pai,

Could you please disable the privacy?

What is the SDK version that you are working on?

Regards,

Mario

0 Kudos

1,386 Views
ben_pai
Contributor II

Hi Mario:

I disable the gAppUsePrivacy_d. The result is same.

I use the SDK 2.2.

CMSIS 4.3 (CMSIS Download 4.5)

DMA manager 2.1.0

FatFs 0.12b

FreeRTOS 9.0.0

BLE controller 4.2.0

BLE host 1.2.3

BLE profiles 1.2.3

GENFSK 1.0.3

Framework 5.3.3

0 Kudos

1,386 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Ben,

Did you modify the code?

What is the phone that you are working on?

Could you please confirm? When you work with an iPhone, the KW example works right?

Mario

0 Kudos

1,386 Views
ben_pai
Contributor II

Hi Mario:

I only modify the define of bonding and pairing.

We use Android phone LG V20.

Yes, it works normally on using iphone 5s and 6s. The IoT toolbox APP will prevent it happen and show alarm message box.

May I request what kind of APP do you use?

Thank you. 

0 Kudos

1,386 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Ben,

I used an LG phone and it works very well. The kw41 rejects the connection and ask for the new key.

Could you please erase the complete memory? mass erase command.

Mario

0 Kudos

1,386 Views
countach_work
Contributor I

Hi Mario:

Sorry, for reply so late.

I make two video about the step of compiler and operating on IoT toolbox.

The hyper link is as below.

passkey issue part1 - YouTube 

passkey issue part2 - YouTube 

You can see part 2 video when we enter over 6-digit passkey.

The peripheral device can be bonded and connect.

After re-connect, central can get value from peripheral. 

If the step is wrong, please correct me.

Thank you. 

0 Kudos

1,386 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Ben Pai,

As you know, the BLE Spec mentions.

For Secure Simple Pairing and Security Manager, the Bluetooth passkey is a 6-digit numerical value. It is represented as integer value in the range 0x00000000 – 0x000F423F (000000 to 999999).

So, the Android OS allows that the user can enter more than 6 digit numbers, but the device only sends the first 6 digits.

If you try this with an iPhone the system will reject more than 6 digits,

Mario

0 Kudos

1,386 Views
ben_pai
Contributor II

Hi Mario:

Exactly, as we tried it earlier on iOS, system will reject more than 6 digits.

Android system don't resist in our smart phone. 

Thank you for your help.