Characteristic Permission Setting with Pairing & Bond

cancel
Showing results for 
Search instead for 
Did you mean: 

Characteristic Permission Setting with Pairing & Bond

68 Views
wang_barry
Contributor II

Hello:

I have the same question with the below topic and do some experiments after reading the discussion:

https://community.nxp.com/t5/Wireless-Connectivity/KW36-Pairing-Bond-with-Link-Encryption-issue/m-p/...

Experiment1: set permission to (gPermissionFlagReadable_c)

  if the mobile app connected, not pair, and not bond, the app can't read the char value.

  if the mobile app connected, paired, and bonded, the app can read the char value.

Experiment2: set permission to (gPermissionFlagReadable_c | gPermissionFlagReadWithEncryption_c)

  if the mobile app connected, not pair, and not bond, the app can't read the char value.

  if the mobile app connected, paired, and bonded, the app can read the char value.

Experiment3: set permission to (gPermissionFlagReadable_c | gPermissionFlagReadWithAuthentication_c)

  if the mobile app connected, not pair, and not bond, the app can't read the char value.

  if the mobile app connected, paired, and bonded, the app can read the char value.

It seems not to differ between which permission flag that I set. What is the correct way to set the attribute read-only by authenticated peers.

 

0 Kudos
3 Replies

25 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @wang_barry,

Please look at the  4.1.3 Pairing and bonding in the Bluetooth® Low Energy Application Developer’s Guide. You will check that mode 1 and level 3 that set the authentication with encryption.

Regards,

Mario

0 Kudos

53 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

What is the security mode and level that you are defining in the service?

I am not sure the example that you are working on but a service could be defined as gSecurityMode_1_Level_3_c

/*!< Mode 1 Level 3 - Encryption with authentication. */

Regards,

Mario

0 Kudos

43 Views
wang_barry
Contributor II

Hello @mario_castaneda 

All settings at app_config.c are gSecurityMode_1_Level_3_c

01.png

02.png

0 Kudos