ESP8266-01 WiFi模块用户手册V1.0
esp8266-01wifi模块用户手册v1.0

ESP8266 WiFi模块用户手册_ 术语和缩写 (4)k 产品简介 (5)二 捱遊 (5)产品特性 (5)模块封装....模块基本参数 硬件介绍 功耗二射频指标 ............................................................................................................................................................................................. 12 二A± ...................................................................................................................................................................................................... 13 二WiFi 天线 ................................................................................................................................................................................................... 14 二 推荐炉温曲线 .. (14)乙 功能描述 (15)二主要功能 ..................................................................................................................................................................................................... 15 二工作模式 ..................................................................................................................................................................................................... 15 ・ 应用领域 ..................................................................................................................................................................................................... 15 二AiCloud .................................................................................................................................................................................................... 15 L全功能测试版介绍 .............................................................................................................................................................................................. 16 二测试步骤 ..................................................................................................................................................................................................... 17 二 基砂AT 指令 (20)测试AT (20)二 WiFi 功能AT 指令 (20)选择WiFi 应用模式:AT+CWM0DE (20)列出当前可用接入点:AT+CWLAP (21)加入接入点:AT+CWJAP (21)退出接入点:AT+CWQAP (22)设置AP 模式下的参数:AT+CWSAP (22)TCPIP AT 指令 (23)建立 TCP/UDP 连接:AT+CIPSTART (23)获得 TCP/UDP 连接状态:AT+CIPSTATUS (23)启动多连接:AT+CIPMUX (24)发送数据:AT+CIPSEND (25)关闭 TCP/UDP 连接:AT+CIPCL0SE (25)6 7 8 11获取本地IP地址:AT+CIFSR (26)配置为服务器: (27)选择 TCPIP 应用模式:AT+CIPMODE (30)设置服务器主动断开的超时时间:AT+CIPST0 (30)设置波特率:AT+CI0BAUD (30)4. 产品试用 (31)表格目录表格1 术语和缩写4表格2 模块技术规格7表格3 Pin脚定义10表格4 功耗数据11表格5 射频指标12 &图目录图2 模块管脚排列图 (8)图3 天线图 (13)图4 V/iFi射频参考电路图 (14)图5 推荐回流曲线图 (14)图6 全功能测试板板正面视图 (16)术语和缩写表格1 术语和缩写1.产品简介1.1.(1.2.概述ESP8266是一款超低功耗的UART-WiFi透传模块,拥有业内极富竞争力的封装尺寸和超低能耗技术,专为移动设备和物联网应用设计.可将用户的物理设备连接到Wi-Fi无线网络上,进行互联网或局域网通信,实现联网功能。
esp8266 技术参考 说明书

3.2.1.
平台介绍 ......................................................................................................................13
第9章
I2C 接口口说明
描述 I2C 的功能、master 接口口和使用用示例例。
第 10 章
I2S 接口口说明
描述 I2S 的功能、模块配置和接口口函数说明。
第 11 章
UART 接口口说明
描述 UART 的功能、硬件资源、参数配置、配置中断、中断处理理
函数示例例流程和屏蔽上电打印。
第 12 章
PWM 接口口说明
附录
附录
GPIO 寄存器器、SPI 寄存器器、UART 寄存器器、定时器器寄存器器。
描述 SDIO 的功能、DEMO 实现方方案、ESP8266 端及 STM32 端
软件说明。
描述 SPI 的功能、SPI 主/从机协议格式和 API 函数说明。
描述 SPI 的功能、从机协议格式、从机状态定义与中断线行行行为和
应用用场景 1 参数配置 .....................................................................................................8
2.3.2.
应用用场景 2 参数配置 .....................................................................................................9
1.3. 串串行行行外设接口口(SPI/HSPI) .....................................................................................................1
ESP8266新手入门调试教程指导含目录

ESP8266新手入门调试教程指导含目录目录:1.介绍2.准备工作3.环境配置4.连接硬件5.安装驱动程序6.编写代码7.编译和烧录8.调试与测试1.介绍:2.准备工作:在开始调试之前,你需要准备以下工具和材料:- ESP8266模块 (如NodeMCU)-一台计算机-USB数据线-杜邦线-LED灯3.环境配置:4.连接硬件:将ESP8266模块通过USB数据线连接到计算机的USB接口上。
确保连接稳定,没有松动或接触不良的问题。
5.安装驱动程序:大多数操作系统都会自动检测并安装ESP8266模块的驱动程序。
如果你的操作系统无法自动识别设备,请在官方网站上找到合适的驱动程序进行安装。
6.编写代码:打开Arduino IDE,在"文件"菜单中选择"新建",并将以下代码粘贴到新建的文件中:```c++#define LED_PIN 2 // 设置LED灯的引脚void setupinMode(LED_PIN, OUTPUT); // 将LED引脚设置为输出void loodigitalWrite(LED_PIN, HIGH); // 将LED引脚输出设为高电平,点亮LED灯delay(1000); // 延时1秒digitalWrite(LED_PIN, LOW); // 将LED引脚输出设为低电平,熄灭LED灯delay(1000); // 延时1秒```这段代码的作用是让ESP8266控制一个连接到引脚2的LED灯,每隔1秒钟进行一次闪烁。
7.编译和烧录:在Arduino IDE中,选择适合你的ESP8266板型和串口,点击"工具"菜单中的"板型"和"串口"进行设置。
然后点击工具栏上的"上传"按钮,将代码编译并烧录到ESP8266模块中。
8.调试与测试:完成烧录后,你应该可以看到LED灯开始闪烁。
ESP8266 WIFI模块

OCROBOT SEED(WIFI模块)AT指令参考手册
通用指令部分
AT+Reset
版本号
AP操作指令部分
AT+MODE
AT+ExtAP
退出网络
AT+SAP
配置模块为可登陆的wifi热点(仅在AP与Station+AP模式下有效)
TCP/IP指令部分
AT+MUX
配置单链接模式或者多链接模式(一般使用推荐配置成单链接模式,使用简单)
建立TCP或者UDP链接
单链接模式下
多链接模式
获取链接状态
AT+UpDate 发送数据
多链接模式
关闭链接
单链接模式
建立服务器,接受数据(请注意:一定要开启多链接模式才能启用)
其他显示指令
+IPD指令
这个指令为系统收到数据的自动返回指令格式如下+IPD,<数据长度>,<数据> +IPD,<链接ID>,<数据长度>,<数据>。
esp8266教程

esp8266教程ESP8266是一款十分流行的物联网(IoT)设备。
使用ESP8266可以实现智能家居、传感器网络以及远程控制等功能。
下面介绍一些ESP8266的基础知识和常用操作。
1. ESP8266是一款低成本、低功耗的Wi-Fi模块,由乐鑫科技(Espressif Systems)推出。
它集成了Wi-Fi功能,可以作为一个独立的微控制器运行,也可以作为其他微控制器的无线网络模块。
2. ESP8266有多种型号,其中最常用的是ESP-01、ESP-12E以及NodeMCU等。
这些型号的差异主要在于引脚数目、封装类型以及板载的外设等。
3. ESP8266可以通过串口与其他设备进行通信,同时也支持Wi-Fi进行网络通信。
它的处理器内置了TCP/IP协议栈,可以连接到云服务器或者其他设备进行数据传输。
4. ESP8266的编程语言可以使用Arduino IDE,也可以使用乐鑫科技开发的非官方SDK。
Arduino IDE提供了丰富的库函数和例程,使得开发ESP8266变得简单快捷。
5. 连接ESP8266模块时,通常需要使用杜邦线将其与Arduino或者其他控制器连接。
一般情况下,需要将ESP8266的GPIO0引脚接地,然后使用串口进行数据交互。
6. 使用ESP8266的时候,需要注意电源供应的问题。
它的工作电压为3.3V,绝对不能使用5V电源供应,否则会损坏模块。
7. 开发ESP8266的过程中,可以使用相关的AT指令集来控制模块的功能。
AT指令集提供了一系列命令,可以实现Wi-Fi连接、网络通信、GPIO控制等功能。
8. 基于ESP8266的项目有很多,比如温湿度传感器、智能插座、远程开关等。
你可以根据自己的需求选择合适的硬件和库函数,进行开发创作。
总之,ESP8266是一款功能强大、易于使用的物联网模块。
通过掌握基础知识和常用操作,你可以开发出许多有趣的物联网项目。
开始动手吧!。
ESP8266一对一或一对多通信配置说明

TCP连接建立成功后,模块1的串口会后显示“CONNECT”
如图:
发送数据
指令:AT+CIPSEND=5
等号后的数字为一次发送的字节数。
如图,返回“SEND OK”,表示发送成功。
在模块1的串口调试助手中可查看接收到的数据。
如图,收到的数据中,+IPD,后的“0”表示第0个TCP链接,“5”表示接收到的字节数;冒号之后为接收到的数据。
如图:
配置为TCP服务器,端口号8080
指令为:AT+CIPSEP地址:
指令:AT+CIFSR
如图:
在返回的参数中,APIP为本地的IP地址,此地址将在模块2中建立TCP连接时使用。
模块
模块2与PC连接后,发送AT,测试链接是否正常。
连接正常后,设置为STATION模式。
ESP8266串口wifi模块,一对一或一对多通信AT指令配置说明
史晓冬
邮箱:630836967@
介绍
在本例中使用至少两个ESP8266模块
其中模块1配置为AP模式,并创建一个服务器server1。模块2配置为STA模式,作为客户端client1加入模块1创建的AP后与服务器server1建立TCP连接,之后模块1和模块2可以通信。模块3与模块2配置类似,模块3配置为STA模式,作为客户端client2加入模块1创建的AP,之后与server1建立TCP连接,模块1和模块3可以通信。
其中,等号后的0为TCP的标号,5为发送数据的字节数,
如图
注意
一对多的通信与一对一的通信原理相同,不同的就是在服务器向客户端发送数据时,TCP的标号要根据不同的连接做修改。
附录
在本历程中使用的AT指令:
ESP8266-08-WiFi模块用户手册V1.0知识讲解

E S P8266-08-W iF i模块用户手册V1.0ESP8266 WiFi模块用户手册V1.0目录术语和缩写 (4)1.产品简介 (5)1.1.概述 (5)1.1.1产品特性 (5)1.1.2模块封装 (6)1.1.3模块基本参数 (6)1.2.硬件介绍 (7)1.3.功耗 (10)1.4.射频指标 (11)1.5.尺寸 (13)1.6.WiFi 天线 (14)1.7.推荐炉温曲线 (14)2.功能描述 (15)2.1.主要功能 (15)2.2.工作模式 (15)2.3.应用领域 (16)2.4.AiCloud (16)3.全功能测试版介绍 (17)3.1.测试步骤 (18)3.2.基础AT指令 (22)3.2.1 测试AT (22)3.3.WiFi功能AT指令 (22)3.3.1 选择WiFi应用模式:AT+CWMODE (22)3.3.2列出当前可用接入点:AT+CWLAP (23)3.3.3 加入接入点:AT+CWJAP (23)3.3.4 退出接入点:AT+CWQAP (23)3.3.5设置AP模式下的参数:AT+CWSAP (24)3.4.TCPIP AT指令 (25)3.4.1建立TCP/UDP连接:AT+CIPSTART (25)3.4.2获得TCP/UDP连接状态:AT+CIPSTATUS (25)3.4.3启动多连接:AT+CIPMUX (26)3.4.4发送数据:AT+CIPSEND (27)3.4.5关闭TCP/UDP连接:AT+CIPCLOSE (27)3.4.6获取本地IP地址:AT+CIFSR (28)3.4.7配置为服务器: (29)3.4.8选择TCPIP应用模式:AT+CIPMODE (32)3.4.9设置服务器主动断开的超时时间:AT+CIPSTO (32)3.4.10设置波特率:AT+CIOBAUD (32)4.产品试用 (33)表格目录表格 1 术语和缩写4表格 2 模块技术规格7表格 3 Pin脚定义10表格 4 功耗数据11表格 5 射频指标12图目录图 2 模块管脚排列图 (8)图 3 尺寸图 (13)图 4 WiFi射频参考电路图 (14)图 5 推荐回流曲线图 (15)图 6 全功能测试板板正面视图 (17)术语和缩写表格 1 术语和缩写1.产品简介1.1.概述ESP8266是一款超低功耗的UART-WiFi 透传模块,拥有业内极富竞争力的封装尺寸和超低能耗技术,专为移动设备和物联网应用设计,可将用户的物理设备连接到Wi-Fi 无线网络上,进行互联网或局域网通信,实现联网功能。
WIFI模块EPS8266使用详述

用的这款各引脚功能:来至厂家提供的资料GPIO0 默认是工作模式(不接线)。
如果接了低电平就是下载模式(给模块刷固件!!),所以可以不接线,当然也可以接高电平。
反正一开始连接的时候CH_PD 必须为高电平。
其余的可以不接。
如果电脑的wifi 上显示了你的wifi 信号说明模块已经工作。
注意默认的波特率是115200!!!!!!设置好串口调试助手的波特率,再贴张图片吧防止亲们忘。
PIN FunctionDescription 1 URXD 1)UART_RXD ,接收;2)General Purpose Input/Output :GPIO3;2UTXD 1)UART_TXD ,发送;2)General Purpose Input/Output :GPIO1;3)开机时禁止下拉; 5RESET (GPIO 16) 外部Reset 信号,低电平复位,高电平工作(默认高); 6GND GND 8VCC 3.3V ,模块供电; 9 ANT WiFi Antenna11 GPIO0 1)默认WiFi Status :WiFi 工作状态指示灯控制信号;2)工作模式选择:上拉:Flash Boot ,工作模式;下拉:UART Download ,下载模式;12 ADC ADC ,输入范围:0V-1V ;13 GPIO15 下拉:工作模式;14 CH_PD 1)高电平工作;2)低电平模块供电关掉;15GPIO21)开机上电时必须为高电平,禁止硬件下拉;2)内部默认已拉高记得输入各种AT指令,勾选上“发送新行”些内部信息)然后输出READY!代表系统正系统启动后,系统会输出一堆乱码(其实不是乱码,系统启动后输出一常对于后面的操作--先提个醒,如果连接wifi出现连接不上的问题,可以发送AT+RESTORE 恢复出厂设置或刷固件先看秦时明月;;;;;;终于做好了,android客服端软件,(记得加权限,网络,和wifi。
亿佰特(Ebyte)-低功耗WiFi模块(ESP8266)智能家居物联网改造应用方案

E103-W01-IPX使用手册V1.01.模块介绍 (2)1.1.特点简介 (2)1.2.基本用法 (3)1.3.电气参数 (3)1.4.电气特性 (3)2.功能简述 (4)2.1.引脚定义 (4)2.2.模块功耗 (5)2.3.应用原理图 (5)3.快速入门 (6)3.1.模块作为Client与TCP服务器连接 (6)3.2.模块作为AP建立TCP SERVER与PC无线连接 (15)3.3.Smart Config使用 (17)3.4.PWM的使用 (18)3.5.GPIO的使用 (19)3.6.ADC的使用 (20)3.7.修改串口波特率 (20)4.组网说明 (21)4.1.组网角色 (21)4.2.组网模型 (21)5.AT指令 (23)6.定制合作 (24)7.关于我们 (25)1.模块介绍1.1.特点简介E103-W01是一款超高性价比的100mW(20dBm)串口转Wi-Fi模块,贴片小体积封装,陶瓷天线与IPX并存,工作在2.4~2.4835GHz频段。
模块可使用串口进行数据收发,降低了无线应用的门槛。
E103-W01模块是基于Espressif公司的ESP8266EX芯片研发。
模块集成了透传功能,即拿即用,支持串口AT指令集,服务器AT指令集,用户通过串口即可使用网络访问的功能,广泛应用于穿戴设备、家庭自动化、家庭安防、个人保健、智能家电、配饰与遥控器、汽车、照明、工业互联网等领域。
E103-W01模块支持标准的IEEE802.11b/g/n协议和完整的TCP/IP协议栈,支持STA/AP/STA+AP工作模式、支持SmartConfig、串口透传、IO口控制、开机透传、PWM输出、AD检测等功能,简单配置后便可以非常便利的实现网络访问功能,最大限度减少开发者的工作和项目开发时间。
典型应用:模块特点:√无线抄表√210ms开机透传,掉线自动连接√无线传感√多种波特率√智能家居√支持SmartConfig配置功能√工业遥控及遥测√支持TCPServer、TCPClient、UDP√智能楼宇及智能建筑√三种工作模式STATION、AP、STATION&AP√高压线监测√支持14mA低功耗数据接收√环境工程√支持串口透明传输√高速公路√支持多种加密方式√小型气象站√支持模块串口AT指令配置√自动化数据采集√支持可配置4路PWM输出√消费电子√内置看门狗,永不死机√智能机器人√参数记忆,掉电保存√路灯控制√1路10位精度ADC1.2.基本用法1.3.电气参数1.4.电气特性2.功能简述2.1.引脚定义2.2.模块功耗参数最小值典型值最大值单位Tx802.11b,CCK11Mbps,POUT=+17dBm165170180mA Tx802.11g,OFDM54Mbps,POUT=+15dBm135140150mA Tx802.11n,MCS7,POUT=+13dBm115120130mA Rx802.11b,1024bytes包长,-80dBm182023mA Rx802.11g,1024bytes包长,-70dBm535665mA Rx802.11n,1024bytes包长,-65dBm535665mA 部分睡眠131518mA睡眠0.80.9 1.1mA深度睡眠91011uA关机0.40.50.6uA 2.3.应用原理图注意:供电电源必须保证在3.0V~3.6V,为保证模块能稳定工作,建议外部选择电流大于300mA的LDO。
迪文WIFI模块使用指南 V1.1说明书

RMA 报警 保留
0x401 0x404
3 D2=需要上传的 RMA 变量存储器字地址。
D1 : D0=需要上传的 RMA 变量存储器字长度。 12 保留。
高字节=0x5A 表示设备描述有效。
设备描述 (设备描述)
0x410
0x411 0x413 0x414 0x416
低字节=设备描述文本的编码方式和长度。 1
每个 Buffer 固定占 2304 个字(0x900)空间,顺序往后排。
5A
单个 Buffer 定义(前 512 字节是控制接口,后面 4KB 是数据):
00
0x44A
D0:0x5A 表示启动一次这个 buffer 的远程升级,CPU 处理后清零。
08
D1:远程升级空间选择,0x00-0x03,4 个远程升级空间之一。
0x430
RMA 自动刷新服务器的时间间隔,0x0000-0xFFFF,单位为 0 . 1 秒。 1 0x0000 表示不需要自动刷新。
推荐值 5AA5
全 00 全 00
5A45
00000001 0001 自定义
DGUS2_T5UID1
012C
设备描述 (RMA 映射)
设备描述 (远程升级)
0x431 0x432
迪文 WIFI 模块使用指南 V1.1
1. 概述
为了让迪文智能液晶屏轻松方便的连接互联网,迪文架设了自己的云服务器,并在 DGUS 系统之上,将连接 互联网的接口进行整合,这样以后开发带网络功能的智能迪文屏将会非常简单方便。
目前支持的液晶屏平台有 T5UID1、T5UID2 以及 T5L_ASIC。支持的产品有 86 盒产品、网络屏等。 迪文 WIFI 方案优势主要体现在以下三个方面: 1、开发效率 基于 DGUS 架构,单机功能实现后,单片机零代码即可实现配网和数据上传。工程师只需要对数据地址做好 规划即可。将复杂的 JSON 协议解析放在云端处理,节省单片机资源,提高开发效率。客户可以将精力集中在产品 核心功能上。 2、稳定性 方案已经将主芯片(GUI)、WIFI 模块、MQTT 服务器之间协议打通,形成 UI+IOT 集成式解决方案,减少客户 开发的环节数,减少沟通成本,降低开发中的不确定性,使整个方案稳定性提升。 3、成本 WIFI 模块作为迪文物联网解决方案一环,面对不同行业数万家客户,形成规模优势。直接和 WIFI 芯片原厂合 作,保证成本优势。
ESP8266串口wifi模块使用手册

ESP8266串口wifi模块使用手册
一、模块引脚介绍
正常使用只需要VCC,GND,URXD,UTXD,CH_PD这5个io就可以,其中CH_PD正常使用时接高电平。
其他接口一般用于模块烧写固体是用到。
模块出厂已经烧有固体,波特率为115200。
二、模块与407开发板(高配版)V3.1连接
由于wifi模块接口与网络芯片DP83838公用IO口,所以在使用wifi模块时,需要把P5,上图红色圈出来的短路帽全部拆掉,不要接。
三、实验操作与现象
1、P5短路帽全部拆掉
2、板子上电,下载配套的例程程序
3、板子断电,插上wifi模块
4、板子上电后,代码运行配置wifi模块工作在服务器
5、此时手机wifi搜索,可搜索到名为“qiming_wifi”的热点,连接此热点,密码为:0123456789
6、打开“启明WIFI”app,输入IP: 192.168.4.1 端口号5000
7、点击“连接”,连接成功后手机APP就可以控制开发板了第5、6步可以在程序中设置用户自己所需参数。
ESP8266 WiFi模块参数配置指南说明书

ESP8266 Phy Init Bin Parameter Configuration GuideVersion 1.0Espressif SystemsCopyright © 2018About This Guide This guide provides the parameter configuration for ESP8266 phy init bin.Release NotesDate Version Release notes2018.12V1.0Initial releaseDocumentation Change NotificationEspressif provides email notifications to keep customers updated on changes totechnical documentation. Please subscribe at https:///en/subscribe.CertificationDownload certificates for Espressif products from https:///en/certificates.Table of Contents....................................................................................... 1.Structure of ESP8266 Phy Init Bin 1.................................................................................... 2.Check Bits for ESP8266 Phy Init Bin 2.......................................................................................... 3.Version of ESP8266 Phy Init Bin 3............................................................................................... 4.Selection of Crystal Oscillator 4.......................................................................................................... 5.Six Levels of TX Power 5.......................................................................................... 6.TX Power for Various Data Rates 6.................................................................................................................... 7.TX Power Limits 7..........................................................................................7.1.Value Range of the TX Power Limits 77.2.Parameters for the TX Power Limits 7................................................................................................................................................................................................................. 8.RF Calibration 91. Structure of ESP8266 Phy Init Bin 1.Structure of ESP8266 Phy InitBin ESP8266 phy init bin is comprised of a 128-byte phy init data as shown in Table 1-1:Table 1-1. Structure of ESP8266 Phy Init BinName Sizephy init data128 bytes2. Check Bits for ESP8266 Phy Init Bin 2.Check Bits for ESP8266 PhyInit Bin The check bits for ESP8266 phy init bin are stored in byte zero of phy init data, and therelevant parameter is Init_bin_magic with default value of 0x5. The check bits are used forverifying the data location in ESP8266 phy init bin. If the parameter value is the same asthe default value when reading data, it is assumed that data are stored correctly inESP8266 phy init bin.Table 2-1. Check Bits for ESP8266 Phy Init BinLocation in phy init data Parameter Name Default Value Description0Init_bin_magic5For check3. Version of ESP8266 Phy Init Bin3.Version of ESP8266 Phy InitBinThe version information of ESP8266 phy init bin is stored in byte 1 of phy init data.For example, ESP8266_esp_data_bin_v08.bin represents Version 08, which is stored inbyte 1 as 0x8.Table 3-1. Version of ESP8266 Phy Init BinLocation in phy init data Parameter Name Default Value Description1Init_bin_version8phy init bin version4. Selection of Crystal Oscillator 4.Selection of Crystal OscillatorThe parameter crystal_sel allows you to select a crystal oscillator. The available options aregiven in Table 4-1. Currently, ESP8266 mainly supports 26 MHz and 40 MHz crystaloscillators.Table 4-1. Selection of Crystal OscillatorLocation in phy init data Parameter Name Default Value Description48crystal_sel10: 40 MHz crystal oscillator 1: 26 MHz crystal oscillator 2: 24 MHz crystal oscillator5. Six Levels of TX Power 5.Six Levels of TX PowerTX power can be switched between six levels. The indexes for the six levels are thenumbers from 0 to 5 at the end of the parameter names. For example, the index fortxpwr_qdb_0 is 0, representing the maximum TX power. From txpwr_qdb_0 totxpwr_qdb_5, the TX power decreases progressively.Default TX power settings can be found in Table 5-1.Table 5-1. Six Levels of TX PowerLocation in phy init data Parameter Name Default Value Unit Actual TX Power34txpwr_qdb_0780.25 dB19.5 dBm35txpwr_qdb_1740.25 dB18.5 dBm36txpwr_qdb_2700.25 dB17.5 dBm37txpwr_qdb_3640.25 dB16 dBm38txpwr_qdb_4600.25 dB15 dBm39txpwr_qdb_5560.25 dB14 dBm6. TX Power for Various Data Rates 6.TX Power for Various DataRates You can choose from any of the six TX power levels for different data rates. The columnDefault value in Table 6-1 contains the TX power index.Table 6-1. TX Power for Various Date RatesLocation in phy init data Parameter Name Data rate/mode DefaultValueDescription40txpwr_index_0MCS0, 1 Mbit/s, 2 Mbit/s, 5.5 Mbit/s, 11 Mbit/s,6 Mbit/s, 9 Mbit/s0Select txpwr_qdb_041txpwr_index_1MCS1, 12 Mbit/s0Select txpwr_qdb_0 42txpwr_index_2MCS2, 18 Mbit/s1Select txpwr_qdb_1 43txpwr_index_3MCS3, 24 Mbit/s1Select txpwr_qdb_1 44txpwr_index_4MCS4, 36 Mbit/s2Select txpwr_qdb_2 45txpwr_index_5MCS5, 48 Mbit/s3Select txpwr_qdb_3 46txpwr_index_6MCS6, 54 Mbit/s4Select txpwr_qdb_4 47txpwr_index_7MCS75Select txpwr_qdb_596txpwr_index_11b_en802.11b00: use txpwr_index_0 toset TX Power for 802.11b1: use bytes 97 and 98 toset TX Power for 802.11b97txpwr_index_11b_01 Mbit/s,2 Mbit/s0Select txpwr_qdb_098txpwr_index_11b_15.5 Mbit/s, 11 Mbit/s0Select txpwr_qdb_07. TX Power Limits7.TX Power LimitsThe TX power limits have been set mainly to limit the maximum powers for channels 1, 11,13 and 14 in order to conform to the certification test results.7.1.Value Range of the TX Power LimitsThe TX power limits are set against the six levels. The value range of the limits is [0:5],which includes the values presented in Table 7-1.7.2.Parameters for the TX Power LimitsThe parameters for the TX power limits are specified in Table 7-2. For example, if the valueof byte 78 is set to 2, the bytes 30-33 are enabled to configure the maximum TX powers for channels 1, 11, 13 and 14.Table 7-1. Values of the TX Power Limits ValueTX Power Limit (Unit: 0.25 dB)0txpwr_qdb_01txpwr_qdb_12txpwr_qdb_23txpwr_qdb_34txpwr_qdb_45txpwr_qdb_5Table 7-2. Parameters for the TX Power Limits Location inphy init data Parameter name Default value Description78fcc_enable 00: disable bytes 30-331: reserved2: enable bytes 30-33 to set maximum TXpower30mpwr_chan10Set the maximum TX power for 802.11 b/g/n mode at channel 1, range [0:5]. 0xf8 isan invalid parameter.31mpwr_chan110Set the maximum TX power for 802.11 b/g/n mode at channel 11, range [0:5]. 0xf8is an invalid parameter.7. TX Power Limits32mpwr_chan130Set the maximum TX power for 802.11 b/ g/n mode at channel 13, range [0:5]. 0xf8 is an invalid parameter.33mpwr_chan140Set the maximum TX power for 802.11 b/ g/n mode at channel 14, range [0:5]. 0xf8 is an invalid parameter.8. RF Calibration 8.RF CalibrationThe values of the parameter RF_calibration are shown in Table 8-1. To ensure better RFperformance, it is recommend to set RF_calibration to 3, otherwise the RF performancemay become poor.Table 8-1. Parameter of RF CalibrationLocation inphy init dataParameter name Default value Description114RF_calibration30 & 1: only used for setting TX power 2: No RF calibration3: Conduct all RF calibrationDisclaimer and Copyright NoticeInformation in this document, including URL references, is subject to change without notice.THIS DOCUMENT IS PROVIDED AS IS WITH NO WARRANTIES WHATSOEVER,INCLUDING ANY WARRANTY OF MERCHANTABILITY , NON-INFRINGEMENT, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE.All liability, including liability for infringement of any proprietary rights, relating to use of information in this document is disclaimed. No licenses express or implied, by estoppel or otherwise, to any intellectual property rights are granted herein.The Wi-Fi Alliance Member logo is a trademark of the Wi-Fi Alliance. The Bluetooth logo is a registered trademark of Bluetooth SIG.All trade names, trademarks and registered trademarks mentioned in this document are property of their respective owners, and are hereby acknowledged. Copyright © 2018 Espressif Inc. All rights reserved.Espressif IoT Team。
第一章--esp8266的使用

ESP8266-wifi模块使用方法
说明:学习esp8266wifi模块与电脑接收与发送数据。
一、原料
硬件:①esp8266-wifi模块
②usb转ttl
③5v转3.3v模块(esp8266仅支持3.3v电压,使用5v模块有几率会被烧坏)
④杜邦线
软件:串口工具sscom32
二、连线
1、wifi模块有8个引脚,要使用它,我们只需要用到5个引脚即可(红框)。
本来不准备画出连线图的,考虑到效率问题,在下面附上(应该多看看esp8266的学习文档,尝试自己连,然后再参考下面的)
2、插电源,插电脑
3、电脑上打开串口工具
插上电后,串口工具显示一堆乱码和一串英文。
这时候我们尝试输入AT并点击发送。
然而此时esp8266模块的默认波特率是115200,所以,不会返回任何数据给串口工具,所以我们需要将模块波特率改为9600才能用。
输入AT+UART=9600,8,1,0,0并点击发送。
然后重启模块。
重启之后,再次发送AT,这时候串口工具会返回OK。
这样就说明模块可以使用了。
模块配置是需要AT指令来执行的,不懂AT指令的话,自行百度哦。
我这里截一下常用的指令,不给你们写注释了(有些我也有点遗忘了,万一写错会误导你们),要学会多百度,不懂再问。
esp8266 教程

esp8266 教程ESP8266是一款非常流行的物联网开发板,它是由Espressif Systems开发的一款低成本且具有无线网络能力的芯片。
ESP8266可用于连接互联网,在物联网应用和项目中有着广泛的应用。
本文将介绍ESP8266的基本功功能以及使用它进行物联网开发的步骤。
首先,ESP8266具备Wifi无线通信能力,可以连接到互联网并与其他设备进行通信。
它内置了TCP/IP协议栈,可以通过Wifi模块连接到无线网络,支持多种加密方式,使其在物联网项目和应用中具有很高的灵活性和可扩展性。
ESP8266的开发可以使用Arduino IDE进行编程,使得其在开发者之间具备很高的可用性。
开发人员可以使用C/C++编写程序,利用丰富的Arduino库来简化代码开发。
通过Arduino IDE可以很方便地下载程序到ESP8266芯片,并进行调试和监控。
同时,开发者还可以使用ESP8266 SDK进行底层程序的开发,实现更加高级和复杂的功能。
ESP8266还支持多种传感器和外设的连接。
通过GPIO引脚,可以连接各种传感器,如温度传感器、湿度传感器等,实现对环境的监测。
此外,还可以连接各种执行器,如继电器、电机等,实现对外部设备的控制。
通过与其他设备的互联,可以实现物联网应用的开发。
对于物联网的开发,ESP8266提供了OTA(Over-the-Air)功能,使得程序的远程更新变得非常简单。
开发者可以通过OTA将程序上传到ESP8266,不需要将开发板与计算机进行有线连接,大大提高了开发的便捷性和效率。
此外,ESP8266还支持MQTT协议,可以与物联网平台进行通信,实现设备的远程控制和监控。
总结来说,ESP8266是一款强大而灵活的物联网开发板。
它具备Wifi无线通信能力,可以连接到互联网并与其他设备进行通信。
开发者可以使用Arduino IDE进行编程,使用丰富的库简化代码开发。
ESP8266还支持多种传感器和外设的连接,可以实现对环境的监测和对外部设备的控制。
ESP8266 WiFi模块硬件连接指南说明书

Your ESP8266 is an impressive, low cost WiFi module suitable for adding WiFi functionality to an existing microcontroller project via a UART serial connection. The module can even be reprogrammed to act as a standalone WiFi connected device–just add power!The feature list is impressive and includes:802.11 b/g/n protocol Wi-Fi Direct (P2P), soft-APIntegrated TCP/IP protocol stackThis guide is designed to help you get started with your new WiFi module so let’s start!The hardware connections required to connect to the ESP8266 module are fairly straight-forward but there are a couple of important items to note related to power:The ESP8266 requires 3.3V power–do not power it with 5 volts!The ESP8266 needs to communicate via serial at 3.3V and does not have 5V tolerant inputs,so you need level conversion to communicate with a 5V microcontroller like most Arduinos use.However , if you’re adventurous and have no fear you can possibly get away with ignoring the second requirement. But nobody takes any responsibility for what happens if you do. :)Here are the connections available on the ESP8266 WiFi module:ESP8266 WiFi Module Quick Start GuideIntroductionHardware ConnectionsNOTE:Links and Code (Software) Supplied or Referenced in this Document is supplied as a service to our customers and accuracy is not guaranteed nor is it an Endorsement of any particular part, supplier or manufacturer. Use of information and suitability for any application is at users own discretion and user assumes all risk.All rights are retained by the AuthorWhen power is applied to the module you should see the red power light turn on and the blue serial indicator light flicker briefly.If you have a 3.3V FTDI Serial to USB board you can get started without fear of destroying your new ESP8266 WiFi module. Do note that many FTDI boards have a solder jumper to convert from 3.3V to 5V operation so ensure it is set to enable 3.3V operation.Here are the connections required to enable communication with the module over serial:With FTDI 3.3V Board (Legit)DO NOT DO THIS! You may break your Arduino or your ESP8266 WiFi module.This method is a bad idea for a number of reasons:The ESP8266 does not have 5V tolerant inputs–you could destroy your WiFi module.The ESP8266 may draw more current than the 3.3V regulator on your Arduino can supply–you could damage your Arduino.The operation of the ESP8266 outside of stated limits may be unstable and unreliable–you could damage your sanity.This method does have one redeeming feature:If you already have an Arduino Uno R3 it’s really easy to get started and (mostly) worked for me. :)We’re essentially going to use your Arduino as a power supply and USB to serial converter so you need to ensure there is no sketch that interferes with the serial connection. There are a couple of ways to achieve this:Upload an “empty” sketch that doesn’t use the serial connection, e.g. BareMinimum from theWith Arduino Uno R3 (Quick but not very legit)examples menu; or,Remove the microcontroller from the Arduino board (if it is a DIP form factor–don’t undersolder an SMD one).Here are the connections required to enable communication with the module over serial in this configuration:Serial ControlWith the hardware connections in place you can communicate with the WiFi module through a serial terminal.Using Arduino IDE Serial MonitorIf you already have the Arduino IDE installed the easiest way to get started is to use the built-in Serial Monitor:1. Plug in the WiFi module.2. Choose the correct serial port from the Tools > Serial Port menu.3. Open the Serial Monitor via the Tools menu or “magnifying glass” icon on the editor window.4. For the default firmware version (00160901), ensure Carriage return is selected in the lineending pop-up menu at the bottom of the serial monitor. (For later versions it must be set toBoth NL & CR.)5. For the default firmware version, ensure the communication speed is set to 115200 baud. (Forlater versions or if it has been modified it will need to be 9600 baud or similar.)You’re now ready to send your first commands!Using GNU ScreenIt’s possible to use GNU Screen out of the box with the default version of the firmware (00160901) which expects Carriage-Return-only line endings, e.g. (on OS X):screen /dev/bserial-AB12345 115200Unfortunately the updated firmware versions require Carriage-Return-and-New-Line line endings and there appears to be no way to configure screen to send both with one key press. Instead, you need to press <enter> or Ctrl-M then follow that with Ctrl-J.You might have more success with something like minicom or picocom with later firmware versions.Now you’re ready to send your first commands!First Commands1. Ensure AT commands are received correctly (the AT seems not to be case sensitive but therest of any command is case sensitive):ATResponse:OKIf you don’t get this response check:Hardware connections (the blue LED on the board should flash). Try swapping RX & TX.Correct baudrate–should be 115200 on the default firmware version (00160901).Correct line endings–should be Carriage Return only for default firmware version (00160901).If it still doesn’t work, give up, you’ve probably got better things to do with your life…2. Ensure the module is in a known state by issuing a reset command:AT+RSTResponse:ets Jan 8 2013,rst cause:4, boot mode:(3,6)wdt resetload 0x40100000, len 24444, room 16tail 12chksum 0xe0ho 0 tail 12 room 4load 0x3ffe8000, len 3168, room 12tail 4chksum 0x93load 0x3ffe8c60, len 4956, room 4tail 8chksum 0xbdcsum 0xbdreadyOr similar. The important part is the ready on the last line.3. Check the firmware version:AT+GMRThe stock firmware produces this output:001609014. Enable the module to act as both a “Station” and an “Access Point”:AT+CWMODE=3Response:OK(You may need to perform another reset after changing this setting.)5. List surrounding WiFi networks.First, if you’re on (at least) the 00160901 firmware you need to work around an apparent firmware bug that hangs on listing WiFi networks if the last joined network is no longer available.The following command ensures no network details are stored for connection (you should get an OK) response:AT+CWJAP="",""(You can check to see what the currently stored network details are with:AT+CWJAP?which should generate the following output if no network details are stored:+CWJAP:""With a later firmware or if the last joined network is still in the vicinity you shouldn’t need to do this pre-step.)Now you send the actual command to list networks in the vicinity:AT+CWLAPYou should get a response like:+CWLAP:(0,"",0)+CWLAP:(3,"WiFiArtThouRomeo",-80)+CWLAP:(3,"Free Public WiFi",-51)+CWLAP:(3,"Guest",-91)OKSometimes you might get ERROR or no response–in which case you’ll have to try doing the USB plug/unplug cycle and try again. (Or the same with the ground jumper.)6. Join a suitable WiFi access point:AT+CWJAP="<access_point_name>","<password>"You should get an OK response.For example, with the above list of access points you might use:AT+CWJAP="Guest","MyVoiceIsMyPasswordSoWhyDoINeedThis?"You can check if the module has been allocated a IP address with:AT+CIFSRYou should get your current IP address in response, e.g:192.168.1.2Acting as a TCP ClientYou can connect to an internet server (e.g. a web server) with the following method:1. Enable multiple connections (you need an OK response):AT+CIPMUX=12. Specify which connection channel you wish to connect on (0-4), the protocol type (TCP/UDP),the IP address (or domain if you have DNS access) and the port number using the CIPSTART command:AT+CIPSTART=4,"TCP","",80You should receive the response OK followed by Linked when the connection is open:OKLinked3. Next you need to specify how much data you wish to send (after specifying which channel). In thisexample we’re going to send “GET / HTTP/1.0\r\n\r\n” which is 18 bytes:AT+CIPSEND=4,18This time, instead of an “OK” response your will get a > prompt:>This indicates the module is waiting for you to send the 18 bytes of data.Here it gets a bit messy if you’re using the Arduino serial monitor as you have to swap between the line ending the module requires (“Carriage return” only) and what the HTTP server is expecting (“Both NL & CR”). Change the setting to Both NL & CR and send the following (you will need to press Send a second time to send the empty line the HTTP server expects):GET / HTTP/1.0The module should respond with:SEND OKNow you should change the line ending setting to Carriage return only so you can send additional commands.The module should provide a second response once the web server responds:+IPD,4,530:The 4 indicates it’s data from connection channel 4 and the 530 indicates there’s 530 bytes of data. You should now see the data:HTTP/1.0 302 FoundCache-Control: privateContent-Type: ...Woo! You just put a thing on the internet…time to go find a VC!You’ll likely get an OK response or two and then eventually an indication that the server has closed the connection:UnlinkActing as a TCP ServerYou can enable the module to accept TCP connections (i.e. act as a server) in the following manner:1. Connect to a WiFi access point.2. Enable multiple connections.AT+CIPMUX=13. Find out the IP address of the module:AT+CIFSRNote the response, e.g.:192.168.1.24. Set the module to listen (first parameter, mode is set to 1) for a connection on a specific port(in this case port 1336):AT+CIPSERVER=1,13365. From another device on the same network connect to the listening port, e.g. with telnet:telnet 192.168.1.2 1336The module should display:LinkType some text into the telnet session, e.g.:KiwiconAte!The module should display the following (0 being the connection channel, 13 being the length of the data received:+IPD,0,13:KiwiconAte!OKYou can send data in response with the CIPSEND command as used previously, e.g. (0 is the channel, 8 is the length of the data):AT+CIPSEND=0,8The module will display the prompt:>Then you can send the data, e.g.:WhatEvsAnd then the module will respond with:SEND OKThe telnet session should now display:WhatEvsYou can then end the telnet session with by pressing Ctrl-] and q<enter>, the module will display:UnlinkActing as a WiFi Access PointIn addition to connecting to WiFi Access Points the module can also act as an Access Point–this means you can connect devices to the module without any other network infrastructure in place. Ideal for a local private shared “drop box” perhaps…1. The module comes with an access point pre-defined (SSID of “ESP_…”) but you can define yourown with:AT+CWSAP="NoWorriESSID","password",3,0The first parameter is the SSID name; the second parameter is the password; the third the WiFichannel–pick one not used in your area; and, the final parameter is the encryption standard to use.An encryption value of 0 turns encryption off which means the password is ignored–but it still can’t be an empty value. I couldn’t get any encryption to work though (it would always create an unencrypted network) you might have more luck–possibly with a more recent firmware…2. To actually enable the network to be created you need to set the “WiFi mode” of the module to “AP”(2) or “Both” (3):AT+CWMODE=3Now you will be able to connect to your module as an access point from another device (e.g. a laptop or a phone).3. You can list the IP address etc of any device connected to the network with:AT+CWLIFWhich generates the response:192.168.4.100, [...]4. Now you can run the server example from above and connect–note that the module always has theIP 192.168.4.1 when acting as an AP.Updating the firmwareYou’ll be pleased to know you’re not stuck with the ample list of features that ship with your module, no, because you can update the firmware of your module! Yes, that means you can get new features & new bugs too…Finding New Official FirmwareIt’s not particularly easy to find new official firmware versions–the links are spread over forums, wikis and Google Drive accounts which don’t look particularly legit.It seems like the best source of details is the “Updates” section of the “Firmware” section on this page: /w/Wi07c#FirmwareThis ridiculous URL (from the link entitled “Find most upated firmware on this google link” on the above ElectroDragon page) seems to list all the official firmware updates: https:///folderview? id=0B3dUKfqzZnlwR2pVWjg3NXRVdW8&usp=drive_web&tid=0B3dUKfqzZnlwRjFaNTUzZFptbzg#listConsider uploading one of the following versions:ESP8266_flasher_V00170901_00_Cloud Update Ready.zipESP8266_AT_V00180902_02_baudrate watchdog added.zip(A note on version numbers: the version number 00160901 is made up of two parts: 0016 is theSDK version and 0901 is the AT command set version.)Once you’ve updated the firmware you also have the option of “Cloud Updates” but I’ve not managed to get any cloud update to work yet: /cloud-updating-your-wi07c-esp8266-now/Firmware Update ToolsWhile there are other tools for updating the firmware, for this example we’ll use esptoolhttps:///themadinventor/esptool/ which is cross platform and GPL licensed.Download the script file fromhttps:///themadinventor/esptool/master/esptool.py.Hardware Connections and Performing the UpdateIn order to update the firmware you need to configure the hardware to enter firmware update mode:1. Disconnect the module from your computer.2. Connect GPIO0 to ground (0 Volts) (“pulled low”) to enable firmware update mode.3. Reconnect the module to your computer.The module should now be in firmware update mode.(Note that the esptool docs say to ensure “GPIO2 is pulled high” but this doesn’t appear to be necessary.)Execute this command to perform the firmware update (the .bin file is from theESP8266_AT_V00180902_02_baudrate watchdog added.zip archive):python esptool.py --port /dev/bserial-ABC12345 write_flash 0x000000 " v0.9.2.2 AT Firmware.bin"You should receive progress updates during the upload process:Connecting...Erasing flash...Writing at 0x0007ec00... (100 %)Leaving...If you have problems connecting and have been using the Arduino IDE Serial Monitor ensure it isn’t open when trying to perform the upgrade. (Ask me how I know…)Once the update has completed:1. Disconnect the module from your computer.2. Remove the connection from GPIO0 to ground.3. Reconnect the module to your computer.You should now have a new firmware version installed and functioning.Note:The startup behaviour of the module is now different–it displays different output.The module now defaults to communicating at 9600 baud.The module now expects both carriage return and new line characters at the end of every line.New AT commands will be available and some bugs may have been fixed!Arduino and ESP8266Up until now you’ve been manually controlling the WiFI module via the serial console. It’s obviously possible to control the module programmatically via an Arduino sketch. At present there doesn’t seem like a “preferred” choice for an Arduino library to abstract the functionality but a few searches will find you Arduino examples to start with and presumably over time the Arduino community will settle on a preferred library.ESP8266 SDK and Custom FirmwareAn official Software Development Kit (SDK) has been released for the System-on-Chip (SoC) controller which powers the ESP8266 WiFi module. Using the SDK it’s possible to add extra features to the AT command firmware or even create a standalone firmware.Here’s a couple of custom firmwares to check out…NodeMcuLua based firmware for WiFi-SoC ESP8266: https:///nodemcu/nodemcu-firmwareVery cool and easy to get started with.Download the firmware:wget https:///nodemcu/nodemcu-firmware/raw/master/0.9.2/512k-flas h/nodemcu_512k.binFlash the firmware to the module:python esptool.py --port /dev/bserial-ABC123456 write_flash 0x000000 nodemcu_512k.binConnect to the module:screen /dev/bserial-ABC123456 9600Do the obvious…print("hello")For more details look at:https:///nodemcu/nodemcu-firmware#readmehttps:///nodemcu/nodemcu-firmware/wiki/nodemcu_api_enAT Command GPIO controlThere is a custom firmware with AT commands added to read and write the General PurposeInput/Output (GPIO) pins available–this enables you to control LEDs and read buttons with AT commands.For more details see: /esp8266-gpio-test-edited-firmware/More resourcesEspressif Systems (Designer): https:///en/products/esp8266/Espressif Systems Github: https:///espressifESP8266 Community Forum: /NURDspace on ESP8266: https://nurdspace.nl/ESP8266First setup of ESP8266 SDK: https://nurdspace.nl/ESP8266/First_setupElectroDragon on ESP8266: /w/Wi07cFinally…Have fun!Find updates to this guide and more information at /i/follower/p/notes-esp8266. This getting started guide is brought to you by Kiwicon 8 and !。
Handson Technology ESP8266 NodeMCU WiFi开发板用户手册说明书

