Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Defines

    Specifies the macros and defines used by the Wlan APIs.

Macros

#define M2M_802_1X_MSCHAP2_FLAG   0x01
 
#define M2M_802_1X_PREPEND_DOMAIN_FLAG   0x40
 
#define M2M_802_1X_TLS_CLIENT_CERTIFICATE   1
 
#define M2M_802_1X_TLS_FLAG   0x02
 
#define M2M_802_1X_UNENCRYPTED_USERNAME_FLAG   0x80
 
#define M2M_AP_CMD_BASE   70
 
#define M2M_ASSOC_FAIL   ((uint8)4)
 
#define M2M_AUTH_1X_CERT_LEN_MAX   1584
 
#define M2M_AUTH_1X_PASSWORD_LEN_MAX   256
 
#define M2M_AUTH_1X_PRIVATEKEY_LEN_MAX   256
 
#define M2M_AUTH_1X_USER_LEN_MAX   100
 
#define M2M_AUTH_FAIL   ((uint8)3)
 
#define M2M_BUFFER_MAX_SIZE   (1600UL - 4)
 
#define M2M_CONFIG_CMD_BASE   1
 
#define M2M_CRED_ENCRYPT_FLAG   0x02
 
#define M2M_CRED_IS_ENCRYPTED_FLAG   0x20
 
#define M2M_CRED_IS_STORED_FLAG   0x10
 
#define M2M_CRED_STORE_FLAG   0x01
 
#define M2M_CUST_IE_LEN_MAX   252
 
#define M2M_DEVICE_NAME_MAX   48
 
#define M2M_ETHERNET_HDR_LEN   14
 
#define M2M_ETHERNET_HDR_OFFSET   34
 
#define M2M_FASTCONNECT_DEFAULT_RSSI_THRESH   (-45)
 
#define M2M_GEN_CMD_BASE   105
 
#define M2M_JOIN_FAIL   ((uint8)2)
 
#define M2M_LISTEN_INTERVAL   1
 
#define M2M_MAC_ADDRES_LEN   6
 
#define M2M_MAX_GRP_NUM_REQ   (127)
 
#define M2M_MAX_PSK_LEN   65
 
#define M2M_MAX_SSID_LEN   33
 
#define M2M_MIN_PSK_LEN   9
 
#define M2M_NTP_MAX_SERVER_NAME_LENGTH   32
 
#define M2M_OTA_CMD_BASE   100
 
#define M2M_SCAN_DEFAULT_NUM_PROBE   (2)
 
#define M2M_SCAN_DEFAULT_NUM_SLOTS   (2)
 
#define M2M_SCAN_DEFAULT_PASSIVE_SLOT_TIME   (300)
 
#define M2M_SCAN_DEFAULT_SLOT_TIME   (20)
 
#define M2M_SCAN_ERR_AP   ((sint8)-4)
 
#define M2M_SCAN_ERR_IP   ((sint8)-3)
 
#define M2M_SCAN_ERR_P2P   ((sint8)-5)
 
#define M2M_SCAN_ERR_WIFI   ((sint8)-2)
 
#define M2M_SCAN_ERR_WPS   ((sint8)-6)
 
#define M2M_SCAN_FAIL   ((uint8)1)
 
#define M2M_SERVER_CMD_BASE   100
 
#define M2M_STA_CMD_BASE   40
 
#define M2M_WIFI_CONN_BSSID_FLAG   0x01
 
#define M2M_WIFI_FRAME_SUB_TYPE_ANY   0xFF
 
#define M2M_WIFI_FRAME_TYPE_ANY   0xFF
 
#define MAX_HIDDEN_SITES   4
 
#define PSK_CALC_LEN   40
 
#define TLS_FILE_NAME_MAX   48
 
#define TLS_SRV_SEC_MAX_FILES   8
 
#define TLS_SRV_SEC_START_PATTERN_LEN   8
 
#define WEP_104_KEY_SIZE   ((uint8)13)
 
#define WEP_104_KEY_STRING_SIZE   ((uint8)26)
 
#define WEP_40_KEY_SIZE   ((uint8)5)
 
#define WEP_40_KEY_STRING_SIZE   ((uint8)10)
 
#define WEP_KEY_MAX_INDEX   ((uint8)4)
 

#define M2M_802_1X_MSCHAP2_FLAG   0x01

Flag to indicate 802.1x MsChapV2 credentials: domain/user-name/password.

Referenced by m2m_wifi_connect_1x_mschap2().

#define M2M_802_1X_PREPEND_DOMAIN_FLAG   0x40

