10 years, 8 months ago.

Connecting to WPA2-Personal network

How do you specify a WPA2-Personal security connection in: WiflyInterface wifly(p9, p10, p30, p29, "mbed", "password", WPA);

Question relating to:

1 Answer

10 years, 8 months ago.

Michal,

I had run into this with WiFly. I made a local copy and added WPA2_PSK option to the driver .cpp and .h files and it worked out fine. The changes are minor. It would be nice to have this change on the official driver.

Regards,

...kevin

Thanks Kevin. I will see if I can make the changes myself...

posted by Michal Wozny 17 Jul 2013

Which "driver.cpp and .h" files are you referring to? In the file wifly.cpp, I found this code here where it sets the type of security.

key step if (state.sec != NONE) { if (state.sec == WPA) sprintf(cmd, "set w p %s\r", phrase); else if (state.sec == WEP_128) sprintf(cmd, "set w k %s\r", phrase);

if (!sendCommand(cmd, "AOK")) continue; }

What is the variable for WPA2-Persona? In the documentation, it only says that the AT command is EE and the parameter is 2 and only gives "AT" commands, not "set" as in this case.

posted by Terry Neckar 06 Oct 2013

Hi Terry,

David Smart now has a forked version of WiflyInterface that has the WPA2 authentication mode in it (along with many other enhancements). WPA2 was a pretty tivial addition to made actually. The mode is WPA2_PSK. Download David's driver and you should be all set.

...kevin braun

posted by Kevin Braun 07 Oct 2013

Thanks for your help. I found it in the code but didn't know what the parameter value is.

Terry

posted by Terry Neckar 10 Oct 2013