Characteristic Permission Setting with Pairing & Bond

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

Characteristic Permission Setting with Pairing & Bond

909 Views
wang_barry
Contributor III

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
5 Replies

819 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Wang,

If you want to implement this authentication, you should also change the security and mode level of each service.

Could you please provide more information about your final application?

Regards,

Mario

0 Kudos

832 Views
wang_barry
Contributor III

Hello @mario_castaneda   

   Have any further suggestions?

0 Kudos

866 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

894 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

884 Views
wang_barry
Contributor III

Hello @mario_castaneda 

All settings at app_config.c are gSecurityMode_1_Level_3_c

01.png

02.png

0 Kudos