This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3100MOD: How do I make a WiFi-Direct connection with a password/pin

Part Number: CC3100MOD

I have a device with a CC3100MOD WiFi-Chip and i want to connect it to a PC or a Smartphone using WiFi-Direct (P2P). The connection already works when i use Push-Button as security type, but i want it so that my device stores a password/pin and the PC/Smartphone has to connect using that password/pin. So i want it like in AP-Mode but for WiFi-Direct. 

I already tried setting the secParams.Key in the sl_WlanConnect() function to my desired password/pin in combination with Push-Button/Pin-Keypad/Pin-Display but that all didn't work. I saw at the release notes of the Simple-Link Driver that there is an issue when the password-string is not null-terminated but there is also no problem.

Do you have any suggestions on how i could make this work?

By the way my device has no screen and i tested it with the Microsoft UWP WiFi-Direct Sample and also with my own custom C++/WinRt App.

  • Hi Matthias,

    I already tried setting the secParams.Key in the sl_WlanConnect() function to my desired password/pin in combination with Push-Button/Pin-Keypad/Pin-Display but that all didn't work. I saw at the release notes of the Simple-Link Driver that there is an issue when the password-string is not null-terminated but there is also no problem.

    Did you get an error when trying to use SecParams.Key?

    Thanks,
    Jacob

  • Hello Jacob,

    the sl_WlanConnect() function didn't return any error but i always get a SL_WLAN_CONNECTION_FAILED_EVENT shortly after i try to connect using my pc.

  • I think i found the solution to my problem. My problem was that i always looked at the wifi direct configuration from the perspective of my device. So i put my device in "Display Key" Mode and on my PC i would also put it in "Display Key" Mode, which obviously doesn't make much sense. 

    Now i have my device set to "Display Key" and my PC to "Provide Pin" and now it works fine. The key is set in the secParams.Key parameter.