Skip to content

Commit

Permalink
IDF release/v5.1 (#8758)
Browse files Browse the repository at this point in the history
* IDF release/v5.1 6b1f40b9bf

* Fix WPA2 examples

* Fix typo
  • Loading branch information
me-no-dev authored Oct 12, 2023
1 parent 40a39a3 commit f3b5994
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
/*|----------------------------------------------------------|*/
#include <WiFi.h>
#include <HTTPClient.h>
#if __has_include ("esp_eap_client.h")
#include "esp_eap_client.h"
#else
#include "esp_wpa2.h"
#endif
#include <Wire.h>
#define EAP_IDENTITY "identity" //if connecting from another corporation, use identity@organisation.domain in Eduroam
#define EAP_PASSWORD "password" //your Eduroam password
Expand Down Expand Up @@ -42,10 +46,17 @@ void setup() {
Serial.println(ssid);
WiFi.disconnect(true); //disconnect form wifi to set new wifi connection
WiFi.mode(WIFI_STA); //init wifi mode
#if __has_include ("esp_eap_client.h")
esp_eap_client_set_identity((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide identity
esp_eap_client_set_username((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide username
esp_eap_client_set_password((uint8_t *)EAP_PASSWORD, strlen(EAP_PASSWORD)); //provide password
esp_wifi_sta_enterprise_enable();
#else
esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide identity
esp_wifi_sta_wpa2_ent_set_username((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide username --> identity and username is same
esp_wifi_sta_wpa2_ent_set_password((uint8_t *)EAP_PASSWORD, strlen(EAP_PASSWORD)); //provide password
esp_wifi_sta_wpa2_ent_enable();
#endif
WiFi.begin(ssid); //connect to wifi
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <WiFi.h> //Wifi library
#include "esp_wpa2.h" //wpa2 library for connections to Enterprise networks
#define EAP_IDENTITY "login" //if connecting from another corporation, use identity@organisation.domain in Eduroam
#define EAP_USERNAME "login" //oftentimes just a repeat of the identity
#define EAP_PASSWORD "password" //your Eduroam password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

#include <WiFi.h>
#include <WiFiClientSecure.h>
#if __has_include ("esp_eap_client.h")
#include "esp_eap_client.h"
#else
#include "esp_wpa2.h"
#endif
#include <Wire.h>
#define EAP_ANONYMOUS_IDENTITY "anonymous@example.com" //anonymous identity
#define EAP_IDENTITY "id@example.com" //user identity
Expand Down Expand Up @@ -64,10 +68,17 @@ void setup() {
Serial.println(ssid);
WiFi.disconnect(true); //disconnect form wifi to set new wifi connection
WiFi.mode(WIFI_STA); //init wifi mode
#if __has_include ("esp_eap_client.h")
esp_eap_client_set_identity((uint8_t *)EAP_ANONYMOUS_IDENTITY, strlen(EAP_ANONYMOUS_IDENTITY)); //provide identity
esp_eap_client_set_username((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide username
esp_eap_client_set_password((uint8_t *)EAP_PASSWORD, strlen(EAP_PASSWORD)); //provide password
esp_wifi_sta_enterprise_enable();
#else
esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)EAP_ANONYMOUS_IDENTITY, strlen(EAP_ANONYMOUS_IDENTITY)); //provide identity
esp_wifi_sta_wpa2_ent_set_username((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide username
esp_wifi_sta_wpa2_ent_set_password((uint8_t *)EAP_PASSWORD, strlen(EAP_PASSWORD)); //provide password
esp_wifi_sta_wpa2_ent_enable();
#endif
WiFi.begin(ssid); //connect to wifi
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Expand Down
68 changes: 34 additions & 34 deletions package/package_esp32_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{
"packager": "esp32",
"name": "esp32-arduino-libs",
"version": "idf-release_v5.1-f0437b945f"
"version": "idf-release_v5.1-6b1f40b9bf"
},
{
"packager": "esp32",
Expand Down Expand Up @@ -97,63 +97,63 @@
"tools": [
{
"name": "esp32-arduino-libs",
"version": "idf-release_v5.1-f0437b945f",
"version": "idf-release_v5.1-6b1f40b9bf",
"systems": [
{
"host": "i686-mingw32",
"url": "https://github.com/espressif/esp32-arduino-libs/releases/download/0.0.0-alpha/esp32-arduino-libs-0.0.0-alpha.zip",
"archiveFileName": "esp32-arduino-libs-0.0.0-alpha.zip",
"checksum": "SHA-256:096aa276bfe07375f1701f84d05039cb439f48ba1a607676fe27d2807037389a",
"size": "333176544"
"url": "https://codeload.github.com/espressif/esp32-arduino-libs/zip/91077b905f50a66c4ecfae2fd5070530c932e97f",
"archiveFileName": "esp32-arduino-libs-91077b905f50a66c4ecfae2fd5070530c932e97f.zip",
"checksum": "SHA-256:7862c881730df293d129a34994c8f0416276c5aa22df01df6f6b9a5ba11b7dd4",
"size": "361692919"
},
{
"host": "x86_64-mingw32",
"url": "https://github.com/espressif/esp32-arduino-libs/releases/download/0.0.0-alpha/esp32-arduino-libs-0.0.0-alpha.zip",
"archiveFileName": "esp32-arduino-libs-0.0.0-alpha.zip",
"checksum": "SHA-256:096aa276bfe07375f1701f84d05039cb439f48ba1a607676fe27d2807037389a",
"size": "333176544"
"url": "https://codeload.github.com/espressif/esp32-arduino-libs/zip/91077b905f50a66c4ecfae2fd5070530c932e97f",
"archiveFileName": "esp32-arduino-libs-91077b905f50a66c4ecfae2fd5070530c932e97f.zip",
"checksum": "SHA-256:7862c881730df293d129a34994c8f0416276c5aa22df01df6f6b9a5ba11b7dd4",
"size": "361692919"
},
{
"host": "arm64-apple-darwin",
"url": "https://github.com/espressif/esp32-arduino-libs/releases/download/0.0.0-alpha/esp32-arduino-libs-0.0.0-alpha.zip",
"archiveFileName": "esp32-arduino-libs-0.0.0-alpha.zip",
"checksum": "SHA-256:096aa276bfe07375f1701f84d05039cb439f48ba1a607676fe27d2807037389a",
"size": "333176544"
"url": "https://codeload.github.com/espressif/esp32-arduino-libs/zip/91077b905f50a66c4ecfae2fd5070530c932e97f",
"archiveFileName": "esp32-arduino-libs-91077b905f50a66c4ecfae2fd5070530c932e97f.zip",
"checksum": "SHA-256:7862c881730df293d129a34994c8f0416276c5aa22df01df6f6b9a5ba11b7dd4",
"size": "361692919"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/espressif/esp32-arduino-libs/releases/download/0.0.0-alpha/esp32-arduino-libs-0.0.0-alpha.zip",
"archiveFileName": "esp32-arduino-libs-0.0.0-alpha.zip",
"checksum": "SHA-256:096aa276bfe07375f1701f84d05039cb439f48ba1a607676fe27d2807037389a",
"size": "333176544"
"url": "https://codeload.github.com/espressif/esp32-arduino-libs/zip/91077b905f50a66c4ecfae2fd5070530c932e97f",
"archiveFileName": "esp32-arduino-libs-91077b905f50a66c4ecfae2fd5070530c932e97f.zip",
"checksum": "SHA-256:7862c881730df293d129a34994c8f0416276c5aa22df01df6f6b9a5ba11b7dd4",
"size": "361692919"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/espressif/esp32-arduino-libs/releases/download/0.0.0-alpha/esp32-arduino-libs-0.0.0-alpha.zip",
"archiveFileName": "esp32-arduino-libs-0.0.0-alpha.zip",
"checksum": "SHA-256:096aa276bfe07375f1701f84d05039cb439f48ba1a607676fe27d2807037389a",
"size": "333176544"
"url": "https://codeload.github.com/espressif/esp32-arduino-libs/zip/91077b905f50a66c4ecfae2fd5070530c932e97f",
"archiveFileName": "esp32-arduino-libs-91077b905f50a66c4ecfae2fd5070530c932e97f.zip",
"checksum": "SHA-256:7862c881730df293d129a34994c8f0416276c5aa22df01df6f6b9a5ba11b7dd4",
"size": "361692919"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/espressif/esp32-arduino-libs/releases/download/0.0.0-alpha/esp32-arduino-libs-0.0.0-alpha.zip",
"archiveFileName": "esp32-arduino-libs-0.0.0-alpha.zip",
"checksum": "SHA-256:096aa276bfe07375f1701f84d05039cb439f48ba1a607676fe27d2807037389a",
"size": "333176544"
"url": "https://codeload.github.com/espressif/esp32-arduino-libs/zip/91077b905f50a66c4ecfae2fd5070530c932e97f",
"archiveFileName": "esp32-arduino-libs-91077b905f50a66c4ecfae2fd5070530c932e97f.zip",
"checksum": "SHA-256:7862c881730df293d129a34994c8f0416276c5aa22df01df6f6b9a5ba11b7dd4",
"size": "361692919"
},
{
"host": "aarch64-linux-gnu",
"url": "https://github.com/espressif/esp32-arduino-libs/releases/download/0.0.0-alpha/esp32-arduino-libs-0.0.0-alpha.zip",
"archiveFileName": "esp32-arduino-libs-0.0.0-alpha.zip",
"checksum": "SHA-256:096aa276bfe07375f1701f84d05039cb439f48ba1a607676fe27d2807037389a",
"size": "333176544"
"url": "https://codeload.github.com/espressif/esp32-arduino-libs/zip/91077b905f50a66c4ecfae2fd5070530c932e97f",
"archiveFileName": "esp32-arduino-libs-91077b905f50a66c4ecfae2fd5070530c932e97f.zip",
"checksum": "SHA-256:7862c881730df293d129a34994c8f0416276c5aa22df01df6f6b9a5ba11b7dd4",
"size": "361692919"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://github.com/espressif/esp32-arduino-libs/releases/download/0.0.0-alpha/esp32-arduino-libs-0.0.0-alpha.zip",
"archiveFileName": "esp32-arduino-libs-0.0.0-alpha.zip",
"checksum": "SHA-256:096aa276bfe07375f1701f84d05039cb439f48ba1a607676fe27d2807037389a",
"size": "333176544"
"url": "https://codeload.github.com/espressif/esp32-arduino-libs/zip/91077b905f50a66c4ecfae2fd5070530c932e97f",
"archiveFileName": "esp32-arduino-libs-91077b905f50a66c4ecfae2fd5070530c932e97f.zip",
"checksum": "SHA-256:7862c881730df293d129a34994c8f0416276c5aa22df01df6f6b9a5ba11b7dd4",
"size": "361692919"
}
]
},
Expand Down

0 comments on commit f3b5994

Please sign in to comment.