Can you please confirm in this Customer scenario , both Peripheral & Central is CYW43438 ?
When the IO capability is Display , the stack generates passkey. There is no option to set it in the application.
When the IO capability is Keyboard, you can send the required passkey using API wiced_bt_dev_pass_key_req_reply(WICED_BT_SUCCESS, remote_addr ,passkey);
It is used in the following environment.
Peripheral : CYW43438
Central : Windows10 & nRF Connect
I have sent a passkey using the API wiced_bt_dev_pass_key_req_reply (), but I cannot connect.
Are there any problems with the following usages?
・Specify (local_io_cap = BTM_IO_CAPABILITIES_KEYBOARD_ONLY)
・Send a passkey with (event: BTM_PASSKEY_REQUEST_EVT)
wiced_bt_dev_pass_key_req_reply(WICED_BT_SUCCESS, event_data->user_passkey_request->bd_addr, 12);
No , there is no problem for keeping BTM_IO_CAPABILITIES_KEYBOARD_ONLY and sending the passkey directly with API wiced_bt_dev_pass_key_req_reply . But you should make sure the same passkey is generated and used on the peer side.
In the previous response , you are passing 12 as passkey . Please make sure you are passing a valid passkey of 6 digits and try again.
I confirmed 123456 as a passkey, but could not connect.
Link key exchange did not start after the event (BTM_PASSKEY_REQUEST_EVT) was issued.
The peer also specifies (KEYBOARD_ONLY) and enters the passkey (123456).
Is there a way to make sure the same passkey is generated?
For passkey pairing , both Central and Peripheral should not be in same IO capability of Keyboard only.
One side it should be Keyboard and the other side it should be display. Then only it will work.
So only the display side, the passkey should be generated by the BT stack and the same key should be entered on the peer side using Keyboard. You can also skip entering the key using keyboard and send the API wiced_bt_dev_pass_key_req_reply directly. But the scenario should be as explained above.
If this can't be done, then you may have to choose some other pairing mechanism depending upon your device IO capabilities.
Hope you understood. Please let me know if you need any clarification.
I'm sorry I don't understand the BT specifications and ask unknown questions.
Is there a way to use my own passkey without using the passkey generated by BT stack?
1 of 1 people found this helpful
No, there is no option in WICED to use custom/fixed passkey other than stack creates.
One option is as below:
If you have the control to set a fixed passkey on your Central side, whose IO capability is set to Display only.
In that case, on CYW43438 (peripheral) you can keep IO capability as keyboard and instead of entering the passkey manually , you can use API wiced_bt_dev_pass_key_req_reply and send the known passkey as reply. This will work.
But you may have to check on your peer (Central) applications if this option of providing a fixed passkey is available or not.
I will consider it based on the content you answered.
Thank you very much.