background image

Chengdu Ebyte Electronic Technology Co., Ltd.

E103-W03 _User Manual _EN_V1.1

Copyright ©2012–2022, Chengdu Ebyte Electronic Technology Co., Ltd

.

23

source.

6.1.2 Communication between modules

There are three ways of communication between modules of this product: AP-STA-based communication; STA-STA
communication; these two communication methods are one module as a TCP server and the other as a TCP client, the
only difference is STA - The STA method requires connecting both modules to an external router.
Communication in P2P mode based on WiFi-Direct.

6.1.2.1 AP-STA TCP communication between modules

1

* Set the working mode, set module A as the AP role, and module B as the STA role. In particular, it should be noted
that in TCP mode, the service mode of the modules cannot be set to the same, that is to say, one of the two modules
must be TCP Server and the other must be TCP Client, otherwise the connection and communication cannot be
established normally.
AP configuration:

Mode: AT+MODE=1,1,1
SSID

AT+SSID=0,E103-W03,2,12345678

Get the local IP: AT+SVRPORTIP? (This operation must be performed here, and then the parameters are passed

to STA, otherwise communication cannot be performed)

The return value is shown in the figure.

Summary of Contents for E103-W03

Page 1: ...E103 W03 Instruction Manual CC3220R 2 4GHz WiFi serial port module...

Page 2: ...8 5 2 1 Transparent transmission 9 5 2 2 Protocol Transmission 9 5 3 SERVICE MODE 10 5 3 1 TCP server 10 5 3 2 TCP client 10 5 3 3 UDP 10 5 3 4 MQTT 11 5 3 5 HTTP Client 11 5 3 6 WebSocket 11 5 4 PARA...

Page 3: ...lectronic Technology Co Ltd 6 2 1 MQTT 28 6 2 2 HTTP Client 31 6 2 3 WebSocket 32 6 3 PARAMETER CONFIGURATION 32 6 3 1 Serial port AT command configuration 32 6 3 2 UDP remote configuration 33 6 3 3 W...

Page 4: ...network role supports multiple network working modes supports SmartConfig serial port transparent transmission power on transparent transmission and other functions after a simple configuration the n...

Page 5: ...ustom heartbeat package function Support socket distribution protocol AT command configuration Support remote command configuration Support Smartconfig fast distribution network Support transparent mu...

Page 6: ...g frequency band Hz 2 412 G 2 442 G 2 472 G 2 4G frequency band Power Consumpti on Maximum transmit power dBm 17 18 18 5 Test 2 412GHz Maximum emission current mA 257m A 260m A 268m A Instantaneous po...

Page 7: ...Built in intelligent processing Configuration parameters can be set or read through AT commands 13 Wi Fi version 802 11 b g n 14 Communication Interface UART serial port 15 Antenna form PCB Onboard A...

Page 8: ...l to 2ms 5 SOP2 I Programming emulation mode selection The SOP2 pin has a built in 2 4K pull down resistor when in use an external pull up resistor 100R is required to pull the pin level high Normal o...

Page 9: ...igh 27 GPIO9 O Wifi connection status indicator connected output is low not connected output is high 30 GPIO10 O Network connection status indicator the connected output is low and the unconnected out...

Page 10: ...ing on the SOP1 pin needs to be connected to a 1M pull up resistor and SOP0 and SOP2 are connected to a pull down resistor the module has already connected SOP0 and SOP2 to the pull down resistor so i...

Page 11: ...upported The command AT MODE 1 x x sets the first bit to 1 to configure the module to work in the role of AP 5 1 2 Station STA mode The Station mode is referred to as STA The module under this role do...

Page 12: ...g means that the data packet input to the serial port contains a unique socked ID number and the module transmits the data to the corresponding socket connection according to this ID number Fixed head...

Page 13: ...pported by the module and the role of the module under the network protocol that is the server server and client client which are often referred to as server server and client client Here UDP MQTT HTT...

Page 14: ...d platform you need to log in to OneNet to obtain relevant parameters mainly including device ID product ID authentication information etc For details see Chapter 7 OneNet Configuration Tutorial 5 3 5...

Page 15: ...he module and the terminal are in the same network set the corresponding IP and port to configure parameters Remote configuration must be in AP mode or STA mode after the network connection has been e...

