ESP32开发

SmartConfig 仅支持在 ESP Station 模式下调用,请参考 ESP-TOUCH 使用指南

怎样将ESP32处理器编程为ModbusTCPMaster

初始化失败常见原因:

1.超时问题

 \ | /
- RT -     Thread Operating System
 / | \     4.0.2 build Aug 16 2019
 2006 - 2019 Copyright by rt-thread team
[32m[I/sal.skt] Socket Abstraction Layer initialize success.[0m
[32m[I/at.clnt] AT client(V1.3.0) on device uart3 initialize success.[0m
[0m[D/at.dev] the network interface device(esp0) set up status[0m
[0m[D/at.dev] esp8266 device(esp0) initialize start.[0m
[31m[E/at.clnt] Read response buffer failed. The Response buffer size is out of buffer size(256)![0m
[0m[D/at.clnt] execute command (ATE0) timeout (5000 ticks)![0m
[32m[I/at.dev] esp8266 device(esp0) initialize retry...[0m

1.Read response buffer failed. 缓冲区内存过小,那我们就直接增大就好了

2.command (ATE0)运行超时,ATE0是AT指令中的关闭回显,出现这个问题的原因可能是AT组件初始化时间过短

解决缓冲区内存过小问题

修改响应最大支持的接收数据的长度为128,防止缓冲区内存过小

解决ATE0运行超时问题

AT_SEND_CMD(client, resp, "AT+RST");
/* reset waiting delay */
rt_thread_mdelay(2000);//增加延时
/* disable echo */
AT_SEND_CMD(client, resp, "ATE0");

 

posted on 2022-01-27 18:35  杰瑞鼠  阅读(167)  评论(0编辑  收藏  举报