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.
How to solve it in FW?
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.
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).
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.
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
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
BLE controller 4.2.0
BLE host 1.2.3
BLE profiles 1.2.3
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?
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?
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.
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.
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.
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,