How to connect with a PIN on the CYW4343W?

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

cross mob
RoWo_4704901
Level 3
Level 3
First like received First like given

Folks,

How do you connect to a CYW4343W using a PIN please? There is vague mentions of PINs in both the source code and the sketchy documentation, but I can't fathom how you set the device up so that when the phone attempts to connect to the CYW4343W, the phone has to enter a PIN for the connection to succeed.

I have set up our device in the hello_sensor style and I can connect, read and write data etc, but now I need to set it up so the phone enters the PIN to communicate.

The PIN will be the same in every device (at least to start with) and we have no user interface whatsoever, hence the need for each device to have the same PIN.

I can't even see any example code to wade through.

I could do with some explicit instructions as to how this works. I'm assuming you have to set up somerthing when advertising.

Many thanks.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi RoWo_4704901 ,

From your description, I believe you are using BLE and you want to use 6 digit Passkey for security.

In order to use the passkey method, you need to set the IO capabilities accordingly. In your case , your mobile phone have to enter the passkey. Which means 4343W should be having IO capability Display and for mobile keyboard.

So when you set the IO capability BTM_IO_CAPABILITIES_DISPLAY_ONLY in BTM_PAIRING_IO_CAPABILITIES_BLE_REQUEST_EVT , the stack will generate 6 digit passkey and display on the 4343W device. Then you have to enter this passkey on your mobile phone during connection process.

As per spec, the 6 digit passkey should be randomly generated. So there is no provision to have all the devices with same PIN .  As of now , there is no such API in WICED to set a fixed passkey in all of your devices.

So ideally only if your device have any IO capability , you can use passkey method.

I have attached modified hello_Sensor example for IO capability display to test at your side.

Note :

I have attached our WICED Academy files compatible with WICED SDK. It is targeted for CYW20719 device, however the app code implementations and structures are same for 4343W . You may refer to WBT101-04B-BLE-Ntfy-Sec.pdf in labmaual folder for understanding how to implement different security options.

Regards,

Anjana

View solution in original post

0 Likes
21 Replies