{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/2795","repository_url":"https://api.github.com/repos/esp8266/Arduino","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/2795/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/2795/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/2795/events","html_url":"https://github.com/esp8266/Arduino/issues/2795","id":197577396,"node_id":"MDU6SXNzdWUxOTc1NzczOTY=","number":2795,"title":"Unable to connect to some Wi-Fi access points","user":{"login":"simonvanderveldt","id":204286,"node_id":"MDQ6VXNlcjIwNDI4Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/204286?v=4","gravatar_id":"","url":"https://api.github.com/users/simonvanderveldt","html_url":"https://github.com/simonvanderveldt","followers_url":"https://api.github.com/users/simonvanderveldt/followers","following_url":"https://api.github.com/users/simonvanderveldt/following{/other_user}","gists_url":"https://api.github.com/users/simonvanderveldt/gists{/gist_id}","starred_url":"https://api.github.com/users/simonvanderveldt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonvanderveldt/subscriptions","organizations_url":"https://api.github.com/users/simonvanderveldt/orgs","repos_url":"https://api.github.com/users/simonvanderveldt/repos","events_url":"https://api.github.com/users/simonvanderveldt/events{/privacy}","received_events_url":"https://api.github.com/users/simonvanderveldt/received_events","type":"User","site_admin":false},"labels":[{"id":332802539,"node_id":"MDU6TGFiZWwzMzI4MDI1Mzk=","url":"https://api.github.com/repos/esp8266/Arduino/labels/waiting%20for%20feedback","name":"waiting for feedback","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":35,"created_at":"2016-12-26T11:21:25Z","updated_at":"2019-03-04T19:55:37Z","closed_at":null,"author_association":"NONE","body":"### Hardware\r\nHardware: ESP-01\r\nFlash Size: 512KB\r\nCPU Frequency: 80Mhz\r\nCore Version: 2.3.0 (assuming this is the version of the Arduino framework for the esp8266)\r\n\r\n### Description\r\nI'm just doing a simple thing, namely connection to an access point, which used to work fine when using lua/nodemcu with this access point, but refuses to work using this framework.\r\nThe strange thing is, it does work when I connect to my phone's Wi-Fi hotspot, but doesn't work when connecting to my regular access point (a Asus WL-500gP running Tomato).\r\n\r\nI tried everything I could think of on the access point:\r\n- switch channels\r\n- switch mode between b and g (it doesn't support n)\r\n- rename SSID\r\n- change password\r\n- change encryption to WPA1/TKIP or to WPA1/WPA2 compatible TKIP or EAS\r\n\r\nBut none of them fixed the problem\r\n\r\n### Sketch\r\nI've simplified it to just the basic steps/example code. Added the network scan so it shows that the SSID does exist and is found by the esp8266. So at the very least the debug message `no SimonAP found, reconnect after 1s` is wrong.\r\n\r\n```\r\n#include <ESP8266WiFi.h>\r\n\r\nvoid setup() {\r\n  Serial.begin(115200);\r\n  Serial.setDebugOutput(true);\r\n  Serial.println();\r\n  Serial.println(\"Starting setup\");\r\n\r\n  Serial.print(\"Scan start ... \");\r\n  int n = WiFi.scanNetworks();\r\n  Serial.print(n);\r\n  Serial.println(\" network(s) found\");\r\n  for (int i = 0; i < n; i++)\r\n  {\r\n    Serial.println(WiFi.SSID(i));\r\n  }\r\n  Serial.println();\r\n\r\n  WiFi.disconnect(true);\r\n  WiFi.setAutoConnect(false);\r\n  WiFi.setPhyMode(WIFI_PHY_MODE_11G);\r\n  WiFi.begin(\"SimonAP\", \"thisisapassword\");\r\n  WiFi.printDiag(Serial);\r\n  Serial.println(WiFi.getPhyMode());\r\n\r\n  Serial.print(\"Connecting\");\r\n  while (WiFi.status() != WL_CONNECTED)\r\n  {\r\n    delay(500);\r\n    Serial.print(\".\");\r\n  }\r\n  Serial.println();\r\n  Serial.print(\"Connected, IP address: \");\r\n  Serial.println(WiFi.localIP());\r\n\r\n  delay(2000);\r\n}\r\n```\r\n\r\n### Debug Messages\r\n```\r\nsetup\r\nScan start ... scandone\r\nf r0, scandone\r\n14 network(s) found\r\nSimonAP\r\n... (<other 13 APs redacted>)\r\n\r\ndel if0\r\nusl\r\nmode : null\r\nmode : sta(18:fe:34:9d:2b:d6)\r\nadd if0\r\nf r0, Mode: STA\r\nPHY mode: G\r\nChannel: 1\r\nAP id: 0\r\nStatus: 1\r\nAuto connect: 1\r\nSSID (7): SimonAP\r\nPassphrase (15): thisisapassword\r\nBSSID set: 0\r\n2\r\nConnecting....scandone\r\nstate: 0 -> 2 (b0)\r\n.state: 2 -> 3 (0)\r\nstate: 3 -> 0 (19)\r\n..reconnect\r\nf 0, ....scandone\r\nstate: 0 -> 2 (b0)\r\nstate: 2 -> 3 (0)\r\nstate: 3 -> 0 (19)\r\n..reconnect\r\nf -180, ....scandone\r\nno SimonAP found, reconnect after 1s\r\nreconnect\r\nf r0, ....scandone\r\nstate: 0 -> 2 (b0)\r\nstate: 2 -> 3 (0)\r\nstate: 3 -> 0 (19)\r\n..reconnect\r\nf 0, .....scandone\r\nstate: 0 -> 2 (b0)\r\nstate: 2 -> 3 (0)\r\nstate: 3 -> 0 (19)\r\n..reconnect\r\nf -180, ....scandone\r\nno SimonAP found, reconnect after 1s\r\nreconnect\r\nf r0, ....scandone\r\nstate: 0 -> 2 (b0)\r\nstate: 2 -> 3 (0)\r\nstate: 3 -> 0 (19)\r\n..reconnect\r\nf 0, ..\r\n```"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/469398034","html_url":"https://github.com/esp8266/Arduino/issues/2795#issuecomment-469398034","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/2795","id":469398034,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2OTM5ODAzNA==","user":{"login":"Keltere","id":8084245,"node_id":"MDQ6VXNlcjgwODQyNDU=","avatar_url":"https://avatars3.githubusercontent.com/u/8084245?v=4","gravatar_id":"","url":"https://api.github.com/users/Keltere","html_url":"https://github.com/Keltere","followers_url":"https://api.github.com/users/Keltere/followers","following_url":"https://api.github.com/users/Keltere/following{/other_user}","gists_url":"https://api.github.com/users/Keltere/gists{/gist_id}","starred_url":"https://api.github.com/users/Keltere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keltere/subscriptions","organizations_url":"https://api.github.com/users/Keltere/orgs","repos_url":"https://api.github.com/users/Keltere/repos","events_url":"https://api.github.com/users/Keltere/events{/privacy}","received_events_url":"https://api.github.com/users/Keltere/received_events","type":"User","site_admin":false},"created_at":"2019-03-04T19:55:37Z","updated_at":"2019-03-04T19:55:37Z","author_association":"NONE","body":"@Khalid7777777 what wifi router did you use? Did you tried disabling WMM?"}}
{"actor":{"display_login":"Keltere"}}