station mode API ** More...
Data Structures | |
struct | mc_wifi_link_info_t |
Wi-Fi station link info. More... | |
Functions | |
int32_t | MX_WIFI_ResetModule (MX_WIFIObject_t *Obj) |
Reset the module by Software. More... | |
int32_t | MX_WIFI_ResetToFactoryDefault (MX_WIFIObject_t *Obj) |
Reset To factory defaults. More... | |
int32_t | MX_WIFI_GetVersion (MX_WIFIObject_t *Obj, uint8_t *version, uint32_t size) |
Get the firmware version string of the wifi module. More... | |
int32_t | MX_WIFI_GetMACAddress (MX_WIFIObject_t *Obj, uint8_t *mac) |
Get the MAC address of the wifi module. More... | |
int32_t | MX_WIFI_Scan (MX_WIFIObject_t *Obj, mc_wifi_scan_mode_t scan_mode, char *ssid, int32_t len) |
wifi block scan More... | |
int8_t | MX_WIFI_Get_scan_result (MX_WIFIObject_t *Obj, uint8_t *results, uint8_t number) |
wifi get scan result More... | |
int32_t | MX_WIFI_RegisterStatusCallback (MX_WIFIObject_t *Obj, mx_wifi_status_callback_t cb, void *arg) |
Register wifi status changed callback. More... | |
int32_t | MX_WIFI_RegisterStatusCallback_if (MX_WIFIObject_t *Obj, mx_wifi_status_callback_t cb, void *arg, mwifi_if_t interface) |
< status code. More... | |
int32_t | MX_WIFI_UnRegisterStatusCallback (MX_WIFIObject_t *Obj) |
UnRegister wifi status changed callback. More... | |
int32_t | MX_WIFI_UnRegisterStatusCallback_if (MX_WIFIObject_t *Obj, mwifi_if_t interface) |
< status code. More... | |
int32_t | MX_WIFI_Connect (MX_WIFIObject_t *Obj, const char *SSID, const char *Password, MX_WIFI_SecurityType_t SecType) |
Join an Access point. More... | |
int32_t | MX_WIFI_EAP_Connect (MX_WIFIObject_t *Obj, const char *SSID, const char *Identity, const char *Password, mwifi_eap_attr_t *attr, mwifi_ip_attr_t *ip) |
Join an Access point with WPA-E. More... | |
int32_t | MX_WIFI_Disconnect (MX_WIFIObject_t *Obj) |
Disconnect from a network. More... | |
int32_t | MX_WIFI_WPS_Connect (MX_WIFIObject_t *Obj) |
Join an Access point with WPS (PUSH-BUTTON) mode. More... | |
int32_t | MX_WIFI_WPS_Stop (MX_WIFIObject_t *Obj) |
Stop WPS connect. More... | |
int8_t | MX_WIFI_IsConnected (MX_WIFIObject_t *Obj) |
Check whether the module is connected to an access point. More... | |
int32_t | MX_WIFI_GetIPAddress (MX_WIFIObject_t *Obj, uint8_t *ipaddr, mwifi_if_t wifi_if) |
Get the local IPv4 address of the wifi module. More... | |
int32_t | MX_WIFI_GetIP6Address (MX_WIFIObject_t *Obj, uint8_t *ipaddr6, int32_t addr_num, mwifi_if_t wifi_if) |
Get the local IPv6 address of the wifi module. More... | |
int32_t | MX_WIFI_GetIP6AddressState (MX_WIFIObject_t *Obj, int32_t addr_num, mwifi_if_t wifi_if) |
Get the local IPv6 address state of the wifi module. More... | |
station mode API **
int32_t MX_WIFI_Connect | ( | MX_WIFIObject_t * | Obj, |
const char * | SSID, | ||
const char * | Password, | ||
MX_WIFI_SecurityType_t | SecType | ||
) |
Join an Access point.
Obj | pointer to module handle |
Ssid | the access point id. |
Password | the Access point password. |
SecType | Security type. |
Operation | Status.< status code. |
int32_t MX_WIFI_Disconnect | ( | MX_WIFIObject_t * | Obj | ) |
Disconnect from a network.
Obj | pointer to module handle |
Operation | Status.< status code. |
int32_t MX_WIFI_EAP_Connect | ( | MX_WIFIObject_t * | Obj, |
const char * | SSID, | ||
const char * | Identity, | ||
const char * | Password, | ||
mwifi_eap_attr_t * | attr, | ||
mwifi_ip_attr_t * | ip | ||
) |
Join an Access point with WPA-E.
Obj | pointer to module handle |
Ssid | the access point ID. |
Identity | client identity. |
Password | client password. |
attr | extral attributes of EAP method. NULL for default mode EAP-PEAP. |
ip | Station IP settings, NULL for DHCP mode. |
Operation | Status.< status code. |
int8_t MX_WIFI_Get_scan_result | ( | MX_WIFIObject_t * | Obj, |
uint8_t * | results, | ||
uint8_t | number | ||
) |
wifi get scan result
Obj | pointer to module handle |
results | scan result buffer, contains mwifi_ap_info_t * number |
number | max ap number to get, max 10 |
return | the real ap number got. |
int32_t MX_WIFI_GetIP6Address | ( | MX_WIFIObject_t * | Obj, |
uint8_t * | ipaddr6, | ||
int32_t | addr_num, | ||
mwifi_if_t | wifi_if | ||
) |
Get the local IPv6 address of the wifi module.
Obj | pointer to module handle |
ipaddr6 | buf to the IPv6 address array(16 bytes). |
addr_num | index of the IPv6 address (index: 0/1/2). |
wifi_if | wifi mode(station or softap). |
Operation | Status.< status code. |
int32_t MX_WIFI_GetIP6AddressState | ( | MX_WIFIObject_t * | Obj, |
int32_t | addr_num, | ||
mwifi_if_t | wifi_if | ||
) |
Get the local IPv6 address state of the wifi module.
Obj | pointer to module handle |
addr_num | index of the IPv6 address (index: 0/1/2). |
wifi_if | wifi mode(station or softap). |
IPV6 | address State, error if < 0 |
int32_t MX_WIFI_GetIPAddress | ( | MX_WIFIObject_t * | Obj, |
uint8_t * | ipaddr, | ||
mwifi_if_t | wifi_if | ||
) |
Get the local IPv4 address of the wifi module.
Obj | pointer to module handle |
ipaddr | pointer to the IP address array(4 bytes). |
wifi_if | wifi mode(station or softap). |
Operation | Status.< status code. |
int32_t MX_WIFI_GetMACAddress | ( | MX_WIFIObject_t * | Obj, |
uint8_t * | mac | ||
) |
Get the MAC address of the wifi module.
Obj | pointer to module handle |
mac | pointer to the MAC address array, size 6Bytes. |
Operation | Status.< status code. |
int32_t MX_WIFI_GetVersion | ( | MX_WIFIObject_t * | Obj, |
uint8_t * | version, | ||
uint32_t | size | ||
) |
Get the firmware version string of the wifi module.
Obj | pointer to module handle |
version | buffer pointer to receive the version string. |
size | length of the buffer, max size 24Bytes. |
Operation | Status.< status code. |
int8_t MX_WIFI_IsConnected | ( | MX_WIFIObject_t * | Obj | ) |
Check whether the module is connected to an access point.
link | status 1: connected, otherwise not connect. |
int32_t MX_WIFI_RegisterStatusCallback | ( | MX_WIFIObject_t * | Obj, |
mx_wifi_status_callback_t | cb, | ||
void * | arg | ||
) |
Register wifi status changed callback.
Obj | pointer to module handle |
cb | wifi status callback function |
arg | argument pass to callback |
Operation | Status.< status code. |
int32_t MX_WIFI_RegisterStatusCallback_if | ( | MX_WIFIObject_t * | Obj, |
mx_wifi_status_callback_t | cb, | ||
void * | arg, | ||
mwifi_if_t | interface | ||
) |
< status code.
int32_t MX_WIFI_ResetModule | ( | MX_WIFIObject_t * | Obj | ) |
Reset the module by Software.
Obj | pointer to module handle |
Operation | Status.< status code. |
int32_t MX_WIFI_ResetToFactoryDefault | ( | MX_WIFIObject_t * | Obj | ) |
Reset To factory defaults.
Obj | pointer to module handle |
Operation | Status.< status code. |
int32_t MX_WIFI_Scan | ( | MX_WIFIObject_t * | Obj, |
mc_wifi_scan_mode_t | scan_mode, | ||
char * | ssid, | ||
int32_t | len | ||
) |
wifi block scan
Obj | pointer to module handle |
scan_mode | scan mode |
ssid | ssid for active scan(scan specified AP), not used(set NULL) if do passive scan(scan all APs) |
len | ssid len of the AP to scan, not used(set 0) if do passive scan |
Operation | Status.< status code. |
int32_t MX_WIFI_UnRegisterStatusCallback | ( | MX_WIFIObject_t * | Obj | ) |
UnRegister wifi status changed callback.
Obj | pointer to module handle |
Operation | Status.< status code. |
int32_t MX_WIFI_UnRegisterStatusCallback_if | ( | MX_WIFIObject_t * | Obj, |
mwifi_if_t | interface | ||
) |
< status code.
int32_t MX_WIFI_WPS_Connect | ( | MX_WIFIObject_t * | Obj | ) |
Join an Access point with WPS (PUSH-BUTTON) mode.
Operation | Status.< status code. |
int32_t MX_WIFI_WPS_Stop | ( | MX_WIFIObject_t * | Obj | ) |
Stop WPS connect.
Obj | pointer to module handle |
Operation | Status.< status code. |