Characteristic Permission Setting with Pairing & Bond

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Characteristic Permission Setting with Pairing & Bond

1,145 次查看
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 项奖励
回复
5 回复数

1,055 次查看
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 项奖励
回复

1,068 次查看
wang_barry
Contributor III

Hello @mario_castaneda   

   Have any further suggestions?

0 项奖励
回复

1,102 次查看
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 项奖励
回复

1,130 次查看
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 项奖励
回复

1,120 次查看
wang_barry
Contributor III

Hello @mario_castaneda 

All settings at app_config.c are gSecurityMode_1_Level_3_c

01.png

02.png

0 项奖励
回复