Announcements
Community Announcement : Welcome to the NEW Cypress Developer Community.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

D_Sd_3235936
New Contributor II

 

Connection went well.

Pairing is a success. Device was added to whitelist. 

But on disconnection and connection (works) but pairing (fails)  I get this:

[11:08:46:649] : 'Authentication Error Notification' event received
[11:08:46:649] : Status: AUTH_ERROR_INSUFFICIENT_ENCRYPTION_KEY_SIZE
[11:08:46:649] : 'Misc Event Notification' received
[11:08:46:649] : Event Code: 0x0029 (GAP_ENCRYPT_CHANGE)
[11:08:46:649] : Event Data: Encryption OFF
[11:08:46:649] : Event Data: [00]
Error: gpm.M1108: Authentication failed.

 

Does not happen when I do the same process using an android,

0 Likes
1 Solution
Yugandhar
Moderator
Moderator

Hello,

In the BLE component, Go to Gap Settings ->Security and check the Encryption Key size. The valid values of encryption key size are 7-to-16 bytes.
Also, At Peripheral side when encryption is failed due to LTK loss, CYBLE_EVT_GAP_AUTH_FAILED event with reason code CYBLE_GAP_AUTH_ERROR_INSUFFICIENT_ENCRYPTION_KEY_SIZE is given to application. 

The authentication error code CYBLE_GAP_AUTH_ERROR_INSUFFICIENT_ENCRYPTION_KEY_SIZE will occurs due to Insufficient key size for the security requirements of this device or LTK is lost 

Thanks,
P Yugandhar.

View solution in original post

0 Likes
3 Replies
Yugandhar
Moderator
Moderator

Hello,

If the encryption key size is too short, pairing will be failed with insufficient encryption key size. Could you please share your peripheral project for debugging at our end ?
You can refer to the Day015_Bonding and Day014_Whitelist code examples from the GitHub.

Thanks,
P Yugandhar.

0 Likes
D_Sd_3235936
New Contributor II

Can you tell me please where can I change the key?

0 Likes
Yugandhar
Moderator
Moderator

Hello,

In the BLE component, Go to Gap Settings ->Security and check the Encryption Key size. The valid values of encryption key size are 7-to-16 bytes.
Also, At Peripheral side when encryption is failed due to LTK loss, CYBLE_EVT_GAP_AUTH_FAILED event with reason code CYBLE_GAP_AUTH_ERROR_INSUFFICIENT_ENCRYPTION_KEY_SIZE is given to application. 

The authentication error code CYBLE_GAP_AUTH_ERROR_INSUFFICIENT_ENCRYPTION_KEY_SIZE will occurs due to Insufficient key size for the security requirements of this device or LTK is lost 

Thanks,
P Yugandhar.

View solution in original post

0 Likes