[GH-ISSUE #676] android force connect to esp8266 wifi not working. #567

Closed
opened 2026-02-28 01:25:53 +03:00 by kerem · 0 comments
Owner

Originally created by @kotran88 on GitHub (Jul 25, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/676

Wemos D1

I want to force connect to esp8266 ssid.
I found code example to connect specified ssid but for esp8266, not work

below is code snippet .
it firstly connected to specified ssid "MyEsp8266", but right after connected to MyEsp8266 ssid,
, it changed to my home wifi that I used to connect.

I think configuration is a bit different?
how can I maintain connection to MyEsp8266 SSID???

WifiConfiguration wc = new WifiConfiguration(); wc.SSID = "\"MyEsp8266\""; wc.preSharedKey = "\"\""; wc.status = WifiConfiguration.Status.ENABLED; wc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP); wc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP); wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK); wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP); wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP); wc.allowedProtocols.set(WifiConfiguration.Protocol.RSN); // connect to and enable the connection int netId = wifiManager.addNetwork(wc);

Originally created by @kotran88 on GitHub (Jul 25, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/676 Wemos D1 I want to force connect to esp8266 ssid. I found code example to connect specified ssid but for esp8266, not work below is code snippet . it firstly connected to specified ssid "MyEsp8266", but right after connected to MyEsp8266 ssid, , it changed to my home wifi that I used to connect. I think configuration is a bit different? how can I maintain connection to MyEsp8266 SSID??? `WifiConfiguration wc = new WifiConfiguration(); wc.SSID = "\"MyEsp8266\""; wc.preSharedKey = "\"\""; wc.status = WifiConfiguration.Status.ENABLED; wc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP); wc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP); wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK); wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP); wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP); wc.allowedProtocols.set(WifiConfiguration.Protocol.RSN); // connect to and enable the connection int netId = wifiManager.addNetwork(wc);`
kerem 2026-02-28 01:25:53 +03:00
  • closed this issue
  • added the
    invalid
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#567
No description provided.