Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
WiFiS3: add missing WL*_LENGTH definitions
  • Loading branch information
pennam committed Feb 19, 2025
commit 1b67e53bbeef7af023706594d2ee83b3eb3d0645
2 changes: 0 additions & 2 deletions libraries/WiFiS3/src/WiFi.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
#define DEFAULT_GW_AP_ADDRESS IPAddress(192,168,1,1)
#define DEFAULT_NM_AP_ADDRESS IPAddress(255,255,255,0)


#define WIFI_FIRMWARE_LATEST_VERSION "0.4.1"
#define WL_MAC_ADDR_LENGTH 6

class CAccessPoint {
public:
Expand Down
46 changes: 28 additions & 18 deletions libraries/WiFiS3/src/WiFiTypes.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
#ifndef WIFI_S3_TYPES_H
#define WIFI_S3_TYPES_H

// 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

typedef enum {
WL_NO_SHIELD = 255,
WL_NO_MODULE = WL_NO_SHIELD,
WL_IDLE_STATUS = 0,
WL_NO_SSID_AVAIL,
WL_SCAN_COMPLETED,
WL_CONNECTED,
WL_CONNECT_FAILED,
WL_CONNECTION_LOST,
WL_DISCONNECTED,
WL_AP_LISTENING,
WL_AP_CONNECTED,
WL_AP_FAILED
WL_NO_SHIELD = 255,
WL_NO_MODULE = WL_NO_SHIELD,
WL_IDLE_STATUS = 0,
WL_NO_SSID_AVAIL,
WL_SCAN_COMPLETED,
WL_CONNECTED,
WL_CONNECT_FAILED,
WL_CONNECTION_LOST,
WL_DISCONNECTED,
WL_AP_LISTENING,
WL_AP_CONNECTED,
WL_AP_FAILED
} wl_status_t;

/* Encryption modes */
Expand All @@ -27,15 +38,14 @@ enum wl_enc_type {
ENC_TYPE_WPA3,
ENC_TYPE_NONE,
ENC_TYPE_AUTO,

ENC_TYPE_UNKNOWN = 255
};

typedef enum {
WL_PING_DEST_UNREACHABLE = -1,
WL_PING_TIMEOUT = -2,
WL_PING_UNKNOWN_HOST = -3,
WL_PING_ERROR = -4
} wl_ping_result_t;
WL_PING_DEST_UNREACHABLE = -1,
WL_PING_TIMEOUT = -2,
WL_PING_UNKNOWN_HOST = -3,
WL_PING_ERROR = -4
}wl_ping_result_t;

#endif