maix.network.wifi
maix.network.wifi module
You can use
maix.network.wifi
to access this module with MaixPy
This module is generated from MaixPy and MaixCDK
1. Module#
No module
2. Enum#
3. Variable#
4. Function#
4.1. list_devices#
List WiFi interfaces
item | description |
---|---|
return | WiFi interface list, string type |
C++ defination code:
5. Class#
5.1. AP_Info#
WiFi AP info
C++ defination code:
5.1.1. ssid#
WiFi AP info SSID
item | description |
---|---|
type | var |
static | False |
readonly | False |
C++ defination code:
5.1.2. bssid#
WiFi AP info BSSID
item | description |
---|---|
type | var |
static | False |
readonly | False |
C++ defination code:
5.1.3. security#
WiFi AP info security
item | description |
---|---|
type | var |
static | False |
readonly | False |
C++ defination code:
5.1.4. channel#
WiFi AP info channel
item | description |
---|---|
type | var |
static | False |
readonly | False |
C++ defination code:
5.1.5. frequency#
WiFi AP info frequency
item | description |
---|---|
type | var |
static | False |
readonly | False |
C++ defination code:
5.1.6. rssi#
WiFi AP info rssi
item | description |
---|---|
type | var |
static | False |
readonly | False |
C++ defination code:
5.1.7. ssid_str#
WiFi AP info ssid_str
item | description |
---|---|
type | func |
static | False |
C++ defination code:
5.2. Wifi#
Wifi class
C++ defination code:
5.2.1. __init__#
Wifi class
item | description |
---|---|
type | func |
param | iface: wifi interface name, default is wlan0 |
static | False |
C++ defination code:
5.2.2. get_ip#
Get current WiFi ip
item | description |
---|---|
type | func |
return | ip, string type, if network not connected, will return empty string. |
static | False |
C++ defination code:
5.2.3. get_mac#
Get current WiFi MAC address
item | description |
---|---|
type | func |
return | ip, string type. |
static | False |
C++ defination code:
5.2.4. get_ssid#
Get current WiFi SSID
item | description |
---|---|
type | func |
param | from_cache: if true, will not read config from file, direct use ssid in cache. attention, first time call this method will auto matically read config from file, and if call connect method will set cache. |
return | SSID, string type. |
static | False |
C++ defination code:
5.2.5. get_gateway#
Get current WiFi ip
item | description |
---|---|
type | func |
return | ip, string type, if network not connected, will return empty string. |
static | False |
C++ defination code:
5.2.6. start_scan#
WiFi start scan AP info around in background.
item | description |
---|---|
type | func |
return | If success, return err.Err.ERR_NONE, else means failed. |
static | False |
C++ defination code:
5.2.7. get_scan_result#
Get WiFi scan AP info.
item | description |
---|---|
type | func |
return | wifi.AP_Info list. |
static | False |
C++ defination code:
5.2.8. stop_scan#
Stop WiFi scan AP info.
item | description |
---|---|
type | func |
static | False |
C++ defination code:
5.2.9. connect#
Connect to WiFi AP.
item | description |
---|---|
type | func |
param | ssid: SSID of AP password: password of AP, if no password, leave it empty. wait: wait for got IP or failed or timeout. timeout: connect timeout internal, unit second. |
return | If success, return err.Err.ERR_NONE, else means failed. |
static | False |
C++ defination code:
5.2.10. disconnect#
Disconnect from WiFi AP.
item | description |
---|---|
type | func |
return | If success, return err.Err.ERR_NONE, else means failed. |
static | False |
C++ defination code:
5.2.11. is_connected#
See if WiFi is connected to AP.
item | description |
---|---|
type | func |
return | If connected return true, else false. |
static | False |
C++ defination code:
5.2.12. start_ap#
Start WiFi AP.
item | description |
---|---|
type | func |
param | ssid: SSID of AP. password: password of AP, if no password, leave it empty. ip: ip address of hostap, default empty string means auto generated one according to hardware. netmask: netmask, default 255.255.255.0, now only support 255.255.255.0 . mode: WiFi mode, default g(IEEE 802.11g (2.4 GHz)), a = IEEE 802.11a (5 GHz), b = IEEE 802.11b (2.4 GHz). channel: WiFi channel number, 0 means auto select. MaixCAM not support auto, will default channel 1. hidden: hidden SSID or not. |
return | If success, return err.Err.ERR_NONE, else means failed. |
static | False |
C++ defination code:
5.2.13. stop_ap#
Stop WiFi AP.
item | description |
---|---|
type | func |
return | If success, return err.Err.ERR_NONE, else means failed. |
static | False |
C++ defination code:
5.2.14. is_ap_mode#
Whether WiFi is AP mode
item | description |
---|---|
type | func |
return | True if AP mode now, or False. |
static | False |
C++ defination code: