After I call Wifi_DisconnectAP(); Wifi_AssocStatus() doesn't become ASSOCSTATUS_DISCONNECTED or ASSOCSTATUS_SEARCHING. So it basically doesn't work... What can I do to make it work?
Thanks in advance!
Wifi_DisconnectAP() doesn't seem to work
Re: Wifi_DisconnectAP() doesn't seem to work
You could look at the connects on the AP if you have access
Re: Wifi_DisconnectAP() doesn't seem to work
It's about disconnecting. I'm really sure it is connected, but if I return to the menu, I want to disconnect from the access point. So first the Wifi_AssocStatus() is equal to 5 (which is connected) and after I call Wifi_DisconnectAP(); it still is 5.
Re: Wifi_DisconnectAP() doesn't seem to work
If you disconnect wouldn't it disappear from the list? Alternatively you could use a packet sniffer to look for disassociation packets.
Re: Wifi_DisconnectAP() doesn't seem to work
I took a look at the dswifi code. It does not send a disassociation packet. the function sets a flag for the arm7 to perform the disconnect - but it does not send anything (that I can tell). it sets the AID to 0 and removes the connected flag. I am a little surprised that you are seeing 5 from Wifi_AssocStatus as I would expect 6 (ASSOCSTATUS_CANNOTCONNECT) as the Wifi_DisconnectAP sets wifi_connect_state=-1 before it returns - which should cause Wifi_AssocStatus to always return ASSOCSTATUS_CANNOTCONNECT.
it looks like Wifi_AssocStatus is only really useful while trying to associate. I think WifiData->curMode would be a better indicator but it is not really exposed anywhere.
after a few minutes of inactivity the AP should drop the connection anyway. You probably need to wait a little while before trying to connect to a different AP so that the arm7 has a chance to process the disconnect request.
it looks like Wifi_AssocStatus is only really useful while trying to associate. I think WifiData->curMode would be a better indicator but it is not really exposed anywhere.
after a few minutes of inactivity the AP should drop the connection anyway. You probably need to wait a little while before trying to connect to a different AP so that the arm7 has a chance to process the disconnect request.
Re: Wifi_DisconnectAP() doesn't seem to work
Thanks for the help. You are right it did return 6 afterwards.
Who is online
Users browsing this forum: No registered users and 1 guest