-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server returns http 400 when connected to SSID with password #819
Comments
SO when your esp is connected to an anoymous ap it works, and when its connected to a secure ap it doesn't ? and have you tried this without wm , because it doesn't sound like anything to do with wm. |
Yes exactly. It could be a problem of internal ZYXEL routing, because SSIDs have different MAC addresses. However, when I tried HttpClient example from Arduino library that does not use WM, it connects to server correctly through both secure and insecure AP. My example with WM only connects to web server when connected to insecure AP (without password). I can send you problematic sketch, but not over this issue management, it would make messages hard to read. |
Are you setting mode(WIFI_STA) explicitly, and making sure it is not falling back to STA_AP ? |
In Arduino example yes and it works. In my sketch that uses WM there is no such setting, I connect with following code. It works well and does connect to AP (but not to http server, only with empty password). By the way, I had troubles with secure SSID earlier, I discovered I was using beta version of JSON library. I could not connect to secure SSID. When I downgraded JSON library, then secure SSID connection started to work.
|
that is the only thing I can think of, that the esp is being left in the default sta ap mode and you are not changing it in your code. This could cause issues with connecting to some aps, set mode explicitly in your code to what you need it to do |
Does "wifiManager.autoConnect()" set STA mode itself? Or how do I do it? Googling did not help much... |
WiFi.mode(WIFI_STA); |
I have added it after autoConnect(): but the problem remains, http GET only works with SSID without password. With password, server returns 400 (error -11). Interesting is that GET and telegram check connection DOES NOT work, while BLYNK sending parameters DOES work even with secure SSID... |
If you want to provide all the information in the issue form I can look into it. You can try the development branch and see if it already been fixed |
Hello, I have noticed following strange behavior.
I have multiple SSIDs provided by my home ZYXEL router, some with password, some without it. I use WiFiManager.h to autoconnect to SSID. When it does not detect connection, it launches captive portal, where I can select some of my SSID, enter password and ESP then connects to that SSID.
Then I use OTA from web server, with ESP8266HTTPClient.h and ESP8266httpUpdate.h. I noticed that when I am connected to SSID with password, I can not connect to OTA server and it returns http code 400. When I reconnect to other SSID without password, then OTA server returns http code 200 and server the update file.
Jan
The text was updated successfully, but these errors were encountered: