“ESP8266 WiFi”的版本间的差异
第1行: | 第1行: | ||
− | <font color="orange" size="+2">'''WiFi | + | <font color="orange" size="+2">'''ESP8266 WiFi 库'''</font><br> |
'''The WiFi class initializes the ethernet library and network settings.''' | '''The WiFi class initializes the ethernet library and network settings.''' | ||
+ | |||
+ | <font color="orange" size="+1">'''ESP8266WiFi'''</font><br> | ||
- <font color="forestgreen">WiFi.mode()</font> | - <font color="forestgreen">WiFi.mode()</font> | ||
第9行: | 第11行: | ||
{| border="0" cellpadding="10" width="100%" | {| border="0" cellpadding="10" width="100%" | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | + | ||
− | + | <font color="orange" size="+1">'''ESP8266WiFi AP'''</font><br> | |
− | + | ||
- <font color="forestgreen">WiFi.softAP(ssid,[password],[channel],[ssid_hidden])</font> | - <font color="forestgreen">WiFi.softAP(ssid,[password],[channel],[ssid_hidden])</font> | ||
:设置AP模式参数 | :设置AP模式参数 | ||
第47行: | 第49行: | ||
:返回:String | :返回:String | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | + | ||
− | + | <font color="orange" size="+1">'''ESP8266WiFi STA'''</font><br> | |
− | + | ||
WL_CONNECTED | WL_CONNECTED | ||
第164行: | 第166行: | ||
:返回:int32_t (RSSI value) | :返回:int32_t (RSSI value) | ||
− | <font color="deepskyblue" size="+ | + | <font color="deepskyblue" size="+0.5">STA远程配置</font><br> |
- <font color="forestgreen">WiFi.beginWPSConfig(void)</font> | - <font color="forestgreen">WiFi.beginWPSConfig(void)</font> | ||
: WPS配置(so far only WPS_TYPE_PBC is supported (SDK 1.2.0)) | : WPS配置(so far only WPS_TYPE_PBC is supported (SDK 1.2.0)) | ||
第209行: | 第211行: | ||
{| border="0" cellpadding="10" width="100%" | {| border="0" cellpadding="10" width="100%" | ||
− | |width=" | + | |width="33%" valign="top" align="left"| |
− | <font color="orange" size="+ | + | <font color="orange" size="+1">'''Server 类'''</font><br> |
'''The Server class creates servers which can send data to and receive data from connected clients (programs running on other computers or devices).''' | '''The Server class creates servers which can send data to and receive data from connected clients (programs running on other computers or devices).''' | ||
第229行: | 第231行: | ||
:-[[ println()]] | :-[[ println()]] | ||
<br> | <br> | ||
− | <font color="orange" size="+ | + | |width="33%" valign="top" align="left"| |
+ | <font color="orange" size="+1">'''Client 类'''</font><br> | ||
'''The client class creates clients that can connect to servers and send and receive data.''' | '''The client class creates clients that can connect to servers and send and receive data.''' | ||
第256行: | 第259行: | ||
<br><br> | <br><br> | ||
− | <font color="orange" size="+ | + | |width="33%" valign="top" align="left"| |
+ | <font color="orange" size="+1">'''UDP 类'''</font><br> | ||
'''The UDP class enables UDP message to be sent and received.''' | '''The UDP class enables UDP message to be sent and received.''' |
2016年3月25日 (五) 13:52的版本
ESP8266 WiFi 库
The WiFi class initializes the ethernet library and network settings.
ESP8266WiFi
- WiFi.mode()
- 设置wifi模块工作模式WIFI_AP,WIFI_STA,WIFI_AP_STA
ESP8266WiFi AP - WiFi.softAP(ssid,[password],[channel],[ssid_hidden])
- WiFi.softAPConfig(local_ip,gateway,subnet)
- WiFi.softAPdisconnect(wifioff)
- WiFi.softAPgetStationNum()
- WiFi.softAPIP()
- WiFi.softAPmacAddress(mac)
- WiFi.softAPmacAddress(void)
|
ESP8266WiFi STA WL_CONNECTED WL_NO_SSID_AVAIL WL_CONNECT_FAILED WL_IDLE_STATUS WL_DISCONNECTED - WiFi.begin()
- WiFi.config(local_ip, gateway, subnet, dns1, dns2)
- WiFi.reconnect()
- WiFi.disconnect(bool wifioff)
- WiFi.isConnected()
- WiFi.setAutoConnect(bool autoConnect)
- WiFi.setAutoConnect()
- WiFi.setAutoReconnect(bool autoReconnect)
- WiFi.waitForConnectResult()
- WiFi.localIP()
- WiFi.macAddress(uint8_t* mac)
- WiFi.macAddress(void)
- WiFi.subnetMask()
- WiFi.gatewayIP()
- WiFi.dnsIP(uint8_t dns_no)
- WiFi.hostname(void)
- WiFi.hostname(char* aHostname)
- WiFi.hostname(const char* aHostname)
- WiFi.hostname(String aHostname)
- WiFi.SSID()
- WiFi.psk()
- WiFi.BSSID(void)
- WiFi.BSSIDstr(void)
- WiFi.RSSI(void)
STA远程配置
- WiFi.beginSmartConfig()
- WiFi.stopSmartConfig()
- WiFi.smartConfigDone()
|
- - begin()
- - config()
- - setDNS()
- - SSID()
- - BSSID()
- - RSSID()
- - status()
Server 类 The Server class creates servers which can send data to and receive data from connected clients (programs running on other computers or devices).
|
Client 类 The client class creates clients that can connect to servers and send and receive data.
|
UDP 类 The UDP class enables UDP message to be sent and received. |
更多建议和问题欢迎反馈至 YFRobot论坛