RAFW Flexible Software Package Documentation  Release v2.0.1

 
WIFI (rm_wifi)

Functions

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...
 

Detailed Description

Driver for the WIFI device on RA6W1/RA6W2. This module implements the WiFi Interface.

Overview

Features

Configuration

Build Time Configurations for rm_wifi

The following build time configurations are defined in fsp_cfg/rm_wifi_config.h:

ConfigurationOptionsDefaultDescription
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
  • Disabled
Enabled Enable when using the Watchdog Service.
BLE CLI
  • Enabled
  • Disabled
Disabled Enable BLE CLI support
Enable MQTT on WI-FI
  • Enabled
  • Disabled
Disabled Enable MQTT on WIFI
ATCMD Task Support
  • Enable
  • Disable
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).

ConfigurationOptionsDefaultDescription
General
NameName must be a valid C symbolg_wifi0 Module name.
Interrupts
Wi-Fi Interrupts Priority LevelMCU Specific OptionsSelect the interrupt priority
Co-Existence
Co-Existence > Pins
Coex_ASC1 PortRefer to the RAFW Configuration tool for available options.00 Specify the antenna selection 1 port for Co-Existence.
Coex_ASC1 PinRefer to the RAFW Configuration tool for available options.07 Specify the antenna selection 1 pin for Co-Existence.
Coex_ASC2 PortRefer to the RAFW Configuration tool for available options.00 Specify the antenna selection 2 port for Co-Existence.
Coex_ASC2 PinRefer to the RAFW Configuration tool for available options.06 Specify the antenna selection 2 pin for Co-Existence.
BT_ACT PortRefer to the RAFW Configuration tool for available options.01 Specify the BT-ACT port for Co-Existence.
BT_ACT PinRefer 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
  • Low
  • High
High Specify the value for antenna selection 1 in BLE operation for 5G.
ASC2 Reset Value
  • Low
  • High
Low Specify the value for antenna selection 2 in BLE operation for 5G.
ZigBee/Bluetooth Co-Existence
  • Disabled
  • Enabled
Disabled Enable ZigBee/Bluetooth Co-Existence support

Examples

Basic Example

This is a basic example of minimal use of WIFI STA.

WIFIScanResult_t scan_data[MAX_WIFI_SCAN_RESULTS];
void wifi_basic_sta_example(void)
{
WIFIReturnCode_t wifi_err;
/* Setup Access Point connection parameters */
WIFINetworkParams_t net_params =
{
.xPassword.xWPA.cPassphrase = "'password'",
.ucSSID = "'access_point_ssid'",
.xPassword.xWPA.ucLength = 8,
.ucSSIDLength = 17,
.xSecurity = eWiFiSecurityWPA2,
};
memset(scan_data, 0, sizeof(WIFIScanResult_t) * MAX_WIFI_SCAN_RESULTS);
/* Open connection to the Wifi Module */
wifi_err = WIFI_On();
assert(eWiFiSuccess == wifi_err);
vTaskDelay(DELAY_5SEC);
/* Scan the local Wifi network for other APs */
wifi_err = WIFI_Scan(&scan_data[0], MAX_WIFI_SCAN_RESULTS);
assert(eWiFiSuccess == wifi_err);
vTaskDelay(DELAY_5SEC);
/* Connect to the Access Point */
wifi_err = WIFI_ConnectAP(&net_params);
assert(eWiFiSuccess == wifi_err);
/* Shutdown the WIFI - not supported right now */
#if 0 // --------------------------------------------------------------
#endif // 0 // --------------------------------------------------------
}
void wifi_basic_ap_example(void)
{
WIFIReturnCode_t xWifiStatus;
WIFIDeviceMode_t xDeviceMode;
/* Setup Access Point connection parameters */
WIFINetworkParams_t net_params =
{
.xPassword.xWPA.cPassphrase = "'password'",
.ucSSID = "'access_point_ssid'",
.xPassword.xWPA.ucLength = 8,
.ucSSIDLength = 17,
.xSecurity = eWiFiSecurityWPA2,
.ucChannel = 6,
};
/* Open connection to the Wifi Module */
xWifiStatus = WIFI_On();
assert(eWiFiSuccess == xWifiStatus);
vTaskDelay(5000);
xWifiStatus = WIFI_GetMode(&xDeviceMode);
if (xWifiStatus == eWiFiSuccess) {
if (xDeviceMode != eWiFiModeAP) {
xWifiStatus = WIFI_SetMode(eWiFiModeAP);
assert(eWiFiSuccess == xWifiStatus);
xWifiStatus = WIFI_ConfigureAP(&net_params);
assert(eWiFiSuccess == xWifiStatus);
reset();
}
}
/* Shutdown the WIFI - not supported right now */
#if 0 // --------------------------------------------------------------
#endif // 0 // --------------------------------------------------------
}

