Android Question Forget Wifi [solved]

jsanchezc

Member
Licensed User
Longtime User
Hello,
I need to forget Wifi, so device will be not able to reconnect.
I have tried ML Wifi and WifiConnect but i do not see how to do it.

After connect to a Wifi and read data from a data adquisition module over wifi,
i need to disconnect and forget password to get de device be reconnected to a wifi with intenet access if avaible.

For the rest of functions i use:
Dim WIFI1 As WiFiConnect
WIFI1.Initialize()
../..

This lib has .disableNetwork function but it need a parameter netId (int) .
I have SSID but i don't know where get this parameter-

WIFI1.disableNetwork( netId? )

Thanks for your help
 

jsanchezc

Member
Licensed User
Longtime User
Hello again, today (and yesterday...) mi brain was not so clear... ;)

I solved problem:
I get NetID from ssid:
WIFI1.getNetworkIdBySSID(xSSID )
then i can "forget" Wifi
WIFI1.disableNetwork( WIFI1.getNetworkIdBySSID(xSSID ))
 
Upvote 0
Top