Chat freely about anything...

User avatar
By Rupak
#55331 I am trying to connect to esp-8266 through android. I tried below code on android, but not able to connect to 8266.
Can anyone help me if I am missing some configuration related to 8266.

SSID = "\"" + networkInfo.name + "\"";
password = getPassword(networkInfo.name);
wifiConfiguration.preSharedKey = "\"" + password + "\"";
wifiConfiguration.allowedKeyManagement.set(WifiConfiguration‌​.KeyMgmt.WPA_PSK);
wifiConfiguration.allowedProtocols.set(WifiConfiguration.Pro‌​tocol.WPA);
netid = wifiManager.addNetwork(wifiConfiguration);
wifiManager.enableNetwork(netid, true)
wifiManager.reconnect();

thanks,