Data Structures

struct  wifi_coex_cfg_t
 
struct  WIFINetworkParamsExt_t
 

Typedefs

typedef void(* WIFIEventExtHandler_t) (WIFIEventExt_t *xEventExt)
 Wi-Fi Extended event handler definition. More...
 

Enumerations

enum  e_wifi_device_mode_ext_t
 
enum  WIFIPmf_t
 
enum  WIFISecurityExt_t
 
enum  WIFIEventExtType_t
 

Data Structure Documentation

◆ wifi_coex_cfg_t

struct 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.

Typedef Documentation

◆ 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.

Enumeration Type Documentation

◆ 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

enum 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.

Function Documentation

◆ rm_wifi_wep_network_params_check()

fsp_err_t rm_wifi_wep_network_params_check ( const WIFINetworkParams_t *const  pxNetworkParams)

Checks the parameters of WEP security.

Parameters
[in]pxNetworkParamsNetwork parameters.
Return values
FSP_SUCCESSWIFI successfully configured.
FSP_ERR_WIFI_FAILEDThe check of WEP network parameters have failed.

◆ rm_wifi_enterprise_network_params_check()

fsp_err_t rm_wifi_enterprise_network_params_check ( const WIFINetworkParamsExt_t *const  pxNetworkParamsExt)

Checks the parameters of Enterprise WPA/WPA2/WAP3 security.

Parameters
[in]pxNetworkParamsExtExtended Network parameters.
Return values
FSP_SUCCESSWIFI successfully configured.
FSP_ERR_WIFI_FAILEDThe 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_cfgPointer to configuration structure.
Return values
FSP_SUCCESSWIFI successfully configured.
FSP_ERR_ASSERTIONNULL 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_cfgPointer to configuration structure.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_FAILEDError occurred with retrieving AP parameters from NVRAM or with connection.
FSP_ERR_WIFI_CONFIG_FAILEDError occurred with save_config.
FSP_ERR_WIFI_AP_NOT_CONNECTEDError occurred with select_network

◆ rm_wifi_close()

fsp_err_t rm_wifi_close ( )

Close WIFI module.

Return values
FSP_SUCCESSWIFI 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]pxNetworkParamsNetwork parameters validated by WIFI_NetworkParams_check().
[in]hidden_ssidConnect to AP with hidden SSID.
[in]pmfSpecify Protected Management Frames mode (only valid in some WIFISecurity modes)
[in]sae_groupsSpecify the SAE groups IDs (valid on WPA3 SAE security mode only)
[in]ucNumChannelsNumber of channels to scan (0 = scan all)
[in]pucChannelListPointer to list of channels to scan (NULL = scan all)
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_CONFIG_FAILEDError occurred with save_config.
FSP_ERR_WIFI_AP_NOT_CONNECTEDError occurred with select_network

◆ rm_wifi_connect_Ext()

fsp_err_t rm_wifi_connect_Ext ( const WIFINetworkParamsExt_t *const  pxNetworkParamsExt)

Connects to the specified Wifi Access Point.

Parameters
[in]pxNetworkParamsExtExtended network parameters.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_CONFIG_FAILEDError occurred with save_config.
FSP_ERR_WIFI_AP_NOT_CONNECTEDError occurred with select_network

◆ rm_wifi_auto_config()

fsp_err_t rm_wifi_auto_config ( const WIFINetworkParams_t *const  pxNetworkParams)