Flag to indicate that the 802.1x domain name should be prepended to the user-name: "Domain\Username". If the flag is not set then domain name is appended to the user-name: "Username@Domain". (Note that the '@' or '\' must be included in the domain name.)

Referenced by m2m_wifi_connect_1x_mschap2(), and m2m_wifi_connect_1x_tls().

#define M2M_802_1X_TLS_CLIENT_CERTIFICATE   1

Info type used in tstrM2mWifiAuthInfoHdr to indicate Enterprise TLS client certificate.

Referenced by m2m_wifi_connect_1x_tls().

#define M2M_802_1X_TLS_FLAG   0x02

Flag to indicate 802.1x TLS credentials: domain/user-name/private-key/certificate.

Referenced by m2m_wifi_connect_1x_tls().

#define M2M_802_1X_UNENCRYPTED_USERNAME_FLAG   0x80

Flag to indicate that the 802.1x user-name should be sent (unencrypted) in the initial EAP identity response. Intended for use with EAP-TLS only.

Referenced by m2m_wifi_connect_1x_mschap2(), and m2m_wifi_connect_1x_tls().

#define M2M_AP_CMD_BASE   70

The base value of all the Access Point mode host commands opcodes.

#define M2M_ASSOC_FAIL   ((uint8)4)

Indicates the WINC board has failed to associate with the AP.

#define M2M_AUTH_1X_CERT_LEN_MAX   1584

The maximum length (in bytes) of certificate for authentication with Enterprise TLS methods.

Referenced by m2m_wifi_connect_1x_tls().

#define M2M_AUTH_1X_PASSWORD_LEN_MAX   256

The maximum length (in ASCII characters) of password for authentication with Enterprise MSCHAPv2 methods.

Referenced by m2m_wifi_connect_1x_mschap2().

#define M2M_AUTH_1X_PRIVATEKEY_LEN_MAX   256

The maximum length (in bytes) of private key modulus for authentication with Enterprise TLS methods. Private key exponent must be the same length as modulus, pre-padded with 0s if necessary.

Referenced by m2m_wifi_connect_1x_tls().

#define M2M_AUTH_1X_USER_LEN_MAX   100

The maximum length (in ASCII characters) of domain name + username (including '@' or '\') for authentication with Enterprise methods.

Referenced by m2m_wifi_connect_1x_mschap2(), and m2m_wifi_connect_1x_tls().

#define M2M_AUTH_FAIL   ((uint8)3)

Indicates the WINC board has failed to authenticate with the AP.

#define M2M_BUFFER_MAX_SIZE   (1600UL - 4)

Maximum size for the shared packet buffer.

Referenced by m2m_wifi_prng_get_random_bytes().

#define M2M_CONFIG_CMD_BASE   1

The base value of all the Host configuration commands opcodes.

#define M2M_CRED_ENCRYPT_FLAG   0x02

Flag used in tstrM2mConnCredHdr to indicate that Wi-Fi connection credentials should be encrypted when stored in WINC flash.

Referenced by legacy_connect_prepare_msg(), and m2m_wifi_connect_prepare_msg().

#define M2M_CRED_IS_ENCRYPTED_FLAG   0x20

Flag used in tstrM2mConnCredHdr to indicate that Wi-Fi connection credentials are encrypted in WINC flash. May only be set by WINC firmware.

#define M2M_CRED_IS_STORED_FLAG   0x10

Flag used in tstrM2mConnCredHdr to indicate that Wi-Fi connection credentials are stored in WINC flash. May only be set by WINC firmware.

#define M2M_CRED_STORE_FLAG   0x01

Flag used in tstrM2mConnCredHdr to indicate that Wi-Fi connection credentials should be stored in WINC flash.

Referenced by legacy_connect_prepare_msg(), and m2m_wifi_connect_prepare_msg().

#define M2M_CUST_IE_LEN_MAX   252

The maximum size of IE (Information Element).

#define M2M_DEVICE_NAME_MAX   48

Maximum Size for the device name including the NULL termination.

Referenced by m2m_wifi_set_device_name().

#define M2M_ETHERNET_HDR_LEN   14

Length of the Ethernet header in bytes.

Referenced by m2m_wifi_send_ethernet_pkt().

#define M2M_ETHERNET_HDR_OFFSET   34

The offset of the Ethernet header within the WLAN Tx Buffer.

Referenced by m2m_wifi_send_ethernet_pkt().

#define M2M_FASTCONNECT_DEFAULT_RSSI_THRESH   (-45)

The default threshold RSSI for fast reconnection to an AP.

#define M2M_GEN_CMD_BASE   105

The base value of additional host wifi command opcodes. Usage restrictions (eg STA mode only) should always be made clear at the API layer in any case.

#define M2M_JOIN_FAIL   ((uint8)2)

Indicates the WINC board has failed to join the BSS.

#define M2M_LISTEN_INTERVAL   1

The STA uses the Listen Interval parameter to indicate to the AP how many beacon intervals it shall sleep before it retrieves the queued frames from the AP.

Referenced by app_wifi_init().

#define M2M_MAC_ADDRES_LEN   6

The size of the 802 MAC address.

Referenced by m2m_wifi_connect_prepare_msg().

#define M2M_MAX_GRP_NUM_REQ   (127)

max number of request in one group equal to 127 as the last bit reserved for config or data pkt

#define M2M_MAX_PSK_LEN   65

1 more than the WPA PSK length (in ASCII format). This matches the size of the WPA PSK/Passphrase buffer (max ASCII contents + 1-byte length field). Alternatively it matches the WPA PSK length (in ASCII format) + 1 byte NULL termination.

Referenced by m2m_wifi_connect_psk(), and m2m_wifi_connect_sc().

#define M2M_MAX_SSID_LEN   33

1 more than the max SSID length. This matches the size of SSID buffers (max SSID length + 1-byte length field).

Referenced by m2m_validate_ap_parameters(), m2m_wifi_connect_prepare_msg(), m2m_wifi_connect_sc(), m2m_wifi_delete_sc(), and m2m_wifi_request_scan_ssid_list().

#define M2M_MIN_PSK_LEN   9

1 more than the minimum WPA PSK Passphrase length. It matches the minimum WPA PSK Passphrase length + 1 byte NULL termination.

#define M2M_NTP_MAX_SERVER_NAME_LENGTH   32

Maximum NTP server name length

Referenced by m2m_wifi_configure_sntp().

#define M2M_OTA_CMD_BASE   100

The base value of all the OTA mode host commands opcodes. The OTA messages have their own group so op codes can extended from 1 to M2M_MAX_GRP_NUM_REQ.

#define M2M_SCAN_DEFAULT_NUM_PROBE   (2)

The default number of probes per slot.

Referenced by m2m_validate_scan_options().

#define M2M_SCAN_DEFAULT_NUM_SLOTS   (2)

The default number of scan slots used by the WINC board.

#define M2M_SCAN_DEFAULT_PASSIVE_SLOT_TIME   (300)

The passive scan slot default duration in ms.

#define M2M_SCAN_DEFAULT_SLOT_TIME   (20)

The active scan slot default duration in ms.

#define M2M_SCAN_ERR_AP   ((sint8)-4)

Currently not used.

#define M2M_SCAN_ERR_IP   ((sint8)-3)

Currently not used.

#define M2M_SCAN_ERR_P2P   ((sint8)-5)

Currently not used.

#define M2M_SCAN_ERR_WIFI   ((sint8)-2)

Currently not used.

#define M2M_SCAN_ERR_WPS   ((sint8)-6)

Currently not used.

#define M2M_SCAN_FAIL   ((uint8)1)

Indicates the WINC board has failed to perform the scan operation.

#define M2M_SERVER_CMD_BASE   100

The base value of all the Power Save mode host commands codes.

#define M2M_STA_CMD_BASE   40

The base value of all the Station mode host commands opcodes.

#define M2M_WIFI_CONN_BSSID_FLAG   0x01

Flag used in tstrM2mConnCredCmn to indicate that Wi-Fi connection must be restricted to an AP with a certain BSSID.

Referenced by legacy_connect_prepare_msg(), and m2m_wifi_connect_prepare_msg().

#define M2M_WIFI_FRAME_SUB_TYPE_ANY   0xFF

Receive frames with any sub type when configured as Monitor Mode.

#define M2M_WIFI_FRAME_TYPE_ANY   0xFF

Receive any frame type when configured as Monitor Mode.

#define MAX_HIDDEN_SITES   4

max number of hidden SSID supported by scan request

Referenced by m2m_wifi_request_scan_ssid_list().

#define PSK_CALC_LEN   40

PSK is 32 bytes generated either:

  • from 64 ASCII characters
  • by SHA1 operations on up to 63 ASCII characters 40 byte array is required during SHA1 operations, so we define PSK_CALC_LEN as 40.
#define TLS_FILE_NAME_MAX   48

Maximum length for each TLS certificate file name.

#define TLS_SRV_SEC_MAX_FILES   8

Maximum number of certificates allowed in TLS_SRV section.

#define TLS_SRV_SEC_START_PATTERN_LEN   8

Length of certificate struct start pattern.

#define WEP_104_KEY_SIZE   ((uint8)13)

The size in bytes of a 104-bit wep key.

#define WEP_104_KEY_STRING_SIZE   ((uint8)26)

The string length of a 104-bit wep key.

Referenced by m2m_validate_ap_parameters(), m2m_wifi_connect_wep(), and retrieve_credentials().

#define WEP_40_KEY_SIZE   ((uint8)5)

The size in bytes of a 40-bit wep key.

#define WEP_40_KEY_STRING_SIZE   ((uint8)10)

The string length of a 40-bit wep key.

Referenced by m2m_validate_ap_parameters(), m2m_wifi_connect_wep(), and retrieve_credentials().

#define WEP_KEY_MAX_INDEX   ((uint8)4)

WEP key index is in the range 1 to 4 inclusive. (This is decremented to result in an index in the range 0 to 3 on air.)

Referenced by m2m_validate_ap_parameters(), and m2m_wifi_connect_wep().