User Manual V1.2The ESP8266 is the name of a micro controller designed by Espressif Systems. The ESP8266 itself is a self-contained WiFi networking solution offering as a bridge from existing micro controller to WiFi and is also capable of running self-contained applications. This module comes with a built in USB connector and a rich assortment of pin-outs. With a micro USB cable, you can connect NodeMCU devkit to your laptop and flash it without any trouble, just like Arduino. It is also immediately breadboard friendly.Table of Contents1. Specification: (3)2. Pin Definition: (3)3. Using Arduino IDE (3)3.1 Install the Arduino IDE 1.6.4 or greater (4)3.2 Install the ESP8266 Board Package (4)3.3 Setup ESP8266 Support (5)3.4 Blink Test (7)3.5 Connecting via WiFi (9)4. Flashing NodeMCU Firmware on the ESP8266 using Windows (12)4.1 Parts Required: (12)4.2 Pin Assignment: (12)4.3 Wiring: (13)4.4 Downloading NodeMCU Flasher for Windows (13)4.5 Flashing your ESP8266 using Windows (13)5. Getting Started with the ESPlorer IDE (15)5.1 Installing ESPlorer (15)5.2 Schematics (18)5.3 Writing Your Lua Script (18)6. NodeMCU GPIO for Lua (22)7. Web Resources: (22)ing Arduino IDEClick ‘File’ -> ‘Preferences’ to access this panel. Next, use the Board manager to install the ESP8266 package.Click ‘Tools’ -> ‘Board:’ -> ‘Board Manager…’ to access this panel.Scroll down to ‘ esp8266 by ESP8266 Community ’ and click “Install” button to install the ESP8266 library package. Once installation completed, close and re-open Arduino IDE for ESP8266 library to take effect.Setup ESP8266 SupportWhen you've restarted Arduino IDE, select ‘Generic ESP8266 Module’ from the ‘Tools’ -> ‘Board:’ dropdown menu. Select 80 MHz as the CPU frequency (you can try 160 MHz overclock later)Find out which Com Port is assign for CH340 Select the correct Com Port as indicated on ‘Device Manager” Note: if this is your first time using CH340 “ USB-to-Serial ” interface, please install the driver first before proceed the above Com Port setting. The CH340 driver can be download from the below site:Once the ESP board is in bootload mode, upload the sketch via the IDE, Figure 3-2.Figure3-1: Connection diagram for the blinking testFigure 3.2: Uploading the sketch to ESP8266 NodeMCU module.The sketch will start immediately - you'll see the LED blinking. Hooray!Connecting via WiFiOK once you've got the LED blinking, let’s go straight to the fun part, connecting to a webserver. Create a new sketchconst char* host ="";void setup(){Serial.begin(115200);delay(100);// We start by connecting to a WiFi networkSerial.println();Serial.println();Serial.print("Connecting to ");Serial.println(ssid);WiFi.begin(ssid, password);while(WiFi.status()!= WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("");Serial.println("WiFi connected");Serial.println("IP address: ");Serial.println(WiFi.localIP());}int value =0;void loop(){delay(5000);++value;Serial.print("connecting to ");Serial.println(host);// Use WiFiClient class to create TCP connectionsWiFiClient client;const int httpPort =80;if(!client.connect(host, httpPort)){Serial.println("connection failed");return;}// We now create a URI for the requestString url ="/projects/index.html";Serial.print("Requesting URL: ");Serial.println(url);// This will send the request to the serverclient.print(String("GET ")+ url +" HTTP/1.1\r\n"+"Host: "+ host +"\r\n"+"Connection: close\r\n\r\n");delay(500);// Read all the lines of the reply from server and print them to Serial while(client.available()){String line = client.readStringUntil('\r');Serial.print(line);}Serial.println();Serial.println("closing connection");}That's it, pretty easy right ! This section is just to get you started and test out your module.ESP8266 Module Breadboard Friendly with Header ConnectorESP8266 Module Breadboard FriendlyPL2303HX USB-UART Converter CableSome Male-to-Female Jumper WiresESP8266 Pin DescriptionCH_PD Pull high, connect to Vcc +3.3VVcc Power Supply +3.3VTXD Connect to RXD (white) of PL2303HX USB-Serial converter cable RXD Connect to TXD (Green) of PL2303HX USB-Serial converter cable GPIO0 Pull low, connect to GND pinGND Power Supply groundPress the button “Flash” and it should start the flashing process immediately, showing the Module MAC address if After finishing this flashing process, it should appear a green circle with a check icon at lower left corner.Your ESP8266 module is now loaded with NodeMCU firmware.Here’s a rundown of the features the ESPlorer IDE includes:Syntax highlighting LUA and Python code.Code editor color themes: default, dark, Eclipse, IDEA, Visual Studio.Undo/Redo editors features.Code Autocomplete (Ctrl+Space).Below the Code Window, you have 12 buttons that offer you all the functions you could possible need to interact with your ESP8266. Here’s the ones you’ll use most: “Save to ESP” and “Send to ESP”.5.3 Writing Your Lua ScriptBelow is your script to blink an LED.lighton=0pin=4gpio.mode(pin,gpio.OUTPUT)Right now you don’t need to worry how this code works, but how you can upload it to your ESP8266.Look at the top right corner of your ESPlorer IDE and follow these instructions: Press the Refresh button.Select the COM port for your FTDI programmer.Select your baudrate.Click Open.Copy your Lua script to the code window (as you can see in the Figure below):Congratulations, you’ve made it! The blue LED at the upper right corner should be blinking every 2 seconds!6. NodeMCU GPIO for LuaThe GPIO(General Purpose Input/Output) allows us to access to pins of ESP8266 , all the pins of ESP8266 accessed using the command GPIO, all the access is based on the I/O index number on the NoddMCU dev kits, not the internal GPIO pin, for example, the pin ‘D7’ on the NodeMCU dev kit is mapped to the internal GPIO pin 13, if you want to turn ‘High’ or ‘Low’ that particular pin you need to called the pin number ‘7’, not the internal GPIO of the pin. When you are programming with generic ESP8266 this confusion will arise which pin needs to be called during programming, if you are using NodeMCU devkit, it has come prepared for working with Lua interpreter which can easily program by looking the pin names associated on the Lua board. If you are using generic ESP8266 device or any other vendor boards please refer to the table below to know which IO index is associated to the internal GPIO of ESP8266.Nodemcu dev kit ESP8266 Pin Nodemcu devkitESP8266 PinD0 GPIO16 D7 GPIO13D1 GPIO5 D8 GPIO15D2 GPIO4 D9 GPIO3D3 GPIO0 D10 GPIO1D4 GPIO2 D11 GPIO9D5 GPIO14 D12 GPIO10D6 GPIO12D0 or GPIO16 can be used only as a read and write pin, no other options like PWM/I2C are supported by this pin.In our example in chapter 5 on blinking the blue LED, the blue LED in connected to GPIO2, it is defined as Pin4 (D4) in Lua script.7. Web Resources:•ESP8266 Lua Nodemcu WIFI Module•ESP8266 Breadboard Friendly Module•ESP8266 Remote Serial WIFI Module•PL2303HX USB-UART Converter Cable。
已解决esp8266-01所有通讯连接(适合新手)

