15、WIFI.showStatus(void)
显示连接状态,
return: string of connection status 0-4 tcp or udp ip port number
16、WIFI.showMux(void)
显示连接模式。
17、WIFI.onfMux(boolean a)
设置连接模式
a: connection mode
0 - single
1 - multiple
18、WIFI.newMux(byte type, String addr, int port)
设置single状态下的TCP或UDP连接。
type: tcp or udp
addr: ip address
port: port number
19、WIFI.newMux( byte id, byte type, String addr, int port)
设置multiple状态下的TCP或UDP连接。变量同上。
20、WIFI.Send(String str)
在single模式下发送数据。
21、WIFI.Send(byte id, String str)
在multiple状态下发送数据。
22、WIF.loseMux(void)
关闭single状态下的tcp或udp连接。
23、WIFI.closeMux(byte id)
关闭multiple状态下的tcp或udp连接。
24、WIFI.showIP(void)
显示本地IP地址。
25、WIFI.confServer(byte mode, int port)
设置TCP服务器参数
mode:
0 - close server mode
1 - open server mode
port:
1、WIFI.begin()
设置波特率:9600,发送AT指令:AT+RST,如果OK,显示Module is ready,如果否,显示Module have no response.
2、WIFI.begin(long wifiBaudRate,long debugBaudRate)
自己设置WiFi模块的波特率和调试的波特率,后面同1。
3、WIFI.Initialize(byte mode, String ssid, String pwd, byte chl, byte ecn)
mode设置AP、STA或AP_STA模式;ssid设置wifi名;pwd设置wifi密码;后两个为频道和加密AP,基本不用。
chl: channel number
ecn: encryption
OPEN 0
WEP 1
WAP_PSK 2
WAP2_PSK 3
WAP_WAP2_PSK 4
4、WIFI.ipConfig(byte type, String addr, int port, boolean a, byte id)
type设置TCP或UDP通讯模式;addr设置想连入的ip地址,如:"192.168.1.1";port设置连入的端口号。
5、WIFI.ReceiveMessage(char *buf)
接受数据,返回数据长度。
6.WIFI.Reset(void)
重启wifi模块。
WiFi功能命令
15、WIFI.showStatus(void)
显示连接状态,
return: string of connection status 0-4 tcp or udp ip port number
16、WIFI.showMux(void)
显示连接模式。
17、WIFI.onfMux(boolean a)
设置连接模式
a: connection mode
0 - single
1 - multiple
18、WIFI.newMux(byte type, String addr, int port)
设置single状态下的TCP或UDP连接。
type: tcp or udp
addr: ip address
port: port number
19、WIFI.newMux( byte id, byte type, String addr, int port)
设置multiple状态下的TCP或UDP连接。变量同上。
20、WIFI.Send(String str)
在single模式下发送数据。
21、WIFI.Send(byte id, String str)
在multiple状态下发送数据。
22、WIF.loseMux(void)
关闭single状态下的tcp或udp连接。
23、WIFI.closeMux(byte id)
关闭multiple状态下的tcp或udp连接。
24、WIFI.showIP(void)
显示本地IP地址。
25、WIFI.confServer(byte mode, int port)
设置TCP服务器参数
mode:
0 - close server mode
1 - open server mode