当前位置:网站首页>Esp8266 WiFi module and mobile communication
Esp8266 WiFi module and mobile communication
2022-07-28 04:11:00 【Anonymousgirls】
ESP8266 WIFI Module through TTL Module and mobile communication
List of articles
Preface
With the continuous development of intelligent Internet of things , More and more people choose wireless communication devices , such as WiFi、 bluetooth 、Lora、zigbee、2G Modules and other wireless communication modules of the Internet of things , Thus, the purpose of wireless control can be better achieved .
1、 Debugging tools
1. This debugging assistant supports a full range of functions , You can download from the mobile application market by yourself .

2. Serial port debugging assistant is provided by punctual atom XCOM

2、 Module as client
When the module is the client , Then the mobile phone will be selected as the server
2.1、 Module instructions
STA Pattern ,TCP client Configuration instructions
Instructions effect
AT // Test instruction
AT+CWMODE=1 // Set up modules WIFI The model is STA Pattern
AT+RST // Restart the module to take effect
AT+CWJAP="xxxx","xxxxxxxxx" // Connect WIFI hotspot , Route name :xxx, password :12345678
AT+CIPSTART="TCP","192.168.31.244",8088 // establish TCP Connect to ” 192.168.1.XXX”,8088
AT+CIPMODE=1 // Turn on transmission mode
AT+CIPSEND // Start transmitting
+++( No carriage return ) // Exit through mode
2.2、 Module wiring
Here's the picture :
| USB-TTL modular | WiFi modular |
|---|---|
| VCC(5V) | VCC(5V) |
| GND | GND |
| TXD | RXD |
| RXD | TXD |
| IO_0 | GND( The firmware ) |
- IO_0 This pin is used when brushing firmware , Just get to the ground , When communicating, it is suspended by default ( Don't pick up ) that will do .

2.3、 Instruction example
Pass the module through USB-TTL After the module is connected to the computer, select the serial port number , Baud rate should be selected according to the module , You can configure it with instructions later .
1. send out AT Command to test whether the module is successfully connected , Before normal communication . It should be noted here that the command is to check the enter line , Otherwise, the instruction will not fail to be sent .
2. Hair AT+CWMODE=1 Set up modules WIFI The model is STA Pattern

3. Send reset command , Prompt the firmware version information of the template after restart .

4. Connect the router network


Tips WIFI CONNECTED Indicates successful connection WiFi 了 .
5. Mobile phone establishment TCP The server , Open the software as shown in the figure below : Click on TCP Server creation

Then click the plus sign to add a server

Fill in the name of the server , The address is fixed , It can't be modified , Any four digit port number is enough , Finally, click save .
The built server is shown in the figure below : Then click in

6. Hair AT+CIPSTART=“TCP”,“192.168.31.244”,8088 establish TCP Connect to ” 192.168.xx.xxx”,8088, The address and port here must be consistent with the server created .

After sending, you can see the assistant prompt on your mobile phone that you are connected .
Note that the mobile phone and the module should be on the same LAN ( That is, both the mobile phone and the module are together WiFi).
2.4、 The data transfer
AT+CIPMODE=1 Turn on transmission mode
AT+CIPSEND Start transmitting 



The above is the process of sending data to the serial port debugging assistant and the mobile network assistant . If the debugging passes, you can send instructions and send and receive data with the program , It can be used for communication between mobile phone and MCU development board .
Hair +++ Exit through mode , Note that there is no need to tick back to switch lines when exiting the transparent transmission mode , Otherwise, I will +++ When the data is processed .

3、 The module acts as a server
3.1. Module instructions
STA Pattern ,TCP The server Configuration instructions
Instructions effect
AT // test
AT+CWMODE=1 // Set up modules WIFI The model is STA Pattern
AT+RST // Restart the module to take effect
AT+CWJAP="Ryan","12345678" // Connect WIFI hotspot , Route name :Ryan, password :12345678
AT+CIPSTART="TCP","192.168.31.244",8088 // establish TCP Connect to ” 192.168.1.XXX”,8086
AT+CIPMODE=1 // Turn on transmission mode
AT+CIPSEND // Start transmitting
+++( No carriage return ) // Exit through mode
The process is brief …
Refer to the above process for specific steps , Just switch over .
4、 Computer network assistant communication
In addition, if you don't want to use your mobile phone , You can use the network debugging assistant to test on the computer , The steps are the same , It's all the process of establishing a server , Special attention should be paid to that the network should be in the same LAN . No tests here …

5、 Firmware burning
Based on the previous use , Before burning firmware , notes It means I0_0 Need to be stay model block On electric And front even Pick up To GND, however after hit open solid Pieces of burn Write soft Pieces of ESPFlashDownloadTool.exe . Click on START, Then power on the module again , You can automatically burn .

When I double-click this software , There was no reaction , Then copy the whole folder to the desktop and you can open it normally , It is estimated that the Chinese path is too long to open .

Add these two firmware in turn , route 【 The punctual atoms 】WIFI modular ATK-ESP8266 Information \6,ESP8266 Related information \ Firmware burning and description \ Atomic cloud firmware v2.4

Select the relevant parameters , Pay attention to the selection of serial port number , And then click START.

Power up the module again , Wait for the burning to finish

The final prompt indicates that the brush is finished .
6、 summary
It's on it WiFi Some simple test procedures of the module , It's fun , Due to limited time , Just tested STA Mode , There is no time to test AP The model , If you can spare time later , Go play again .
8266WiFi The overall use of the module is relatively simple , As long as the instruction is sent correctly, it can work normally in the corresponding mode .
边栏推荐
- Linux - MySQL advanced (day19)
- 程序人生 | 测试工程师还只会点点点?7个捷径教给你快速学习新技术...
- Kingbasees Security Guide for Jincang database -- 4 data access protection
- XML file usage and parsing
- test case management tool
- The State Administration of market supervision exposes typical cases of food safety
- Combination of Oracle and Premier League statistics and presentation
- Simple and easy-to-use performance testing tools recommended
- null安全与异常
- 金仓数据库KingbaseES安全指南--5.2. 数据完整性保护
猜你喜欢
![Error no matching function for call to 'std:: exception:: exception (const char [15])' problem solving](/img/d1/2fbdf42cf60b5382b5a35c64b172b9.png)
Error no matching function for call to 'std:: exception:: exception (const char [15])' problem solving

Monotonous stack -- 42. Receiving rain -- a difficult problem that big factories must know

Cyber Nuwa, how to make digital people?

21天,胖哥亲自带你玩转OAuth2

jdbc使用

Fedformer MOE module

security异常处理机制

Read Plato farm's eplato and the reason for its high premium

Appnium -- app automated test tool

R notes mice
随机推荐
Linux - MySQL advanced (day19)
月薪28K学员 自动化测试经验分享
金仓数据库KingbaseES安全指南--6.2. 身份验证相关的配置文件
【伸手党福利】微信中h5网页调起扫一扫最简单的方法
Kingbasees Security Guide for Jincang database -- 4 data access protection
Iterator function operation of iterator learning
Appnium--APP自动化测试工具
Selenium--WEB自动化测试工具
Istio's Traffic Management API
Developing rc522 module based on c8t6 chip to realize breathing lamp
企业数字化建设“三不五要”原则
C#跨线程刷新前台UI
ESP8266 WIFI 模块和手机通信
金仓数据库KingbaseES安全指南--6.1. 强身份验证简介
测试用例管理工具
idea启动项目mvn命令终端用不了法将“mvn”项识别为 cmdlet
Un7.27: how to successfully build a ruoyi framework project in idea?
Dynamic planning - 63. Different paths II
Monotonous stack -- 42. Receiving rain -- a difficult problem that big factories must know
Notes to subject 2