UDP模式网络调试助手端:设置好本机主机ip和端口号,以及对方的ip和端口号在设备端:a )b sscorn42测试版「作者:融」嵋(丁丁X Emaiil;mcu52@163xorn,2007/9 多杀宇苻串发送AT<IfSTAKT=',W J ,, "192. i 曲一 2S. 162 ”,8080, 8080 CONNECT □K 打开文件|図军茗 COTU5 ▼ 115200 T 6 ▼1 ▼ None T None T关谢串口鰭 HE%显示 厂HE 工岌谨 LDTRLRT5f7 岌送唏 厂定时左送|100~血故 宇符串输入框:发送 HE厂厂厂厂厂厂厂厂厂厂厂厂厂|hT+RST kTKmJPE=l AT 吒IFSE AT 云出TAKT AT&町Af"ATHLE ™ 列札TM :IFSERVE0X BQB(J 羅 吃MAT 』cloudw or 1加33", AT 吃ITSENDF AT 财 L1FJLT^CIFSTATUS kT*CIP5EWD^ 10 "TCP V192. iee. 25. L82\ 3000I 3 "1姐1加.55. 1竝",和机,8更| 口必发送文件|偉止|保存窗口丨劉余窗口 |帮取|二|隐藏 «T7^JtPCBtW^ 小万Q : 8000BB315 監i 卬氓i 戏虾论坛!怂犬虾黑春■(噩------- 以下掏广告 -------- 市嫌化m 创新曲菇”国产5i 单片机 PCB 打持审这审旅即:/Aww, iz-ilc. con/£ lAT+CIPSTART^W^ W192. 16S. 25. 182* 8080, 8080 Lvww.daxiaxor 5:46 R:62 匚QM15已打开T15200bpm.&1」无歴验1无曲 匚TS=O D5R=D RLSt 若连接失败,则可先rst 设备,在发送命令时 设备端发送数据,要添加命令 AT+CIPSEND=1表示发送10个字节UDP 下可以透传模式,AT+CIPMODE=1123十吨・透传模式下,去掉了+IPD,<stl>:(stl为后面字符的长度)在此模式下,模块如果要发送数据, 需发送命令AT+CIPSEND则双方进入透传模式下的传输退出透传,发送+++ (不发送新行)在透传模式下,可关闭透传模式AT+CIPMODE=0模块为 servers 模式打开多链路模式后,再打开服务器及配置端口号I 55 coJ J ). E m ai I ; m cu 5 2 @ 16 3 H C orn , 2007/9发送文件I 停止I 保存窗口 1著除宙口丨帮助丨-1隐藏匸敲R 关闭串口鑑厂胁显示 --------- 1厂HE 媛谡 厂DTR 厂RTSp^送新行 寸厂室时雄[ioo~耐软 重+叭册I /hHQ : 000050316 尬i 卬渝i 戏虾论坛!金瘙貴虾等看保!------- ki 下掏广告-------- 市塚化弓创新聘范'国言刃单片机PCB 打牌占汶甲http /Awx. iz-ilc. com/£接收从客户端的消息容易,当发送数据到客户端时,首先需要查询客户端的的 id 号AT+CIPSTATUS STATUS:3+CIPSTATUS:0,"TCP","192.168.25.182",52391,1 然后再根据前面的0进行发数据 AT+CIPSEND=0,20AT<imnt=i□KAT-*CIFSERYER=1,6O6O多耨符爭发送| 厂自总环岌送,闾踽□KHEX.r 厂厂 厂 厂 厂 r 厂 厂 厂 厂 厂 ^.T+RST1M+CWLAT2W-»€WrE=l 3 KT+CIFSR 44T+CIPSTART & kT*CWJ^F?& AT*crmni=i7AT<IPSERVER=l,8CK0玄崔?AP="岛功1]," g肛吃 IFMDDER 10JlKWUFnMKIPJTATUS 12KT*CITSEHB=1013 "TCP" "192.168 2E.182* 8000N "「192. 168.25. 102\ 8080,80S15 kT*CIPCLOSE16IF字符串 发送打开文件I 反祚茗 ^vww B daxia.cor 5:34RMCOMI开115200b»Nh 无俊验无扭CTS=O DSR=0 RLSt115200 ▼时 ore 二| |AT 屹:[PSERVTR=1,射的I 5? co m412,31J^i J J ). E m gi I ; m cu 5 2 @ 16 3 oriri , 2007/9AT<irSTATUS STATUS:3+CIPSTATUS:O, "TCF : *192 疋8.西.182* 5239E 1 0KAKIFSEHIH], 10 0Ky 吒I, iobury w,.,Recv 10 IbytesSEND OKAT+CIFSEHD=O, 20 □K> CIPSEHIX.. 20 Eusy s...SEHD OK+IPD, 0? 33: Lttp i //wvrw. cm soft, fin QQ. 1086E600s 打开文件睜茗 多条宇符串发送厂自动猶环岌強闻隠阿mi 发送1 23 910 11 1213 1415161?■发送交件I 停止I 保存醤口丨瘠踪窗口 I 聚助I -1隐藏*www.daua.cof ^&1O0 |lt275 |CO 袖 15巳扫开 T15200bp&& [刃翅JE 沁 |CTS=0 DSR=D R1SI ■ 丁 rM n r ir ■ ii n« cm i在此模式下,透传模式不支持模块为client模式单路模式网络串口端,配置好pc的ip(根据路由器获取到的ip)然后打开一个端口,查看端口是否打开,可以在cmd命令中输入netstat命令查看,若是查看服务端是否打开, 可用telnet 命令在单链路模式下,发送连接的命令AT+CIPMUX=OAT+CIPSTART="TCP","192.168.25.182",8080其中ip为服务端的ip,端口为服务端的端口注意事项:若此时无法建立连接,把电脑防火墙关闭,防火墙会阻止某个端口的打开load 0x40100000^ len 1396^ rcKont 16 tail 4cKkstum 0js89loid OxSff-eSOOO^ leu 776, room 4 t&il 4 cKk^iw OxeS lo^d OK3£fe8303s , leu 546 nm 4 tail 8 cKk suim 0xd3 csum OxcO2nd boot; v-trsisn : 1,4 (bl) SFI Sp^d : 4阿工 SPI Mode : DIOa SFIFlash Size & Alap : fiKbi t (512KB -^12K1) jump to run us^rl ® 1000多杀字符串发送IJIT+R^TOKWIFI BISCOJfflECTet s Jan 6 2013^ rit ctuie :2^ t moh :⑶6)卞.畔枕Ai-Thinker TechnO'lQsy g _■ Ltd.OKi 卜 ―试版炸者:龛J 唏i 丁丁!.Email;rnaj52@16%ciin2{)O7jf9□X匚OM2g 已打开 115200bP5.a. 1 匚TS=O DSR=O RLSt^vww.daKia,cor 5:348 R:2260厂自动湄环岌医闾隔:阿m串亠子16 7 8 95iitval 1 d*IFI CONNECTED 1IFI GOT IF AT^CITTOI^IKirrn-oOKAT^IPSTART 3^*, w 192. Ifi8. 25 182", 803C CONHECT在此模式下可打开透传模式 AT+CIPMODE=1然后当客户端要发送数据时,发送 AT+CIPSEN 则进入透传发 送模式退出透传模式,同样发送+++然后把发送新行的勾去掉 退出后发送AT+CIPMODE=0则退出透传模式hT 吃労 ____________________ JLT 吃师DE=1 AT 也TBSK竝4CUSTAKT —JIT 忧町AF? 丸THtPKinih扎T 垃賈JAF=*SSIin"» 2hT~*€ITWDE=1 AT 警 L1F AT 吒 IPSTATUS 垃疸FSEH04X 0J "丁併:二巫.1的.西.18g :柱080AT<IT5TAET=W^ ^192.1637AT-*CIPgjQSE ____________________札T P IFEEND _ 辺晅 FSEMi=go^T-*CirSERVEIW) IPMUX ? AT*CIFMUX^314 671811151一 12J3I 冬多路模式多路模式下,发送命令AT+CIPMUX=1AT+CIPSTART=0,"TCP","192.168.25.182",8080i 卜 55co 1^4.2^.ITW :WJ J ).Email;mcu52@163HCorn,2007/9專方创F%尢睡他小万0 800058315 肚向询i 戏虾论坛!金瘍坎虾等看伽!------- klTXir 告----------- 市1S 化弓创新典范,国产51单片机PCB 打样占这甲http ;//ww. iz-ilc. c«iw/£发送数据时则发送对于的id 号及密码Lvwwrdaxia.cor 5:70R :112 COM 西已打开115200b»N1无桂验无曲 CTS=O D5R=0 RLSC战屹HSTART 中,FTF",莓駝一 166.西一 1&2=8號口AT-»cimni=i □KAKIFSTATUS STATUS:2OKAT-tCIPSTART^, "TCf< “妮一 168.25. 182*. 8030 ① 00WCT □K厂自动猪环左医闾隔:|i« mn「『厂厂厂厂厂厂厂厂厂厂厂厂厂厂厂厂厂一扎T+RST _________________________ AT^C 肖 UF JLT*CWHDDE=1 ilT 比TFSE AI4CI7STAKT —AT 吃町AP?丸丁比工珊训=1札T 心FSERVE 貞7 8060 &T 吃賈JAF=*SSID I " hT~H :imWE=1AT5 肖 L1F AT 代IPSTATUS丸T *CI :FSTART W T 匸F ::igz.茁&? AT<IfSTAM=W ; "192. leT ;AT-K :IPCLOSE —-- ^TKIFSEBB _______________________ hT~^!FSEmi=go AT 吃 ITSERVEIH] JLT*CirMUX? KT+CIFMUX^发送文件I 停止I 傑存窗口 I 猜除窗□ I 帮助发送14 56 78 9 1011 1213 14 15 16 1321 建藏C0M29 T115200 T B▼ 1▼NoneNone关闭爭口曬甩兀显示 厂KE 业 厂DTR 厂RTS p 新行 厂室时左送[ioo 宇符串輸入框:msA^在此模式下,不能使用透传模式。
[整理版]ESP8266新手入门调试指导(补全)
![[整理版]ESP8266新手入门调试指导(补全)](https://img.taocdn.com/s3/m/36b9496e8f9951e79b89680203d8ce2f006665b3.png)
ESP8266 ESP-01调试全过程–使用指导测试&编写&汇总by fairyhui一接线注意:本系统是3.3V ! 请勿接5V !新版(全IO口引出版):此版本若想从FLASH启动进入AT系统,只需CH-PD引脚接VCC或接上拉(不接上拉的情况下,串口可能无数据),其余三个引脚可选择悬空或接VCC(但群里(@云海之梦)反映接VCC后导致无法正常启动)(GPIO0为高电平代表从FLASH启动,GPIO0为低电平代表进入系统升级状态,此时可以经过串口升级内部固件RST(GPIO16)可做外部硬件复位使用)测试系统不同,接线方法也选择多多,请各位根据自己的情况进行选择,推荐接法:在CH-PD和VCC之间焊接电阻后,将UTXD,GND,VCC,URXD连上USB-TTL(两者的TXD和RXD交叉接)即可进行测试旧版(AT指令版):该版本中间四根线悬空即可。
群里(@ZR(小R))反应:接线正确的情况下,连上USB转TTL,红灯蓝灯闪烁一下以后全灭,此现象为模块电流过大,超过了USB转TLL模块的承受范围。
解决办法:1. CH-PD换一个阻值更大的上拉电阻;2.换个承受电流大一点USB转TLL模块(群众们也可以自己改造)(@ZR(小R))反应:在供电不足的情况下,收到的响应为乱码。
请各位检查下供电电压是否足够。
二上电:正常工作验证本模块可以工作在三种模式:1. STA 2 .AP 3 .AP+STA,出厂设置为第三种上电后,蓝色灯微弱闪烁后熄灭,红灯长亮1. 搜索无线网络,可见ESP_XXXXXX已经处于列表中(后面的数字是MAC地址后几位)连接该网络以后,查看连接状态:手机搜索该网络,也可连接上:2.使用USR-TCP232-Test.exe进行测试:软件配置如下图:注意:(1)波特率一般在出厂情况下默认的是115200。
如果在115200情况下收到的是乱码可以试试其他波特率(旧版本的默认波特率可能是其他数值)。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
ESP8266 WiFi模块用户手册V1.0目录术语和缩写 (4)1.产品简介 (5)1.1.概述 (5)1.1.1产品特性 (5)1.1.2模块封装 (6)1.1.3模块基本参数 (7)1.2.硬件介绍 (8)1.3.功耗 (11)1.4.射频指标 (12)1.5.尺寸 (13)1.6.WiFi 天线 (14)1.7.推荐炉温曲线 (14)2.功能描述 (15)2.1.主要功能 (15)2.2.工作模式 (15)2.3.应用领域 (15)2.4.AiCloud (15)3.全功能测试版介绍 (16)3.1.测试步骤 (17)3.2.基础AT指令 (20)3.2.1 测试AT (20)3.3.WiFi功能AT指令 (20)3.3.1 选择WiFi应用模式:AT+CWMODE (20)3.3.2列出当前可用接入点:AT+CWLAP (21)3.3.3 加入接入点:AT+CWJAP (21)3.3.4 退出接入点:AT+CWQAP (22)3.3.5设置AP模式下的参数:AT+CWSAP (22)3.4.TCPIP AT指令 (23)3.4.1建立TCP/UDP连接:AT+CIPSTART (23)3.4.2获得TCP/UDP连接状态:AT+CIPSTATUS (23)3.4.3启动多连接:AT+CIPMUX (24)3.4.4发送数据:AT+CIPSEND (25)3.4.5关闭TCP/UDP连接:AT+CIPCLOSE (25)3.4.6获取本地IP地址:AT+CIFSR (26)3.4.7配置为服务器: (27)3.4.8选择TCPIP应用模式:AT+CIPMODE (30)3.4.9设置服务器主动断开的超时时间:AT+CIPSTO (30)3.4.10设置波特率:AT+CIOBAUD (30)4.产品试用 (31)表格目录表格1 术语和缩写4表格2 模块技术规格7表格3 Pin脚定义10表格4 功耗数据11表格5 射频指标12图目录图 2 模块管脚排列图 (8)图 3 天线图 (13)图 4 WiFi射频参考电路图 (14)图 5 推荐回流曲线图 (14)图 6 全功能测试板板正面视图 (16)术语和缩写表格 1 术语和缩写1.产品简介1.1.概述ESP8266是一款超低功耗的UART-WiFi 透传模块,拥有业内极富竞争力的封装尺寸和超低能耗技术,专为移动设备和物联网应用设计,可将用户的物理设备连接到Wi-Fi 无线网络上,进行互联网或局域网通信,实现联网功能。
ESP8266封装方式多样,天线可支持板载PCB天线,IPEX接口和邮票孔接口三种形式;ESP8266可广泛应用于智能电网、智能交通、智能家具、手持设备、工业控制等领域。
更多资料,请访问安信可开源社区1.1.1产品特性●支持无线802.11 b/g/n 标准●支持STA/AP/STA+AP 三种工作模式●内置TCP/IP协议栈,支持多路TCP Client连接●支持丰富的Socket AT指令●支持UART/GPIO数据通信接口●支持Smart Link 智能联网功能●支持远程固件升级(OTA)●内置32位MCU,可兼作应用处理器●超低能耗,适合电池供电应用● 3.3V 单电源供电1.1.2模块封装ESP8266支持五种封装形式,极大的丰富了客户的可选择性,方便应用于各种物联网硬件终端场合。
1. 2.54标准直插工艺2. 贴片封装3. 底贴工艺4. 半孔贴片工艺5. 超小体积封装,只有10*10毫米1.1.3模块基本参数表格2 模块技术规格1.2.硬件介绍ESP8266硬件接口丰富,可支持UART,IIC,PWM,GPIO,ADC等,适用于各种物联网应用场合。
图1 模块管脚排列图表格3 Pin脚定义1.3.功耗下列功耗数据是基于3.3V的电源、25°的环境温度下测得。
[1] 所有测量均在天线接口处完成。
[2] 所有发射数据是基于90% 的占空比,在持续发射的模式下测得的。
表格 4 功耗数据1.4.射频指标以下数据是在室内温度下,电压为3.3V时测得。
表格5 射频指标注:1)72.2Mbps是在802.11n模式下,MCS=7,GI=200uS时测得;2)802.11b模式下最高可达+19.5dBm的输出功率;1.5.尺寸图2 天线图1)ESP8266模块PCB封装可以提供,请联系客服索取;1.6.WiFi 天线ESP8266支持三种天线接口形式:板载PCB天线、IPEX接口和邮票孔接口,板载PCB天线和IPEX 接口天线客户可直接使用,无需添加任何匹配电路。
如果客户需要在大板上设计天线部分,可使用ESP8266邮票孔天线接口,这种设计时大板需要预留匹配电路,如下:图3 WiFi射频参考电路图注:1、以上虚线框的部分需要进行天线匹配,以实际天线匹配的电子元器件参数为准;2、以上为RF走线要做50欧姆阻抗,禁止90度直角走线,长度不能超过15mm;1.7.推荐炉温曲线Refer to IPC/JEDEC standard;Peak Temperature : <250°C;Number of Times: ≤2 times;图 4 推荐回流曲线图2.功能描述2.1.主要功能ESP8266可以实现的主要功能包括:串口透传,PWM 调控,GPIO控制。
串口透传:数据传输,传输的可靠性好,最大的传输速率为:460800bps。
PWM 调控:灯光调节,三色LED 调节,电机调速等。
GPIO控制:控制开关,继电器等。
2.2.工作模式ESP8266模块支持STA/AP/STA+AP 三种工作模式。
♦STA 模式:ESP8266模块通过路由器连接互联网,手机或电脑通过互联网实现对设备的远程控制。
♦AP 模式:ESP8266模块作为热点,实现手机或电脑直接与模块通信,实现局域网无线控制。
♦STA+AP 模式:两种模式的共存模式,即可以通过互联网控制可实现无缝切换,方便操作。
2.3.应用领域♦串口CH340 转Wi-Fi;♦工业透传DTU;♦Wi-Fi 远程监控/控制;♦玩具领域;♦色LED 控制;♦消防、安防智能一体化管理;♦智能卡终端,无线POS 机,Wi-Fi 摄像头,手持设备等。
2.4.AiCloudAiCloud为安信可科技(Ai-Thinker)推出的互联网云平台服务。
用户可以在平台上对设备进行监控和管理,实现大数据管理和分析,使设备真正实现智能化。
AiCloud可将打包全套的服务器解决方案,为客户省去成本,加快开发进度。
AiCloud可接受客户的定制化需求,Web 页面配置,Android/iOS 平台App均可支持。
3.全功能测试版介绍Ai-Thinker可提供专门的UART_WiFi全功能测试板供客户研发测试ESP8266使用,通过该开发板,传统的串口设备或MCU设备可以方便的接入WiFi网络,通过网络实现对设备的管理与控制。
该开发板可提供UART串口数据传输解决方案、RGB灯光调节、智能插座等硬件演示方案;图5 全功能测试板板正面视图Notice:由于本全功能测试板利用模块的外围管脚兼容设计了不同的应用,故需要通过拨码开关选择和区分;1)011010,110000 默认模式,可直接用手机app控制;2)011010,001010 串口调试模式;3)011110,001010 串口下载模式;4)011010,000101 单片机下载模式;3.1.测试步骤服务器和客户端要搭载在同一个网络上(要么同时搭载在路由器上要么同时搭载在模块上,)1.搭载在路由器上(手机/PC直接连接到路由器,模块通过A T+CWJAP="SSID","PWD"链接到路由器)2.搭载在模块上(手机/PC连接到模块wifi上即Esp8266,模块不用设置)首先要设置服务器(手机、PC、模块都可以模拟服务器)1.模块作为服务器,AT指令设置模块进入server模式,tcp调试助手连接模块。
2.PC作为服务器,设置pc端为tcp server模式,模块作为客户端向pc申请端口(AT+CIPSTART="pc端IP",端口)3.手机作为服务器和pc作为服务器原理相同(手机默认server模式,等待模块连接)4.透传模式测试上电之后,执行AT指令(AT+CWMODE=3AT+RSTAT+CIPMODE=1 "设置透传模式"...... "正常tcp连接测试"注:透传只能在单连接模式下进行,所以在建立连接之前一定要用(AT+CIPMUX=0 设置单连接)3.2.基础AT指令3.2.1 测试AT语法规则:3.3.WiFi功能AT指令3.3.1 选择WiFi应用模式:AT+CWMODE 语法规则:参数定义:3.3.2 列出当前可用接入点:AT+CWLAP语法规则:参数定义:3.3.3 加入接入点:AT+CWJAP语法规则:参数定义:3.3.4 退出接入点:AT+CWQAP语法规则:3.3.5设置AP模式下的参数:AT+CWSAP 语法规则:参数定义:3.4.TCPIP AT指令3.4.1建立TCP/UDP连接:AT+CIPSTART语法规则:参数定义:3.4.2获得TCP/UDP连接状态:AT+CIPSTATUS 语法规则:参数定义:3.4.3启动多连接:AT+CIPMUX 语法规则:参数定义:3.4.4发送数据:AT+CIPSEND语法规则:参数定义:3.4.5关闭TCP/UDP连接:AT+CIPCLOSE 语法规则:参数定义:3.4.6获取本地IP地址:AT+CIFSR 语法规则:参数定义:3.4.7配置为服务器:3.4.8选择TCPIP应用模式:AT+CIPMODE语法规则:参数定义:3.4.9设置服务器主动断开的超时时间:AT+CIPSTO参数定义:3.4.10设置波特率:AT+CIOBAUD语法规则:默认波特率是9600ESP8266 WiFi模块用户手册V1.0参数定义:4.产品试用(1)淘宝店铺:深圳市安信可科技(2)技术讨论QQ群:185323735(3)技术支持论坛:物联世界深圳市安信可科技有限公司第31页共31 页。