File tree 4 files changed +40
-25
lines changed
4 files changed +40
-25
lines changed Original file line number Diff line number Diff line change 17
17
#define DEFAULT_GW_AP_ADDRESS IPAddress (192 ,168 ,1 ,1 )
18
18
#define DEFAULT_NM_AP_ADDRESS IPAddress (255 ,255 ,255 ,0 )
19
19
20
-
21
20
#define WIFI_FIRMWARE_LATEST_VERSION " 0.4.1"
22
- #define WL_MAC_ADDR_LENGTH 6
23
21
24
22
class CAccessPoint {
25
23
public:
Original file line number Diff line number Diff line change 1
1
#ifndef WIFI_S3_TYPES_H
2
2
#define WIFI_S3_TYPES_H
3
3
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
+
4
15
typedef 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
17
28
} wl_status_t ;
18
29
19
30
/* Encryption modes */
@@ -27,15 +38,14 @@ enum wl_enc_type {
27
38
ENC_TYPE_WPA3 ,
28
39
ENC_TYPE_NONE ,
29
40
ENC_TYPE_AUTO ,
30
-
31
41
ENC_TYPE_UNKNOWN = 255
32
42
};
33
43
34
44
typedef 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 ;
40
50
41
51
#endif
Original file line number Diff line number Diff line change @@ -537,17 +537,17 @@ int CLwipIf::getMacAddress(NetIfType_t type, uint8_t* mac)
537
537
MAC.mode = WIFI_MODE_STA;
538
538
if (CEspControl::getInstance ().getWifiMacAddress (MAC) == ESP_CONTROL_OK) {
539
539
CNetUtilities::macStr2macArray (mac, MAC.mac );
540
- rv = MAC_ADDRESS_DIM ;
540
+ rv = WL_MAC_ADDR_LENGTH ;
541
541
}
542
542
} else if (type == NI_WIFI_SOFTAP) {
543
543
MAC.mode = WIFI_MODE_AP;
544
544
if (CEspControl::getInstance ().getWifiMacAddress (MAC) == ESP_CONTROL_OK) {
545
545
CNetUtilities::macStr2macArray (mac, MAC.mac );
546
- rv = MAC_ADDRESS_DIM ;
546
+ rv = WL_MAC_ADDR_LENGTH ;
547
547
}
548
548
} else {
549
549
eth_get_mac_address (mac);
550
- rv = MAC_ADDRESS_DIM ;
550
+ rv = WL_MAC_ADDR_LENGTH ;
551
551
}
552
552
553
553
CLwipIf::getInstance ().restartAsyncRequest ();
Original file line number Diff line number Diff line change 34
34
#endif
35
35
36
36
#define MAX_SOFAT_CONNECTION_DEF 5
37
-
38
- #define MAC_ADDRESS_DIM 6
39
37
#define NETWORK_INTERFACES_MAX_NUM 3
40
38
#define MAX_HOSTNAME_DIM 253
41
39
42
40
#define WIFI_INIT_TIMEOUT_MS 10000
43
41
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
44
49
#define WL_MAC_ADDR_LENGTH 6
50
+ // Size of a IP4 address
51
+ #define WL_IPV4_LENGTH 4
45
52
46
53
/* DEFAULT ADDRESS FOR ETHERNET CONFIGURATION */
47
54
You can’t perform that action at this time.
0 commit comments