FULL_MAC_DRIVER_API
Functions |
|
| sl_status_t | wf200_set_mac_address (const wf200_mac_address_t *mac, wf200_interface_t interface) |
|
Set the MAC address used by wf200.
|
|
| sl_status_t | wf200_send_join_command (const uint8_t *ssid, uint32_t ssid_length, uint16_t security_mode, const uint8_t *passkey, uint32_t passkey_length) |
|
As a station, send a command to join a Wi-Fi network.
|
|
| sl_status_t | wf200_send_disconnect_command (void) |
|
As a station, send a disconnection request to the AP.
|
|
| sl_status_t | wf200_start_ap_command (uint32_t channel, uint8_t *ssid, uint32_t ssid_length, WfmSecurityMode security, const uint8_t *passkey, uint8_t passkey_length) |
|
Send a command to start the softap mode.
|
|
| sl_status_t | wf200_update_ap_command (uint16_t beacon_iedata_length, uint16_t proberesp_iedata_length, uint32_t *beacon_iedata, uint32_t *proberesp_iedata) |
|
Update AP settings.
|
|
| sl_status_t | wf200_stop_ap_command (void) |
|
Send a command to stop the softap mode.
|
|
| sl_status_t | wf200_send_ethernet_frame ( wf200_frame_t *frame, uint32_t data_length, wf200_interface_t interface) |
|
Send an Ethernet frame.
|
|
| sl_status_t | wf200_send_scan_command (uint16_t scan_mode, const uint8_t *channel_list, uint16_t channel_list_count, const WfmHiSsidDef_t *ssid_list, uint16_t ssid_list_count, const uint8_t *ie_data, uint16_t ie_data_length) |
|
send a scan command
|
|
| sl_status_t | wf200_send_stop_scan_command (void) |
|
Stop a scan process.
|
|
| sl_status_t | wf200_get_signal_strength (uint32_t *signal_strength) |
|
Get the signal strength of the last packets received.
|
|
| sl_status_t | wf200_disconnect_ap_client_command (const wf200_mac_address_t *client) |
|
In AP mode, disconnect the specified client.
|
|
| sl_status_t | wf200_set_power_mode ( WfmPmMode mode, uint16_t interval) |
|
Set the power mode used as a station.
|
|
| sl_status_t | wf200_add_multicast_address (const wf200_mac_address_t *mac_address, wf200_interface_t interface) |
|
Configure the maximum number of clients supported in softap mode //TODO.
|
|
| sl_status_t | wf200_set_max_ap_client (uint32_t max_clients) |
|
Configure the maximum number of clients supported in softap mode.
|
|
Function Documentation
◆ wf200_add_multicast_address()
| sl_status_t wf200_add_multicast_address | ( | const wf200_mac_address_t * |
mac_address,
|
| wf200_interface_t |
interface
|
||
| ) |
Configure the maximum number of clients supported in softap mode //TODO.
- Parameters
-
mac_addressinterfaceInterface used to send the ethernet frame. wf200_interface_t. - WF200_STA_INTERFACE
- WF200_SOFTAP_INTERFACE
- Returns
- SL_SUCCESS if the setting is applied correctly, SL_ERROR otherwise
Definition at line
581
of file
wf200.c
.
References
WfmHiAddMulticastAddrReqBody_t::Mac
, and
WFM_HI_ADD_MULTICAST_ADDR_REQ_ID
.
◆ wf200_disconnect_ap_client_command()
| sl_status_t wf200_disconnect_ap_client_command | ( | const wf200_mac_address_t * |
client
|
) |
In AP mode, disconnect the specified client.
- Parameters
-
clientthe mac address of the client to disconnect
- Returns
- SL_SUCCESS if the request has been sent correctly, SL_ERROR otherwise
Definition at line
541
of file
wf200.c
.
References
WfmHiDisconnectApClientReqBody_t::Mac
, and
WFM_HI_DISCONNECT_AP_CLIENT_REQ_ID
.
◆ wf200_get_signal_strength()
| sl_status_t wf200_get_signal_strength | ( | uint32_t * |
signal_strength
|
) |
Get the signal strength of the last packets received.
- Parameters
-
signal_strengthreturn the RCPI value averaged on the last packets received. RCPI ranges from 0 - 220 with 220 corresponds to 0dBm and each increment represents an increase of 0.5 dBm
- Returns
- SL_SUCCESS if the request has been sent correctly, SL_ERROR otherwise
Definition at line
505
of file
wf200.c
.
◆ wf200_send_disconnect_command()
| sl_status_t wf200_send_disconnect_command | ( | void |
|
) |
As a station, send a disconnection request to the AP.
- Returns
- SL_SUCCESS if the command has been sent correctly, SL_ERROR otherwise
Definition at line
279
of file
wf200.c
.
References
WFM_HI_DISCONNECT_REQ_ID
.
◆ wf200_send_ethernet_frame()
| sl_status_t wf200_send_ethernet_frame | ( | wf200_frame_t * |
frame,
|
| uint32_t |
data_length,
|
||
| wf200_interface_t |
interface
|
||
| ) |
Send an Ethernet frame.
- Parameters
-
frameEthernet frame to be sent data_lengthSize of the frame interfaceInterface used to send the ethernet frame. - WF200_STA_INTERFACE
- WF200_SOFTAP_INTERFACE
- Returns
- SL_SUCCESS if the command has been sent correctly, SL_ERROR otherwise
Definition at line
379
of file
wf200.c
.
◆ wf200_send_join_command()
| sl_status_t wf200_send_join_command | ( | const uint8_t * |
ssid,
|
| uint32_t |
ssid_length,
|
||
| uint16_t |
security_mode,
|
||
| const uint8_t * |
passkey,
|
||
| uint32_t |
passkey_length
|
||
| ) |
As a station, send a command to join a Wi-Fi network.
- Note
- The PDS file contains the WF200 settings
- Parameters
-
ssidName of the AP to connect to ssid_lengthSize of the SSID name security_modeSecurity mode of the AP - WFM_SECURITY_MODE_OPEN
- WFM_SECURITY_MODE_WEP
- WFM_SECURITY_MODE_WPA2_WPA1_PSK
- WFM_SECURITY_MODE_WPA2_PSK
passkeyPasskey of the AP passkey_lengthSize of the passkey
- Returns
- SL_SUCCESS if the command has been sent correctly, SL_ERROR otherwise
Definition at line
224
of file
wf200.c
.
◆ wf200_send_scan_command()
| sl_status_t wf200_send_scan_command | ( | uint16_t |
scan_mode,
|
| const uint8_t * |
channel_list,
|
||
| uint16_t |
channel_list_count,
|
||
| const WfmHiSsidDef_t * |
ssid_list,
|
||
| uint16_t |
ssid_list_count,
|
||
| const uint8_t * |
ie_data,
|
||
| uint16_t |
ie_data_length
|
||
| ) |
send a scan command
- Parameters
-
scan_modeMode used for scanning - WFM_SCAN_MODE_PASSIVE
- WFM_SCAN_MODE_ACTIVE
channel_listChannels to be scanned [1;13] channel_list_countNumber of channels to be scanned. If 0 the scan will be performed on every channel. ssid_listSpecify SSID names to look for. WF200 will send information only the specified SSID. Null to request information for every AP found. ssid_list_countThe number of SSID specified [0;2] ie_dataNA ie_data_lengthNA
- Returns
- SL_SUCCESS if the command has been sent correctly, SL_ERROR otherwise
Definition at line
419
of file
wf200.c
.
◆ wf200_send_stop_scan_command()
| sl_status_t wf200_send_stop_scan_command | ( | void |
|
) |
Stop a scan process.
- Returns
- SL_SUCCESS if the request has been sent correctly, SL_ERROR otherwise
Definition at line
494
of file
wf200.c
.
References
WFM_HI_STOP_SCAN_REQ_ID
.
◆ wf200_set_mac_address()
| sl_status_t wf200_set_mac_address | ( | const wf200_mac_address_t * |
mac,
|
| wf200_interface_t |
interface
|
||
| ) |
Set the MAC address used by wf200.
- Parameters
-
macMAC address of the interface interfaceInterface to be configured. wf200_interface_t. - WF200_STA_INTERFACE
- WF200_SOFTAP_INTERFACE
- Returns
- SL_SUCCESS if the request has been sent correctly, SL_ERROR otherwise
Definition at line
202
of file
wf200.c
.
References
WfmHiSetMacAddressReqBody_t::MacAddr
, and
WFM_HI_SET_MAC_ADDRESS_REQ_ID
.
◆ wf200_set_max_ap_client()
| sl_status_t wf200_set_max_ap_client | ( | uint32_t |
max_clients
|
) |
Configure the maximum number of clients supported in softap mode.
- Note
- wf200_set_max_ap_client() has to be called after wf200_start_ap_command() . If the softap is stopped or wf200 resets, the command has to be issued again.
- Parameters
-
max_clientsMaximum number of clients supported in softap.
- Returns
- SL_SUCCESS if the setting is applied correctly, SL_ERROR otherwise
Definition at line
597
of file
wf200.c
.
References
WfmHiSetMaxApClientCountReqBody_t::Count
, and
WFM_HI_SET_MAX_AP_CLIENT_COUNT_REQ_ID
.
◆ wf200_set_power_mode()
| sl_status_t wf200_set_power_mode | ( | WfmPmMode |
mode,
|
| uint16_t |
interval
|
||
| ) |
Set the power mode used as a station.
- Note
- the power mode has to be set once the connection with the AP is established
- Parameters
-
modePower mode to be used by the connection - WFM_PM_MODE_ACTIVE
- WFM_PM_MODE_PS
- WFM_PM_MODE_AUTO
intervalinterval of sleep in seconds
- Returns
- SL_SUCCESS if the request has been sent correctly, SL_ERROR otherwise
Definition at line
561
of file
wf200.c
.
References
WfmHiSetPmModeReqBody_t::PowerMode
, and
WFM_HI_SET_PM_MODE_REQ_ID
.
◆ wf200_start_ap_command()
| sl_status_t wf200_start_ap_command | ( | uint32_t |
channel,
|
| uint8_t * |
ssid,
|
||
| uint32_t |
ssid_length,
|
||
| WfmSecurityMode |
security,
|
||
| const uint8_t * |
passkey,
|
||
| uint8_t |
passkey_length
|
||
| ) |
Send a command to start the softap mode.
- Parameters
-
channelchannel used by the softap ssidSSID name used by the softap ssid_lengthSSID name length securitySecurity level used by the AP - WFM_SECURITY_MODE_OPEN
- WFM_SECURITY_MODE_WEP
- WFM_SECURITY_MODE_WPA2_WPA1_PSK
- WFM_SECURITY_MODE_WPA2_PSK
passkeyPasskey used by the softap if security level is different to WFM_SECURITY_MODE_OPEN passkey_lengthPasskey length, [8;64]
- Returns
- SL_SUCCESS if the request has been sent correctly, SL_ERROR otherwise
Definition at line
299
of file
wf200.c
.
References
WfmHiStartApReqBody_t::Channel
,
WfmHiStartApReqBody_t::Password
,
WfmHiStartApReqBody_t::PasswordLength
,
WfmHiSsidDef_t::Ssid
,
WfmHiStartApReqBody_t::SsidDef
,
WFM_API_PASSWORD_SIZE
,
WFM_HI_START_AP_REQ_ID
, and
WFM_SECURITY_MODE_OPEN
.
◆ wf200_stop_ap_command()
| sl_status_t wf200_stop_ap_command | ( | void |
|
) |
Send a command to stop the softap mode.
- Returns
- SL_SUCCESS if the request has been sent correctly, SL_ERROR otherwise
Definition at line
364
of file
wf200.c
.
References
WFM_HI_STOP_AP_REQ_ID
.
◆ wf200_update_ap_command()
| sl_status_t wf200_update_ap_command | ( | uint16_t |
beacon_iedata_length,
|
| uint16_t |
proberesp_iedata_length,
|
||
| uint32_t * |
beacon_iedata,
|
||
| uint32_t * |
proberesp_iedata
|
||
| ) |
Update AP settings.
- Parameters
-
beacon_iedata_lengthlength of Beacon IE data proberesp_iedata_lengthlength of probe response IE data beacon_iedataBeacon IE data proberesp_iedataprobe response IE data
- Returns
- SL_SUCCESS if the request has been sent correctly, SL_ERROR otherwise
Definition at line
345
of file
wf200.c
.
References
WfmHiUpdateApReqBody_t::BeaconIeDataLength
, and
WFM_HI_UPDATE_AP_REQ_ID
.