35 #ifndef __M2M_WIFI_TYPES_H__ 36 #define __M2M_WIFI_TYPES_H__ 47 #include "m2m_common.h" 104 #define M2M_HIF_INFO_SHIFT (0) 105 #define M2M_HIF_INFO_MASK (0xffff) 108 #define M2M_HIF_BLOCK_SHIFT (14) 109 #define M2M_HIF_BLOCK_MASK (0x3) 110 #define M2M_HIF_LEVEL_SHIFT (0) 111 #define M2M_HIF_LEVEL_MASK (0x3fff) 114 #define M2M_HIF_MAJOR_SHIFT (8) 115 #define M2M_HIF_MAJOR_MASK (0x3f) 116 #define M2M_HIF_MINOR_SHIFT (0) 117 #define M2M_HIF_MINOR_MASK (0xff) 119 #define M2M_GET_HIF_INFO(hif_ver) ((uint16)(((hif_ver) >> M2M_HIF_INFO_SHIFT) & M2M_HIF_INFO_MASK)) 120 #define M2M_GET_HIF_BLOCK(hif_info) ((uint8)(((hif_info) >> M2M_HIF_BLOCK_SHIFT) & M2M_HIF_BLOCK_MASK)) 121 #define M2M_GET_HIF_LEVEL(hif_info) ((uint16)(((hif_info) >> M2M_HIF_LEVEL_SHIFT) & M2M_HIF_LEVEL_MASK)) 122 #define M2M_GET_HIF_MAJOR(hif_info) ((uint8)(((hif_info) >> M2M_HIF_MAJOR_SHIFT) & M2M_HIF_MAJOR_MASK)) 123 #define M2M_GET_HIF_MINOR(hif_info) ((uint8)(((hif_info) >> M2M_HIF_MINOR_SHIFT) & M2M_HIF_MINOR_MASK)) 125 #define M2M_MAKE_HIF_INFO(hif_level) ( \ 126 (((uint16)(hif_level) & M2M_HIF_LEVEL_MASK) << M2M_HIF_LEVEL_SHIFT) | \ 127 (((uint16)M2M_HIF_BLOCK_VALUE & M2M_HIF_BLOCK_MASK) << M2M_HIF_BLOCK_SHIFT) ) 133 #define M2M_HIF_BLOCK_VALUE (2) 136 #define M2M_HIF_MAJOR_VALUE (1) 139 #define M2M_HIF_MINOR_VALUE (3) 142 #define M2M_HIF_LEVEL ( \ 143 ((M2M_HIF_MAJOR_VALUE & M2M_HIF_MAJOR_MASK) << M2M_HIF_MAJOR_SHIFT) | \ 144 ((M2M_HIF_MINOR_VALUE & M2M_HIF_MINOR_MASK) << M2M_HIF_MINOR_SHIFT) \ 153 #define M2M_DRIVER_VERSION_MAJOR_NO (1) 156 #define M2M_DRIVER_VERSION_MINOR_NO (0) 159 #define M2M_DRIVER_VERSION_PATCH_NO (8) 170 #define M2M_BUFFER_MAX_SIZE (1600UL - 4) 175 #define M2M_MAC_ADDRES_LEN 6 179 #define M2M_ETHERNET_HDR_OFFSET 34 184 #define M2M_ETHERNET_HDR_LEN 14 189 #define M2M_MAX_SSID_LEN 33 194 #define M2M_MAX_PSK_LEN 65 198 #define M2M_DEVICE_NAME_MAX 48 203 #define M2M_LISTEN_INTERVAL 1 210 #define M2M_1X_USR_NAME_MAX 21 217 #define M2M_1X_PWD_MAX 41 223 #define M2M_CUST_IE_LEN_MAX 252 228 #define M2M_CONFIG_CMD_BASE 1 231 #define M2M_STA_CMD_BASE 40 234 #define M2M_AP_CMD_BASE 70 237 #define M2M_P2P_CMD_BASE 90 240 #define M2M_OTA_CMD_BASE 100 243 #define M2M_SERVER_CMD_BASE 120 248 #define WEP_40_KEY_STRING_SIZE ((uint8)10) 252 #define WEP_104_KEY_STRING_SIZE ((uint8)26) 255 #define WEP_KEY_MAX_INDEX ((uint8)4) 258 #define M2M_SCAN_DEFAULT_NUM_SLOTS (2) 261 #define M2M_SCAN_DEFAULT_SLOT_TIME (20) 264 #define M2M_SCAN_DEFAULT_PASSIVE_SLOT_TIME (300) 267 #define M2M_SCAN_DEFAULT_NUM_PROBE (2) 270 #define M2M_FASTCONNECT_DEFAULT_RSSI_THRESH (-45) 273 #define M2M_SCAN_FAIL ((uint8)1) 276 #define M2M_JOIN_FAIL ((uint8)2) 279 #define M2M_AUTH_FAIL ((uint8)3) 282 #define M2M_ASSOC_FAIL ((uint8)4) 286 #define M2M_SCAN_ERR_WIFI ((sint8)-2) 289 #define M2M_SCAN_ERR_IP ((sint8)-3) 292 #define M2M_SCAN_ERR_AP ((sint8)-4) 295 #define M2M_SCAN_ERR_P2P ((sint8)-5) 298 #define M2M_SCAN_ERR_WPS ((sint8)-6) 306 #define M2M_WIFI_FRAME_TYPE_ANY 0xFF 309 #define M2M_WIFI_FRAME_SUB_TYPE_ANY 0xFF 316 #define TLS_FILE_NAME_MAX 48 319 #define TLS_SRV_SEC_MAX_FILES 8 322 #define TLS_SRV_SEC_START_PATTERN_LEN 8 337 #define OTA_STATUS_VALID (0x12526285) 341 #define OTA_STATUS_INVALID (0x23987718) 345 #define OTA_MAGIC_VALUE (0x1ABCDEF9) 349 #define OTA_SHA256_DIGEST_SIZE (32) 355 #define OTA_SUCCESS (0) 359 #define OTA_ERR_WORKING_IMAGE_LOAD_FAIL ((sint8)-1) 363 #define OTA_ERR_INVAILD_CONTROL_SEC ((sint8)-2) 367 #define M2M_ERR_OTA_SWITCH_FAIL ((sint8)-3) 371 #define M2M_ERR_OTA_START_UPDATE_FAIL ((sint8)-4) 376 #define M2M_ERR_OTA_ROLLBACK_FAIL ((sint8)-5) 380 #define M2M_ERR_OTA_INVAILD_FLASH_SIZE ((sint8)-6) 384 #define M2M_ERR_OTA_INVAILD_ARG ((sint8)-7) 1094 #define __PADDING_tstr1xAuthCredentials_ (4 - ((M2M_1X_USR_NAME_MAX + M2M_1X_PWD_MAX) % 4)) 1114 #define __PADDING_tuniM2MWifiAuth_ (4 - ((M2M_MAX_PSK_LEN + sizeof(tstr1xAuthCredentials) + sizeof(tstrM2mWifiWepParams)) % 4)) 1131 #define __PADDING__ (4 - ((sizeof(tuniM2MWifiAuth) + 1) % 4)) 1152 #define __CONN_PAD_SIZE__ (4 - ((sizeof(tstrM2MWifiSecInfo) + M2M_MAX_SSID_LEN + 3) % 4)) 1171 char acPinNumber[8];
1201 #define __PADDING_tstrM2MWPSInfo_ (4 - ((2 + M2M_MAX_SSID_LEN + M2M_MAX_PSK_LEN) % 4)) 1228 #define __PADDING_tstrM2MBLEInfo_ (4 - ((2 + M2M_MAX_SSID_LEN + M2M_MAX_PSK_LEN) % 4)) 1710 char acHttpServerDomainName[64];
1803 #define __PADDING_tstrSystemTime_ (4 - (7 % 4)) 1980 #define TLS_CERTS_CHUNKED_SIG_VALUE 0x6ec8
tenuPowerSaveModes
This enum contains all the supported Wi-Fi Power Save modes.
This struct contains the Wi-Fi scan request.
This struct contains the information for the PS Server command.
This struct stores the Wi-Fi Security Parameters for all supported security modes.
uint32 u32OtaControlSecCrc
#define __PADDING_tstrSystemTime_
tenuM2mP2pCmd
This enum contains all the WINC commands while in P2P mode.
uint32 u8NcfUpgradeVersion
This struct contains a TLS certificate.
This struct contains the Device Name of the WINC. It is used mainly for Wi-Fi Direct device discovery...
This struct contains the MAC address to be used. The WINC loads the mac address from the efuse by def...
This module contains common APIs declarations.
#define WEP_104_KEY_STRING_SIZE
signed char sint8
Range of values between -128 to 127.
This struct contains the Wi-Fi TX Packet Info. The M2M Application has the ability to compose raw Wi-...
This struct stores the WPS configuration parameters.
tenuM2mSecType
This enum contains all the supported Wi-Fi security types.
uint32 u32OtaRollbackImageOffset
This struct contains the Wi-Fi scan result.
This struct contains the information for the PS Server initialization.
uint32 u32OtaRollbackImageValidStatus
This struct stores the credentials for the user to authenticate with the AAA server (WPA-Enterprise M...
tenuM2mConfigCmd
This enum contains all the host commands used to configure the WINC board.
This struct contains the OTA image header.
This struct contains the Wi-Fi RX Frame Header. The M2M application has the ability to allow Wi-Fi mo...
Info about a RSA public key.
This struct contains the information corresponding to an AP in the scan result list identified by its...
This struct contains the Wi-Fi information for the channel regions.
tenuM2mConnState
This enum contains all the Wi-Fi connection states.
uint32 u32OtaLastCheckTime
uint32 u32OtaCortusAppRollbackOffset
tstrM2MAPConfig strApConfig
This struct contains a BLE message.
#define __PADDING_tstrM2MWPSInfo_
uint32 u32OtaCurrentworkingImagFirmwareVer
This struct contains the provisioning information obtained from the HTTP Provisioning server...
uint8 u8NcdRequiredUpgrade
#define M2M_SERVER_CMD_BASE
Info about the public key contained in a root certificate.
uint32 u32OtaCortusAppWorkingValidSts
tenuM2mOtaCmd
This enum contains all the WINC commands used for OTA operation.
This struct contains the information from the Multicast filter.
#define __PADDING_tstr1xAuthCredentials_
tstrRootCertRsaKeyInfo strRsaKeyInfo
#define __PADDING_tstrM2MBLEInfo_
This struct contains the Wi-Fi Monitor Mode Filter. It sets the filtering criteria for WLAN packets w...
tenuM2mWifiMode
This enum contains all the supported Wi-Fi Operation Modes.
This struct contains the Listen Interval. It is the value of the Wi-Fi StA Listen Interval when power...
#define M2M_1X_USR_NAME_MAX
unsigned short uint16
Range of values between 0 to 65535.
This struct contains the OTA update information.
#define __CONN_PAD_SIZE__
tenuM2mDefaultConnErrcode
tenuM2mScanRegion
This enum contains all the Wi-Fi channel regions.
tenuOtaUpdateStatus
This struct contains the OTA return status.
uint32 u32OtaCortusAppWorkingVer
#define __PADDING_tuniM2MWifiAuth_
This struct contains the sleep time for the Power Save request.
This struct contains the provisioning mode configuration.
This struct contains the Wi-Fi connection state.
This struct stores logging information.
#define TLS_SRV_SEC_START_PATTERN_LEN
This struct contains the Control Section. The Control Section is used to define the working image and...
This struct contains the connection information.
This struct stores the authentication credentials to connect to a Wi-Fi network.
uint32 u32OtaCurrentworkingImagHifVer
tenuOtaUpdateStatusType
This struct contains the OTA update status type.
This struct contains the response error of m2m_default_connect.
tenuM2mConnChangedErrcode
uint16 u16PassiveScanTime
This struct contains the Power Save configuration.
This struct contains the static IP configuration.
tenuM2mStaCmd
This enum contains all the WINC commands while in Station mode.
This struct stores the WEP security key parameters.
tstrM2mWifiWepParams strWepInfo
#define M2M_MAC_ADDRES_LEN
This struct contains the information for the PS Client state.
This struct contains a set of TLS certificates.
uint32 u32OtaRollbackImagHifVer
uint8 u8OtaUpdateStatusType
This struct contains the information of the gain table index from flash to be used.
uint32 u8NcfCurrentVersion
uint32 u32OtaCurrentworkingImagOffset
uint32 u32OtaSequenceNumber
uint32 u8NcdUpgradeVersion
uint32 u32OtaCortusAppWorkingOffset
USBInterfaceDescriptor data
uint8 u8DownloadUrlOffset
#define M2M_CONFIG_CMD_BASE
This struct contains the system time.
uint32 u32OtaRollbackImagFirmwareVer
tstrRootCertEcdsaKeyInfo strEcsdaKeyInfo
#define TLS_FILE_NAME_MAX
This struct contains the Listen Channel for P2P connect.
tenuRootCertPubKeyType
This enum contains the supported public key types for TLS root certificates.
tenuM2mIpCmd
This enum contains all the WINC commands related to IP.
The Wi-Fi Scan results list is stored in firmware. This struct contains the index by which the applic...
uint32 u32OtaCortusAppRollbackValidSts
This struct stores the Wi-Fi connect request.
tstrM2MWifiSecInfo strSec
This struct contains response when the firmware has failed to configure the gains from flash...
This struct contains the configuration options for Wi-Fi scan.
tenuM2mSslCmd
This enum contains WINC commands related to TLS handshake.
tenuM2mScanCh
This enum contains all the Wi-Fi RF channels.
tenuM2mServerCmd
These commands are currently not supported.
unsigned long uint32
Range of values between 0 to 4294967295.
This struct contains the size and data offset for the received packet.
#define TLS_SRV_SEC_MAX_FILES
uint32 u32OtaFormatVersion
This struct stores the battery voltage.
unsigned char uint8
Range of values between 0 to 255.
Info about a ECDSA public key.
tenuWPSTrigger
This enum contains the WPS triggering methods.
tenuM2mApCmd
This enum contains all the WINC commands while in AP mode.
#define M2M_DEVICE_NAME_MAX
uint32 u32OtaCortusAppRollbackVer
This struct contains the OTA update status.
tenuM2mSigmaCmd
This enum contains all the WINC commands related to Sigma.
This structure holds the configuration parameters for the AP mode. It should be set by the applicatio...
This struct stores the Tx Power levels.
tstr1xAuthCredentials strCred1x