Skip to content

WiFiS3 and WiFIC3 Add wl definitions #439

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

Merged
merged 4 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WiFiC3: add missing WL*_LENGTH definitions
  • Loading branch information
pennam committed Feb 19, 2025
commit 3581fc2471091e2f928caebbcd784be8bacb8b23
6 changes: 3 additions & 3 deletions libraries/lwIpWrapper/src/CNetIf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,17 +537,17 @@ int CLwipIf::getMacAddress(NetIfType_t type, uint8_t* mac)
MAC.mode = WIFI_MODE_STA;
if (CEspControl::getInstance().getWifiMacAddress(MAC) == ESP_CONTROL_OK) {
CNetUtilities::macStr2macArray(mac, MAC.mac);
rv = MAC_ADDRESS_DIM;
rv = WL_MAC_ADDR_LENGTH;
}
} else if (type == NI_WIFI_SOFTAP) {
MAC.mode = WIFI_MODE_AP;
if (CEspControl::getInstance().getWifiMacAddress(MAC) == ESP_CONTROL_OK) {
CNetUtilities::macStr2macArray(mac, MAC.mac);
rv = MAC_ADDRESS_DIM;
rv = WL_MAC_ADDR_LENGTH;
}
} else {
eth_get_mac_address(mac);
rv = MAC_ADDRESS_DIM;
rv = WL_MAC_ADDR_LENGTH;
}

CLwipIf::getInstance().restartAsyncRequest();
Expand Down
11 changes: 9 additions & 2 deletions libraries/lwIpWrapper/src/CNetIf.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,21 @@
#endif

#define MAX_SOFAT_CONNECTION_DEF 5

#define MAC_ADDRESS_DIM 6
#define NETWORK_INTERFACES_MAX_NUM 3
#define MAX_HOSTNAME_DIM 253

#define WIFI_INIT_TIMEOUT_MS 10000

// Maximum size of a SSID
#define WL_SSID_MAX_LENGTH 32
// Length of passphrase. Valid lengths are 8-63.
#define WL_WPA_KEY_MAX_LENGTH 63
// Length of key in bytes. Valid values are 5 and 13.
#define WL_WEP_KEY_MAX_LENGTH 13
// Size of a MAC-address or BSSID
#define WL_MAC_ADDR_LENGTH 6
// Size of a MAC-address or BSSID
#define WL_IPV4_LENGTH 4

/* DEFAULT ADDRESS FOR ETHERNET CONFIGURATION */

Expand Down