Sets the Wi-Fi Access Point (AP) parameters to be used when connecting using rm_wifi_open_connect.

Parameters
[in]pxNetworkParamsNetwork parameters.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_FAILEDError occurred.

◆ rm_wifi_disconnect()

fsp_err_t rm_wifi_disconnect ( )

Disconnects from connected AP.

Return values
FSP_SUCCESSWIFI disconnected successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_set_mode()

fsp_err_t rm_wifi_set_mode ( e_wifi_device_mode_ext_t  xDeviceMode)

Set WIFI Mode

Return values
FSP_SUCCESSSet Mode successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_get_mode()

fsp_err_t rm_wifi_get_mode ( e_wifi_device_mode_ext_t xDeviceModeExt)

Get WIFI Mode

Return values
FSP_SUCCESSGet Mode successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSSet P2P successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_p2p_find()

fsp_err_t rm_wifi_p2p_find ( void  )

WIFI P2P find

Return values
FSP_SUCCESSSet P2P successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSConnected to P2P device successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_p2p_group_remove()

fsp_err_t rm_wifi_p2p_group_remove ( void  )

WIFI P2P group remove

Return values
FSP_SUCCESSRemoved P2P group successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_p2p_group_add()

fsp_err_t rm_wifi_p2p_group_add ( void  )

WIFI P2P group add

Return values
FSP_SUCCESSAdded P2P group successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_p2p_peers()

fsp_err_t rm_wifi_p2p_peers ( char *  reply)

WIFI P2P peers

Return values
FSP_SUCCESSListed known P2P peers successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_p2p_accept()

fsp_err_t rm_wifi_p2p_accept ( void  )

WIFI P2P accept

Return values
FSP_SUCCESSAccepted P2P connection successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSSet operating channel successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSSet listen channel successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSSet GO Intent successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSSet Find Timeout successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSSet SSID Postfix successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSRetrieved P2P parameter successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSIsolate/connect the STAs successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSmac_addr added successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSSet the MAC Filtering to [filter_mode] successfully.
FSP_ERR_WIFI_FAILEDError occurred with setting MAC Filtering to the mode.

◆ rm_wifi_wmm()

fsp_err_t rm_wifi_wmm ( bool  enable_wmm)

Set WMM function to enable/disable

Return values
FSP_SUCCESSWMM function set successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSWMM-PS function set successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSWPS PBC was initiated successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSWPS PIN was initiated successfully.
FSP_ERR_WIFI_FAILEDError occurred with initiating WPS PIN.

◆ rm_wifi_wps_cancel()

fsp_err_t rm_wifi_wps_cancel ( void  )

Cancel any ongoing WPS operation

Return values
FSP_SUCCESSWPS session was canceled successfully.
FSP_ERR_WIFI_FAILEDError 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_SUCCESSOperation was completed successfully.
FSP_ERR_WIFI_FAILEDError occurred with enabling/disabling/generating.

◆ rm_wifi_network_add()

fsp_err_t rm_wifi_network_add ( const WIFINetworkProfile_t *const  pxNetworkProfile,
uint16_t  index 
)

Add a network with the specified index.

Parameters
[in]pxNetworkProfilePointer to a structure which holds the Wi-Fi network parameters.
[in]indexnetwork index.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_CONFIG_FAILEDError 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
[in]indexnetwork index.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_FAILEDError 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_macaddrPointer array to hold mac address.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_scan()

fsp_err_t rm_wifi_scan ( WIFIScanResult_t p_results,
uint32_t  maxNetworks 
)

Get the information about local Wifi Access Points.

Parameters
[out]p_resultsPointer to a structure array holding scanned Access Points.
[in]maxNetworksSize of the structure array for holding APs.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.
FSP_ERR_OUT_OF_MEMORYThere is no more heap memory available.
FSP_ERR_WIFI_SCAN_COMPLETEWifi 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_resultsPointer to a structure array holding scanned Access Points.
[in]maxNetworksSize of the structure array for holding APs.
[in]pxScanConfigExtendedWi-Fi scan extended configuration
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.
FSP_ERR_OUT_OF_MEMORYThere is no more heap memory available.
FSP_ERR_WIFI_SCAN_COMPLETEWifi scan has completed.

