单片机学习小组
直播中

王晾其

7年用户 941经验值
私信 关注

UART WiFi功能的命令有哪些呢

UART WiFi功能的命令有哪些呢?TPC/IP功能命令又有哪些呢?

回帖(1)

陈鹏

2022-1-20 09:51:51
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功能命令

7、WIFI.showMode()
显示当前模式。
8、WIFI.confMode(byte a)
配置wifi模式。
a:            1    -    Station
               2    -    AP
               3    -    AP+Station
9、WIFI.showAP(void)
扫描附近AP信息并显示wifi信息。
10、WIFI.showJAP(void)
显示可用端口名。
11、WIFI.confJAP(String ssid , String pwd)
ssid写wifi名,pwd写wifi密码,连接至此wifi。
12、WIFI.quitAP(void)
与AP断开连接。
13、WIFI.showSAP()
显示我的AP的,,,
14、WIFI.confSAP(String ssid , String pwd , byte chl , byte ecn)
设置我的AP的,,,
TPC/IP功能命令

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:   
举报

更多回帖

发帖
×
20
完善资料,
赚取积分