i'm having problems connecting to wifi networks that are secured by password with CCMP (AES) cipher.
the only way to get wifi with password to work is to force TKIP only - any other mode, including TKIP+CCMP, won't work.
i have a pretty small test program: http://pastebin.com/W4Zp9eU9
all it does is initiate wifi station mode, set config and then poll and print status and system heap free every second.
i also have two APs: one unsecured, called "TehCloud" and one secure, called "DeiWolke" with the same password, where i control encryption.
here are the results i observe:
1) connecting to unsecured AP is never a problem.
wifi status: 1 30216
wifi status: 1 30216
scandone
add 0
aid 1
pm open phy_2,type:2 0 0
connected with TehCloud, channel 4
dhcp client start...
cnt
wifi status: 1 30080
ip:192.168.1.122,mask:255.255.255.0,gw:192.168.1.254
wifi status: 5 30080
wifi status: 5 30080
2) connecting to secured AP with CCMP enabled never completes:
wifi status: 1 29888
wifi status: 1 29560
wifi status: 1 29232
wifi status: 1 28904
rm 0
pm close 7 0 0/4017682
wifi status: 1 28904
reconnect
f 0, wifi status: 1 28904
wifi status: 1 28904
scandone
add 0
aid 1
pm open phy_2,type:2 0 0
cnt
wifi status: 1 28576
wifi status: 1 28248
in fact, it claims there is no AP there when i know it's there and can connect with my laptop:
reconnect
f -240, wifi status: 1 27592
wifi status: 1 27592
scandone
no DeiWolke found, reconnect after 1s
reconnect
f 0, wifi status: 3 27592
wifi status: 3 27592
notice that system heap free is going down. eventually it runs out of heap and get completely stuck. so there is a memory leak problem here.
now, if i go to the AP settings and change encryption to TKIP - while it's still retrying - it is able to connect immediately:
wifi status: 3 21032
wifi status: 3 21032
reconnect
rm 0
pm close 7 0 0/10005241
f 0, wifi status: 3 21032
wifi status: 3 21032
scandone
add 0
aid 1
pm open phy_2,type:2 0 0
cnt
connected with DeiWolke, channel 6
dhcp client start...
wifi status: 3 20544
wifi status: 3 20544
wifi status: 3 20424
ip:192.168.1.122,mask:255.255.255.0,gw:192.168.1.254
wifi status: 5 20544
wifi status: 5 20544
i found another topic where author reports that changing AP to TKIP fixed his connection problem.
problem with this? i do not always control APs and telling customers to force TKIP is giving them bad advice, since TKIP is deprecated.
at the same time, CCMP is so widespread that i find it hard to believe that i ran into this problem first.
what am i doing wrong here?