|
FreeRTOS
|
Wi-Fi Interface. More...
#include <stdint.h>#include "portmacro.h"#include "aws_wifi_config.h"Go to the source code of this file.
Data Structures | |
| struct | WIFINetworkParams_t |
| Parameters passed to the WIFI_ConnectAP API for connection. More... | |
| struct | WIFIScanResult_t |
| Wi-Fi scan results. More... | |
| struct | WIFINetworkProfile_t |
| Wi-Fi network parameters passed to the WIFI_NetworkAdd API. More... | |
Enumerations | |
| enum | WIFIReturnCode_t { eWiFiSuccess = 0, eWiFiFailure = 1, eWiFiTimeout = 2, eWiFiNotSupported = 3 } |
| Return code denoting API status. More... | |
| enum | WIFISecurity_t { eWiFiSecurityOpen = 0, eWiFiSecurityWEP, eWiFiSecurityWPA, eWiFiSecurityWPA2, eWiFiSecurityNotSupported } |
| Wi-Fi Security types. More... | |
| enum | WIFIDeviceMode_t { eWiFiModeStation = 0, eWiFiModeAP, eWiFiModeP2P, eWiFiModeNotSupported } |
| Wi-Fi device modes. More... | |
| enum | WIFIPMMode_t { eWiFiPMNormal = 0, eWiFiPMLowPower, eWiFiPMAlwaysOn, eWiFiPMNotSupported } |
| Wi-Fi device power management modes. More... | |
Functions | |
| WIFIReturnCode_t | WIFI_On (void) |
| Turns on Wi-Fi. More... | |
| WIFIReturnCode_t | WIFI_Off (void) |
| Turns off Wi-Fi. More... | |
| WIFIReturnCode_t | WIFI_ConnectAP (const WIFINetworkParams_t *const pxNetworkParams) |
| Connects to the Wi-Fi Access Point (AP) specified in the input. More... | |
| WIFIReturnCode_t | WIFI_Disconnect (void) |
| Disconnects from the currently connected Access Point. More... | |
| WIFIReturnCode_t | WIFI_Reset (void) |
| Resets the Wi-Fi Module. More... | |
| WIFIReturnCode_t | WIFI_SetMode (WIFIDeviceMode_t xDeviceMode) |
| Sets the Wi-Fi mode. More... | |
| WIFIReturnCode_t | WIFI_GetMode (WIFIDeviceMode_t *pxDeviceMode) |
| Gets the Wi-Fi mode. More... | |
| WIFIReturnCode_t | WIFI_NetworkAdd (const WIFINetworkProfile_t *const pxNetworkProfile, uint16_t *pusIndex) |
| Add a Wi-Fi Network profile. More... | |
| WIFIReturnCode_t | WIFI_NetworkGet (WIFINetworkProfile_t *pxNetworkProfile, uint16_t usIndex) |
| Get a Wi-Fi network profile. More... | |
| WIFIReturnCode_t | WIFI_NetworkDelete (uint16_t usIndex) |
| Delete a Wi-Fi Network profile. More... | |
| WIFIReturnCode_t | WIFI_Ping (uint8_t *pucIPAddr, uint16_t usCount, uint32_t ulIntervalMS) |
| Ping an IP address in the network. More... | |
| WIFIReturnCode_t | WIFI_GetIP (uint8_t *pucIPAddr) |
| Retrieves the Wi-Fi interface's IP address. More... | |
| WIFIReturnCode_t | WIFI_GetMAC (uint8_t *pucMac) |
| Retrieves the Wi-Fi interface's MAC address. More... | |
| WIFIReturnCode_t | WIFI_GetHostIP (char *pcHost, uint8_t *pucIPAddr) |
| Retrieves the host IP address from a host name using DNS. More... | |
| WIFIReturnCode_t | WIFI_Scan (WIFIScanResult_t *pxBuffer, uint8_t ucNumNetworks) |
| Perform a Wi-Fi network Scan. More... | |
| WIFIReturnCode_t | WIFI_StartAP (void) |
| Start SoftAP mode. More... | |
| WIFIReturnCode_t | WIFI_StopAP (void) |
| Stop SoftAP mode. More... | |
| WIFIReturnCode_t | WIFI_ConfigureAP (const WIFINetworkParams_t *const pxNetworkParams) |
| Configure SoftAP. More... | |
| WIFIReturnCode_t | WIFI_SetPMMode (WIFIPMMode_t xPMModeType, const void *pvOptionValue) |
| Set the Wi-Fi power management mode. More... | |
| WIFIReturnCode_t | WIFI_GetPMMode (WIFIPMMode_t *pxPMModeType, void *pvOptionValue) |
| Get the Wi-Fi power management mode. More... | |
| BaseType_t | WIFI_IsConnected (void) |
| Check if the Wi-Fi is connected. More... | |
Wi-Fi Interface.
Definition in file aws_wifi.h.
| enum WIFIDeviceMode_t |
Wi-Fi device modes.
Device roles/modes supported.
| Enumerator | |
|---|---|
| eWiFiModeStation | Station mode. |
| eWiFiModeAP | Access point mode. |
| eWiFiModeP2P | P2P mode. |
| eWiFiModeNotSupported | Unsupported mode. |
Definition at line 73 of file aws_wifi.h.
| enum WIFIPMMode_t |
Wi-Fi device power management modes.
Device power management modes supported.
| Enumerator | |
|---|---|
| eWiFiPMNormal | Normal mode. |
| eWiFiPMLowPower | Low Power mode. |
| eWiFiPMAlwaysOn | Always On mode. |
| eWiFiPMNotSupported | Unsupported PM mode. |
Definition at line 86 of file aws_wifi.h.
| enum WIFIReturnCode_t |
Return code denoting API status.
| Enumerator | |
|---|---|
| eWiFiSuccess | Success. |
| eWiFiFailure | Failure. |
| eWiFiTimeout | Timeout. |
| eWiFiNotSupported | Not supported. |
Definition at line 48 of file aws_wifi.h.
| enum WIFISecurity_t |
Wi-Fi Security types.
| Enumerator | |
|---|---|
| eWiFiSecurityOpen | Open - No Security. |
| eWiFiSecurityWEP | WEP Security. |
| eWiFiSecurityWPA | WPA Security. |
| eWiFiSecurityWPA2 | WPA2 Security. |
| eWiFiSecurityNotSupported | Unknown Security. |
Definition at line 59 of file aws_wifi.h.
| WIFIReturnCode_t WIFI_ConfigureAP | ( | const WIFINetworkParams_t *const | pxNetworkParams | ) |
Configure SoftAP.
| [in] | pxNetworkParams | - Network parameters to configure AP. |
| WIFIReturnCode_t WIFI_ConnectAP | ( | const WIFINetworkParams_t *const | pxNetworkParams | ) |
Connects to the Wi-Fi Access Point (AP) specified in the input.
The Wi-Fi should stay connected when the same Access Point it is currently connected to is specified. Otherwise, the Wi-Fi should disconnect and connect to the new Access Point specified. If the new Access Point specifed has invalid parameters, then the Wi-Fi should be disconnected.
| [in] | pxNetworkParams | Configuration to join AP. |
| WIFIReturnCode_t WIFI_Disconnect | ( | void | ) |
Disconnects from the currently connected Access Point.
| [in] | None. |
| WIFIReturnCode_t WIFI_GetHostIP | ( | char * | pcHost, |
| uint8_t * | pucIPAddr | ||
| ) |
Retrieves the host IP address from a host name using DNS.
| [in] | pxHost | - Host (node) name. |
| [in] | pxIPAddr | - IP Address buffer. |
| WIFIReturnCode_t WIFI_GetIP | ( | uint8_t * | pucIPAddr | ) |
Retrieves the Wi-Fi interface's IP address.
| [out] | IP | Address buffer. |
| WIFIReturnCode_t WIFI_GetMAC | ( | uint8_t * | pucMac | ) |
Retrieves the Wi-Fi interface's MAC address.
| [out] | MAC | Address buffer sized 6 bytes. |
| WIFIReturnCode_t WIFI_GetMode | ( | WIFIDeviceMode_t * | pxDeviceMode | ) |
Gets the Wi-Fi mode.
| [out] | pxDeviceMode | - return mode Station / Access Point /P2P |
| WIFIReturnCode_t WIFI_GetPMMode | ( | WIFIPMMode_t * | pxPMModeType, |
| void * | pvOptionValue | ||
| ) |
Get the Wi-Fi power management mode.
| [out] | xPMModeType | - pointer to get current power mode set. |
| [out] | pvOptionValue | - optional value |
| BaseType_t WIFI_IsConnected | ( | void | ) |
Check if the Wi-Fi is connected.
| WIFIReturnCode_t WIFI_NetworkAdd | ( | const WIFINetworkProfile_t *const | pxNetworkProfile, |
| uint16_t * | pusIndex | ||
| ) |
Add a Wi-Fi Network profile.
Adds a Wi-fi network to the network list in Non Volatile memory.
| [in] | pxNetworkProfile | - Network profile parameters |
| [out] | pusIndex | - Network profile index in storage |
| WIFIReturnCode_t WIFI_NetworkDelete | ( | uint16_t | usIndex | ) |
Delete a Wi-Fi Network profile.
Deletes the Wi-Fi network profile from the network profile list at given index in non-volatile memory
| [in] | usIndex | - Index of the network profile, must be between 0 to wificonfigMAX_NETWORK_PROFILES. |
If wificonfigMAX_NETWORK_PROFILES is the index, then all network profiles will be deleted.
| WIFIReturnCode_t WIFI_NetworkGet | ( | WIFINetworkProfile_t * | pxNetworkProfile, |
| uint16_t | usIndex | ||
| ) |
Get a Wi-Fi network profile.
Gets the Wi-Fi network parameters at the given index from network list in non-volatile memory.
| [out] | pxNetworkProfile | - pointer to return network profile parameters |
| [in] | usIndex | - Index of the network profile, must be between 0 to wificonfigMAX_NETWORK_PROFILES |
| WIFIReturnCode_t WIFI_Off | ( | void | ) |
Turns off Wi-Fi.
This function turns off the Wi-Fi module. The Wi-Fi peripheral should be put in a low power or off state in this routine.
| WIFIReturnCode_t WIFI_On | ( | void | ) |
Turns on Wi-Fi.
This function turns on Wi-Fi module,initializes the drivers and must be called before calling any other Wi-Fi API
| WIFIReturnCode_t WIFI_Ping | ( | uint8_t * | pucIPAddr, |
| uint16_t | usCount, | ||
| uint32_t | ulIntervalMS | ||
| ) |
Ping an IP address in the network.
| [in] | IP | Address array to ping. |
| [in] | Number | of times to ping |
| [in] | Interval | in mili-seconds for ping operation |
| WIFIReturnCode_t WIFI_Reset | ( | void | ) |
Resets the Wi-Fi Module.
| [in] | None. |
| WIFIReturnCode_t WIFI_Scan | ( | WIFIScanResult_t * | pxBuffer, |
| uint8_t | ucNumNetworks | ||
| ) |
Perform a Wi-Fi network Scan.
| [in] | pxBuffer | - Buffer for scan results. |
| [in] | uxNumNetworks | - Number of networks to retrieve in scan result. |
| WIFIReturnCode_t WIFI_SetMode | ( | WIFIDeviceMode_t | xDeviceMode | ) |
Sets the Wi-Fi mode.
| [in] | xDeviceMode | - Mode of the device Station / Access Point /P2P. |
| WIFIReturnCode_t WIFI_SetPMMode | ( | WIFIPMMode_t | xPMModeType, |
| const void * | pvOptionValue | ||
| ) |
Set the Wi-Fi power management mode.
| [in] | xPMModeType | - Power mode type. |
| [in] | pvOptionValue | - A buffer containing the value of the option to set depends on the mode type example - beacon interval in sec |
| WIFIReturnCode_t WIFI_StartAP | ( | void | ) |
Start SoftAP mode.
| [in] | None. |
| WIFIReturnCode_t WIFI_StopAP | ( | void | ) |
Stop SoftAP mode.
| [in] | None. |
1.8.13