File tree Expand file tree Collapse file tree 4 files changed +40
-25
lines changed Expand file tree Collapse file tree 4 files changed +40
-25
lines changed Original file line number Diff line number Diff line change 1717#define DEFAULT_GW_AP_ADDRESS IPAddress (192 ,168 ,1 ,1 )
1818#define DEFAULT_NM_AP_ADDRESS IPAddress (255 ,255 ,255 ,0 )
1919
20-
2120#define WIFI_FIRMWARE_LATEST_VERSION " 0.4.1"
22- #define WL_MAC_ADDR_LENGTH 6
2321
2422class CAccessPoint {
2523public:
Original file line number Diff line number Diff line change 11#ifndef WIFI_S3_TYPES_H
22#define WIFI_S3_TYPES_H
33
4+ // Maximum size of a SSID
5+ #define WL_SSID_MAX_LENGTH 32
6+ // Length of passphrase. Valid lengths are 8-63.
7+ #define WL_WPA_KEY_MAX_LENGTH 63
8+ // Length of key in bytes. Valid values are 5 and 13.
9+ #define WL_WEP_KEY_MAX_LENGTH 13
10+ // Size of a MAC-address or BSSID
11+ #define WL_MAC_ADDR_LENGTH 6
12+ // Size of a IP4 address
13+ #define WL_IPV4_LENGTH 4
14+
415typedef enum {
5- WL_NO_SHIELD = 255 ,
6- WL_NO_MODULE = WL_NO_SHIELD ,
7- WL_IDLE_STATUS = 0 ,
8- WL_NO_SSID_AVAIL ,
9- WL_SCAN_COMPLETED ,
10- WL_CONNECTED ,
11- WL_CONNECT_FAILED ,
12- WL_CONNECTION_LOST ,
13- WL_DISCONNECTED ,
14- WL_AP_LISTENING ,
15- WL_AP_CONNECTED ,
16- WL_AP_FAILED
16+ WL_NO_SHIELD = 255 ,
17+ WL_NO_MODULE = WL_NO_SHIELD ,
18+ WL_IDLE_STATUS = 0 ,
19+ WL_NO_SSID_AVAIL ,
20+ WL_SCAN_COMPLETED ,
21+ WL_CONNECTED ,
22+ WL_CONNECT_FAILED ,
23+ WL_CONNECTION_LOST ,
24+ WL_DISCONNECTED ,
25+ WL_AP_LISTENING ,
26+ WL_AP_CONNECTED ,
27+ WL_AP_FAILED
1728} wl_status_t ;
1829
1930/* Encryption modes */
@@ -27,15 +38,14 @@ enum wl_enc_type {
2738 ENC_TYPE_WPA3 ,
2839 ENC_TYPE_NONE ,
2940 ENC_TYPE_AUTO ,
30-
3141 ENC_TYPE_UNKNOWN = 255
3242};
3343
3444typedef enum {
35- WL_PING_DEST_UNREACHABLE = -1 ,
36- WL_PING_TIMEOUT = -2 ,
37- WL_PING_UNKNOWN_HOST = -3 ,
38- WL_PING_ERROR = -4
39- } wl_ping_result_t ;
45+ WL_PING_DEST_UNREACHABLE = -1 ,
46+ WL_PING_TIMEOUT = -2 ,
47+ WL_PING_UNKNOWN_HOST = -3 ,
48+ WL_PING_ERROR = -4
49+ }wl_ping_result_t ;
4050
4151#endif
Original file line number Diff line number Diff line change @@ -537,17 +537,17 @@ int CLwipIf::getMacAddress(NetIfType_t type, uint8_t* mac)
537537 MAC.mode = WIFI_MODE_STA;
538538 if (CEspControl::getInstance ().getWifiMacAddress (MAC) == ESP_CONTROL_OK) {
539539 CNetUtilities::macStr2macArray (mac, MAC.mac );
540- rv = MAC_ADDRESS_DIM ;
540+ rv = WL_MAC_ADDR_LENGTH ;
541541 }
542542 } else if (type == NI_WIFI_SOFTAP) {
543543 MAC.mode = WIFI_MODE_AP;
544544 if (CEspControl::getInstance ().getWifiMacAddress (MAC) == ESP_CONTROL_OK) {
545545 CNetUtilities::macStr2macArray (mac, MAC.mac );
546- rv = MAC_ADDRESS_DIM ;
546+ rv = WL_MAC_ADDR_LENGTH ;
547547 }
548548 } else {
549549 eth_get_mac_address (mac);
550- rv = MAC_ADDRESS_DIM ;
550+ rv = WL_MAC_ADDR_LENGTH ;
551551 }
552552
553553 CLwipIf::getInstance ().restartAsyncRequest ();
Original file line number Diff line number Diff line change 3434#endif
3535
3636#define MAX_SOFAT_CONNECTION_DEF 5
37-
38- #define MAC_ADDRESS_DIM 6
3937#define NETWORK_INTERFACES_MAX_NUM 3
4038#define MAX_HOSTNAME_DIM 253
4139
4240#define WIFI_INIT_TIMEOUT_MS 10000
4341
42+ // Maximum size of a SSID
43+ #define WL_SSID_MAX_LENGTH 32
44+ // Length of passphrase. Valid lengths are 8-63.
45+ #define WL_WPA_KEY_MAX_LENGTH 63
46+ // Length of key in bytes. Valid values are 5 and 13.
47+ #define WL_WEP_KEY_MAX_LENGTH 13
48+ // Size of a MAC-address or BSSID
4449#define WL_MAC_ADDR_LENGTH 6
50+ // Size of a IP4 address
51+ #define WL_IPV4_LENGTH 4
4552
4653/* DEFAULT ADDRESS FOR ETHERNET CONFIGURATION */
4754
You can’t perform that action at this time.
0 commit comments