Enable Privacy issue and reconnect

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

Enable Privacy issue and reconnect

1,260 Views
Ajay12
Contributor II

Hi

I have done pairing and bonding with two QN9090 devices. I enabled gAppUsePrivacy_d  macro also.

But I Unable to do reconnections and enable privacy using RPA, Could you please suggest me a example or looking for a solution.

Thanks in advance.

 

Thanks

AjayK 

Labels (1)
0 Kudos
9 Replies

1,224 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @Ajay12,

Hope you are doing well.

What SDK version are you using?

Could you please provide more details about your application? What are you trying to achieve?

How can I try to reproduce this behavior? Just to confirm, have you enabled gAppUseBonding_d and gAppUsePairing_d in addition to gAppUsePrivacy_d?

For more information on Pairing, Bonding and Privacy, you can consult the BLE Application Developer Guide (inside QN9090 SDK docs folder > docs > wireless > Bluetooth). Chapter 4 may be helpful.

Regards,
Eduardo.

0 Kudos

1,207 Views
Ajay12
Contributor II

Hi Eduardo,
I am using SDK_2.6.3 version. I have done pairing and bonding between the peripheral and central and I have enabled gAppUsePrivacy_d. I want to achieve Bluetooth core specification ver 5.0 Vol6,Part D,Figure 4.4 (Active Scanning with Privacy) in page Number 2727 using host privacy method after the pairing and bonding.

 

Thanks,

AjayK

Tags (1)
0 Kudos

1,183 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

There should be a newer version of the QN9090 SDK. Please, download the latest SDK version available from the MCUXpresso SDK Builder.

Could you please take a look at the document Bluetooth® Low Energy Privacy and NXP QN9090? This Application Note explains device addresses and Privacy feature modes. Also, could you confirm that have read the BLE Application Developer's Guide, Section 4.4 Privacy feature?

If you want to perform active scanning and only scan for devices in a white list (list of devices that LL uses for device filtering), you can implement the following code (extracted from BLE Application Developer's Guide, Chapter 4.1.1) on Central device:

gapScanningParameters_t scanningParameters = gGapDefaultScanningParameters_d;
scanningParameters.type = gGapScanTypeActive_c;
scanningParameters.filterPolicy = gScanWhiteListOnly_c;
Gap_StartScanning(&scanningParamters, scanningCallback, enableFilterDuplicates, duration, period);

Gap_AddDeviceToWhiteList() is used to add a device address to the white list. If a bond is created, device address should be written in controller's white list in response to gConnEvtPairingComplete_c when gAppUseBonding_d is set to 1.

Regards,
Eduardo.

0 Kudos

1,138 Views
Ajay12
Contributor II

Hi,

I followed the procedure as you said. Now I am able to add device in whitelist. But if I start scan the devices from whitelist very first time, I am gettinf gScanCommandFailed_c event with gHciInvalidHciCommandParameters_c error and again if I start scanning then I can get device from white list.
Could you please explain me the reason for the error?

 

Thanks,

Ajay K

0 Kudos

1,114 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

By any chance, are you powering off or resetting your device after a device is bonded? Bonding information may be stored in RAM, and if the device is powered off, data can be lost.

When the following macro definition (in app_preinclude.h file) is set to 1, user should be able to save the bonding information in the NVM:

/* enable NVM to be used as non-volatile storage management by the host stack */
#define gAppUseNvm_d                    0

You can find more information on NVM in the BLE Application Developer's Guide, Section 2.3 Non-Volatile Memory (NVM) access.

Regards,
Eduardo.

0 Kudos

1,081 Views
Ajay12
Contributor II

Hi @EduardoZamora ,

I already set the macro gAppUseNvm_d  to 1 both peripheral and central. if I start scan the devices from whitelist very first time, I am getting gScanCommandFailed_c event with gHciInvalidHciCommandParameters_c error and again if I start scanning then I can get device from white list.

 

0 Kudos

1,052 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Could you please confirm that you are using the latest SDK version available for QN9090?

Also, what example project / demo application from the SDK are you using as base for your development?

Regards,
Eduardo.

0 Kudos

1,014 Views
Ajay12
Contributor II

Hi NXP TECH SUPPORT ,

Currently I am using SDK_2_6_12_QN9090.

For Central side I am using OTAP server project as reference for my project and peripheral side developed own. I am getting scanning error in central side.

 

Thanks

AjayK

0 Kudos

989 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Could you please help me with more details about your setup?

As I understand, you are using one QN9090 with OTA Server without modifications as Central; and one QN9090 with OTA Client with your own modifications as Peripheral, is this correct?

If so, could you please share the modifications you have done so I can try to reproduce this behavior on my side?

Regards,
Eduardo.

0 Kudos