Embedded TCP/IP stack: fnet_wifi.h Source File

FNET

fnet_wifi.h
1 /**************************************************************************
2 *
3 * Copyright 2017 by Andrey Butok. FNET Community.
4 *
5 ***************************************************************************
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
8 * not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 ***************************************************************************
20 *
21 * Wi-Fi platform independent API definitions.
22 *
23 ***************************************************************************/
24 
25 #ifndef _FNET_WIFI_H_
26 
27 #define _FNET_WIFI_H_
28 
29 /**************************************************************************
30 * Definitions
31 ***************************************************************************/
36 /**************************************************************************/
41 #define FNET_WIFI_SSID_SIZE sizeof("123456789_123456789_123456789_12")
42 
43 /**************************************************************************/
48 #define FNET_WIFI_PASSPHRASE_SIZE_MAX sizeof("123456789_123456789_123456789_123456789_123456789_123456789_1234")
49 
50 /**************************************************************************/
55 #define FNET_WIFI_PASSPHRASE_SIZE_MIN sizeof("12345678")
56 
57 /**************************************************************************/
61 typedef enum
62 {
67 
68 /**************************************************************************/
71 typedef enum
72 {
78 
79 /**************************************************************************/
82 typedef struct
83 {
89 
90 /**************************************************************************/
93 typedef struct
94 {
102  fnet_uint8_t *ie;
105 
106 /******************************************************************************
107 * Function Prototypes
108 *******************************************************************************/
109 #if defined(__cplusplus)
110 extern "C" {
111 #endif
112 
113 /***************************************************************************/
136 
137 /***************************************************************************/
156 
157 /***************************************************************************/
180 
181 /***************************************************************************/
197 
198 /***************************************************************************/
213 fnet_uint32_t fnet_wifi_fw_get_version(fnet_netif_desc_t netif_desc);
214 
215 /***************************************************************************/
236 fnet_return_t fnet_wifi_fw_update(fnet_netif_desc_t netif_desc, const fnet_uint8_t *fw_buffer, fnet_size_t fw_buffer_size);
237 
238 #if defined(__cplusplus)
239 }
240 #endif
241 
244 #endif
WPA2. This mode uses AES(CCMP) cipher. It is used for best security and better performance.
Definition: fnet_wifi.h:75
fnet_wifi_op_mode_t fnet_wifi_get_op_mode(fnet_netif_desc_t netif_desc)
Retrieves current operation mode of the Wi-Fi interface.
fnet_return_t fnet_wifi_disconnect(fnet_netif_desc_t netif_desc)
Disconnects from a Wi-Fi network.
fnet_wifi_wpa_mode_t
WPA-personal security mode. s.
Definition: fnet_wifi.h:71
fnet_char_t * ssid
Wi-Fi SSID (Subscription Service Identifier), also called Wireless Network Name. It can be up to 32 ...
Definition: fnet_wifi.h:95
None. The Wi-Fi network is open.
Definition: fnet_wifi.h:73
WPA. This mode uses TKIP cipher. It is used mainly for legacy devices.
Definition: fnet_wifi.h:74
fnet_return_t fnet_wifi_connect(fnet_netif_desc_t netif_desc, fnet_wifi_connect_params_t *params)
Starts Wi-Fi connection in station mode.
fnet_wifi_wpa_mode_t wpa_mode
WPA security mode.
Definition: fnet_wifi.h:97
fnet_return_t
General return codes, used by most of API functions.
Definition: fnet_stdlib.h:90
fnet_size_t ie_size
Information Element size.
Definition: fnet_wifi.h:103
unsigned long fnet_size_t
Unsigned integer type representing the size in bytes.
Definition: fnet_stdlib.h:56
Wi-Fi connection parameters for fnet_wifi_connect().
Definition: fnet_wifi.h:82
Disconnected. Wi-Fi radio is off.
Definition: fnet_wifi.h:63
fnet_return_t fnet_wifi_access_point(fnet_netif_desc_t netif_desc, fnet_wifi_access_point_params_t *params)
Initializes a Wi-Fi access point.
fnet_wifi_op_mode_t
Wi-Fi operation mode.
Definition: fnet_wifi.h:61
fnet_char_t * wpa_passphrase
WPA alphanumeric pass-phrase. Also, called Pre-Shared Key (PSK). It can be between 8 and 63 characte...
Definition: fnet_wifi.h:86
Station mode.
Definition: fnet_wifi.h:64
fnet_uint32_t fnet_wifi_fw_get_version(fnet_netif_desc_t netif_desc)
Retrieves firmware version number of the Wi-Fi interface module.
fnet_char_t * ssid
Wi-Fi SSID (Subscription Service Identifier), also called Wireless Network Name. It can be up to 32 ...
Definition: fnet_wifi.h:84
fnet_uint8_t * ie
Information Element to be added to Probe-Response and Beacon frames. It is optional.
Definition: fnet_wifi.h:102
Wi-Fi access point parameters for fnet_wifi_access_point().
Definition: fnet_wifi.h:93
char fnet_char_t
Type representing the charecter.
Definition: fnet_stdlib.h:76
void * fnet_netif_desc_t
Network interface descriptor.
Definition: fnet_netif.h:71
fnet_char_t * wpa_passphrase
WPA alphanumeric pass-phrase. Also, called Pre-Shared Key (PSK). It can be between 8 and 63 characte...
Definition: fnet_wifi.h:98
fnet_return_t fnet_wifi_fw_update(fnet_netif_desc_t netif_desc, const fnet_uint8_t *fw_buffer, fnet_size_t fw_buffer_size)
Updates firmware of the Wi-Fi interface.
Access point mode.
Definition: fnet_wifi.h:65

© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net