MT7687 API Reference  LinkIt SDK v4
wifi_api.h
Go to the documentation of this file.
1 /* Copyright Statement:
2  *
3  * (C) 2005-2017 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
113 #ifndef __WIFI_API_H__
114 #define __WIFI_API_H__
115 
116 #include "stdint.h"
117 #include "stdbool.h"
118 
119 
120 #ifdef __cplusplus
121 extern "C" {
122 #endif
123 
130 #define WIFI_MAX_LENGTH_OF_SSID (32)
131 
134 #define WIFI_MAC_ADDRESS_LENGTH (6)
135 
139 #define WIFI_LENGTH_802_11 (24)
140 
143 #define WIFI_TIMESTAMP_LENGTH (8)
144 
147 #define WIFI_BEACON_INTERVAL_LENGTH (2)
148 
151 #define WIFI_CAPABILITY_INFO_LENGTH (2)
152 
156 #define WIFI_MAX_NUMBER_OF_STA (16)
157 
160 #define WIFI_LENGTH_PASSPHRASE (64)
161 
164 #define WIFI_LENGTH_PMK (32)
165 
168 #define WIFI_PROFILE_BUFFER_AP "AP"
169 
172 #define WIFI_PROFILE_BUFFER_STA "STA"
173 
176 #define WIFI_PROFILE_BUFFER_COMMON "common"
177 
182 #define WIFI_PROFILE_BUFFER_LENGTH (128)
183 
186 #define WIFI_BAND_2_4_G (0)
187 
190 #define WIFI_BAND_5_G (1)
191 
192 
195 #define WIFI_STATUS_LINK_DISCONNECTED (0)
196 
199 #define WIFI_STATUS_LINK_CONNECTED (1)
200 
203 #define WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_20MHZ (0x00)
204 
207 #define WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_40MHZ (0x01)
208 
211 #define WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_2040MHZ (WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_20MHZ|WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_40MHZ)
212 
213 
217 #define WIFI_MODE_STA_ONLY (1)
218 
222 #define WIFI_MODE_AP_ONLY (2)
223 
228 #define WIFI_MODE_REPEATER (3)
229 
237 #define WIFI_MODE_MONITOR (4)
238 
242 #define WIFI_MODE_P2P_ONLY (5)
243 
246 #define WIFI_PORT_STA (0)
247 
251 #define WIFI_PORT_APCLI WIFI_PORT_STA
252 
256 #define WIFI_PORT_AP (1)
257 
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)
282 typedef enum {
292  WIFI_EVENT_MAX_NUMBER
293 } wifi_event_t;
294 
299 typedef enum {
343 
344 
347 typedef enum {
366 
369 typedef enum {
381 
384 typedef enum {
403 #ifdef WAPI_SUPPORT
404  WIFI_ENCRYPT_TYPE_ENCRYPT_SMS4_ENABLED,
405 #endif /* WAPI_SUPPORT */
407 
408 
411 typedef enum {
425 
428 typedef enum {
443 
444 
447 typedef enum {
451 
455 typedef enum {
460 
466 typedef enum {
473  WIFI_WPS_DPID_MAX_NUMBER = 0xFFFF
475 
476 
482 typedef enum {
497 
516 typedef int32_t (* wifi_event_handler_t)(wifi_event_t event, uint8_t *payload, uint32_t length);
517 
518 
523 
524 
532 typedef int32_t (* wifi_rx_handler_t)(uint8_t *payload, uint32_t length);
533 
545 typedef struct {
546  uint8_t ssid[WIFI_MAX_LENGTH_OF_SSID];
547  uint8_t ssid_length;
548  uint8_t bssid_present;
549  uint8_t bssid[WIFI_MAC_ADDRESS_LENGTH];
550  uint8_t password[WIFI_LENGTH_PASSPHRASE];
551  uint8_t password_length;
553 
554 
557 typedef struct {
558  uint8_t ssid[WIFI_MAX_LENGTH_OF_SSID];
559  uint8_t ssid_length;
560  uint8_t password[WIFI_LENGTH_PASSPHRASE];
561  uint8_t password_length;
564  uint8_t channel;
565  uint8_t bandwidth;
568 
569 
572 typedef struct {
573  uint8_t opmode;
576 } wifi_config_t;
577 
578 
581 typedef struct {
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];
601  uint8_t sta_bandwidth;
609 
610 
613 typedef struct {
615  uint8_t wep_key_length[WIFI_NUMBER_WEP_KEYS];
618 
619 
622 typedef struct {
623  uint8_t ssid[WIFI_MAX_LENGTH_OF_SSID];
624  uint8_t ssid_length;
625  uint8_t mac_address[WIFI_MAC_ADDRESS_LENGTH];
626  uint8_t wireless_mode;
627  uint8_t channel;
628  uint8_t bandwidth;
629  uint8_t mcs;
630  uint8_t auth_mode;
631  uint8_t encrypt_mode;
633 
634 
637 typedef struct {
642 
643 
646 typedef struct {
647  uint8_t is_valid;
648  int8_t rssi;
649  uint8_t ssid[WIFI_MAX_LENGTH_OF_SSID];
650  uint8_t ssid_length;
651  uint8_t bssid[WIFI_MAC_ADDRESS_LENGTH];
652  uint8_t channel;
653  uint8_t central_channel;
657  bool is_hidden;
658  uint8_t bss_type;
659  uint16_t beacon_interval;
660  uint16_t capability_info;
663 
666 typedef struct {
668  struct _wifi_scan_list_t *next;
670 
673 typedef struct {
674  int8_t last_rssi;
675  uint8_t reserved;
676  int16_t average_rssi;
678 
679 
682 typedef union {
683  struct {
684  uint16_t mcs: 6;
685  uint16_t ldpc: 1;
686  uint16_t bandwidth: 2;
687  uint16_t short_gi: 1;
688  uint16_t stbc: 1;
689  uint16_t external_tx_beam_forming: 1;
690  uint16_t internal_tx_beam_forming: 1;
691  uint16_t mode: 3;
692  } field;
693  uint16_t word;
695 
698 typedef struct {
700  uint16_t reserved_one;
702  uint16_t reserved_two;
704  uint8_t mac_address[WIFI_MAC_ADDRESS_LENGTH];
705  uint8_t power_save_mode;
706  uint8_t bandwidth;
707  uint8_t keep_alive;
708  uint8_t reserved[3];
710 
713 typedef struct {
714  uint8_t key[16];
715  uint8_t rx_mic[8];
716  uint8_t tx_mic[8];
717  uint8_t tx_tsc[6];
718  uint8_t rx_tsc[6];
719  uint8_t cipher_type;
720  uint8_t key_length;
721  uint8_t bssid[6];
722  uint8_t type;
724 
727 typedef struct {
728  uint8_t first_channel;
729  uint8_t num_of_channel;
730  uint8_t max_tx_power;
731  uint8_t geography;
732  bool dfs_req;
734 
735 typedef struct {
736  uint8_t country_code[4];
737  uint8_t dfs_type;
739  wifi_channel_table_t channel_table[];
741 
742 
743 #ifdef MTK_WIFI_WPS_ENABLE
744 
747 typedef struct {
749  char manufacturer[WIFI_WPS_MAX_LENGTH_MANUFACTURER];
751  char model_number[WIFI_WPS_MAX_LENGTH_MODEL_NUMBER];
752  char serial_number[WIFI_WPS_MAX_LENGTH_SERIAL_NUMBER];
754 
758 typedef struct {
759  uint8_t ssid[WIFI_MAX_LENGTH_OF_SSID];
760  uint32_t ssid_len;
763  uint8_t key_index;
764  uint8_t key[WIFI_LENGTH_PASSPHRASE];
765  uint32_t key_length;
767 
768 #endif //end of MTK_WIFI_WPS_ENABLE
769 
784 void wifi_init(wifi_config_t *config, wifi_config_ext_t *config_ext);
785 
800 int32_t wifi_config_get_opmode(uint8_t *mode);
801 
820 int32_t wifi_config_set_opmode(uint8_t mode);
821 
844 int32_t wifi_config_get_mac_address(uint8_t port, uint8_t *address);
845 
863 int32_t wifi_config_get_ssid(uint8_t port, uint8_t *ssid, uint8_t *ssid_length);
864 
883 int32_t wifi_config_set_ssid(uint8_t port, uint8_t *ssid, uint8_t ssid_length);
884 
893 int32_t wifi_config_get_bssid(uint8_t *bssid);
894 
907 int32_t wifi_config_set_bssid(uint8_t *bssid);
908 
934 int32_t wifi_config_set_bandwidth(uint8_t port, uint8_t bandwidth);
935 
960 int32_t wifi_config_get_bandwidth(uint8_t port, uint8_t *bandwidth);
961 
982 int32_t wifi_config_set_channel(uint8_t port, uint8_t channel);
983 
1001 int32_t wifi_config_get_channel(uint8_t port, uint8_t *channel);
1002 
1003 
1019 int32_t wifi_config_get_wireless_mode(uint8_t port, wifi_phy_mode_t *mode);
1020 
1021 
1038 int32_t wifi_config_set_wireless_mode(uint8_t port, wifi_phy_mode_t mode);
1039 
1040 
1927 int32_t wifi_config_set_country_code(wifi_country_code_t *wifi_country_code);
1928 
1938 int32_t wifi_config_get_country_code(wifi_country_code_t *wifi_country_code);
1939 
2010 int32_t wifi_config_get_country_region(uint8_t band, uint8_t *region);
2011 
2086 int32_t wifi_config_set_country_region(uint8_t band, uint8_t region);
2087 
2100 int32_t wifi_config_get_dtim_interval(uint8_t *interval);
2101 
2114 int32_t wifi_config_set_dtim_interval(uint8_t interval);
2115 
2127 int32_t wifi_config_get_listen_interval(uint8_t *interval);
2128 
2143 int32_t wifi_config_set_listen_interval(uint8_t interval);
2144 
2163 int32_t wifi_config_get_security_mode(uint8_t port, wifi_auth_mode_t *auth_mode, wifi_encrypt_type_t *encrypt_type);
2164 
2190 int32_t wifi_config_set_security_mode(uint8_t port, wifi_auth_mode_t auth_mode, wifi_encrypt_type_t encrypt_type);
2191 
2208 int32_t wifi_config_get_wpa_psk_key(uint8_t port, uint8_t *passphrase, uint8_t *passphrase_length);
2209 
2228 int32_t wifi_config_set_wpa_psk_key(uint8_t port, uint8_t *passphrase, uint8_t passphrase_length);
2229 
2247 int32_t wifi_config_get_pmk(uint8_t port, uint8_t *pmk);
2248 
2275 int32_t wifi_config_set_pmk(uint8_t port, uint8_t *pmk);
2276 
2291 int32_t wifi_config_get_wep_key(uint8_t port, wifi_wep_key_t *wep_keys);
2292 
2309 int32_t wifi_config_set_wep_key(uint8_t port, wifi_wep_key_t *wep_keys);
2310 
2324 int32_t wifi_config_reload_setting(void);
2325 
2342 int32_t wifi_config_register_rx_handler(wifi_rx_handler_t wifi_rx_handler);
2343 
2351 int32_t wifi_config_unregister_rx_handler(void);
2352 
2360 int32_t wifi_config_get_rx_filter(uint32_t *flag);
2361 
2382 int32_t wifi_config_set_rx_filter(uint32_t flag);
2383 
2400 int32_t wifi_config_get_smart_connection_filter(uint8_t *flag);
2401 
2418 int32_t wifi_config_set_smart_connection_filter(uint8_t flag);
2419 
2435 int32_t wifi_config_get_radio(uint8_t *on_off);
2436 
2451 int32_t wifi_config_set_radio(uint8_t on_off);
2452 
2462 int32_t wifi_connection_disconnect_ap(void);
2463 
2472 int32_t wifi_connection_disconnect_sta(uint8_t *address);
2473 
2489 int32_t wifi_connection_get_link_status(uint8_t *link_status);
2490 
2502 int32_t wifi_connection_scan_init(wifi_scan_list_item_t *ap_list, uint32_t max_count);
2503 
2511 int32_t wifi_connection_scan_deinit(void);
2512 
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);
2547 
2553 int32_t wifi_connection_stop_scan(void);
2554 
2563 int32_t wifi_connection_parse_beacon(uint8_t *pbuf, uint32_t len, wifi_scan_list_item_t *ap_data);
2564 
2574 int32_t wifi_connection_get_sta_list(uint8_t *number, wifi_sta_list_t *sta_list);
2575 
2584 int32_t wifi_connection_get_max_sta_number(uint8_t *sta_number);
2585 
2595 int32_t wifi_connection_get_rssi(int8_t *rssi);
2596 
2617 
2627 int32_t wifi_connection_register_event_notifier(uint8_t event, wifi_event_handler_t notifier);
2628 
2639 
2649 int32_t wifi_connection_unregister_event_notifier(uint8_t event, wifi_event_handler_t notifier);
2650 
2651 #ifdef MTK_WIFI_PROFILE_ENABLE
2652 
2669 int32_t wifi_profile_set_opmode(uint8_t mode);
2670 
2685 int32_t wifi_profile_get_opmode(uint8_t *mode);
2686 
2705 int32_t wifi_profile_set_channel(uint8_t port, uint8_t channel);
2706 
2724 int32_t wifi_profile_get_channel(uint8_t port, uint8_t *channel);
2725 
2751 int32_t wifi_profile_set_bandwidth(uint8_t port, uint8_t bandwidth);
2752 
2776 int32_t wifi_profile_get_bandwidth(uint8_t port, uint8_t *bandwidth);
2777 
2793 int32_t wifi_profile_get_mac_address(uint8_t port, uint8_t *address);
2794 
2816 int32_t wifi_profile_set_mac_address(uint8_t port, uint8_t *address);
2817 
2837 int32_t wifi_profile_set_ssid(uint8_t port, uint8_t *ssid , uint8_t ssid_length);
2838 
2856 int32_t wifi_profile_get_ssid(uint8_t port, uint8_t *ssid, uint8_t *ssid_length);
2857 
2875 int32_t wifi_profile_set_wireless_mode(uint8_t port, wifi_phy_mode_t mode);
2876 
2892 int32_t wifi_profile_get_wireless_mode(uint8_t port, wifi_phy_mode_t *mode);
2893 
2912 int32_t wifi_profile_set_security_mode(uint8_t port, wifi_auth_mode_t auth_mode, wifi_encrypt_type_t encrypt_type);
2913 
2930 int32_t wifi_profile_get_security_mode(uint8_t port, wifi_auth_mode_t *auth_mode, wifi_encrypt_type_t *encrypt_type);
2931 
2952 int32_t wifi_profile_set_wpa_psk_key(uint8_t port, uint8_t *passphrase, uint8_t passphrase_length);
2953 
2970 int32_t wifi_profile_get_wpa_psk_key(uint8_t port, uint8_t *passphrase, uint8_t *passphrase_length);
2971 
2989 int32_t wifi_profile_set_pmk(uint8_t port, uint8_t *pmk);
2990 
3005 int32_t wifi_profile_get_pmk(uint8_t port, uint8_t *pmk);
3006 
3024 int32_t wifi_profile_set_wep_key(uint8_t port, wifi_wep_key_t *wep_keys);
3025 
3040 int32_t wifi_profile_get_wep_key(uint8_t port, wifi_wep_key_t *wep_keys);
3041 
3060 int32_t wifi_profile_get_country_region(uint8_t band, uint8_t *region);
3061 
3080 int32_t wifi_profile_set_country_region(uint8_t band, uint8_t region);
3081 
3089 int32_t wifi_profile_get_dtim_interval(uint8_t *interval);
3090 
3099 int32_t wifi_profile_set_dtim_interval(uint8_t interval);
3100 
3109 int32_t wifi_profile_get_listen_interval(uint8_t *interval);
3110 
3119 int32_t wifi_profile_set_listen_interval(uint8_t interval);
3120 
3135 int32_t wifi_profile_set_power_save_mode(uint8_t power_save_mode);
3136 
3150 int32_t wifi_profile_get_power_save_mode(uint8_t *power_save_mode);
3151 
3155 int32_t wifi_profile_commit_setting(char *profile_section);
3156 
3160 int32_t wifi_profile_get_profile(uint8_t port, wifi_profile_t *profile);
3161 
3162 #endif //MTK_WIFI_PROFILE_ENABLE
3163 
3164 #ifdef MTK_WIFI_WPS_ENABLE
3165 
3180 int32_t wifi_wps_config_get_pin_code(uint8_t port, uint8_t *pin_code);
3181 
3204 int32_t wifi_wps_connection_by_pbc(uint8_t port, uint8_t *bssid);
3205 
3228 int32_t wifi_wps_connection_by_pin(uint8_t port, uint8_t *bssid, uint8_t *pin_code);
3229 
3239 
3249 
3266 int32_t wifi_wps_config_set_auto_connection(bool auto_connection);
3267 
3280 int32_t wifi_wps_config_get_auto_connection(bool *auto_connection);
3281 
3282 #endif //end of MTK_WIFI_WPS_ENABLE
3283 
3293 int32_t wifi_connection_send_raw_packet(uint8_t *raw_packet, uint32_t length);
3294 
3295 
3296 
3297 
3298 #ifdef __cplusplus
3299 }
3300 #endif
3301 
3305 #endif /* __WIFI_API_H__ */
3306 
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 reserved
Reserved.
Definition: wifi_api.h:675
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
int8_t last_rssi
The latest received RSSI.
Definition: wifi_api.h:674
#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
The RSSI sample is a measurement of the power in a received radio signal.
Definition: wifi_api.h:673
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
int16_t average_rssi
8 times of the average RSSI.
Definition: wifi_api.h:676
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