|
| fsp_err_t | rm_wifi_wep_network_params_check (const WIFINetworkParams_t *const pxNetworkParams) |
| |
| fsp_err_t | rm_wifi_enterprise_network_params_check (const WIFINetworkParamsExt_t *const pxNetworkParamsExt) |
| |
| fsp_err_t | rm_wifi_open (wifi_cfg_t const *const p_cfg) |
| |
| fsp_err_t | rm_wifi_open_connect (wifi_cfg_t const *const p_cfg) |
| |
| fsp_err_t | rm_wifi_close () |
| |
| fsp_err_t | rm_wifi_connect (const WIFINetworkParams_t *const pxNetworkParams, bool hidden_ssid, WIFIPmf_t pmf, const char *sae_groups, uint8_t ucNumChannels, uint32_t *pucChannelList) |
| |
| fsp_err_t | rm_wifi_connect_Ext (const WIFINetworkParamsExt_t *const pxNetworkParamsExt) |
| |
| fsp_err_t | rm_wifi_auto_config (const WIFINetworkParams_t *const pxNetworkParams) |
| |
| fsp_err_t | rm_wifi_disconnect () |
| |
| fsp_err_t | rm_wifi_set_mode (e_wifi_device_mode_ext_t xDeviceMode) |
| |
| fsp_err_t | rm_wifi_get_mode (e_wifi_device_mode_ext_t *xDeviceModeExt) |
| |
| fsp_err_t | rm_wifi_p2p (unsigned char oper_chan, unsigned char listen_chan, unsigned char go_intent, const char *ssid_postfix) |
| |
| fsp_err_t | rm_wifi_p2p_find (void) |
| |
| fsp_err_t | rm_wifi_p2p_connect (const char *p2p_addr, const char *wps_method) |
| |
| fsp_err_t | rm_wifi_p2p_group_remove (void) |
| |
| fsp_err_t | rm_wifi_p2p_group_add (void) |
| |
| fsp_err_t | rm_wifi_p2p_peers (char *reply) |
| |
| fsp_err_t | rm_wifi_p2p_accept (void) |
| |
| fsp_err_t | rm_wifi_p2p_set_oper_chan (unsigned char channel) |
| |
| fsp_err_t | rm_wifi_p2p_set_listen_chan (unsigned char channel) |
| |
| fsp_err_t | rm_wifi_p2p_set_go_intent (unsigned char intent) |
| |
| fsp_err_t | rm_wifi_p2p_set_find_timeout (unsigned char intent) |
| |
| fsp_err_t | rm_wifi_p2p_set_ssid_postfix (const char *ssid_postfix) |
| |
| fsp_err_t | rm_wifi_p2p_get (char *p2pconfig) |
| |
| fsp_err_t | rm_wifi_isolate (bool enable_isolation) |
| |
| fsp_err_t | rm_wifi_acl_mac (const char *mac_addr) |
| |
| fsp_err_t | rm_wifi_acl (const char *filter_mode) |
| |
| fsp_err_t | rm_wifi_wmm (bool enable_wmm) |
| |
| fsp_err_t | rm_wifi_wmm_ps (bool enable_wmm_ps) |
| |
| fsp_err_t | rm_wifi_wps_pbc (const char *mac_addr) |
| |
| fsp_err_t | rm_wifi_wps_pin (const char *mac_addr, const char *pin, char *gen_pin) |
| |
| fsp_err_t | rm_wifi_wps_cancel (void) |
| |
| fsp_err_t | rm_wifi_wps_ap_pin (const char *state, const char *arg1, const char *arg2, char *gen_pin) |
| |
| fsp_err_t | rm_wifi_network_add (const WIFINetworkProfile_t *const pxNetworkProfile, uint16_t index) |
| |
| fsp_err_t | rm_wifi_network_del (uint16_t index) |
| |
| fsp_err_t | rm_wifi_mac_addr_get (uint8_t *p_macaddr) |
| |
| fsp_err_t | rm_wifi_scan (WIFIScanResult_t *p_results, uint32_t maxNetworks) |
| |
| fsp_err_t | rm_wifi_scan_extended (WIFIScanResult_t *p_results, uint32_t maxNetworks, WIFIScanExtendedConfig_t *pxScanConfigExtended) |
| |
| fsp_err_t | rm_wifi_start_ap () |
| |
| fsp_err_t | rm_wifi_stop_ap () |
| |
| fsp_err_t | rm_wifi_configure_ap (WIFINetworkParamsExt_t *pxNetworkParamsExt) |
| |
| fsp_err_t | rm_wifi_is_connected (const WIFINetworkParams_t *pxNetworkParams) |
| |
| fsp_err_t | rm_wifi_get_connection_info_ext (WIFIConnectionInfoExt_t *pxConnectionInfoExt, int iface_num) |
| |
| fsp_err_t | rm_wifi_get_connection_info (WIFIConnectionInfo_t *pxConnectionInfo, int iface_num) |
| |
| fsp_err_t | rm_wifi_get_rssi (int8_t *pcRSSI) |
| |
| fsp_err_t | rm_wifi_start_disconnect_station (uint8_t *pucMac) |
| |
| fsp_err_t | rm_wifi_mac_addr_set (uint8_t *pucMac) |
| |
| fsp_err_t | rm_wifi_set_country_code (const char *pcCountryCode) |
| |
| fsp_err_t | rm_wifi_get_country_code (char *pcCountryCode) |
| |
| struct netif * | rm_wifi_get_netif (int iface_index) |
| | Wrapper function to retrieve network interface. More...
|
| |
| WIFIReturnCode_t | WIFI_ConfigureAPExt (WIFINetworkParamsExt_t *pxNetworkParamsExt) |
| | Configure SoftAP. More...
|
| |
| fsp_err_t | rm_wifi_get_station_list (WIFIStationInfo_t *pxStationList, uint8_t *pcStationListSize) |
| |
| WIFIReturnCode_t | WIFI_RegisterEventExt (WIFIEventExtType_t xEventExtType, WIFIEventExtHandler_t xHandler) |
| | Register a Wi-Fi Extended event Handler. More...
|
| |
Driver for the WIFI device on RA6W1/RA6W2. This module implements the WiFi Interface.
Overview
Features
- Standard WIFI STA Mode
- Standard WIFI soft AP Mode
Configuration
Build Time Configurations for rm_wifi
The following build time configurations are defined in fsp_cfg/rm_wifi_config.h:
| Configuration | Options | Default | Description |
| Parameter Checking |
-
Default (BSP)
-
Enabled
-
Disabled
| Default (BSP) | If selected code for parameter checking is included in the build. The Default (BSP) value is BSP_CFG_PARAM_CHECKING_ENABLE. It is the value of RRQ Common|Parameter checking under BSP |
| Watchdog Service Support |
| Enabled | Enable when using the Watchdog Service. |
| BLE CLI |
| Disabled | Enable BLE CLI support |
| Enable MQTT on WI-FI |
| Disabled | Enable MQTT on WIFI |
| ATCMD Task Support |
| Disable | Enable support for the AT interface. |
Configurations for Networking > Wi-Fi (rm_wifi)
This module can be added to the Stacks tab via New Stack > Networking > Wi-Fi (rm_wifi).
| Configuration | Options | Default | Description |
| General |
| Name | Name must be a valid C symbol | g_wifi0 | Module name. |
| Interrupts |
| Wi-Fi Interrupts Priority Level | MCU Specific Options | | Select the interrupt priority |
| Co-Existence |
| Co-Existence > Pins |
| Coex_ASC1 Port | Refer to the RAFW Configuration tool for available options. | 00 | Specify the antenna selection 1 port for Co-Existence. |
| Coex_ASC1 Pin | Refer to the RAFW Configuration tool for available options. | 07 | Specify the antenna selection 1 pin for Co-Existence. |
| Coex_ASC2 Port | Refer to the RAFW Configuration tool for available options. | 00 | Specify the antenna selection 2 port for Co-Existence. |
| Coex_ASC2 Pin | Refer to the RAFW Configuration tool for available options. | 06 | Specify the antenna selection 2 pin for Co-Existence. |
| BT_ACT Port | Refer to the RAFW Configuration tool for available options. | 01 | Specify the BT-ACT port for Co-Existence. |
| BT_ACT Pin | Refer to the RAFW Configuration tool for available options. | 15 | Specify the BT-ACT pin for Co-Existence. |
| Co-Existence > BLE Operation Mode |
| ASC1 Reset Value |
| High | Specify the value for antenna selection 1 in BLE operation for 5G. |
| ASC2 Reset Value |
| Low | Specify the value for antenna selection 2 in BLE operation for 5G. |
| ZigBee/Bluetooth Co-Existence |
| Disabled | Enable ZigBee/Bluetooth Co-Existence support |
Examples
Basic Example
This is a basic example of minimal use of WIFI STA.
void wifi_basic_sta_example(void)
{
{
.xPassword.xWPA.cPassphrase = "'password'",
.
ucSSID =
"'access_point_ssid'",
.xPassword.xWPA.ucLength = 8,
.ucSSIDLength = 17,
};
vTaskDelay(DELAY_5SEC);
wifi_err =
WIFI_Scan(&scan_data[0], MAX_WIFI_SCAN_RESULTS);
vTaskDelay(DELAY_5SEC);
#if 0 // --------------------------------------------------------------
#endif // 0 // --------------------------------------------------------
}
void wifi_basic_ap_example(void)
{
{
.xPassword.xWPA.cPassphrase = "'password'",
.
ucSSID =
"'access_point_ssid'",
.xPassword.xWPA.ucLength = 8,
.ucSSIDLength = 17,
.ucChannel = 6,
};
vTaskDelay(5000);
reset();
}
}
#if 0 // --------------------------------------------------------------
#endif // 0 // --------------------------------------------------------
}
◆ wifi_coex_cfg_t
User configuration structure, used in open function
◆ WIFINetworkParamsExt_t
| struct WIFINetworkParamsExt_t |
Parameters passed to WIFI_ConfigureAPExt API for AP configuration
| Data Fields |
|
WIFINetworkParams_t |
xNetworkParams |
Basic configuration. |
|
WIFIEnterpriseNetParams_t |
xEntNetParams |
Enterprise security configuration. |
|
WIFIApNetParams_t |
xApNetParams |
AP configuration. |
|
WIFIBand_t |
ucBand |
Band to configure. |
|
e_wifi_phy_mode_ext_t |
ucWiFi_mode |
Wi-Fi PHY mode to configure (a, b, g ,n, ...) |
|
bool |
hidden_ssid |
AP is using hidden SSID. |
|
WIFIPmf_t |
pmf |
Protected Management Frame mode. |
|
char |
sae_groups[wificonfigMAX_SAE_GROUPS_LEN] |
String contains all the WPA3 sae group ids. |
|
uint8_t |
ucNumChannels |
Number of channels to scan. |
|
uint32_t * |
pucChannelList |
Pointer to list of channels to scan. |
◆ WIFIEventExtHandler_t
| typedef void(* WIFIEventExtHandler_t) (WIFIEventExt_t *xEventExt) |
Wi-Fi Extended event handler definition.
- Parameters
-
| [in] | xEventExt | - Wi-Fi Extended event data structure. |
- Returns
- None.
◆ e_wifi_device_mode_ext_t
| Enumerator |
|---|
| WIFI_DEVICE_MODE_EXT_STATION | Station mode.
|
| WIFI_DEVICE_MODE_EXT_AP | Access point mode.
|
| WIFI_DEVICE_MODE_EXT_P2P | P2P mode.
|
| WIFI_DEVICE_MODE_EXT_P2P_GO | P2P GO mode.
|
| WIFI_DEVICE_MODE_EXT_AP_STATION | AP + Station mode.
|
| WIFI_DEVICE_MODE_EXT_P2P_STATION | P2P + Station mode.
|
| WIFI_DEVICE_MODE_EXT_MESH_POINT | Mesh point mode.
|
| WIFI_DEVICE_MODE_EXT_MESH_PORTAL | Mesh portal mode.
|
| WIFI_DEVICE_MODE_EXT_NOT_SUPPORTED | Unsupported mode.
|
◆ WIFIPmf_t
Wi-Fi PMF (Protected Management Frames) modes
◆ WIFISecurityExt_t
Wi-Fi Security extended types, backwards compatible with WIFISecurity_t
| Enumerator |
|---|
| eWiFiSecurityOpen_ext | Open - No Security.
|
| eWiFiSecurityWEP_ext | WEP Security.
|
| eWiFiSecurityWPA_ext | WPA Security.
|
| eWiFiSecurityWPA2_ext | WPA2 Security.
|
| eWiFiSecurityWPA2_ent_ext | WPA2 Enterprise Security.
|
| eWiFiSecurityWPA3_ext | WPA3 Security.
|
| eWiFiSecurityNotSupported_ext | Unknown Security.
|
| eWiFiSecurityWPA_ent_ext | WPA Enterprise Security.
|
| eWiFiSecurityWPA_WPA2_ent_ext | WPA + WPA2 Enterprise Security.
|
| eWiFiSecurityWPA2_WPA3_ent_ext | WPA2 + WPA3 Enterprise Security.
|
| eWiFiSecurityWPA3_ent_ext | WPA3 128 Bits Enterprise Security.
|
| eWiFiSecurityWPA3_192B_ent_ext | WPA3 192 Bits Enterprise Security.
|
| eWiFiSecurityWPA_WPA2_ext | WPA + WPA2 Security.
|
| eWiFiSecurityWPA2_WPA3_ext | WPA2 + WPA3 Security.
|
| eWiFiSecurityWPA3_OWE_ext | WPA3-OWE Security.
|
◆ WIFIEventExtType_t
| Enumerator |
|---|
| eWiFiEventExtTWT | TWT Event.
|
◆ rm_wifi_wep_network_params_check()
Checks the parameters of WEP security.
- Parameters
-
| [in] | pxNetworkParams | Network parameters. |
- Return values
-
| FSP_SUCCESS | WIFI successfully configured. |
| FSP_ERR_WIFI_FAILED | The check of WEP network parameters have failed. |
◆ rm_wifi_enterprise_network_params_check()
Checks the parameters of Enterprise WPA/WPA2/WAP3 security.
- Parameters
-
| [in] | pxNetworkParamsExt | Extended Network parameters. |
- Return values
-
| FSP_SUCCESS | WIFI successfully configured. |
| FSP_ERR_WIFI_FAILED | The check of Enterprise network parameters have failed. |
◆ rm_wifi_open()
| fsp_err_t rm_wifi_open |
( |
wifi_cfg_t const *const |
p_cfg | ) |
|
Opens and configures the WIFI module.
- Parameters
-
| [in] | p_cfg | Pointer to configuration structure. |
- Return values
-
| FSP_SUCCESS | WIFI successfully configured. |
| FSP_ERR_ASSERTION | NULL pointer to configuration or watchdog service instance. |
◆ rm_wifi_open_connect()
| fsp_err_t rm_wifi_open_connect |
( |
wifi_cfg_t const *const |
p_cfg | ) |
|
Opens and configures the WIFI module, and connects to previously configured AP using rm_wifi_auto_config.
- Parameters
-
| [in] | p_cfg | Pointer to configuration structure. |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with retrieving AP parameters from NVRAM or with connection. |
| FSP_ERR_WIFI_CONFIG_FAILED | Error occurred with save_config. |
| FSP_ERR_WIFI_AP_NOT_CONNECTED | Error occurred with select_network |
◆ rm_wifi_close()
Close WIFI module.
- Return values
-
| FSP_SUCCESS | WIFI closed successfully. |
◆ rm_wifi_connect()
| fsp_err_t rm_wifi_connect |
( |
const WIFINetworkParams_t *const |
pxNetworkParams, |
|
|
bool |
hidden_ssid, |
|
|
WIFIPmf_t |
pmf, |
|
|
const char * |
sae_groups, |
|
|
uint8_t |
ucNumChannels, |
|
|
uint32_t * |
pucChannelList |
|
) |
| |
Connects to the specified Wifi Access Point.
- Parameters
-
| [in] | pxNetworkParams | Network parameters validated by WIFI_NetworkParams_check(). |
| [in] | hidden_ssid | Connect to AP with hidden SSID. |
| [in] | pmf | Specify Protected Management Frames mode (only valid in some WIFISecurity modes) |
| [in] | sae_groups | Specify the SAE groups IDs (valid on WPA3 SAE security mode only) |
| [in] | ucNumChannels | Number of channels to scan (0 = scan all) |
| [in] | pucChannelList | Pointer to list of channels to scan (NULL = scan all) |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_CONFIG_FAILED | Error occurred with save_config. |
| FSP_ERR_WIFI_AP_NOT_CONNECTED | Error occurred with select_network |
◆ rm_wifi_connect_Ext()
Connects to the specified Wifi Access Point.
- Parameters
-
| [in] | pxNetworkParamsExt | Extended network parameters. |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_CONFIG_FAILED | Error occurred with save_config. |
| FSP_ERR_WIFI_AP_NOT_CONNECTED | Error occurred with select_network |
◆ rm_wifi_auto_config()
Sets the Wi-Fi Access Point (AP) parameters to be used when connecting using rm_wifi_open_connect.
- Parameters
-
| [in] | pxNetworkParams | Network parameters. |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred. |
◆ rm_wifi_disconnect()
Disconnects from connected AP.
- Return values
-
| FSP_SUCCESS | WIFI disconnected successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_set_mode()
Set WIFI Mode
- Return values
-
| FSP_SUCCESS | Set Mode successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_get_mode()
Get WIFI Mode
- Return values
-
| FSP_SUCCESS | Get Mode successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p()
| fsp_err_t rm_wifi_p2p |
( |
unsigned char |
oper_chan, |
|
|
unsigned char |
listen_chan, |
|
|
unsigned char |
go_intent, |
|
|
const char * |
ssid_postfix |
|
) |
| |
WIFI P2P
- Return values
-
| FSP_SUCCESS | Set P2P successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_find()
WIFI P2P find
- Return values
-
| FSP_SUCCESS | Set P2P successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_connect()
| fsp_err_t rm_wifi_p2p_connect |
( |
const char * |
p2p_addr, |
|
|
const char * |
wps_method |
|
) |
| |
WIFI P2P connect
- Return values
-
| FSP_SUCCESS | Connected to P2P device successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_group_remove()
WIFI P2P group remove
- Return values
-
| FSP_SUCCESS | Removed P2P group successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_group_add()
WIFI P2P group add
- Return values
-
| FSP_SUCCESS | Added P2P group successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_peers()
WIFI P2P peers
- Return values
-
| FSP_SUCCESS | Listed known P2P peers successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_accept()
WIFI P2P accept
- Return values
-
| FSP_SUCCESS | Accepted P2P connection successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_set_oper_chan()
| fsp_err_t rm_wifi_p2p_set_oper_chan |
( |
unsigned char |
channel | ) |
|
WIFI P2P Set Operating Channel
- Return values
-
| FSP_SUCCESS | Set operating channel successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_set_listen_chan()
| fsp_err_t rm_wifi_p2p_set_listen_chan |
( |
unsigned char |
channel | ) |
|
WIFI P2P Set Listen Channel
- Return values
-
| FSP_SUCCESS | Set listen channel successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_set_go_intent()
| fsp_err_t rm_wifi_p2p_set_go_intent |
( |
unsigned char |
intent | ) |
|
WIFI P2P Set GO Intent
- Return values
-
| FSP_SUCCESS | Set GO Intent successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_set_find_timeout()
| fsp_err_t rm_wifi_p2p_set_find_timeout |
( |
unsigned char |
intent | ) |
|
WIFI P2P Set Find Timeout
- Return values
-
| FSP_SUCCESS | Set Find Timeout successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_set_ssid_postfix()
| fsp_err_t rm_wifi_p2p_set_ssid_postfix |
( |
const char * |
ssid_postfix | ) |
|
WIFI P2P Set SSID Postfix
- Return values
-
| FSP_SUCCESS | Set SSID Postfix successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_p2p_get()
| fsp_err_t rm_wifi_p2p_get |
( |
char * |
p2pconfig | ) |
|
WIFI P2P Get Parameter
- Return values
-
| FSP_SUCCESS | Retrieved P2P parameter successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_isolate()
| fsp_err_t rm_wifi_isolate |
( |
bool |
enable_isolation | ) |
|
Isolate STAs connected to the AP from each other (or cancel isolation).
- Return values
-
| FSP_SUCCESS | Isolate/connect the STAs successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_acl_mac()
| fsp_err_t rm_wifi_acl_mac |
( |
const char * |
mac_addr | ) |
|
Register the MAC Address of a Station in the ACL
- Return values
-
| FSP_SUCCESS | mac_addr added successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with adding to ACL. |
◆ rm_wifi_acl()
| fsp_err_t rm_wifi_acl |
( |
const char * |
filter_mode | ) |
|
Set ACL to allow/deny/clear"
- Return values
-
| FSP_SUCCESS | Set the MAC Filtering to [filter_mode] successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with setting MAC Filtering to the mode. |
◆ rm_wifi_wmm()
Set WMM function to enable/disable
- Return values
-
| FSP_SUCCESS | WMM function set successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with setting WMM. |
◆ rm_wifi_wmm_ps()
| fsp_err_t rm_wifi_wmm_ps |
( |
bool |
enable_wmm_ps | ) |
|
Set WMM-PS function to enable/disable
- Return values
-
| FSP_SUCCESS | WMM-PS function set successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with setting WMM-PS. |
◆ rm_wifi_wps_pbc()
| fsp_err_t rm_wifi_wps_pbc |
( |
const char * |
mac_addr | ) |
|
Initiate WPS Push Button Configuration (PBC)
- Return values
-
| FSP_SUCCESS | WPS PBC was initiated successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with initiating WPS PBC. |
◆ rm_wifi_wps_pin()
| fsp_err_t rm_wifi_wps_pin |
( |
const char * |
mac_addr, |
|
|
const char * |
pin, |
|
|
char * |
gen_pin |
|
) |
| |
Initiate WPS PIN method
- Return values
-
| FSP_SUCCESS | WPS PIN was initiated successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with initiating WPS PIN. |
◆ rm_wifi_wps_cancel()
Cancel any ongoing WPS operation
- Return values
-
| FSP_SUCCESS | WPS session was canceled successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with cancelling WPS. |
◆ rm_wifi_wps_ap_pin()
| fsp_err_t rm_wifi_wps_ap_pin |
( |
const char * |
state, |
|
|
const char * |
arg1, |
|
|
const char * |
arg2, |
|
|
char * |
gen_pin |
|
) |
| |
Manage the WPS AP PIN state or value
- Return values
-
| FSP_SUCCESS | Operation was completed successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with enabling/disabling/generating. |
◆ rm_wifi_network_add()
Add a network with the specified index.
- Parameters
-
| [in] | pxNetworkProfile | Pointer to a structure which holds the Wi-Fi network parameters. |
| [in] | index | network index. |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_CONFIG_FAILED | Error occurred with save_config. |
◆ rm_wifi_network_del()
| fsp_err_t rm_wifi_network_del |
( |
uint16_t |
index | ) |
|
Delete a network with specified index.
- Parameters
-
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with remove_network. |
◆ rm_wifi_mac_addr_get()
| fsp_err_t rm_wifi_mac_addr_get |
( |
uint8_t * |
p_macaddr | ) |
|
Get MAC address.
- Parameters
-
| [out] | p_macaddr | Pointer array to hold mac address. |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_scan()
Get the information about local Wifi Access Points.
- Parameters
-
| [out] | p_results | Pointer to a structure array holding scanned Access Points. |
| [in] | maxNetworks | Size of the structure array for holding APs. |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
| FSP_ERR_OUT_OF_MEMORY | There is no more heap memory available. |
| FSP_ERR_WIFI_SCAN_COMPLETE | Wifi scan has completed. |
◆ rm_wifi_scan_extended()
| fsp_err_t rm_wifi_scan_extended |
( |
WIFIScanResult_t * |
p_results, |
|
|
uint32_t |
maxNetworks, |
|
|
WIFIScanExtendedConfig_t * |
pxScanConfigExtended |
|
) |
| |
Get the information about local Wifi Access Points.
- Parameters
-
| [out] | p_results | Pointer to a structure array holding scanned Access Points. |
| [in] | maxNetworks | Size of the structure array for holding APs. |
| [in] | pxScanConfigExtended | Wi-Fi scan extended configuration |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
| FSP_ERR_OUT_OF_MEMORY | There is no more heap memory available. |
| FSP_ERR_WIFI_SCAN_COMPLETE | Wifi scan has completed. |
◆ rm_wifi_start_ap()
Start SoftAP mode.
- Return values
-
| FSP_SUCCESS | Start SoftAP mode successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_stop_ap()
Stop SoftAP mode.
- Return values
-
| FSP_SUCCESS | Start SoftAP mode successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_configure_ap()
Configure SoftAP.
param[in] pxNetworkParams Network parameters.
- Return values
-
| FSP_SUCCESS | Configure SoftAP successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_is_connected()
Check if the Wi-Fi is connected and the AP configuration matches the query.
param[in] pxNetworkParams - Network parameters to query, if NULL then just check the Wi-Fi link status.
- Return values
-
| FSP_SUCCESS | Wi-Fi is connected and the AP configuration matches the query. |
| FSP_ERR_OUT_OF_MEMORY | There is no more heap memory available. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
| FSP_ERR_WIFI_AP_NOT_CONNECTED | No connection to access point has happened. |
◆ rm_wifi_get_connection_info_ext()
| fsp_err_t rm_wifi_get_connection_info_ext |
( |
WIFIConnectionInfoExt_t * |
pxConnectionInfoExt, |
|
|
int |
iface_num |
|
) |
| |
Get extended Wi-Fi info of the interfaces.
- Return values
-
| FSP_SUCCESS | Get info successfully. |
| FSP_ERR_OUT_OF_MEMORY | There is no more heap memory available. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_get_connection_info()
Get Wi-Fi info of the interfaces.
- Return values
-
| FSP_SUCCESS | Get info successfully. |
| FSP_ERR_OUT_OF_MEMORY | There is no more heap memory available. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_get_rssi()
| fsp_err_t rm_wifi_get_rssi |
( |
int8_t * |
pcRSSI | ) |
|
Return the RSSI of the connected AP.
- Parameters
-
| [out] | pcRSSI | RSSI of the connected AP. |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_AP_NOT_CONNECTED | No connection to access point has happened. |
◆ rm_wifi_start_disconnect_station()
| fsp_err_t rm_wifi_start_disconnect_station |
( |
uint8_t * |
pucMac | ) |
|
AP mode disconnecting a station.
- Parameters
-
| [in] | pucMac | Station MAC address do be disconnected. |
- Return values
-
| FSP_SUCCESS | Disconnection was started successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred. |
◆ rm_wifi_mac_addr_set()
| fsp_err_t rm_wifi_mac_addr_set |
( |
uint8_t * |
pucMac | ) |
|
Set Wi-Fi MAC addresses.
- Parameters
-
| [in] | pucMac | Station MAC address. |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_set_country_code()
| fsp_err_t rm_wifi_set_country_code |
( |
const char * |
pcCountryCode | ) |
|
Set country code.
- Parameters
-
| [in] | pcCountryCode | Country code (null-terminated string, e.g. "US", "CN". See ISO-3166). |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ rm_wifi_get_country_code()
| fsp_err_t rm_wifi_get_country_code |
( |
char * |
pcCountryCode | ) |
|
Return the country code.
- Parameters
-
| [out] | pcCountryCode | Null-terminated string to hold the country code (ISO-3166). Must be at least 4 bytes. |
- Return values
-
| FSP_SUCCESS | Function completed successfully. |
| FSP_ERR_WIFI_AP_NOT_CONNECTED | No connection to access point has happened. |
◆ rm_wifi_get_netif()
| struct netif* rm_wifi_get_netif |
( |
int |
iface_index | ) |
|
Wrapper function to retrieve network interface.
- Parameters
-
| [in] | iface_index | Index of the desired interface. |
- Return values
-
◆ WIFI_ConfigureAPExt()
Configure SoftAP.
- Parameters
-
| [in] | pxNetworkParamsExt | - Network parameters to configure AP. |
- Returns
- eWiFiSuccess if SoftAP was successfully configured, failure code otherwise.
Example
xNetworkParamsExt.
xNetworkParams.xPassword.xWPA.cPassphrase =
"PASSWORD";
◆ rm_wifi_get_station_list()
Get connected station list in softAP mode.
- Return values
-
| FSP_SUCCESS | Get connected station list successfully. |
| FSP_ERR_OUT_OF_MEMORY | There is no more heap memory available. |
| FSP_ERR_WIFI_FAILED | Error occurred with command to Wifi module. |
◆ WIFI_RegisterEventExt()
Register a Wi-Fi Extended event Handler.
- Parameters
-
| [in] | xEventType | - Wi-Fi Extended event type. |
| [in] | xHandler | - Wi-Fi Extended event handler. |
- Returns
- eWiFiSuccess if registration is successful, failure code otherwise.