Chengdu Ebyte Electronic Technology Co., Ltd.
E103-W03 _User Manual _EN_V1.1
Copyright ©2012–2022, Chengdu Ebyte Electronic Technology Co., Ltd
.
25
Target: AT+STACON=E103-W03,2,12345678
Configure local port: AT+SVRPORTIP=4001
Get the IP address: AT+SVRPORTIP? Get the return: AT+SVRPORTIP=4001,192.168.1.21
STA2 configuration process:
Mode: AT+MODE=2,1,2
Target: AT+STACON=E103-W03,2,12345678
Set the remote IP and port, here the IP and port obtained by STA1 are passed in:
AT+SOCKET=0,4001, 192.168.1.21
Restart the module and wait for the connection to complete before communicating.
6.1.2.2 UDP communication between modules
UDP is a communication that does not establish a connection, and the core is the IP address and port. In this way, one
communicates as an AP and the other as a STA.
1
、
Configure the AP module:
Setting mode: AT+MODE=1,1,3
Set SSID: AT+SSID=0,E103-W03,2,12345678
Set local port: AT+SVRPORTIP=4001
Get local port local IP: AT+SVRPORTIP?. Get return: AT+SVRPORTIP=4001,10.145.45.1
Set remote port Set remote IP: AT+SOCKET=0,4002,10.145.45.2
2
、
Configure the STA module:
Setting mode: AT+MODE=2,1,3
Set target SSID: AT+STACON=E103-W03,2,12345678
Set the connection mode: AT+CONTYPE=1
Set the local port: AT+SVRPORTIP=4002 (note that the local port here is the remote port in the previous step)
Set remote port remote IP: AT+SOCKET=0,4001,10.145.45.1 (the remote port IP here is the local port IP in the
previous step)