Skip to content

Commit a53cc61

Browse files
committed
fix(wifi): Fix requirements and guards for Wi-Fi in ESP32-P4
1 parent c009220 commit a53cc61

File tree

13 files changed

+42
-24
lines changed

13 files changed

+42
-24
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}

libraries/ESP_NOW/src/ESP32_NOW.h

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
#include "esp_now.h"
66
#include "esp32-hal-log.h"
77
#include "esp_mac.h"
8+
#include "sdkconfig.h"
9+
10+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
11+
#error "ESP-NOW is only supported in SoCs with native Wi-Fi support"
12+
#endif
813

914
class ESP_NOW_Peer; //forward declaration for friend function
1015

libraries/HTTPClient/examples/HTTPClientEnterprise/HTTPClientEnterprise.ino

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
/*|TESTED BOARDS: Devkit v1 DOIT, Devkitc v4 |*/
44
/*|CORE: June 2018 |*/
55
/*|----------------------------------------------------------|*/
6+
7+
#include "sdkconfig.h"
8+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
9+
#error "WPA-Enterprise is only supported in SoCs with native Wi-Fi support"
10+
#endif
11+
612
#include <WiFi.h>
713
#include <HTTPClient.h>
814
#if __has_include("esp_eap_client.h")
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"fqbn_append": "PartitionScheme=huge_app",
3-
"requires_any": [
4-
"CONFIG_SOC_WIFI_SUPPORTED=y",
5-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
3+
"requires": [
4+
"CONFIG_SOC_WIFI_SUPPORTED=y"
65
]
76
}

libraries/NetworkClientSecure/examples/WiFiClientSecureEnterprise/WiFiClientSecureEnterprise.ino

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
// Note: this example is outdated and may not work!
1414
// For more examples see https://github.com/martinius96/ESP32-eduroam
1515

16+
#include "sdkconfig.h"
17+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
18+
#error "WPA-Enterprise is only supported in SoCs with native Wi-Fi support"
19+
#endif
20+
1621
#include <WiFi.h>
1722
#include <NetworkClientSecure.h>
1823
#if __has_include("esp_eap_client.h")
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"fqbn_append": "PartitionScheme=huge_app",
3-
"requires_any": [
4-
"CONFIG_SOC_WIFI_SUPPORTED=y",
5-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
3+
"requires": [
4+
"CONFIG_SOC_WIFI_SUPPORTED=y"
65
]
76
}

libraries/WiFi/examples/WPS/WPS.ino

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ Author:
1414
Pranav Cherukupalli <[email protected]>
1515
*/
1616

17+
#include "sdkconfig.h"
18+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
19+
#error "WPS is only supported in SoCs with native Wi-Fi support"
20+
#endif
21+
1722
#include "WiFi.h"
1823
#include "esp_wps.h"
1924
/*

libraries/WiFi/examples/WPS/ci.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}

libraries/WiFi/examples/WiFiSmartConfig/WiFiSmartConfig.ino

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#include "sdkconfig.h"
2+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
3+
#error "SmartConfig is only supported in SoCs with native Wi-Fi support"
4+
#endif
5+
16
#include "WiFi.h"
27

38
void setup() {
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}

0 commit comments

Comments
 (0)