Authentication with static passkey

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am new to Cypress PRoC/PSoC solutions for BLE. I am trying to establish an authenticated connection between a peripheral and a central device using a pre-known static passkey. Here is what I have so far:

   

 

   

Peripheral side:

   

- configured as GATT server, GAP peripheral

   

- successfully starts BLE stack

   

- successfully starts advertising with 5 sec interval

   

- allows central device to connect

   

- waits for central device to start authentication process

   

- on receiving CYBLE_EVT_GAP_AUTH_REQ, calls CyBle_GappAuthReqReply() with No Bonding, key size 16, security 0x02

   

- on receiving CYBLE_EVT_GAP_PASSKEY_ENTRY_REQUEST, calls CyBle_GapAuthPassKeyReply() with static passkey

   

- waits for CYBLE_EVT_GAP_AUTH_COMPLETE or CYBLE_EVT_GAP_AUTH_FAILED

   

 

   

Central side:

   

- configured as GATT client, GAP central

   

- successfully starts BLE stack

   

- successfully starts scanning with fast scan mode

   

- successfully discovers target peer device

   

- successfully connects to target device using CyBle_GapcConnectDevice() with return 0x00

   

- on receiving CYBLE_EVT_GAP_DEVICE_CONNECTED, calls CyBle_GapAuthReq() with No Bonding, key size 16, security 0x02

   

 

   

After calling CyBle_GapAuthReq() the central device gets CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST the very first time, and then stays there without generating any other events from the BLE stack. And the passkey displayed is not the static passkey I'm trying to use.

   

 

   

Can someone shine light on the faults in the process above, for both the central and peripheral devices?

0 Likes
8 Replies
Anonymous
Not applicable

I am new to Cypress, i have Psoc 4 (CY8C4245AXI-483) target board and mini prog1(CY2310) .

   

i am using Psoc creator3.3 tool, if I  connect target board to  PC , device is not detect in PSoC creator while programming.

   

please help me in that.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The miniprog1 cannot be used for programming PSoC 3, 4 or 5, only PSoC1 can be programmed. We need some more info: Your target board is which one? CY8CKit-049 or CY8CKIT-042? Or what is your target board.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you for your information.

   

we are not using evaluation board.

   

We are using one customized board which is having  CY8C4245AXI-483 IC, temperature control circuit and  FAN control circuit etc.

   

Miniprog3 is used for   programming PSoC 3, 4 or 5?

   

I need one more information, 

   

how to implement PID algorithm for  controlling the temperature?

   

i saw Fan_Control_Auto_FW_with_Alert example , PID algorithm used for controlling the speed of the motors.

   

I am not getting , please help me in that.

   

is there any block for PID control in PSoC creator , like components in component catalog?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

PID controller is a simple 4-liner, no component ready for that. I suggest to use google to find a solution. More complex is the math to set the required Kp, Ki and Kd parameters for the application.

   

Miniprog3 is used for   programming PSoC 3, 4 and 5? Yes, exactly.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Has Cypress finally worked on the static passkey feature??

0 Likes
Anonymous
Not applicable

I will answer myself here I suppose. Found through tech support that it was finally done in PSoC Creator 3.3 CP2. Cheers!

0 Likes
Anonymous
Not applicable

Hi,

Could you share example or document to do authentication with static passkey ?

Thank you,

Asier.

0 Likes
Anonymous
Not applicable

If you look at this example: PSoC-4-BLE/main.c at master · cypresssemiconductorco/PSoC-4-BLE · GitHub

But change the passkey to be a constant number instead of using the number input by the user, then it will be functionally the same as what you are asking.

PS: The code can be simplified more than this, but only the one step/change is needed for fixed passkey testing/example.

0 Likes