Hello,
i try to use ESP32_HTTP_GET_OpenWeatherMap application
with my ESP32 VROMM-32 ESP32 KITV1
compiling ..is OK
Uploading ..is OK
but i can’t connect ESP to my WIFI Lan
my SSID is ON_AI2021
and i am using for my KEY : mode WPA (TKIP+AES)
this key is 63 chars long ..
const char* ssid =”ON_AIR2021″;
const char* password = “cGT>1_@?LOdBqD7kd%s@v|.b6x^4PD|?s}uu*j4o)Uqpa|r1jftH+H>4_oG6}v5″; // <- modifiée!!! i modified a little bit the original *.ino like this const char *ssid =”ON_AIR2021”; const char *password = “cGT>1_@?LOdBqD6kd%s@v|.b5x^4PC|?s}uu*j4o)Uqpa|r1jftH+H>8_oG6}v4”;
String openWeatherMapApiKey = “bd939aa8d23ff33d3c8f5dd2dd43”;
int Result;
void setup() {
Serial.begin(115200);
Serial.println(“ESP32_HTTP_GET_OpenWeatherMap ..”);
Serial.println(“Wifi disconnect”);
WiFi.disconnect();
delay(1000);
WiFi.begin(ssid,password);
do
{
delay(3000);
Serial.println(“Connecting”);
Result=(WiFi.status());
Serial.print(” Wifi Status = “);
Serial.println(Result);
}while(Result != WL_CONNECTED);
and get this result on Arduino Monitor
<code>
16:04:57.583 -> ESP32_HTTP_GET_OpenWeatherMap ..
16:04:57.583 -> Wifi disconnect
16:05:00.724 -> Connecting
16:05:00.724 -> Wifi Status = 6
16:05:03.701 -> Connecting
16:05:03.701 -> Wifi Status = 1
16:05:06.702 -> Connecting
16:05:06.702 -> Wifi Status = 1
16:05:09.710 -> Connecting
16:05:09.710 -> Wifi Status = 1
</code>
.. and so on …
so i never get the connection to WIFI ?
With a ESP8266 , and another application ASYNC web server ,
i can connect to my WIFI LAN …
<code>
Test PWM rev 22/07/2021
ESP8266_Jaune_Slider_PWM_2021-0723.ino
Led Rouge sur D6 (GPIO 12) pull Down
Init PWM sortie 2 => Pin D4 module Lolin (
Connecting to WiFi..
Connecting to WiFi..
Connecting to WiFi..
Connecting to WiFi..
192.168.0.110
Consigne=186
Consigne=337
Consigne=532
</code>
so i think WIFI SSID and password KEY are OK
i also, tested the api Weather.. with my KEY
using google chrome …it’s works fine ..
i get all data for my city : Lyon FR
a test with WIFISCAN show the Wifi Lan around me
<code>
scan start
scan done
3 networks found
1: ON_AIR2021 (-71)*
2: DIRECT-RB-BRAVIA (-72)*
3: Salon.v (-81)
</code>
What could be the problem ?
https://1drv.ms/u/s!AgSdoVts608TiSV2ZU_Bwp1FuGTI
Hi.
Wi-Fi Status = 6 means WL_DISCONNECTED (when disconnected from a network)
Wi-Fi Status =1 means WL_NO_SSID_AVAIL (when no SSID are available).
I’m not sure what might be causing the issue. What is the ESP32 board that you have? Does it have an external antenna?
Update your ESP32 boards to version 2.0.1.
Go to Tools > Board > Boards Manager, search for ESP32 and check the version.
Let me know if updating the boards solves the issue.
Regards,
Sara
hello, i loaded application ESP32_Wifi_Acces_Point compiled OK, with a board type : (Arduino, tools, ESP32 ….. Doit ESP32 Devkit V1) and i can connect to the defined wifi: ESP32-Acces-Point with key=paulfjujo50 Works fine !
https://1drv.ms/u/s!AgSdoVts608TiSd0Icv0gUk0IAQq
but when i want to use my existing Wifi with the other application :
ESP32_HTTP_GET_OpenWeatherMap
using
my SSID : ON_AIR2021
and my KEY : mode WPA (TKIP+AES)
this key is 63 chars long ..
const char* ssid =”ON_AIR2021″;
const char* password = “cGT>1_@?LOdBqD7kd%s@v|.b6x^4PD|?s}uu*j4o)Uqpa|r1jftH+H>4_oG6}v5″;
i never can connect …
even at less than 3 meter far from my Freebox !
so my question is :
can ESP32 support a Wifi KEY type WPA(TKIP+AES) ?
Hi.
I’m not sure it supports it, or if it depends on the ESP32 board you have.
For example, in the following link, it is mentioned, that the ESP32-S2 no longer supports that: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/wifi-security.html#id1
I’m not sure if it is the same for other boards.
Regards,
Sara
hello,
my board is an ESP32 -vrrom-EP32 ESP32 Devkitv1
and i use the definition board : “Doit ESP32 DEVKIT V1″
i did another test with ESP32_AvancedWebserver
and i can get a connection with my WIFI ( for internet acces) wit SSID= ON_AIR2021 and
my password : mode WPA (TKIP+AES) 63 chars long..
Connection with IP@ 192.168.0.103 ( my WIFI can cover the DNS adresse range 192.168.0.100 .. up to 111.)
This applicatio call an external server ; svg xmlns=\”http://www.w3.org/2000/svg\…
So i think this module is OK to connect to the internet trough my Wifi Lan..
hardcopy:
https://1drv.ms/u/s!AobzXXeAgQ2DccjhdxA9adlGtC8
For the application Test “OpenWheatermap” , i think , i must be able to also use my ON_AIR wifi
to reach the internet ?
else i will have only a local LAN , without any external Web connection …
can you confirm ?
if you test yourself this application ,are you using your SSID+ pasword of your Wifi internet access?
(https://api.openweathermap.org/data/2.5/weather?q=Lyon,fr&appid=b05d……..My Key……..975″
or is the problem due to httpS
in the example directory
// String serverPath = “http://api.openweathermap.org/data/2.5/weather?q=” + city + “,” + countryCode + “&APPID=” + openWeatherMapApiKey;
but now , link is https …
Hi.
I’m currently out of the office and unable to test any projects at the moment.
The problem might be related to the https. You need to use the http link.
Otherwise, I think you need to use the WiFiClientSecure instead if you want to make a request on a https URL.
Regards,
Sara
Hello,
Thank’s for your support…
i added this 3 libraries:
#include <WiFiClientSecure.h>
#include <WebServer.h>
#include <ESPmDNS.h>
and it is working Now , but i don’t know exactly why ?
20:31:17.709 -> ESP32_HTTP_GET_OpenWeatherMap ..
20:31:17.709 -> Version :12-05-2022
20:31:18.834 -> Connecting??
0:31:17.709 -> ESP32_HTTP_GET_OpenWeatherMap ..
20:31:17.709 -> Version :12-05-2022
0:31:21.740 -> Connected to WiFi network with IP Address: 192.168.0.103
20:31:21.740 -> Timer set to 30sec n (timerDelay variable), it will take 30sec before publishing the first reading.
20:31:21.740 -> MAC address: 94:C9:8D:F2:3A:8
20:31:22.725 -> signal strength (RSSI):-63
20:31:43.848 -> HTTP Response code: 200
20:31:43.882 -> {“coord”:{“lon”:5.1953,”lat”:45.9084},”weather”:[{“id”:804,”main”:”Clouds”,”description”:”overcast clouds”,”icon”:”04d”}],”base”:”stations”,”main”:{“temp”:296.57,”feels_like”:297.06,”temp_min”:293.22,”temp_max”:297.09,”pressure”:1019,”humidity”:80,”sea_level”:1019,”grnd_level”:989},”visibility”:10000,”wind”:{“speed”:1.88,”deg”:136,”gust”:3.55},”clouds”:{“all”:100},”dt”:1652380015,”sys”:{“type”:1,”id”:6498,”country”:”FR”,”sunrise”:1652328678,”sunset”:1652381997},”timezone”:7200,”id”:2994094,”name”:”Meximieux”,”cod”:200}
20:31:43.882 -> JSON object = {“coord”:{“lon”:5.1953,”lat”:45.9084},”weather”:[{“id”:804,”main”:”Clouds”,”description”:”overcast clouds”,”icon”:”04d”}],”base”:”stations”,”main”:{“temp”:296.57,”feels_like”:297.06,”temp_min”:293.22,”temp_max”:297.09,”pressure”:1019,”humidity”:80,”sea_level”:1019,”grnd_level”:989},”visibility”:10000,”wind”:{“speed”:1.88,”deg”:136,”gust”:3.55},”clouds”:{“all”:100},”dt”:1652380015,”sys”:{“type”:1,”id”:6498,”country”:”FR”,”sunrise”:1652328678,”sunset”:1652381997},”timezone”:7200,”id”:2994094,”name”:”Meximieux”,”cod”:200}
20:31:43.951 -> Temperature: 296.57
20:31:43.951 -> Pressure: 1019
20:31:43.951 -> Humidity: 80
20:31:43.951 -> Wind Speed: 1.88
20:32:14.046 -> HTTP Response code: 200
20:32:14.046 -> {“coord”:{“lon”:5.1953,”lat”:45.9084},”weather”:[{“id”:804,”main”:”Clouds”,”description”:”overcast clouds”,”icon”:”04d”}],”base”:”stations”,”main”:{“temp”:296.57,”feels_like”:297.06,”temp_min”:293.22,”temp_max”:297.09,”pressure”:1019,”humidity”:80,”sea_level”:1019,”grnd_level”:989},”visibility”:10000,”wind”:{“speed”:1.88,”deg”:136,”gust”:3.55},”clouds”:{“all”:100},”dt”:1652380015,”sys”:{“type”:1,”id”:6498,”country”:”FR”,”sunrise”:1652328678,”sunset”:1652381997},”timezone”:7200,”id”:2994094,”name”:”Meximieux”,”cod”:200}
20:32:14.080 -> JSON object = {“coord”:{“lon”:5.1953,”lat”:45.9084},”weather”:[{“id”:804,”main”:”Clouds”,”description”:”overcast clouds”,”icon”:”04d”}],”base”:”stations”,”main”:{“temp”:296.57,”feels_like”:297.06,”temp_min”:293.22,”temp_max”:297.09,”pressure”:1019,”humidity”:80,”sea_level”:1019,”grnd_level”:989},”visibility”:10000,”wind”:{“speed”:1.88,”deg”:136,”gust”:3.55},”clouds”:{“all”:100},”dt”:1652380015,”sys”:{“type”:1,”id”:6498,”country”:”FR”,”sunrise”:1652328678,”sunset”:1652381997},”timezone”:7200,”id”:2994094,”name”:”Meximieux”,”cod”:200}
20:32:14.148 -> Temperature: 296.57
20:32:14.148 -> Pressure: 1019
20:32:14.148 -> Humidity: 80
20:32:14.148 -> Wind Speed: 1.88
20:32:44.249 -> HTTP Response code: 200
20:32:44.249 -> {“coord”:{“lon”:5.1953,”lat”:45.9084},”weather”:[{“id”:804,”main”:”Clouds”,”description”:”overcast clouds”,”icon”:”04d”}],”base”:”stations”,”main”:{“temp”:296.57,”feels_like”:297.06,”temp_min”:293.22,”temp_max”:297.09,”pressure”:1019,”humidity”:80,”sea_level”:1019,”grnd_level”:989},”visibility”:10000,”wind”:{“speed”:1.88,”deg”:136,”gust”:3.55},”clouds”:{“all”:100},”dt”:1652380015,”sys”:{“type”:1,”id”:6498,”country”:”FR”,”sunrise”:1652328678,”sunset”:1652381997},”timezone”:7200,”id”:2994094,”name”:”Meximieux”,”cod”:200}
20:32:44.296 -> JSON object = {“coord”:{“lon”:5.1953,”lat”:45.9084},”weather”:[{“id”:804,”main”:”Clouds”,”description”:”overcast clouds”,”icon”:”04d”}],”base”:”stations”,”main”:{“temp”:296.57,”feels_like”:297.06,”temp_min”:293.22,”temp_max”:297.09,”pressure”:1019,”humidity”:80,”sea_level”:1019,”grnd_level”:989},”visibility”:10000,”wind”:{“speed”:1.88,”deg”:136,”gust”:3.55},”clouds”:{“all”:100},”dt”:1652380015,”sys”:{“type”:1,”id”:6498,”country”:”FR”,”sunrise”:1652328678,”sunset”:1652381997},”timezone”:7200,”id”:2994094,”name”:”Meximieux”,”cod”:200}
20:32:44.343 -> Temperature: 296.57
20:32:44.343 -> Pressure: 1019
20:32:44.343 -> Humidity: 80
20:32:44.343 -> Wind Speed: 1.88
another problem :
when i push BP Reset ..i loose all
it seems program is erased ?
because i don’t get the starting texte
ESP32_HTTP_GET_OpenWeatherMap
i am obliged to reload the application ..
What’s wrong ?
Hi.
So, with the WiFiClient secure you can get the data, right?
Anout the other problem, I’m not sure I understood your question.Can you better explain?
Isn’t the program starting if you press the board RST button? Is that the problem?
Regards,
Sara
Hello Sara,
Today all is OK ..
When i press Reset .. it restart OK
i don’t know where was the problem …
I added option units=metric to get temperature in °C
…maybe residual warning due to the use of french accentued char like ‘é’
it seem that API doesn’t gives data for “rain” value, maybe due to the free acces (without any charges ( payement)) ? because this items not belong in the request..
The result show the essential collecting datas , on serial terminal
https://1drv.ms/u/s!AobzXXeAgQ2DddvvXdy-3ots5Vw
at the statup of application iget
12:38:21.425 -> ESP32_HTTP_GET_OpenWeatherMap ..
12:38:21.425 -> Version :13-05-2022
12:38:22.539 -> Connecting.
12:38:25.492 -> Connected to WiFi network with IP Address: 192.168.0.103
12:38:25.492 -> Timer set to 30sec n (timerDelay variable), it will take 30sec before publishing the first reading.
12:38:25.492 -> MAC address: 94:C9:8D:F2:3A:8
12:38:26.477 -> signal strength (RSSI):-65
with Languard Network scanner , i can see my PC , and ESP32
https://1drv.ms/u/s!AobzXXeAgQ2DdgUipH1RC0oQAvI
i try to connect to http://192.168.0.103 ..but i get nothing
is it normal .?
maybe i have to add a Web page HTML to show the results ?
main probleme was NORTON … add allowed peripheral ESP32 with fixed adresse 192.168.0.103
=> …OK
so marked as Resolved…