background image

Chengdu Ebyte Electronic Technology Co., Ltd.

E103-W03 _User Manual _EN_V1.1

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

.

16

same

Packet

Data

Type
Registry
Package Data

CDEBYTE-REGISTER-PACK-STR

NTP time

NTP time zone offset

480 (unit: minute) Beijing time

AT+NTPTIME

Modbus

Modbus enable

0 (Modbus off)

AT+MODBUS

Static IP

IP address

192.168.1.2

AT+IPSTATIC

subnet mask

255.255.255.0

Gateway address

192.168.1.1

Server address

192.168.1.1

Chapter 6 Tutorial

This module has many functions, and it needs to configure relevant parameters before using it, and then it can work
normally.
In the following tutorials, the operations marked with * are mandatory, and please set according to your own needs when
using other modes. Please refer to Chapter 6 for specific AT commands.

6.1 Basic TCP/UDP data transmission

Why is it called basic TCP/UDP data transmission, because this kind of data transmission is based on the transport layer
under the TCP/IP protocol, which is the most basic data transmission 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 support data transmission, provided that the mandatory module and the target are
under the same LAN. There are some differences between AP mode and STA mode. For example, AP mode supports
multi-connection protocol transmission. In AP mode, there is no need to set the remote IP address in advance. This
tutorial is based on the AT command of the serial port. The operations with * in each step are necessary operations, and
the operations without * are non-essential operations that can be omitted. After opening the serial port debugging
assistant, operate.
Data transmission is further divided into: data transmission with PC and data transmission with modules.

6.1.1 Communication with PC

6.1.1.1 Communication with PC's TCP server under AP role

Here is just an example, the other two communication in TCP mode also refer to this example (TCP server, UDP), just set
different modes by AT+MODE command.
1.

*

Enter AT command mode

+++

2.

*

Set module role: AP, transmission mode: transparent transmission, service mode: TCP server;

Содержание E103-W03

Страница 1: ...E103 W03 Instruction Manual CC3220R 2 4GHz WiFi serial port module...

Страница 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...

Страница 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...

Страница 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...

Страница 5: ...ustom heartbeat package function Support socket distribution protocol AT command configuration Support remote command configuration Support Smartconfig fast distribution network Support transparent mu...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Отзывы: