XCORE SDK
XCORE Software Development Kit
|
Functions | |
sl_status_t | sl_wfx_set_mac_address (const sl_wfx_mac_address_t *mac, sl_wfx_interface_t interface) |
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. More... | |
sl_status_t | sl_wfx_send_disconnect_command (void) |
Connected as a station, send a disconnection request to the AP. More... | |
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. More... | |
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. More... | |
sl_status_t | sl_wfx_stop_ap_command (void) |
Send a command to stop the softap mode. More... | |
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. More... | |
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. More... | |
sl_status_t | sl_wfx_send_stop_scan_command (void) |
Stop an ongoing scan process. More... | |
sl_status_t | sl_wfx_get_signal_strength (uint32_t *signal_strength) |
Get the signal strength of the last packets received. More... | |
sl_status_t | sl_wfx_disconnect_ap_client_command (const sl_wfx_mac_address_t *client) |
In AP mode, disconnect the specified client. More... | |
sl_status_t | sl_wfx_set_power_mode (sl_wfx_pm_mode_t mode, sl_wfx_pm_poll_t strategy, uint16_t interval) |
Set the power mode used as a station. The Wi-Fi chip will enable the Wi-Fi power mode feature. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
sl_status_t | sl_wfx_set_broadcast_filter (uint32_t filter) |
Set the broadcast filter state. More... | |
sl_status_t | sl_wfx_set_unicast_filter (uint32_t filter) |
Set the unicast filter state. More... | |
sl_status_t | sl_wfx_add_whitelist_address (const sl_wfx_mac_address_t *mac_address) |
Add a mac address to the device whitelist. More... | |
sl_status_t | sl_wfx_add_blacklist_address (const sl_wfx_mac_address_t *mac_address) |
Add a mac address to the device blacklist. More... | |
sl_status_t | sl_wfx_set_max_ap_client (uint32_t max_clients) |
Configure the maximum number of clients supported in softap mode. More... | |
sl_status_t | sl_wfx_set_max_ap_client_inactivity (uint32_t inactivity_timeout) |
Configure the maximum client idle time. More... | |
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. More... | |
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. More... | |
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. More... | |
sl_status_t | sl_wfx_set_max_tx_power (int32_t max_tx_power, sl_wfx_interface_t interface) |
Set maximum transmit power. More... | |
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. More... | |
sl_status_t | sl_wfx_get_pmk (sl_wfx_password_t *password, uint32_t *password_length, sl_wfx_interface_t interface) |
Get the PMK used to connect to the current secure network. More... | |
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. More... | |
sl_status_t | sl_wfx_ext_auth (sl_wfx_ext_auth_data_type_t auth_data_type, uint16_t auth_data_length, const uint8_t *auth_data) |
Send a WPA3 Auth packet. More... | |
sl_status_t sl_wfx_add_blacklist_address | ( | const sl_wfx_mac_address_t * | mac_address | ) |
Add a mac address to the device blacklist.
mac_address | is the MAC address to add. Broadcast address denies all MAC addresses. |
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.
mac_address | is the MAC address to add |
interface | is the interface where to apply the change
|
sl_status_t sl_wfx_add_whitelist_address | ( | const sl_wfx_mac_address_t * | mac_address | ) |
Add a mac address to the device whitelist.
mac_address | is the MAC address to add. Broadcast address allows all MAC addresses. |
sl_status_t sl_wfx_disconnect_ap_client_command | ( | const sl_wfx_mac_address_t * | client | ) |
In AP mode, disconnect the specified client.
client | is the mac address of the client to disconnect |
sl_status_t sl_wfx_ext_auth | ( | sl_wfx_ext_auth_data_type_t | auth_data_type, |
uint16_t | auth_data_length, | ||
const uint8_t * | auth_data | ||
) |
Send a WPA3 Auth packet.
auth_data_type | is the type of the packet to send.
|
auth_data_length | is the length of the data to be sent. |
auth_data | is the data. |
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.
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. |
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.
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_status_t sl_wfx_get_pmk | ( | sl_wfx_password_t * | password, |
uint32_t * | password_length, | ||
sl_wfx_interface_t | interface | ||
) |
Get the PMK used to connect to the current secure network.
password | is the current Pairwise Master Key |
password_length | is its length in bytes |
interface | is the interface used to send the request.
|
sl_status_t sl_wfx_get_signal_strength | ( | uint32_t * | signal_strength | ) |
Get the signal strength of the last packets received.
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. |
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.
mac_address | is the MAC address to remove |
interface | is the interface where to apply the change
|
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_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.
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.
|
priority | is the priority level used to send the Ethernet frame. |
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.
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
|
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 |
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.
scan_mode | is the mode used during the scan phase
|
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. |
sl_status_t sl_wfx_send_stop_scan_command | ( | void | ) |
Stop an ongoing scan process.
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.
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) |
sl_status_t sl_wfx_set_broadcast_filter | ( | uint32_t | filter | ) |
Set the broadcast filter state.
filter | is equal to 1 to enable broadcast filtering. |
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
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_status_t sl_wfx_set_max_ap_client | ( | uint32_t | max_clients | ) |
Configure the maximum number of clients supported in softap mode.
max_clients | is the maximum number of clients supported in softap. Broadcast address denies all MAC addresses. |
sl_status_t sl_wfx_set_max_ap_client_inactivity | ( | uint32_t | inactivity_timeout | ) |
Configure the maximum client idle time.
inactivity_timeout | is the maximum client idle time in seconds. |
sl_status_t sl_wfx_set_max_tx_power | ( | int32_t | max_tx_power, |
sl_wfx_interface_t | interface | ||
) |
Set maximum transmit power.
max_tx_power | is the maximum transmit power in units of 0.1d_bm. |
interface | is the interface used to send the request.
|
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.
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) |
sl_status_t sl_wfx_set_power_mode | ( | sl_wfx_pm_mode_t | mode, |
sl_wfx_pm_poll_t | strategy, | ||
uint16_t | interval | ||
) |
Set the power mode used as a station. The Wi-Fi chip will enable the Wi-Fi power mode feature.
mode | is the power mode to be used by the connection
|
interval | is the number of beacons/DTIMs to skip while sleeping |
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.
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 |
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.
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 |
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.
rate_set_bitmask | is the list of rates that will be used in STA mode. |
sl_status_t sl_wfx_set_unicast_filter | ( | uint32_t | filter | ) |
Set the unicast filter state.
filter | is equal to 1 to enable unicast filtering. |
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.
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
|
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 |
sl_status_t sl_wfx_stop_ap_command | ( | void | ) |
Send a command to stop 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.
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 |