{"action":"opened","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/5359","repository_url":"https://api.github.com/repos/esp8266/Arduino","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/5359/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/5359/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/5359/events","html_url":"https://github.com/esp8266/Arduino/issues/5359","id":383211977,"node_id":"MDU6SXNzdWUzODMyMTE5Nzc=","number":5359,"title":"Cannot connect to WEP network with WiFi.enableInsecureWEP()","user":{"login":"porkyneal","id":8297625,"node_id":"MDQ6VXNlcjgyOTc2MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/8297625?v=4","gravatar_id":"","url":"https://api.github.com/users/porkyneal","html_url":"https://github.com/porkyneal","followers_url":"https://api.github.com/users/porkyneal/followers","following_url":"https://api.github.com/users/porkyneal/following{/other_user}","gists_url":"https://api.github.com/users/porkyneal/gists{/gist_id}","starred_url":"https://api.github.com/users/porkyneal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porkyneal/subscriptions","organizations_url":"https://api.github.com/users/porkyneal/orgs","repos_url":"https://api.github.com/users/porkyneal/repos","events_url":"https://api.github.com/users/porkyneal/events{/privacy}","received_events_url":"https://api.github.com/users/porkyneal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-21T16:58:33Z","updated_at":"2018-11-21T16:58:33Z","closed_at":null,"author_association":"NONE","body":"### Basic Infos\r\n\r\n- [x] This issue complies with the [issue POLICY doc](https://github.com/esp8266/Arduino/blob/master/POLICY.md).\r\n- [x] I have read the documentation at [readthedocs](https://arduino-esp8266.readthedocs.io/en/latest) and the issue is not addressed there.\r\n- [x] I have tested that the issue is present in current master branch (aka latest git).\r\n- [x] I have searched the issue tracker for a similar issue.\r\n- [x] If there is a stack dump, I have decoded it.\r\n- [x] I have filled out all fields below.\r\n\r\n#### Platform\r\n\r\n- Hardware:\t\t\t\tWroom02\r\n- Core Version:\t\t\t74ca42f\r\n- Development Env:\t\tPlatformio\r\n- Operating System:\t\tWindows\r\n\r\n### Settings in IDE\r\n\r\n- Module:  \t\t\tGeneric ESP8266 Module\r\n- Flash Size: \t\t2MB\r\n- lwip Variant:  v2 Lower Memory\r\n- Reset Method:\t\tnodemcu\r\n- CPU Frequency:\t\t160MHz\r\n\r\n### Problem Description\r\n\r\nAn existing working setup has stopped being able to connect to a WEP network. If i change AP settings to WPA2 everything works as expected. This has been since upgrading the git core, unfortunately I cannot pinpoint the exact previous working git version.\r\n\r\nI have tried before WiFi begin:\r\nWiFi.enableInsecureWEP(true); \r\nWiFi.enableInsecureWEP(); \r\n\r\nWiFi error is 1  - Unreachable WiFi Network\r\n\r\nAll other device connect and work perfectly fine with the access point and the same credentials.\r\n\r\nHere is a wifiscan output from the ESP, I have obscured the SSIDs, SSIDWPA2 is WPA2 encrytption and SSID WEP - WEP.\r\n\r\n\"SSID\" : SSIDWEP,\r\n\"RSSI\" : -30,\r\n\"encryption\" : 5,\r\n\"BSSID\" : 46:D9:E7:F3:35:B8,\r\n\"channel\" : 6,\r\n\"isHidden\" : false\r\n\r\n\"SSID\" : SSIDWPA2,\r\n\"RSSI\" : -30,\r\n\"encryption\" : 4,\r\n\"BSSID\" : 44:D9:E7:F3:35:B8,\r\n\"channel\" : 6,\r\n\"isHidden\" : false\r\n\r\n\r\n\r\n\r\n### [MCVE](https://stackoverflow.com/help/mcve) Sketch\r\n\r\nI will create an MVCE if required, but my setup routine looks like this:\r\n\r\n`void wifiSetup(){\r\n    WiFi.hostname(config.deviceID);\r\n    WiFi.enableInsecureWEP(); \r\n    WiFi.mode(WIFI_AP_STA);\r\n\r\n    if(config.wifiSettings.fixedSettings){\r\n        Serial.println(F(\"Applying fixed wifi settings\"));\r\n        IPAddress staticIP, gateway, subnet, dns1, dns2;\r\n        if(staticIP.fromString(config.wifiSettings.ip)){\r\n            if(gateway.fromString(config.wifiSettings.gateway)){\r\n                if(subnet.fromString(config.wifiSettings.mask)){\r\n                    if(dns1.fromString(config.wifiSettings.dns1)){\r\n                        if(dns1.fromString(config.wifiSettings.dns2)){\r\n                            WiFi.config(staticIP, gateway, subnet, dns1, dns2);\r\n                        } else {\r\n                            Serial.println(F(\"Failed DNS2 Address conversion\"));\r\n                            WiFi.config(staticIP, gateway, subnet, dns1);\r\n                        }\r\n                    }else{\r\n                        Serial.println(F(\"Failed DNS1 Address conversion\"));\r\n                        WiFi.config(staticIP, gateway, subnet);\r\n                    }        \r\n                } else Serial.println(F(\"Failed Net Mask conversion\"));  \r\n            } else Serial.println(F(\"Failed Gateway Address conversion\"));\r\n        } else Serial.println(F(\"Failed IP Address conversion\"));\r\n    }\r\n    WiFi.softAP(config.apSSID, config.apPassword);    \r\n    if(strlen(config.wifiSettings.ssid) != 0){\r\n        Serial.println(F(\"Begin WiFi\"));\r\n        Serial.print(F(\"Connecting to \"));\r\n        Serial.println(config.wifiSettings.ssid);\r\n        WiFi.begin(config.wifiSettings.ssid, config.wifiSettings.password);\r\n    }\r\n}`\r\n### Debug Messages\r\n\r\n```\r\nmode : sta(84:f3:eb:46:dd:c3) + softAP(86:f3:eb:46:dd:c3)\r\nadd if0\r\nBegin WiFi\r\nConnecting to SSIDWEP\r\nscandone\r\nno SSIDWEP found, reconnect after 1s\r\nreconnect\r\nscandone\r\nno SSIDWEP found, reconnect after 1s\r\nreconnect\r\nscandone\r\nno SSIDWEP found, reconnect after 1s\r\nreconnect\r\nscandone\r\nno SSIDWEP found, reconnect after 1s\r\nreconnect\r\nscandone\r\nno SSIDWEP found, reconnect after 1s\r\nreconnect\r\nscandone\r\nno SSIDWEP found, reconnect after 1s\r\nreconnect\r\nWiFi Failure - 1\r\nUnreachable WiFi Network\r\nscandone\r\ndel if0\r\nmode : softAP(86:f3:eb:46:dd:c3)\r\n```\r\n\r\n\r\n"}}
{"actor":{"display_login":"porkyneal"}}