3Mqtt Notes; Http Client Mode (Http); Setup Process; Use Of Theost Request Method - Ebyte E103-W02 User Manual

Serial wifi smd small volume pcb antenna mqtt
Hide thumbs Also See for E103-W02:
Table of Contents

Advertisement

3.2.3MQTT Notes

In the above usage examples, ONENET is used as a use case, but this feature is used as a general MQTT feature to
support different MQTT In the process of use, especially when MQTT is connected to the servers of MQTT service
providers (e.g. AliCloud, BaiduCloud, ONENET), customers need to derive the corresponding MQTT triples according
to their rules.

3.3 HTTP Client mode (HTTP)

3.3.1 Setup Process

When the module is working in HTTP Client mode, some sub-functions in other modes or modes will not be enabled at
this time, in HTTP Client
mode, the module is connected to the user's destination HTTP server as an HTTP client. If the user wants to access
Ethernet data in this way when using HTTP mode, he/she needs to know that the network role of the module should be
set to STA mode. In the following, the access method and communication will be described.
1. Enter AT mode so that the current network role is in STA mode
+++
AT+ROLE=STA
2. Connect the destination WIFI (AP), access the network AT+STA=EBYTE,2,JSZXE880
3. Switch the mode, set the working mode to HTTP mode AT+MODE=HTTP
4. Set the HTTP connection information, the destination IP of the HTTP server and the listening port
AT+HCADDR=192.168.0.136,80 (the HTTP server address of the local LAN) 5.
AT+HCMODE=/1.txt, POST
7. Set HTTP client's request header options (up to 180 bytes) AT+HCHEAD=, (parameter send "," means don't set
header information) 8,restart to take effect command
AT+RST

3.3.2 Use of theOST request method

The AT command AT+HCMODE=URL, POST allows the module to request data in the form of a POST, with the URL
being the specified access path.
For demonstration purposes, we open a server software on a PC under the same LAN as the module and create a 1.txt
file in the same directory of the software, and write a number of data in the txt file, as shown in the following figure.
In the serial port, each time the data is sent, it will trigger the HTTP client's request data, and the corresponding data

Advertisement

Table of Contents
loading

Table of Contents