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_join_ibss_command (const uint8_t *ssid, uint32_t ssid_length, uint32_t channel, uint16_t security_mode, const uint8_t *passkey, uint16_t passkey_length)
 Join or create an IBSS network.
 
sl_status_t sl_wfx_leave_ibss_command (void)
 Send a command to stop the IBSS mode.
 
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_addressis 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 923 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_addressis the MAC address to add
interfaceis 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 801 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_addressis 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 907 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
clientis 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 758 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
clientis the mac address of the client
signal_strengthreturns 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 1164 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_1returns the maximum transmit power in units of 0.1d_bm, on RF port 1.
max_tx_power_rf_port_2returns the maximum transmit power in units of 0.1d_bm, on RF port 2.
interfaceis 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 1107 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
passwordis the current Pairwise Master Key
password_lengthis its length in bytes
interfaceis 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 1136 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_strengthreturns 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 732 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_join_ibss_command()

sl_status_t sl_wfx_join_ibss_command ( const uint8_t *  ssid,
uint32_t  ssid_length,
uint32_t  channel,
uint16_t  security_mode,
const uint8_t *  passkey,
uint16_t  passkey_length 
)

Join or create an IBSS network.

Parameters
ssidis the name of the IBSS network
ssid_lengthis the length of the SSID name
channelis the channel used by the network
security_modeis the security mode used by the network
  • WFM_SECURITY_MODE_OPEN
  • WFM_SECURITY_MODE_WEP
passkeyis the passkey used by the network
passkey_lengthis the length of the passkey
Returns
SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise

Definition at line 693 of file sl_wfx.c.

References sl_wfx_join_ibss_req_body_t::channel, sl_wfx_join_ibss_req_body_t::password, sl_wfx_join_ibss_req_body_t::password_length, sl_wfx_join_ibss_req_body_t::security_mode, SL_WFX_JOIN_IBSS_REQ_ID, sl_wfx_send_command(), SL_WFX_STA_INTERFACE, sl_wfx_ssid_def_t::ssid, sl_wfx_join_ibss_req_body_t::ssid_def, and sl_wfx_ssid_def_t::ssid_length.

◆ sl_wfx_leave_ibss_command()

sl_status_t sl_wfx_leave_ibss_command ( void  )

Send a command to stop the IBSS mode.

Returns
SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise

Definition at line 718 of file sl_wfx.c.

References SL_WFX_LEAVE_IBSS_REQ_ID, sl_wfx_send_command(), and SL_WFX_STA_INTERFACE.

◆ 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_addressis the MAC address to remove
interfaceis 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 819 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 380 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
framecontains the Ethernet frame to be sent
data_lengthis the length of the Ethernet frame
interfaceis the interface used to send the ethernet frame.
  • SL_WFX_STA_INTERFACE
  • SL_WFX_SOFTAP_INTERFACE
priorityis 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 548 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
ssidis the name of the AP to connect to
ssid_lengthis the length of the SSID name
bssidis the address of the AP to connect to (optional)
channelis the channel used by AP. Set at 0 if the channel is unknown
security_modeis 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_roamingis equal to 1 to prevent automatic roaming between APs
management_frame_protectionis equal to 1 to enable PMF mode
passkeyis the passkey used by the AP. Can be the WPA hash key to improve connection speed
passkey_lengthis the length of the passkey
ie_dataare the Vendor-specific IEs to be added to the probe request
ie_data_lengthis the length of the IEs
Returns
Returns SL_STATUS_OK if the command has been sent correctly, SL_STATUS_FAIL otherwise

Definition at line 314 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_modeis the mode used during the scan phase
  • WFM_SCAN_MODE_PASSIVE
  • WFM_SCAN_MODE_ACTIVE
channel_listis the list of channels to be scanned. Suitable values goes from 1 to 13.
channel_list_countis the number of channels to be scanned. If 0 the scan will be performed on every channel.
ssid_listis 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_countis the number of SSID specified (from 0 up to 2)
ie_datais the Vendor-specific IE data to be added to probe requests
ie_data_lengthis the length of the probe request IEs
bssidis 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 592 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 674 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_addris the pointer to ARP IP address list to offload
num_arp_ip_addris 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 835 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
filteris equal to 1 to enable broadcast filtering.
Returns
SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise

Definition at line 876 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
macis the MAC address to be set on the specified the interface
interfaceis 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 285 of file sl_wfx.c.

References sl_wfx_set_mac_address_req_body_t::mac_addr, sl_wfx_mac_address_t::octet, sl_wfx_send_command(), and SL_WFX_SET_MAC_ADDRESS_REQ_ID.

◆ 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_clientsis 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 943 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_timeoutis 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 962 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_poweris the maximum transmit power in units of 0.1d_bm.
interfaceis 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 1086 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_addris the pointer to NS IP address list to offload
num_ns_ip_addris 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 856 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
modeis the power mode to be used by the connection
  • WFM_PM_MODE_ACTIVE
  • WFM_PM_MODE_BEACON
  • WFM_PM_MODE_DTIM
intervalis 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 782 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_thresholdis the lower RCPI limit trigerring a roaming attempt
rcpi_hysteresisis the High RCPI limit that must be attain before a roaming attempt can be triggered again
beacon_lost_countis the beacon loss limit for a roaming attempt
channel_listis the list of specific channels to scan
channel_list_countis 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 1013 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_timeis 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_timeTime spent on each channel during passive scan. Set to 0 for FW default, 1 - 550 TUs (1 TU = 1.024 ms).
num_probe_requestsis 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 985 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_bitmaskis 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 1067 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
filteris equal to 1 to enable unicast filtering.
Returns
SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise

Definition at line 891 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
channelis the channel used by AP. Between 1 and 14
ssidis the SSID name used by the softap
ssid_lengthis the SSID name length
hidden_ssidis equal to 1 to hide the network
client_isolationis equal to 1 isolate clients from each other
security_modeis 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_protectionis equal to 1 to enable PMF mode
passkeyis the passkey used by the softap. Only applicable in security modes different from WFM_SECURITY_MODE_OPEN.
passkey_lengthis the length of the passkey
beacon_ie_datais the Vendor-specific IE data to be added to beacons
beacon_ie_data_lengthis the length of the beacon IEs
probe_response_ie_datais the Vendor-specific IE data to be added to probe responses
probe_response_ie_data_lengthis 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 410 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 531 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_lengthis the length of the beacon IEs
probe_response_ie_data_lengthis the length of the probe response IEs
beacon_ie_datais the Vendor-specific IE data to be added to beacons
probe_response_ie_datais 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 483 of file sl_wfx.c.

References sl_wfx_allocate_command_buffer(), and SL_WFX_UPDATE_AP_REQ_ID.