◆ rm_wifi_start_ap()

fsp_err_t rm_wifi_start_ap ( )

Start SoftAP mode.

Return values
FSP_SUCCESSStart SoftAP mode successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_stop_ap()

fsp_err_t rm_wifi_stop_ap ( )

Stop SoftAP mode.

Return values
FSP_SUCCESSStart SoftAP mode successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_configure_ap()

fsp_err_t rm_wifi_configure_ap ( WIFINetworkParamsExt_t pxNetworkParamsExt)

Configure SoftAP.

param[in] pxNetworkParams Network parameters.

Return values
FSP_SUCCESSConfigure SoftAP successfully.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_is_connected()

fsp_err_t rm_wifi_is_connected ( const WIFINetworkParams_t pxNetworkParams)

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_SUCCESSWi-Fi is connected and the AP configuration matches the query.
FSP_ERR_OUT_OF_MEMORYThere is no more heap memory available.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.
FSP_ERR_WIFI_AP_NOT_CONNECTEDNo 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_SUCCESSGet info successfully.
FSP_ERR_OUT_OF_MEMORYThere is no more heap memory available.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ rm_wifi_get_connection_info()

fsp_err_t rm_wifi_get_connection_info ( WIFIConnectionInfo_t pxConnectionInfo,
int  iface_num 
)

Get Wi-Fi info of the interfaces.

Return values
FSP_SUCCESSGet info successfully.
FSP_ERR_OUT_OF_MEMORYThere is no more heap memory available.
FSP_ERR_WIFI_FAILEDError 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]pcRSSIRSSI of the connected AP.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_AP_NOT_CONNECTEDNo 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]pucMacStation MAC address do be disconnected.
Return values
FSP_SUCCESSDisconnection was started successfully.
FSP_ERR_WIFI_FAILEDError occurred.

◆ rm_wifi_mac_addr_set()

fsp_err_t rm_wifi_mac_addr_set ( uint8_t *  pucMac)

Set Wi-Fi MAC addresses.

Parameters
[in]pucMacStation MAC address.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_FAILEDError 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]pcCountryCodeCountry code (null-terminated string, e.g. "US", "CN". See ISO-3166).
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_FAILEDError 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]pcCountryCodeNull-terminated string to hold the country code (ISO-3166). Must be at least 4 bytes.
Return values
FSP_SUCCESSFunction completed successfully.
FSP_ERR_WIFI_AP_NOT_CONNECTEDNo 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_indexIndex of the desired interface.
Return values
Theoutput pointer.

◆ WIFI_ConfigureAPExt()

WIFIReturnCode_t WIFI_ConfigureAPExt ( WIFINetworkParamsExt_t pxNetworkParamsExt)

Configure SoftAP.

Parameters
[in]pxNetworkParamsExt- Network parameters to configure AP.
Returns
eWiFiSuccess if SoftAP was successfully configured, failure code otherwise.

Example

WIFINetworkParamsExt_t xNetworkParamsExt;
xNetworkParamsExt.xNetworkParams.ucSSID = "SSID_Name";
xNetworkParamsExt.xNetworkParams.xPassword.xWPA.cPassphrase = "PASSWORD";
xNetworkParamsExt.xNetworkParams.ucChannel = ChannelNum;
xNetworkParamsExt.ucBand = eWiFiBand5G;
WIFI_ConfigureAPExt(&xNetworkParamsExt);

◆ rm_wifi_get_station_list()

fsp_err_t rm_wifi_get_station_list ( WIFIStationInfo_t pxStationList,
uint8_t *  pcStationListSize 
)

Get connected station list in softAP mode.

Return values
FSP_SUCCESSGet connected station list successfully.
FSP_ERR_OUT_OF_MEMORYThere is no more heap memory available.
FSP_ERR_WIFI_FAILEDError occurred with command to Wifi module.

◆ WIFI_RegisterEventExt()

WIFIReturnCode_t WIFI_RegisterEventExt ( WIFIEventExtType_t  xEventType,
WIFIEventExtHandler_t  xHandler 
)

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.