Page 16: ...luence of the connection distance and requires actual testing 5 8 Heartbeat package registration package The heartbeat packet registration packet is a function only available in the TCP client mode Th...

Page 17: ...ing it and the GPIO12 pin will be set to low level after the parameters are successfully restored 5 12 Scan nearby AP information When the module works in STA mode you can use the AT command to scan t...

Page 18: ...0 client P2P local name E103 W03WiFiDirectClient P2P target name E103 W03WiFiDirectGo P2P socket P2P port 4001 AT P2PSOCKET P2P address 192 168 1 1 STA connection parameters Target SSID E103 W03 AT ST...

Page 19: ...ission layer The data at this layer is not like MQTT HTTP and other protocols Complex network packets For detailed instructions on this piece please study by yourself Both the AP role and the STA role...

Page 20: ...known as WiFi name AT SSID 0 E103 W03 TEST 2 12345678 4 Set the port number AT SVRPORTIP 4001 5 After configuring the parameters restart the module find the SSID WiFi hotspot name set in the second s...

Page 21: ...modes and service modes are set based on this 6 1 1 2 The STA role communicates with the TCP client of the PC In order for the module to communicate with the PC under the role of STA it is necessary...

Page 22: ...ect you will not be able to communicate fill in the remote IP address and port number refer to the command configuration read SOCKET port IP address AT SOCKET 0 8000 192 168 1 12 4 Set module role STA...

Page 23: ...ave the data forwarding function due to their own technical reasons so you need to pay attention 6 1 1 3 UDP protocol transmission under AP role This example will demonstrate protocol transmission in...

Page 24: ...al value can be set according to the needs 4 Reboot the module connect to the module with PC 5 Open the UDP assistant to establish UDP communication 6 Communication because it is protocol transmission...

Page 25: ...sends The module receives At this point the communication between the module and the PC is completed The two roles of AP and STA support TCP server TCP Client and UDP The specific combination methods...

Page 26: ...ion in P2P mode based on WiFi Direct 6 1 2 1 AP STA TCP communication between modules 1 Set the working mode set module A as the AP role and module B as the STA role In particular it should be noted t...

Page 27: ...restart the module wait for the connection to complete and then send data Special attention is required before starting STA the IP address of the AP connected to it must be passed in Otherwise a norma...

Page 28: ...n 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 Set...

Page 29: ...nection the configuration process is as follows 1 First configure to P2P mode the two modules send AT command at the same time AT MODE 3 1 1 2 Then select one of the modules to be configured as GroupO...

Page 30: ...T P2PDEVINFO 20 0 E103 W03WiFiDirectClient E103 W03WiFiDirectGo 5 Configure the remote port and address and set the IP address and port of the GroupOwner queried in the previous step to the Client the...

Page 31: ...he self built mqtt server uses Baidu Cloud the device name is the Client ID and the user name and password correspond When using onenet the device ID is the Client ID the product ID is the user name a...

Page 32: ...tion select the service mode as MQTT and save the settings 2 In the parameter setting menu select Baidu Cloud 3 Device name the name entered when creating a new object shadow Note You can only enter n...

Page 33: ...age again and select ONENET in the parameter setting menu Note onenet creates products and selects multi protocol access 3 Device ID eg 511986588 4 Product ID eg 286258 5 Authentication information Cu...

Page 34: ...56 HTTP 1 1 Host 192 168 4 10 8080 Among them request login do is the content set in the URL of the header path note that should be added after the URL and name test userpwd 123456 is the data receive...

Page 35: ...ct websocket as the service mode and save the settings 2 In the parameter setting menu configure the required parameters 6 3 Parameter configuration 6 3 1 Serial port AT command configuration Serial p...

Page 36: ...xed value and cannot be changed Remote configuration is essentially an AT command operation see AT commands for specific commands The following figures are the remote configuration based on AP mode an...

Page 37: ..._EN_V1 1 Copyright 2012 2022 Chengdu Ebyte Electronic Technology Co Ltd 34 6 4Modbus usage After setting the working parameters according to the above chapters enter the AT command and open the modbus...

Page 38: ...parameters AT IPSTATIC 1 192 168 1 9 255 255 255 0 192 168 1 1 192 168 1 1 3 According to Section 6 1 2 1 set the target AP socket port and address Restart the module to establish a connection for com...

Reviews: