How to enable the pairing and bonding function on KW45B41Z-EVK board

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

How to enable the pairing and bonding function on KW45B41Z-EVK board

575 Views
masayuki_I
Contributor II

■Development environment
Board: KW45B41Z-EVK
Sample SDK: kw45b41zevk_wireless_uart_bm

Hello, I'm a software developer.
I'm currently developing software using the KW45B41Z-EVK.
The sample program I'm using is kw45b41zevk_wireless_uart_bm.

I would like to enable the pairing and bonding functions and have the bonding function work in the following operations.
(I would like to be able to connect without entering a passkey when reconnecting even if I disconnect after connecting once.)

■Normal time (when disconnected by smartphone)
1. The first time I connect my smartphone to the board, you will need to enter a passkey.
2. When reconnecting after disconnecting from my smartphone, connect without entering the passkey.
■When the NXP board is powered off (disconnection/connection by turning the board power off/on)
1. The first time I connect my smartphone to the board, you will need to enter a passkey.
2. Turn off/on the power of the NXP board
3. After the NXP board starts up, connect from my smartphone. At this time, connect without entering a passkey.

■Current situation
●Checking the setting values
#define gAppUseBonding_d 1
#define gAppUsePairing_d 1
#define gAppUsePrivacy_d 0
#define gAppUseNvm_d 1
#define gAppSecureMode_d (0U)

●Check linker settings
--defsym=gUseNVMLink_d=1

●Operating status
The above "Normal time (when disconnected by smartphone)" works as expected because it was possible to connect without entering a passkey.
However, "when the NXP board is powered off (disconnected and connected by turning the board's power off and on)", a passkey is required, which is an unexpected behavior.
It seems that the information necessary for bonding is not saved in non-volatile memory (Flash memory, etc.).

●Document
I found the following information, and when I checked the settings above, I found out that the settings were similar.

---
Bluetooth® Low Energy Application Developer's Guide
2.3 Non-Volatile Memory (NVM) access

To enable the NVM mechanism make sure:
• gAppUseNvm_d (app_preinclude.h) is set to 1 and
• gUseNVMLink_d=1 in the linker options of the toolchain.
---

Since these two settings have already been done, I believe there are other settings, etc.
Could you please tell me what and how to set it?

0 Kudos
Reply
2 Replies

514 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Hope you are doing well. What SDK version are you using?

 

I was trying to reproduce your scenario with kw45b41zevk_wireless_uart_freertos (SDK v2.12.6) and it is working as expected.

 

I just modified these lines:

 

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

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

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

 

Even if I disconnected the board, I am able to connect again with a smartphone without entering again the passkey.

 

Regards,

Ricardo

0 Kudos
Reply

488 Views
masayuki_I
Contributor II

Hello.
The sample we are using and its version are shown below.
- kw45b41zevk_wireless_uart_bm
- version 2.12.6

When I changed the define value settings you taught me to the same settings here, I was able to connect to my smartphone without having to enter a passkey even when I reconnected after turning the board off and on.

thank you very much again for your time and assistance,
masayuki.

0 Kudos
Reply