I am trying to pair two QN9090 devices(SDK_2.6.3_QN9090) using OOB method.
The following parameters are used both peripheral and central.
gapPairingParameters_t gPairingParameters = {
.withBonding = gAppUseBonding_d,
.securityModeAndLevel = gSecurityMode_1_Level_4_c,
.maxEncryptionKeySize = mcEncryptionKeySize_c,
.localIoCapabilities = gIoNone_c,
.oobAvailable = TRUE,
.centralKeys = (gapSmpKeyFlags_t)(gIrk_c),
.peripheralKeys = (gapSmpKeyFlags_t)(gIrk_c),
.leSecureConnectionSupported = TRUE,
.useKeypressNotifications = FALSE,
};
Initially the pairing request was sent by central and response was sent by peripheral.
I am having few doubts after this.
1)I am trying to start the encryption between peripheral and central. Currently I am struggling how to start the encryption link between the devices.
2)I know For secure connection LTK cannot be distributed, it will generated internally, But how can i exchange LTK and store it for secure pairing between peripheral and central .
3)I registered L2Cap connection using PSM Value and I am able to transfer the data using L2CAP, but I need to send data using SMP L2CAP . I tried with SMP CID (0x0006). But unable to transfer the data in SMP L2CAP.
Thanks
Hello @Ajay1202
Hope you are doing well.
Please, use the latest version available of the QN9090 SDK. You can download it from the MCUXpresso SDK Builder.
securityModeAndLevel = gSecurityMode_1_Level_4_c should allow you to have Encryption with LE Secure Connections pairing. Also, please make sure that you have enabled gAppUseBonding_d and gAppUsePairing_d in source/app_preinclude.h file.
When using Secure Connections, LTK should be derived/calculated from the Diffie-Hellman Key. This operation should be done by the stack.
You may find some useful information inside the BLE Application Developer's Guide and BLE Host Stack API Reference Manual (these documents can be found inside QN9090 SDK docs folder > docs > wireless > Bluetooth).
Regards,
Eduardo.
Hi @EduardoZamora ,
I am doing well, Hope you are doing well.
I have enabled gAppUseBonding_d and gAppUsePairing_d in source/app_preinclude.h file.
When using Secure Connections, LTK should be derived/calculated from the Diffie-Hellman Key. This operation should be done by the stack
- Is the calculation from DHkey implementation is required in the application host side ?
Hi,
Please, take a look at the article KW36 - Enabling Out Of Band Pairing on a Bluetooth LE Central and Peripheral. Although this article describes how to enable OOB pairing (using Legacy Pairing and Secure Connections) on Bluetooth LE connectivity examples basing on FRDM-KW36, you can use it as a reference for your development. Here you can see which APIs require user implementation in the code.
Regards,
Eduardo.