113 #ifndef __WIFI_API_H__ 114 #define __WIFI_API_H__ 130 #define WIFI_MAX_LENGTH_OF_SSID (32) 134 #define WIFI_MAC_ADDRESS_LENGTH (6) 139 #define WIFI_LENGTH_802_11 (24) 143 #define WIFI_TIMESTAMP_LENGTH (8) 147 #define WIFI_BEACON_INTERVAL_LENGTH (2) 151 #define WIFI_CAPABILITY_INFO_LENGTH (2) 156 #define WIFI_MAX_NUMBER_OF_STA (16) 160 #define WIFI_LENGTH_PASSPHRASE (64) 164 #define WIFI_LENGTH_PMK (32) 168 #define WIFI_PROFILE_BUFFER_AP "AP" 172 #define WIFI_PROFILE_BUFFER_STA "STA" 176 #define WIFI_PROFILE_BUFFER_COMMON "common" 182 #define WIFI_PROFILE_BUFFER_LENGTH (128) 186 #define WIFI_BAND_2_4_G (0) 190 #define WIFI_BAND_5_G (1) 195 #define WIFI_STATUS_LINK_DISCONNECTED (0) 199 #define WIFI_STATUS_LINK_CONNECTED (1) 203 #define WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_20MHZ (0x00) 207 #define WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_40MHZ (0x01) 211 #define WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_2040MHZ (WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_20MHZ|WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_40MHZ) 217 #define WIFI_MODE_STA_ONLY (1) 222 #define WIFI_MODE_AP_ONLY (2) 228 #define WIFI_MODE_REPEATER (3) 237 #define WIFI_MODE_MONITOR (4) 242 #define WIFI_MODE_P2P_ONLY (5) 246 #define WIFI_PORT_STA (0) 251 #define WIFI_PORT_APCLI WIFI_PORT_STA 256 #define WIFI_PORT_AP (1) 258 #define WIFI_NUMBER_WEP_KEYS (4) 259 #define WIFI_MAX_WEP_KEY_LENGTH (26) 261 #define WIFI_INIT_TIME_OUT 1000 266 #define WIFI_WPS_MAX_LENGTH_DEVICE_NAME (32) 267 #define WIFI_WPS_MAX_LENGTH_MANUFACTURER (64) 268 #define WIFI_WPS_MAX_LENGTH_MODEL_NAME (32) 269 #define WIFI_WPS_MAX_LENGTH_MODEL_NUMBER (32) 270 #define WIFI_WPS_MAX_LENGTH_SERIAL_NUMBER (32) 292 WIFI_EVENT_MAX_NUMBER
404 WIFI_ENCRYPT_TYPE_ENCRYPT_SMS4_ENABLED,
473 WIFI_WPS_DPID_MAX_NUMBER = 0xFFFF
582 uint32_t sta_wep_key_index_present: 1;
583 uint32_t sta_auto_connect_present: 1;
584 uint32_t ap_wep_key_index_present: 1;
585 uint32_t ap_hidden_ssid_enable_present: 1;
586 uint32_t country_code_present: 1;
587 uint32_t sta_bandwidth_present: 1;
588 uint32_t sta_wireless_mode_present: 1;
589 uint32_t sta_listen_interval_present: 1;
590 uint32_t sta_power_save_mode_present: 1;
591 uint32_t ap_wireless_mode_present: 1;
592 uint32_t ap_dtim_interval_present: 1;
593 uint32_t reserved_bit: 21;
594 uint32_t reserved_word[3];
600 uint8_t country_code[4];
668 struct _wifi_scan_list_t *
next;
686 uint16_t bandwidth: 2;
687 uint16_t short_gi: 1;
689 uint16_t external_tx_beam_forming: 1;
690 uint16_t internal_tx_beam_forming: 1;
736 uint8_t country_code[4];
743 #ifdef MTK_WIFI_WPS_ENABLE 768 #endif //end of MTK_WIFI_WPS_ENABLE 2546 int32_t
wifi_connection_start_scan(uint8_t *ssid, uint8_t ssid_length, uint8_t *bssid, uint8_t scan_mode, uint8_t scan_option);
2651 #ifdef MTK_WIFI_PROFILE_ENABLE 3162 #endif //MTK_WIFI_PROFILE_ENABLE 3164 #ifdef MTK_WIFI_WPS_ENABLE 3282 #endif //end of MTK_WIFI_WPS_ENABLE Rekey.
Definition: wifi_api.h:470
int32_t wifi_config_set_listen_interval(uint8_t interval)
This function sets the beacon listen interval used in the Wi-Fi driver in a station mode...
uint8_t central_channel
The center channel in 40MHz bandwidth.
Definition: wifi_api.h:653
The dynamic PIN is shown on a display that is part of the device.
Definition: wifi_api.h:495
int32_t wifi_connection_stop_scan(void)
This function stops the Wi-Fi Scanning triggered by wifi_connection_start_scan(). ...
int32_t wifi_profile_get_wireless_mode(uint8_t port, wifi_phy_mode_t *mode)
int32_t wifi_connection_get_max_sta_number(uint8_t *sta_number)
This function gets the maximum number of the supported stations in the AP mode or repeater mode...
wifi_event_handler_t wifi_event_handler
This is only for compatibility purpose, so that applications implemented with an earlier version of t...
Definition: wifi_api.h:522
wps_device_password_id_t
This enumeration of device password ID is used for WPS.
Definition: wifi_api.h:466
int32_t wifi_wps_config_get_pin_code(uint8_t port, uint8_t *pin_code)
This function gets the pin code of a specific wireless port, the pin code may be different for each f...
int32_t wifi_config_set_smart_connection_filter(uint8_t flag)
This function sets MediaTek Smart Connection RX Filter used in the Wi-Fi driver.
37 Requested from peer STA as it does not want to use the mechanism.
Definition: wifi_api.h:332
11, 11n-only with 5GHz band.
Definition: wifi_api.h:423
uint8_t ssid_length
The length of the SSID.
Definition: wifi_api.h:559
wps_config_method_t
This enumeration lists the configuration methods supported by the Enrollee or Registrar.
Definition: wifi_api.h:482
Not supported.
Definition: wifi_api.h:390
int32_t wifi_config_register_rx_handler(wifi_rx_handler_t wifi_rx_handler)
This function registers a handler to receive 802.11 raw packets from a network processor.
uint8_t dfs_type
Not supported.
Definition: wifi_api.h:737
uint8_t geography
Not supported.
Definition: wifi_api.h:731
The NFC tag is integrated in the device.
Definition: wifi_api.h:488
#define WIFI_WPS_MAX_LENGTH_DEVICE_NAME
The length of device information used for WPS.
Definition: wifi_api.h:266
int32_t wifi_config_get_country_code(wifi_country_code_t *wifi_country_code)
This function gets the country code string that the Wi-Fi driver uses.
int32_t wifi_profile_get_dtim_interval(uint8_t *interval)
uint8_t max_tx_power
The maximum transmit power in the single channel table, the unit is dBm.
Definition: wifi_api.h:730
int32_t wifi_config_get_country_region(uint8_t band, uint8_t *region)
wps_config_method_t configuration_methods
Indicates AP's capability to support WPS methods.
Definition: wifi_api.h:640
3 Deauthenticated because sending STA is leaving (or has left) IBSS or ES.
Definition: wifi_api.h:303
2, WEP128 cipher.
Definition: wifi_api.h:431
uint8_t mcs
Defines the packet data rate.
Definition: wifi_api.h:629
This structure is the Wi-Fi configuration for initialization in STA mode.
Definition: wifi_api.h:545
uint8_t key_index
The WEP key inndex.
Definition: wifi_api.h:763
Secure event, mainly processed in Wi-Fi driver.
Definition: wifi_api.h:286
int32_t wifi_config_get_dtim_interval(uint8_t *interval)
This function gets the DTIM interval used in the Wi-Fi driver in the SoftAP mode. ...
23 IEEE 802.1X authentication failed.
Definition: wifi_api.h:322
WPS PBC available on a physical push button of the device.
Definition: wifi_api.h:493
36 Requested from peer STA as the STA is leaving the BSS (or resetting).
Definition: wifi_api.h:331
int32_t wifi_profile_set_bandwidth(uint8_t port, uint8_t bandwidth)
WIFI_POWER_SAVING_MODE_OFF is a power saving mode that keeps the radio powered up continuously to ens...
Definition: wifi_api.h:456
int32_t wifi_config_set_wep_key(uint8_t port, wifi_wep_key_t *wep_keys)
This function sets the WEP key group used in the Wi-Fi driver for a specific wireless port...
10, BIP cipher.
Definition: wifi_api.h:439
uint8_t wireless_mode
Please refer to the definition of wifi_phy_mode_t.
Definition: wifi_api.h:626
A dynamic PIN from a display.
Definition: wifi_api.h:486
4, 2.4GHz band.
Definition: wifi_api.h:416
Not supported.
Definition: wifi_api.h:397
This structure is the Wi-Fi configuration for initialization in AP mode.
Definition: wifi_api.h:557
int32_t wifi_profile_get_profile(uint8_t port, wifi_profile_t *profile)
3, TKIP cipher.
Definition: wifi_api.h:432
41 (Internal) Invalid group cipher.
Definition: wifi_api.h:336
32 Disassociated for unspecified, QoS-related reason.
Definition: wifi_api.h:327
7, CKIP152 cipher.
Definition: wifi_api.h:436
6 Class 2 frame received from nonauthenticated STA.
Definition: wifi_api.h:306
wifi_phy_mode_t sta_wireless_mode
The wireless mode setting for STA.
Definition: wifi_api.h:602
No encryption.
Definition: wifi_api.h:387
int32_t wifi_config_get_opmode(uint8_t *mode)
This function receives the wireless operation mode of the Wi-Fi driver.
uint8_t password_length
The length of the password.
Definition: wifi_api.h:561
Not supported.
Definition: wifi_api.h:371
39 Requested from peer STA due to time out.
Definition: wifi_api.h:334
int32_t wifi_wps_config_get_device_info(wifi_wps_device_info_t *device_info)
This function gets the WPS device information.
int32_t wifi_profile_set_dtim_interval(uint8_t interval)
int32_t wifi_profile_set_listen_interval(uint8_t interval)
int32_t wifi_config_get_wireless_mode(uint8_t port, wifi_phy_mode_t *mode)
This function gets the wireless mode that the Wi-Fi driver uses for a specific wireless port...
int32_t(* wifi_event_handler_t)(wifi_event_t event, uint8_t *payload, uint32_t length)
This defines the Wi-Fi event handler.
Definition: wifi_api.h:516
int32_t wifi_config_get_ssid(uint8_t port, uint8_t *ssid, uint8_t *ssid_length)
This function gets the SSID and SSID length of a specific wireless port used by the Wi-Fi driver...
7, 2.4GHz band.
Definition: wifi_api.h:419
wifi_bandwidth_ext_t
This enumeration defines 40MHz bandwidth extension.
Definition: wifi_api.h:447
5, CKIP64 cipher.
Definition: wifi_api.h:434
wifi_auth_mode_t
This enumeration defines the wireless authentication mode to indicate the Wi-Fi device’s authenticat...
Definition: wifi_api.h:369
Not supported.
Definition: wifi_api.h:401
0 Reserved.
Definition: wifi_api.h:300
9 STA requesting (re)association is not authenticated with responding STA.
Definition: wifi_api.h:309
#define WIFI_MAX_LENGTH_OF_SSID
The maximum length of SSID.
Definition: wifi_api.h:130
42 (Internal) Invalid pairwise cipher.
Definition: wifi_api.h:337
4 Disassociated due to inactivity.
Definition: wifi_api.h:304
WPS PBC supports software user interface.
Definition: wifi_api.h:492
uint8_t ap_dtim_interval
The DTIM interval setting for AP.
Definition: wifi_api.h:606
uint16_t beacon_interval
Indicates the beacon interval.
Definition: wifi_api.h:659
16 Group Key Handshake time out.
Definition: wifi_api.h:315
Push button.
Definition: wifi_api.h:471
Report the expected packet frame.
Definition: wifi_api.h:290
19 Invalid pairwise cipher.
Definition: wifi_api.h:318
int32_t wifi_profile_get_listen_interval(uint8_t *interval)
uint32_t key_length
Key length.
Definition: wifi_api.h:765
WPA2_PSK.
Definition: wifi_api.h:377
int32_t wifi_connection_register_event_handler(wifi_event_t event, wifi_event_handler_t handler)
This function registers the Wi-Fi event handler.
2, 5GHz band.
Definition: wifi_api.h:414
int32_t wifi_config_get_rx_filter(uint32_t *flag)
This function gets the Wi-Fi RX filter used in the Wi-Fi driver.
uint8_t bssid_present
The BSSID is present if it is set to 1.
Definition: wifi_api.h:548
int32_t wifi_connection_scan_init(wifi_scan_list_item_t *ap_list, uint32_t max_count)
This function initializes the scan table in the Wi-Fi driver.
int32_t wifi_config_set_channel(uint8_t port, uint8_t channel)
This function sets the channel number that the Wi-Fi driver uses for a specific wireless port...
Not supported.
Definition: wifi_api.h:402
int32_t wifi_config_get_channel(uint8_t port, uint8_t *channel)
This function gets the channel number that the Wi-Fi driver uses for a specific wireless port...
wifi_security_cipher_suits_t
This enumeration defines wireless security cipher suits.
Definition: wifi_api.h:428
uint16_t reserved_one
For padding.
Definition: wifi_api.h:700
int32_t wifi_connection_get_rssi(int8_t *rssi)
This function gets the RSSI of the connected AP.
int32_t wifi_config_get_bandwidth(uint8_t port, uint8_t *bandwidth)
This function gets the bandwidth configuration that the Wi-Fi driver uses for a specific wireless por...
int32_t wifi_profile_set_mac_address(uint8_t port, uint8_t *address)
11 Disassociated because the information in the Supported Channels element is unacceptable.
Definition: wifi_api.h:311
bit 12 Enables report frames.
Definition: wifi_api.h:356
Open mode.
Definition: wifi_api.h:370
TKIP or AES mix.
Definition: wifi_api.h:398
uint8_t sta_auto_connect
Set to 1 to enable the STA to automatically connect to the target AP after the initialization.
Definition: wifi_api.h:597
33 Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA.
Definition: wifi_api.h:328
int32_t wifi_connection_get_sta_list(uint8_t *number, wifi_sta_list_t *sta_list)
This function gets the station list associated with the Wi-Fi, only for SoftAP mode.
AES encryption.
Definition: wifi_api.h:395
int32_t wifi_profile_get_opmode(uint8_t *mode)
40 (Internal) Invalid information element.
Definition: wifi_api.h:335
wps_device_password_id_t device_password_id
Indicates AP WPS status, only when selected_registrar is 1, this parameter will take effect...
Definition: wifi_api.h:639
bit 2 A reserved bit, not used.
Definition: wifi_api.h:350
bool dfs_req
0: No DFS request, 1: DFS request.
Definition: wifi_api.h:732
Definition: wifi_api.h:735
43 (Internal) Invalid AKMP.
Definition: wifi_api.h:338
int32_t wifi_wps_config_set_device_info(wifi_wps_device_info_t *device_info)
This function sets the WPS device information.
bit 17 Drops not my BSSID frames.
Definition: wifi_api.h:361
6, 11n-only with 2.4GHz band.
Definition: wifi_api.h:418
bit 15 Drops RTS frames.
Definition: wifi_api.h:359
#define WIFI_WPS_MAX_LENGTH_MANUFACTURER
The maximum length of manufacturer's name.
Definition: wifi_api.h:267
0, No cipher.
Definition: wifi_api.h:429
9, 2.4GHz band.
Definition: wifi_api.h:421
#define WIFI_MAX_WEP_KEY_LENGTH
The maximum length of each WEP key.
Definition: wifi_api.h:259
Not supported.
Definition: wifi_api.h:375
Not supported.
Definition: wifi_api.h:378
8, SMS4 cipher.
Definition: wifi_api.h:437
int32_t wifi_profile_set_ssid(uint8_t port, uint8_t *ssid, uint8_t ssid_length)
No encryption.
Definition: wifi_api.h:388
int8_t rssi
Records the RSSI value when probe response is received.
Definition: wifi_api.h:648
int32_t(* wifi_rx_handler_t)(uint8_t *payload, uint32_t length)
This defines the 802.11 RX raw packet handler.
Definition: wifi_api.h:532
bit 19 Drops different BSSID TIM (Traffic Indication Map) Broadcast frame.
Definition: wifi_api.h:363
int32_t wifi_config_get_security_mode(uint8_t port, wifi_auth_mode_t *auth_mode, wifi_encrypt_type_t *encrypt_type)
This function gets the authentication and encryption modes used in the Wi-Fi driver for a specific wi...
17 Information element in 4-Way Handshake different from (Re)Association Request/Probe Response/Beaco...
Definition: wifi_api.h:316
int32_t wifi_profile_get_bandwidth(uint8_t port, uint8_t *bandwidth)
5 Disassociated because AP is unable to handle all currently associated STAs.
Definition: wifi_api.h:305
Definition: wifi_api.h:484
Not supported.
Definition: wifi_api.h:400
1, 2.4GHz band.
Definition: wifi_api.h:413
int32_t wifi_config_get_wpa_psk_key(uint8_t port, uint8_t *passphrase, uint8_t *passphrase_length)
This function gets the password of the WPA-PSK or WPA2-PSK encryption type used in the Wi-Fi driver f...
int32_t wifi_config_set_wireless_mode(uint8_t port, wifi_phy_mode_t mode)
This function gets the wireless mode that the Wi-Fi driver uses for a specific wireless port...
int32_t wifi_profile_get_power_save_mode(uint8_t *power_save_mode)
wifi_auth_mode_t auth_mode
Please refer to the definition of wifi_auth_mode_t.
Definition: wifi_api.h:655
int32_t wifi_config_set_pmk(uint8_t port, uint8_t *pmk)
wifi_auth_mode_t auth_mode
Please refer to the definition of wifi_auth_mode_t.
Definition: wifi_api.h:761
24 Cipher suite rejected because of the security policy.
Definition: wifi_api.h:323
bit 1 Drops the FCS error frames.
Definition: wifi_api.h:349
wifi_ap_config_t ap_config
The configurations for the AP.
Definition: wifi_api.h:575
8 Disassociated because sending STA is leaving (or has left) BSS.
Definition: wifi_api.h:308
int32_t wifi_connection_register_event_notifier(uint8_t event, wifi_event_handler_t notifier)
int32_t wifi_config_set_dtim_interval(uint8_t interval)
This function sets the DTIM interval used in the Wi-Fi driver in the SoftAP mode. ...
Mixture mode.
Definition: wifi_api.h:379
26 (Internal) Association denied due to requesting STA not supporting the DSSS-OFDM option...
Definition: wifi_api.h:325
int32_t wifi_connection_disconnect_sta(uint8_t *address)
This function disconnects specific station's connection, and takes effect immediately.
wifi_reason_code_t
This enumeration defines the reason code of the WIFI_EVENT_IOT_CONNECTION_FAILED event in wifi_event_...
Definition: wifi_api.h:299
uint8_t cipher_type
0:none, 1:WEP64, 2:WEP128, 3:TKIP, 4:AES, 5:CKIP64, 6:CKIP128.
Definition: wifi_api.h:719
int32_t wifi_config_reload_setting(void)
This function informs the Wi-Fi driver to reload the configuration and applies the configuration sett...
Machine specified.
Definition: wifi_api.h:469
This structure provides the detailed cipher information.
Definition: wifi_api.h:713
22 Invalid RSN information element capabilities.
Definition: wifi_api.h:321
Not supported.
Definition: wifi_api.h:392
bit 6 Drops broadcast frame.
Definition: wifi_api.h:354
bit 18 Drops not unicast to me frames.
Definition: wifi_api.h:362
35 Disassociated because STA is transmitting outside the limits of its TXOPs.
Definition: wifi_api.h:330
wifi_rx_filter_t
This enumeration defines the RX filter register's bitmap.
Definition: wifi_api.h:347
#define WIFI_WPS_MAX_LENGTH_MODEL_NAME
The maximum length of module name.
Definition: wifi_api.h:268
wifi_scan_list_item_t ap_data
The information about an AP obtained through the scan result is stored in this data member...
Definition: wifi_api.h:667
bool is_hidden
Indicates the SSID is hidden or not.
Definition: wifi_api.h:657
struct _wifi_scan_list_t * next
Next item in the list.
Definition: wifi_api.h:668
uint8_t power_save_mode
Station power save mode.
Definition: wifi_api.h:705
int32_t wifi_config_get_mac_address(uint8_t port, uint8_t *address)
This function gets the MAC address of a specific wireless port used by the Wi-Fi driver.
44 (Internal) Unsupported RSN information element version.
Definition: wifi_api.h:339
wifi_event_t
This enumeration defines the supported events generated by the Wi-Fi driver.
Definition: wifi_api.h:282
100 (Internal) Connection has failed, wrong password.
Definition: wifi_api.h:341
int32_t wifi_profile_get_country_region(uint8_t band, uint8_t *region)
Not supported.
Definition: wifi_api.h:391
34 Disassociated because excessive number of frames need to be acknowledged, but are not acknowledged...
Definition: wifi_api.h:329
uint8_t num_of_channel
The number of channels in the single channel table.
Definition: wifi_api.h:729
8, 5GHz band.
Definition: wifi_api.h:420
int32_t wifi_profile_get_security_mode(uint8_t port, wifi_auth_mode_t *auth_mode, wifi_encrypt_type_t *encrypt_type)
int32_t wifi_config_set_bandwidth(uint8_t port, uint8_t bandwidth)
This function sets the bandwidth configuration that the Wi-Fi driver uses for a specific wireless por...
uint8_t bss_type
Indicates the type of BSS.
Definition: wifi_api.h:658
wifi_bandwidth_ext_t bandwidth_ext
The bandwidth extension.
Definition: wifi_api.h:566
5, both 2.4G and 5G band.
Definition: wifi_api.h:417
13 Invalid information element.
Definition: wifi_api.h:312
uint8_t bandwidth
Negotiation bandwidth.
Definition: wifi_api.h:706
int32_t wifi_config_get_bssid(uint8_t *bssid)
This function should be used only in station mode or in APCLI port of repeater mode.
uint8_t sta_bandwidth
The bandwidth setting for STA.
Definition: wifi_api.h:601
int32_t wifi_config_get_wep_key(uint8_t port, wifi_wep_key_t *wep_keys)
This function gets the WEP key group used in the Wi-Fi driver for a specific wireless port...
7 Class 3 frame received from nonauthenticated STA.
Definition: wifi_api.h:307
bool is_wps_supported
Indicates whether WPS is supported or not.
Definition: wifi_api.h:654
15 4-Way Handshake time out.
Definition: wifi_api.h:314
4, AES cipher.
Definition: wifi_api.h:433
#define WIFI_NUMBER_WEP_KEYS
The group number of WEP keys.
Definition: wifi_api.h:258
wifi_encrypt_type_t
This enumeration defines the wireless encryption type to indicate the Wi-Fi device’s encryption attr...
Definition: wifi_api.h:384
Device is capable of entering a PIN.
Definition: wifi_api.h:491
wifi_wps_element_t wps_element
Please refer to the definition of wifi_wps_element_t.
Definition: wifi_api.h:661
uint8_t num_of_channel_table
Number of channel table.
Definition: wifi_api.h:738
int32_t wifi_profile_get_pmk(uint8_t port, uint8_t *pmk)
int32_t wifi_profile_set_wireless_mode(uint8_t port, wifi_phy_mode_t mode)
40MHz up.
Definition: wifi_api.h:448
Wi-Fi profile entity.
Definition: wifi_api.h:622
10 Disassociated because the information in the Power Capability element is unacceptable.
Definition: wifi_api.h:310
Not supported.
Definition: wifi_api.h:373
uint8_t first_channel
The first channel in the single channel table.
Definition: wifi_api.h:728
int32_t wifi_profile_get_mac_address(uint8_t port, uint8_t *address)
uint32_t ssid_len
The length of Registrar network SSID.
Definition: wifi_api.h:760
int32_t wifi_config_set_country_region(uint8_t band, uint8_t region)
uint16_t reserved_two
For padding.
Definition: wifi_api.h:702
2 Previous authentication is no longer valid.
Definition: wifi_api.h:302
1 (Internal) No AP found.
Definition: wifi_api.h:301
uint8_t keep_alive
Keep alive status.
Definition: wifi_api.h:707
wifi_rssi_sample_t rssi_sample
The RSSI sample.
Definition: wifi_api.h:703
Connection has failed.
Definition: wifi_api.h:291
wifi_phy_mode_t
This enumeration defines the wireless physical mode.
Definition: wifi_api.h:411
The dynamic PIN is displayed through a remote user interface, such as an HTML page.
Definition: wifi_api.h:494
9, WEP152 cipher.
Definition: wifi_api.h:438
wifi_power_saving_mode_t
This enumeration defines three power saving modes.
Definition: wifi_api.h:455
int32_t wifi_profile_set_pmk(uint8_t port, uint8_t *pmk)
bit 0 Drops the STBC beacon/BC/MC frames.
Definition: wifi_api.h:348
27 (Internal) HT not supported.
Definition: wifi_api.h:326
#define WIFI_WPS_MAX_LENGTH_SERIAL_NUMBER
The maximum length of serial number.
Definition: wifi_api.h:270
wifi_phy_mode_t ap_wireless_mode
The wireless mode setting for AP.
Definition: wifi_api.h:605
int32_t wifi_wps_config_get_auto_connection(bool *auto_connection)
This function gets auto connection configuration.
User specified.
Definition: wifi_api.h:468
wifi_auth_mode_t auth_mode
The authentication mode.
Definition: wifi_api.h:562
This structure defines the list of scanned APs with their corresponding information.
Definition: wifi_api.h:646
int32_t wifi_profile_set_channel(uint8_t port, uint8_t channel)
uint8_t ssid_length
Length of the SSID.
Definition: wifi_api.h:650
#define WIFI_LENGTH_PASSPHRASE
The maximum length of passphrase used in WPA-PSK and WPA2-PSK encryption types.
Definition: wifi_api.h:160
uint8_t channel
The channel used.
Definition: wifi_api.h:627
12, TKIP_NO_MIC cipher.
Definition: wifi_api.h:441
uint8_t password_length
The length of the password.
Definition: wifi_api.h:551
int32_t wifi_connection_scan_deinit(void)
This function deinitializes the scan table.
bit 13 Drops reserved definition control frames.
Definition: wifi_api.h:357
int32_t wifi_config_set_rx_filter(uint32_t flag)
This function sets the Wi-Fi RX filter used in the Wi-Fi driver.
int32_t wifi_profile_get_channel(uint8_t port, uint8_t *channel)
int32_t wifi_profile_set_power_save_mode(uint8_t power_save_mode)
uint8_t sta_listen_interval
The listening interval setting for STA.
Definition: wifi_api.h:603
uint16_t capability_info
The Capability Information field contains a number of subfields that are used to indicate requested o...
Definition: wifi_api.h:660
uint8_t wep_tx_key_index
Default key index for TX frames using WEP.
Definition: wifi_api.h:616
int32_t wifi_config_get_listen_interval(uint8_t *interval)
This function gets the beacon listen interval used in the Wi-Fi driver in a station mode...
int32_t wifi_config_get_smart_connection_filter(uint8_t *flag)
This function gets MediaTek Smart Connection RX Filter used in the Wi-Fi driver.
wifi_power_saving_mode_t sta_power_save_mode
The power saving mode setting for STA.
Definition: wifi_api.h:604
Connected event.
Definition: wifi_api.h:283
int32_t wifi_connection_unregister_event_handler(wifi_event_t event, wifi_event_handler_t handler)
This function unregisters Wi-Fi event handler.
WEP encryption type.
Definition: wifi_api.h:386
int32_t wifi_config_set_wpa_psk_key(uint8_t port, uint8_t *passphrase, uint8_t passphrase_length)
This function sets the password of the WPA-PSK or WPA2-PSK encryption type used in the Wi-Fi driver f...
bit 5 Drops multicast frame.
Definition: wifi_api.h:353
uint8_t key_length
Key length for each key, 0: entry is invalid.
Definition: wifi_api.h:720
Disconnected event.
Definition: wifi_api.h:285
#define WIFI_MAC_ADDRESS_LENGTH
MAC address length.
Definition: wifi_api.h:134
1, WEP64 cipher.
Definition: wifi_api.h:430
25 (Internal) Association denied due to requesting STA not supporting the Short Slot Time option...
Definition: wifi_api.h:324
int32_t wifi_config_set_security_mode(uint8_t port, wifi_auth_mode_t auth_mode, wifi_encrypt_type_t encrypt_type)
This function sets the authentication and encryption modes used in the Wi-Fi driver for a specific wi...
int32_t wifi_profile_set_opmode(uint8_t mode)
int32_t wifi_connection_start_scan(uint8_t *ssid, uint8_t ssid_length, uint8_t *bssid, uint8_t scan_mode, uint8_t scan_option)
This function starts Wi-Fi Scanning.
uint8_t auth_mode
Wi-Fi authentication mode, please refer to the definition of wifi_auth_mode_t.
Definition: wifi_api.h:630
11, WAPI cipher.
Definition: wifi_api.h:440
Not supported.
Definition: wifi_api.h:372
18 Invalid group cipher.
Definition: wifi_api.h:317
uint8_t bandwidth
The bandwidth that is either WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_20MHZ or WIFI_IOT_COMMAND_CONFIG_BANDW...
Definition: wifi_api.h:565
uint8_t sta_wep_key_index
The WEP key index for STA.
Definition: wifi_api.h:596
Scan completed event.
Definition: wifi_api.h:284
uint8_t channel
The channel.
Definition: wifi_api.h:564
uint8_t encrypt_mode
Wi-Fi encryption mode, please refer to the definition of wifi_encrypt_type_t.
Definition: wifi_api.h:631
TKIP or AES mix.
Definition: wifi_api.h:399
uint8_t type
Indicates the type (pairwise or group) when reporting a MIC error.
Definition: wifi_api.h:722
Wi-Fi extention configuration for initialization.
Definition: wifi_api.h:581
int32_t wifi_config_get_pmk(uint8_t port, uint8_t *pmk)
int32_t wifi_connection_parse_beacon(uint8_t *pbuf, uint32_t len, wifi_scan_list_item_t *ap_data)
This function parses the beacon or probe request packets.
int32_t wifi_connection_get_link_status(uint8_t *link_status)
This function gets the current STA port's link up or link down connection status. ...
int32_t wifi_profile_set_security_mode(uint8_t port, wifi_auth_mode_t auth_mode, wifi_encrypt_type_t encrypt_type)
10, both 2.4G and 5G band.
Definition: wifi_api.h:422
bit 14 Drops CTS frames.
Definition: wifi_api.h:358
Sends notification, if beacon or probe request is received.
Definition: wifi_api.h:287
38 Requested from peer STA as the STA received frames using the mechanism for which a setup is requir...
Definition: wifi_api.h:333
uint8_t ap_hidden_ssid_enable
Set to 1 to enable the hidden SSID in the beacon and probe response packets.
Definition: wifi_api.h:599
int32_t wifi_profile_set_wpa_psk_key(uint8_t port, uint8_t *passphrase, uint8_t passphrase_length)
bit 3 Drops the version field of Frame Control field.
Definition: wifi_api.h:351
20 Invalid AKMP.
Definition: wifi_api.h:319
int32_t wifi_connection_disconnect_ap(void)
This function immediately disconnects the current connection from the connected AP.
int32_t wifi_connection_send_raw_packet(uint8_t *raw_packet, uint32_t length)
This function sends a raw Wi-Fi packet over the air.
int32_t wifi_config_set_bssid(uint8_t *bssid)
This function should be used only in station mode or in APCLI port of repeater mode.
int32_t wifi_profile_get_ssid(uint8_t port, uint8_t *ssid, uint8_t *ssid_length)
void wifi_init(wifi_config_t *config, wifi_config_ext_t *config_ext)
This function initializes the Wi-Fi module.
uint8_t is_valid
Indicates whether the scanned item is valid.
Definition: wifi_api.h:647
40MHz below.
Definition: wifi_api.h:449
int32_t wifi_wps_connection_by_pin(uint8_t port, uint8_t *bssid, uint8_t *pin_code)
This function triggers the WPS PIN process.
int32_t wifi_config_get_radio(uint8_t *on_off)
This function gets the radio status of the Wi-Fi driver.
bit 4 Drops the probe request frame.
Definition: wifi_api.h:352
uint8_t channel
The channel used.
Definition: wifi_api.h:652
int32_t wifi_config_set_country_code(wifi_country_code_t *wifi_country_code)
Set the country code.
Wi-Fi WEP keys.
Definition: wifi_api.h:613
int32_t wifi_profile_commit_setting(char *profile_section)
bit 16 Drops duplicate frames.
Definition: wifi_api.h:360
6, CKIP128 cipher.
Definition: wifi_api.h:435
8-digit static PIN.
Definition: wifi_api.h:485
wifi_transmit_setting_t last_rx_rate
The latest RX rate.
Definition: wifi_api.h:701
wifi_sta_config_t sta_config
The configurations for the STA.
Definition: wifi_api.h:574
wifi_transmit_setting_t last_tx_rate
The latest TX rate.
Definition: wifi_api.h:699
bool selected_registrar
Indicates whether AP WPS is triggered and in progress.
Definition: wifi_api.h:638
AES encryption.
Definition: wifi_api.h:396
uint8_t bandwidth
The bandwidth is 20MHz or 40MHz.
Definition: wifi_api.h:628
bit 11 Drops beacon frame.
Definition: wifi_api.h:355
WPS PBC supports either a physical or a virtual pushbutton.
Definition: wifi_api.h:490
int32_t wifi_config_set_ssid(uint8_t port, uint8_t *ssid, uint8_t ssid_length)
This function sets the SSID and SSID length that the Wi-Fi driver uses for a specific wireless port...
TKIP encryption.
Definition: wifi_api.h:394
0, 2.4GHz band.
Definition: wifi_api.h:412
Registrar specified.
Definition: wifi_api.h:472
WIFI_POWER_SAVING_MODE_LEGACY: The access point buffers incoming messages for the radio...
Definition: wifi_api.h:457
int32_t wifi_profile_get_wpa_psk_key(uint8_t port, uint8_t *passphrase, uint8_t *passphrase_length)
Not supported.
Definition: wifi_api.h:389
int32_t wifi_connection_unregister_event_notifier(uint8_t event, wifi_event_handler_t notifier)
wifi_encrypt_type_t encrypt_type
Please refer to the definition of wifi_encrypt_type_t.
Definition: wifi_api.h:656
int32_t wifi_profile_set_country_region(uint8_t band, uint8_t region)
int32_t wifi_config_unregister_rx_handler(void)
This function unregisters the handler to receive 802.11 raw packets from the network processor...
TKIP encryption.
Definition: wifi_api.h:393
Not supported.
Definition: wifi_api.h:376
int32_t wifi_config_set_opmode(uint8_t mode)
This function sets the Wi-Fi operation mode and it takes effect immediately.
uint8_t ssid_length
The length of the SSID.
Definition: wifi_api.h:547
Represents the credentials used for WPS.
Definition: wifi_api.h:758
WPA_PSK.
Definition: wifi_api.h:374
int32_t wifi_wps_connection_by_pbc(uint8_t port, uint8_t *bssid)
This function triggers a WPS PBC process.
The NFC tag is used for WPS.
Definition: wifi_api.h:487
int32_t wifi_profile_get_wep_key(uint8_t port, wifi_wep_key_t *wep_keys)
Default value or use PIN if selected_registrar is true.
Definition: wifi_api.h:467
3, both 2.4G and 5G band.
Definition: wifi_api.h:415
The device contains an NFC interface.
Definition: wifi_api.h:489
uint8_t ssid_length
The length of SSID.
Definition: wifi_api.h:624
WEP encryption type.
Definition: wifi_api.h:385
Initialization complete event.
Definition: wifi_api.h:289
int32_t wifi_wps_config_set_auto_connection(bool auto_connection)
This function controls the auto connection behavior after the WPS credential information is received ...
uint8_t ap_wep_key_index
The WEP key index for AP.
Definition: wifi_api.h:598
This defines the WPS element.
Definition: wifi_api.h:637
Specifies the Wi-Fi transmitter settings, including MCS, LDPC, bandwidth, short-GI algorithms...
Definition: wifi_api.h:682
This structure defines a link to the scanned AP list.
Definition: wifi_api.h:666
Specifies the Wi-Fi station items, including the Wi-Fi transmitter settings, the RSSI sample...
Definition: wifi_api.h:698
bit 20 Drops the NDPA or not.
Definition: wifi_api.h:364
Represents the device information used for WPS.
Definition: wifi_api.h:747
int32_t wifi_profile_set_wep_key(uint8_t port, wifi_wep_key_t *wep_keys)
21 Unsupported RSN information element version.
Definition: wifi_api.h:320
uint8_t opmode
The operation mode.
Definition: wifi_api.h:573
WIFI_POWER_SAVING_MODE_FAST is a power saving mode that switches between power saving and WIFI_POWER_...
Definition: wifi_api.h:458
45 Peer STA does not support the requested cipher suite.
Definition: wifi_api.h:340
Definition: wifi_api.h:483
#define WIFI_WPS_MAX_LENGTH_MODEL_NUMBER
The maximum length of module number.
Definition: wifi_api.h:269
int32_t wifi_config_set_radio(uint8_t on_off)
This function sets the radio status of the Wi-Fi driver.
This structures provide the country code information.
Definition: wifi_api.h:727
uint16_t word
Defines the length of the union data.
Definition: wifi_api.h:693
Wi-Fi configuration for initialization.
Definition: wifi_api.h:572
14 Message integrity code (MIC) failure.
Definition: wifi_api.h:313
wifi_encrypt_type_t encrypt_type
Please refer to the definition of wifi_encrypt_type_t.
Definition: wifi_api.h:762
wifi_encrypt_type_t encrypt_type
The encryption mode.
Definition: wifi_api.h:563
Credential event, sends notification when WPS process is complete.
Definition: wifi_api.h:288