FULL_MAC_DRIVER_APIDRIVER_API
Functions | |
sl_status_t | sl_wfx_set_mac_address (const sl_wfx_mac_address_t *mac, sl_wfx_interface_t interface) |
Brief Set the MAC address used by Wi-Fi chip. | |
sl_status_t | sl_wfx_send_join_command (const uint8_t *ssid, uint32_t ssid_length, const sl_wfx_mac_address_t *bssid, uint16_t channel, sl_wfx_security_mode_t security_mode, uint8_t prevent_roaming, uint16_t management_frame_protection, const uint8_t *passkey, uint16_t passkey_length, const uint8_t *ie_data, uint16_t ie_data_length) |
As a station, send a command to join a Wi-Fi network. | |
sl_status_t | sl_wfx_send_disconnect_command (void) |
Connected as a station, send a disconnection request to the AP. | |
sl_status_t | sl_wfx_start_ap_command (uint16_t channel, uint8_t *ssid, uint32_t ssid_length, uint8_t hidden_ssid, uint8_t client_isolation, sl_wfx_security_mode_t security_mode, uint8_t management_frame_protection, const uint8_t *passkey, uint16_t passkey_length, const uint8_t *beacon_ie_data, uint16_t beacon_ie_data_length, const uint8_t *probe_response_ie_data, uint16_t probe_response_ie_data_length) |
Send a command to start the softap mode. | |
sl_status_t | sl_wfx_update_ap_command (uint16_t beacon_ie_data_length, uint16_t probe_response_ie_data_length, uint32_t *beacon_ie_data, uint32_t *probe_response_ie_data) |
Update the softap settings. | |
sl_status_t | sl_wfx_stop_ap_command (void) |
Send a command to stop the softap mode. | |
sl_status_t | sl_wfx_send_ethernet_frame (sl_wfx_send_frame_req_t *frame, uint32_t data_length, sl_wfx_interface_t interface, uint8_t priority) |
Send an Ethernet frame. | |
sl_status_t | sl_wfx_send_scan_command (uint16_t scan_mode, const uint8_t *channel_list, uint16_t channel_list_count, const sl_wfx_ssid_def_t *ssid_list, uint16_t ssid_list_count, const uint8_t *ie_data, uint16_t ie_data_length, const uint8_t *bssid) |
Send a scan command. | |
sl_status_t | sl_wfx_send_stop_scan_command (void) |
Stop an ongoing scan process. | |
sl_status_t | sl_wfx_get_signal_strength (uint32_t *signal_strength) |
Get the signal strength of the last packets received. | |
sl_status_t | sl_wfx_disconnect_ap_client_command (const sl_wfx_mac_address_t *client) |
In AP mode, disconnect the specified client. | |
sl_status_t | sl_wfx_set_power_mode (sl_wfx_pm_mode_t mode, uint16_t interval) |
Set the power mode used as a station. | |
sl_status_t | sl_wfx_add_multicast_address (const sl_wfx_mac_address_t *mac_address, sl_wfx_interface_t interface) |
Add a multicast address to the multicast filter whitelist. | |
sl_status_t | sl_wfx_remove_multicast_address (const sl_wfx_mac_address_t *mac_address, sl_wfx_interface_t interface) |
Remove a multicast address from the multicast filter whitelist. | |
sl_status_t | sl_wfx_set_arp_ip_address (uint32_t *arp_ip_addr, uint8_t num_arp_ip_addr) |
Set the ARP offloading state. | |
sl_status_t | sl_wfx_set_ns_ip_address (uint8_t *ns_ip_addr, uint8_t num_ns_ip_addr) |
Set the NS offloading state. | |
sl_status_t | sl_wfx_set_broadcast_filter (uint32_t filter) |
Set the broadcast filter state. | |
sl_status_t | sl_wfx_set_unicast_filter (uint32_t filter) |
Set the unicast filter state. | |
sl_status_t | sl_wfx_add_whitelist_address (const sl_wfx_mac_address_t *mac_address) |
Add a mac address to the device whitelist. | |
sl_status_t | sl_wfx_add_blacklist_address (const sl_wfx_mac_address_t *mac_address) |
Add a mac address to the device blacklist. | |
sl_status_t | sl_wfx_set_max_ap_client (uint32_t max_clients) |
Configure the maximum number of clients supported in softap mode. | |
sl_status_t | sl_wfx_set_max_ap_client_inactivity (uint32_t inactivity_timeout) |
Configure the maximum client idle time. | |
sl_status_t | sl_wfx_set_scan_parameters (uint16_t active_channel_time, uint16_t passive_channel_time, uint16_t num_probe_requests) |
Configure scan parameters. | |
sl_status_t | sl_wfx_set_roam_parameters (uint8_t rcpi_threshold, uint8_t rcpi_hysteresis, uint8_t beacon_lost_count, const uint8_t *channel_list, uint8_t channel_list_count) |
Configure the roaming behavior in station mode. | |
sl_status_t | sl_wfx_set_tx_rate_parameters (sl_wfx_rate_set_bitmask_t rate_set_bitmask) |
Set the rate mode allowed by the station once connected. | |
sl_status_t | sl_wfx_set_max_tx_power (int32_t max_tx_power, sl_wfx_interface_t interface) |
Set maximum transmit power. | |
sl_status_t | sl_wfx_get_max_tx_power (int32_t *max_tx_power_rf_port_1, int32_t *max_tx_power_rf_port_2, sl_wfx_interface_t interface) |
Set maximum transmit power. | |
sl_status_t | sl_wfx_get_pmk (uint8_t *password, uint32_t *password_length, sl_wfx_interface_t interface) |
Get the PMK used to connect to the current secure network. | |
sl_status_t | sl_wfx_get_ap_client_signal_strength (const sl_wfx_mac_address_t *client, uint32_t *signal_strength) |
Get the signal strength of the last packets received from an AP client. |
Function Documentation
◆ sl_wfx_add_blacklist_address()
sl_status_t sl_wfx_add_blacklist_address | ( | const sl_wfx_mac_address_t * | mac_address | ) |
Add a mac address to the device blacklist.
- Parameters
-
mac_address
is the MAC address to add. Broadcast address denies all MAC addresses.
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 897
of file sl_wfx.c
.
References sl_wfx_add_blacklist_addr_req_body_t::mac
, sl_wfx_mac_address_t::octet
, SL_WFX_ADD_BLACKLIST_ADDR_REQ_ID
, sl_wfx_send_command()
, and SL_WFX_SOFTAP_INTERFACE
.
◆ sl_wfx_add_multicast_address()
sl_status_t sl_wfx_add_multicast_address | ( | const sl_wfx_mac_address_t * | mac_address, |
sl_wfx_interface_t | interface |
||
) |
Add a multicast address to the multicast filter whitelist.
- Parameters
-
mac_address
is the MAC address to add interface
is the interface where to apply the change - SL_WFX_STA_INTERFACE
- SL_WFX_SOFTAP_INTERFACE
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 775
of file sl_wfx.c
.
References sl_wfx_add_multicast_addr_req_body_t::mac
, sl_wfx_mac_address_t::octet
, SL_WFX_ADD_MULTICAST_ADDR_REQ_ID
, and sl_wfx_send_command()
.
◆ sl_wfx_add_whitelist_address()
sl_status_t sl_wfx_add_whitelist_address | ( | const sl_wfx_mac_address_t * | mac_address | ) |
Add a mac address to the device whitelist.
- Parameters
-
mac_address
is the MAC address to add. Broadcast address allows all MAC addresses.
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 881
of file sl_wfx.c
.
References sl_wfx_add_whitelist_addr_req_body_t::mac
, sl_wfx_mac_address_t::octet
, SL_WFX_ADD_WHITELIST_ADDR_REQ_ID
, sl_wfx_send_command()
, and SL_WFX_SOFTAP_INTERFACE
.
◆ sl_wfx_disconnect_ap_client_command()
sl_status_t sl_wfx_disconnect_ap_client_command | ( | const sl_wfx_mac_address_t * | client | ) |
In AP mode, disconnect the specified client.
- Parameters
-
client
is the mac address of the client to disconnect
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 732
of file sl_wfx.c
.
References sl_wfx_disconnect_ap_client_req_body_t::mac
, sl_wfx_mac_address_t::octet
, SL_WFX_DISCONNECT_AP_CLIENT_REQ_ID
, sl_wfx_send_command()
, and SL_WFX_SOFTAP_INTERFACE
.
◆ sl_wfx_get_ap_client_signal_strength()
sl_status_t sl_wfx_get_ap_client_signal_strength | ( | const sl_wfx_mac_address_t * | client, |
uint32_t * | signal_strength |
||
) |
Get the signal strength of the last packets received from an AP client.
- Parameters
-
client
is the mac address of the client signal_strength
returns the RCPI value averaged on the last packets received. RCPI ranges from 0 - 220 with 220 corresponds to 0 dBm and each increment represents an increase of 0.5 dBm.
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 1138
of file sl_wfx.c
.
References sl_wfx_get_ap_client_signal_strength_req_body_t::mac
, sl_wfx_mac_address_t::octet
, SL_WFX_GET_AP_CLIENT_SIGNAL_STRENGTH_REQ_ID
, sl_wfx_get_status_code()
, sl_wfx_send_command()
, SL_WFX_SOFTAP_INTERFACE
, and sl_wfx_generic_confirmation_t::status
.
◆ sl_wfx_get_max_tx_power()
sl_status_t sl_wfx_get_max_tx_power | ( | int32_t * | max_tx_power_rf_port_1, |
int32_t * | max_tx_power_rf_port_2, |
||
sl_wfx_interface_t | interface |
||
) |
Set maximum transmit power.
- Parameters
-
max_tx_power_rf_port_1
returns the maximum transmit power in units of 0.1d_bm, on RF port 1. max_tx_power_rf_port_2
returns the maximum transmit power in units of 0.1d_bm, on RF port 2. interface
is the interface used to send the request. - SL_WFX_STA_INTERFACE
- SL_WFX_SOFTAP_INTERFACE
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 1081
of file sl_wfx.c
.
References SL_WFX_GET_MAX_TX_POWER_REQ_ID
, sl_wfx_get_status_code()
, sl_wfx_send_command()
, and sl_wfx_generic_confirmation_t::status
.
◆ sl_wfx_get_pmk()
sl_status_t sl_wfx_get_pmk | ( | uint8_t * | password, |
uint32_t * | password_length, |
||
sl_wfx_interface_t | interface |
||
) |
Get the PMK used to connect to the current secure network.
- Parameters
-
password
is the current Pairwise Master Key password_length
is its length in bytes interface
is the interface used to send the request. - SL_WFX_STA_INTERFACE
- SL_WFX_SOFTAP_INTERFACE
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 1110
of file sl_wfx.c
.
References SL_WFX_GET_PMK_REQ_ID
, sl_wfx_get_status_code()
, sl_wfx_send_command()
, and sl_wfx_generic_confirmation_t::status
.
◆ sl_wfx_get_signal_strength()
sl_status_t sl_wfx_get_signal_strength | ( | uint32_t * | signal_strength | ) |
Get the signal strength of the last packets received.
- Parameters
-
signal_strength
returns the RCPI value averaged on the last packets received. RCPI ranges from 0 - 220 with 220 corresponds to 0 dBm and each increment represents an increase of 0.5 dBm.
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 706
of file sl_wfx.c
.
References SL_WFX_GET_SIGNAL_STRENGTH_REQ_ID
, sl_wfx_get_status_code()
, sl_wfx_send_command()
, SL_WFX_STA_INTERFACE
, and sl_wfx_generic_confirmation_t::status
.
◆ sl_wfx_remove_multicast_address()
sl_status_t sl_wfx_remove_multicast_address | ( | const sl_wfx_mac_address_t * | mac_address, |
sl_wfx_interface_t | interface |
||
) |
Remove a multicast address from the multicast filter whitelist.
- Parameters
-
mac_address
is the MAC address to remove interface
is the interface where to apply the change - SL_WFX_STA_INTERFACE
- SL_WFX_SOFTAP_INTERFACE
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 793
of file sl_wfx.c
.
References sl_wfx_remove_multicast_addr_req_body_t::mac
, sl_wfx_mac_address_t::octet
, SL_WFX_REMOVE_MULTICAST_ADDR_REQ_ID
, and sl_wfx_send_command()
.
◆ sl_wfx_send_disconnect_command()
sl_status_t sl_wfx_send_disconnect_command | ( | void |
| ) |
Connected as a station, send a disconnection request to the AP.
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 398
of file sl_wfx.c
.
References SL_WFX_DISCONNECT_REQ_ID
, sl_wfx_send_command()
, and SL_WFX_STA_INTERFACE
.
◆ sl_wfx_send_ethernet_frame()
sl_status_t sl_wfx_send_ethernet_frame | ( | sl_wfx_send_frame_req_t * | frame, |
uint32_t | data_length, |
||
sl_wfx_interface_t | interface, |
||
uint8_t | priority |
||
) |
Send an Ethernet frame.
- Parameters
-
frame
contains the Ethernet frame to be sent data_length
is the length of the Ethernet frame interface
is the interface used to send the ethernet frame. - SL_WFX_STA_INTERFACE
- SL_WFX_SOFTAP_INTERFACE
priority
is the priority level used to send the Ethernet frame.
- Returns
- SL_STATUS_OK if the request has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 566
of file sl_wfx.c
.
References sl_wfx_send_frame_req_t::body
, sl_wfx_context_t::data_frame_id
, sl_wfx_send_frame_req_body_t::frame_type
, sl_wfx_send_frame_req_t::header
, sl_wfx_header_t::id
, sl_wfx_header_t::info
, sl_wfx_header_t::length
, sl_wfx_send_frame_req_body_t::packet_data_length
, sl_wfx_send_frame_req_body_t::packet_id
, sl_wfx_send_frame_req_body_t::priority
, SL_WFX_SEND_FRAME_REQ_ID
, sl_wfx_send_request()
, and WFM_FRAME_TYPE_DATA
.
◆ sl_wfx_send_join_command()
sl_status_t sl_wfx_send_join_command | ( | const uint8_t * | ssid, |
uint32_t | ssid_length, |
||
const sl_wfx_mac_address_t * | bssid, |
||
uint16_t | channel, |
||
sl_wfx_security_mode_t | security_mode, |
||
uint8_t | prevent_roaming, |
||
uint16_t | management_frame_protection, |
||
const uint8_t * | passkey, |
||
uint16_t | passkey_length, |
||
const uint8_t * | ie_data, |
||
uint16_t | ie_data_length |
||
) |
As a station, send a command to join a Wi-Fi network.
- Parameters
-
ssid
is the name of the AP to connect to ssid_length
is the length of the SSID name bssid
is the address of the AP to connect to (optional) channel
is the channel used by AP. Set at 0 if the channel is unknown security_mode
is the security used by the AP - WFM_SECURITY_MODE_OPEN
- WFM_SECURITY_MODE_WEP
- WFM_SECURITY_MODE_WPA2_WPA1_PSK
- WFM_SECURITY_MODE_WPA2_PSK
prevent_roaming
is equal to 1 to prevent automatic roaming between APs management_frame_protection
is equal to 1 to enable PMF mode passkey
is the passkey used by the AP. Can be the WPA hash key to improve connection speed passkey_length
is the length of the passkey ie_data
are the Vendor-specific IEs to be added to the probe request ie_data_length
is the length of the IEs
- Returns
- Returns SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 332
of file sl_wfx.c
.
References sl_wfx_allocate_command_buffer()
, and SL_WFX_CONNECT_REQ_ID
.
◆ sl_wfx_send_scan_command()
sl_status_t sl_wfx_send_scan_command | ( | uint16_t | scan_mode, |
const uint8_t * | channel_list, |
||
uint16_t | channel_list_count, |
||
const sl_wfx_ssid_def_t * | ssid_list, |
||
uint16_t | ssid_list_count, |
||
const uint8_t * | ie_data, |
||
uint16_t | ie_data_length, |
||
const uint8_t * | bssid |
||
) |
Send a scan command.
- Parameters
-
scan_mode
is the mode used during the scan phase - WFM_SCAN_MODE_PASSIVE
- WFM_SCAN_MODE_ACTIVE
channel_list
is the list of channels to be scanned. Suitable values goes from 1 to 13. channel_list_count
is the number of channels to be scanned. If 0 the scan will be performed on every channel. ssid_list
is the list of SSID names to look for. The Wi-Fi chip will only send scan results for the specified SSIDs. If Null, every scan result will be passed on to the host. ssid_list_count
is the number of SSID specified (from 0 up to 2) ie_data
is the Vendor-specific IE data to be added to probe requests ie_data_length
is the length of the probe request IEs bssid
is optional and triggers a unicast scan if the scan mode used is WFM_SCAN_MODE_ACTIVE.
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 610
of file sl_wfx.c
.
References sl_wfx_allocate_command_buffer()
, and SL_WFX_START_SCAN_REQ_ID
.
◆ sl_wfx_send_stop_scan_command()
sl_status_t sl_wfx_send_stop_scan_command | ( | void |
| ) |
Stop an ongoing scan process.
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 692
of file sl_wfx.c
.
References sl_wfx_send_command()
, SL_WFX_STA_INTERFACE
, and SL_WFX_STOP_SCAN_REQ_ID
.
◆ sl_wfx_set_arp_ip_address()
sl_status_t sl_wfx_set_arp_ip_address | ( | uint32_t * | arp_ip_addr, |
uint8_t | num_arp_ip_addr |
||
) |
Set the ARP offloading state.
- Parameters
-
arp_ip_addr
is the pointer to ARP IP address list to offload num_arp_ip_addr
is the number of addresses in the list (0 - 2)
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 809
of file sl_wfx.c
.
References sl_wfx_set_arp_ip_address_req_body_t::arp_ip_addr
, sl_wfx_send_command()
, SL_WFX_SET_ARP_IP_ADDRESS_REQ_ID
, and SL_WFX_STA_INTERFACE
.
◆ sl_wfx_set_broadcast_filter()
sl_status_t sl_wfx_set_broadcast_filter | ( | uint32_t | filter | ) |
Set the broadcast filter state.
- Parameters
-
filter
is equal to 1 to enable broadcast filtering.
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 850
of file sl_wfx.c
.
References sl_wfx_set_broadcast_filter_req_body_t::filter
, sl_wfx_send_command()
, SL_WFX_SET_BROADCAST_FILTER_REQ_ID
, and SL_WFX_STA_INTERFACE
.
◆ sl_wfx_set_mac_address()
sl_status_t sl_wfx_set_mac_address | ( | const sl_wfx_mac_address_t * | mac, |
sl_wfx_interface_t | interface |
||
) |
Brief Set the MAC address used by Wi-Fi chip.
- Parameters
-
mac
is the MAC address to be set on the specified the interface interface
is the interface to be configured. see sl_wfx_interface_t. - SL_WFX_STA_INTERFACE
- SL_WFX_SOFTAP_INTERFACE
- Returns
- Returns SL_STATUS_OK if the request has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 287
of file sl_wfx.c
.
References sl_wfx_set_mac_address_req_body_t::mac_addr
, sl_wfx_context_t::mac_addr_0
, sl_wfx_context_t::mac_addr_1
, sl_wfx_mac_address_t::octet
, sl_wfx_send_command()
, SL_WFX_SET_MAC_ADDRESS_REQ_ID
, SL_WFX_SOFTAP_INTERFACE
, and SL_WFX_STA_INTERFACE
.
◆ sl_wfx_set_max_ap_client()
sl_status_t sl_wfx_set_max_ap_client | ( | uint32_t | max_clients | ) |
Configure the maximum number of clients supported in softap mode.
- Parameters
-
max_clients
is the maximum number of clients supported in softap. Broadcast address denies all MAC addresses.
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
- Note
- sl_wfx_set_max_ap_client() has to be called after sl_wfx_start_ap_command(). If the softap is stopped or the Wi-Fi chip resets, the command has to be issued again.
Definition at line 917
of file sl_wfx.c
.
References sl_wfx_set_max_ap_client_count_req_body_t::count
, sl_wfx_send_command()
, SL_WFX_SET_MAX_AP_CLIENT_COUNT_REQ_ID
, and SL_WFX_SOFTAP_INTERFACE
.
◆ sl_wfx_set_max_ap_client_inactivity()
sl_status_t sl_wfx_set_max_ap_client_inactivity | ( | uint32_t | inactivity_timeout | ) |
Configure the maximum client idle time.
- Parameters
-
inactivity_timeout
is the maximum client idle time in seconds.
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
- Note
- sl_wfx_set_max_ap_client() has to be called after sl_wfx_start_ap_command(). If the softap is stopped or the Wi-Fi chip resets, the command has to be issued again.
Definition at line 936
of file sl_wfx.c
.
References sl_wfx_set_max_ap_client_inactivity_req_body_t::inactivity_timeout
, sl_wfx_send_command()
, SL_WFX_SET_MAX_AP_CLIENT_INACTIVITY_REQ_ID
, and SL_WFX_SOFTAP_INTERFACE
.
◆ sl_wfx_set_max_tx_power()
sl_status_t sl_wfx_set_max_tx_power | ( | int32_t | max_tx_power, |
sl_wfx_interface_t | interface |
||
) |
Set maximum transmit power.
- Parameters
-
max_tx_power
is the maximum transmit power in units of 0.1d_bm. interface
is the interface used to send the request. - SL_WFX_STA_INTERFACE
- SL_WFX_SOFTAP_INTERFACE
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 1060
of file sl_wfx.c
.
References sl_wfx_set_max_tx_power_req_body_t::max_tx_power
, sl_wfx_send_command()
, and SL_WFX_SET_MAX_TX_POWER_REQ_ID
.
◆ sl_wfx_set_ns_ip_address()
sl_status_t sl_wfx_set_ns_ip_address | ( | uint8_t * | ns_ip_addr, |
uint8_t | num_ns_ip_addr |
||
) |
Set the NS offloading state.
- Parameters
-
ns_ip_addr
is the pointer to NS IP address list to offload num_ns_ip_addr
is the number of addresses in the list (0 - 2)
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 830
of file sl_wfx.c
.
References sl_wfx_set_ns_ip_address_req_body_t::ns_ip_addr
, sl_wfx_send_command()
, SL_WFX_SET_NS_IP_ADDRESS_REQ_ID
, and SL_WFX_STA_INTERFACE
.
◆ sl_wfx_set_power_mode()
sl_status_t sl_wfx_set_power_mode | ( | sl_wfx_pm_mode_t | mode, |
uint16_t | interval |
||
) |
Set the power mode used as a station.
The Wi-Fi chip will enable the Wi-Fi power mode feature.
- Parameters
-
mode
is the power mode to be used by the connection - WFM_PM_MODE_ACTIVE
- WFM_PM_MODE_BEACON
- WFM_PM_MODE_DTIM
interval
is the number of beacons/DTIMs to skip while sleeping
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
- Note
- the power mode has to be set once the connection with the AP is established
Definition at line 756
of file sl_wfx.c
.
References sl_wfx_set_pm_mode_req_body_t::listen_interval
, sl_wfx_set_pm_mode_req_body_t::power_mode
, sl_wfx_send_command()
, SL_WFX_SET_PM_MODE_REQ_ID
, and SL_WFX_STA_INTERFACE
.
◆ sl_wfx_set_roam_parameters()
sl_status_t sl_wfx_set_roam_parameters | ( | uint8_t | rcpi_threshold, |
uint8_t | rcpi_hysteresis, |
||
uint8_t | beacon_lost_count, |
||
const uint8_t * | channel_list, |
||
uint8_t | channel_list_count |
||
) |
Configure the roaming behavior in station mode.
- Parameters
-
rcpi_threshold
is the lower RCPI limit trigerring a roaming attempt rcpi_hysteresis
is the High RCPI limit that must be attain before a roaming attempt can be triggered again beacon_lost_count
is the beacon loss limit for a roaming attempt channel_list
is the list of specific channels to scan channel_list_count
is the amount of specific channels to scan
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
- Note
- Parameters set by sl_wfx_set_roam_parameters() take effect at the next connection. Calling it while connected has no immediate effect.
Definition at line 987
of file sl_wfx.c
.
References sl_wfx_allocate_command_buffer()
, and SL_WFX_SET_ROAM_PARAMETERS_REQ_ID
.
◆ sl_wfx_set_scan_parameters()
sl_status_t sl_wfx_set_scan_parameters | ( | uint16_t | active_channel_time, |
uint16_t | passive_channel_time, |
||
uint16_t | num_probe_requests |
||
) |
Configure scan parameters.
- Parameters
-
active_channel_time
is the time spent on each channel during active scan. Set to 0 for FW default, 1 - 550 TUs (1 TU = 1.024 ms). passive_channel_time
Time spent on each channel during passive scan. Set to 0 for FW default, 1 - 550 TUs (1 TU = 1.024 ms). num_probe_requests
is the number of probe requests to send. Set to 0 for FW default, 1 - 2
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
- Note
- Parameters set with sl_wfx_set_scan_parameters() will apply for every future scan
Definition at line 959
of file sl_wfx.c
.
References sl_wfx_set_scan_parameters_req_body_t::active_channel_time
, sl_wfx_set_scan_parameters_req_body_t::num_of_probe_requests
, sl_wfx_set_scan_parameters_req_body_t::passive_channel_time
, sl_wfx_set_scan_parameters_req_body_t::reserved
, sl_wfx_send_command()
, SL_WFX_SET_SCAN_PARAMETERS_REQ_ID
, and SL_WFX_STA_INTERFACE
.
◆ sl_wfx_set_tx_rate_parameters()
sl_status_t sl_wfx_set_tx_rate_parameters | ( | sl_wfx_rate_set_bitmask_t | rate_set_bitmask | ) |
Set the rate mode allowed by the station once connected.
- Parameters
-
rate_set_bitmask
is the list of rates that will be used in STA mode.
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
- Note
- Parameters set by sl_wfx_set_roam_parameters() take effect at the next connection. Calling it while connected has no immediate effect.
Definition at line 1041
of file sl_wfx.c
.
References sl_wfx_set_tx_rate_parameters_req_body_t::rate_set_bitmask
, sl_wfx_set_tx_rate_parameters_req_body_t::reserved
, sl_wfx_send_command()
, SL_WFX_SET_TX_RATE_PARAMETERS_REQ_ID
, and SL_WFX_STA_INTERFACE
.
◆ sl_wfx_set_unicast_filter()
sl_status_t sl_wfx_set_unicast_filter | ( | uint32_t | filter | ) |
Set the unicast filter state.
- Parameters
-
filter
is equal to 1 to enable unicast filtering.
- Returns
- SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise
Definition at line 865
of file sl_wfx.c
.
References sl_wfx_set_unicast_filter_req_body_t::filter
, sl_wfx_send_command()
, SL_WFX_SET_UNICAST_FILTER_REQ_ID
, and SL_WFX_SOFTAP_INTERFACE
.
◆ sl_wfx_start_ap_command()
sl_status_t sl_wfx_start_ap_command | ( | uint16_t | channel, |
uint8_t * | ssid, |
||
uint32_t | ssid_length, |
||
uint8_t | hidden_ssid, |
||
uint8_t | client_isolation, |
||
sl_wfx_security_mode_t | security_mode, |
||
uint8_t | management_frame_protection, |
||
const uint8_t * | passkey, |
||
uint16_t | passkey_length, |
||
const uint8_t * | beacon_ie_data, |
||
uint16_t | beacon_ie_data_length, |
||
const uint8_t * | probe_response_ie_data, |
||
uint16_t | probe_response_ie_data_length |
||
) |
Send a command to start the softap mode.
- Parameters
-
channel
is the channel used by AP. Between 1 and 14 ssid
is the SSID name used by the softap ssid_length
is the SSID name length hidden_ssid
is equal to 1 to hide the network client_isolation
is equal to 1 isolate clients from each other security_mode
is the security level used by the softap - WFM_SECURITY_MODE_OPEN
- WFM_SECURITY_MODE_WEP
- WFM_SECURITY_MODE_WPA2_WPA1_PSK
- WFM_SECURITY_MODE_WPA2_PSK
management_frame_protection
is equal to 1 to enable PMF mode passkey
is the passkey used by the softap. Only applicable in security modes different from WFM_SECURITY_MODE_OPEN. passkey_length
is the length of the passkey beacon_ie_data
is the Vendor-specific IE data to be added to beacons beacon_ie_data_length
is the length of the beacon IEs probe_response_ie_data
is the Vendor-specific IE data to be added to probe responses probe_response_ie_data_length
is the length of the probe response IEs
- Returns
- Returns SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 428
of file sl_wfx.c
.
References sl_wfx_allocate_command_buffer()
, and SL_WFX_START_AP_REQ_ID
.
◆ sl_wfx_stop_ap_command()
sl_status_t sl_wfx_stop_ap_command | ( | void |
| ) |
Send a command to stop the softap mode.
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 549
of file sl_wfx.c
.
References sl_wfx_send_command()
, SL_WFX_SOFTAP_INTERFACE
, and SL_WFX_STOP_AP_REQ_ID
.
◆ sl_wfx_update_ap_command()
sl_status_t sl_wfx_update_ap_command | ( | uint16_t | beacon_ie_data_length, |
uint16_t | probe_response_ie_data_length, |
||
uint32_t * | beacon_ie_data, |
||
uint32_t * | probe_response_ie_data |
||
) |
Update the softap settings.
- Parameters
-
beacon_ie_data_length
is the length of the beacon IEs probe_response_ie_data_length
is the length of the probe response IEs beacon_ie_data
is the Vendor-specific IE data to be added to beacons probe_response_ie_data
is the Vendor-specific IE data to be added to probe responses
- Returns
- SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise
Definition at line 501
of file sl_wfx.c
.
References sl_wfx_allocate_command_buffer()
, and SL_WFX_UPDATE_AP_REQ_ID
.