一、IDE:keil、cubemx、Arduino.........
二、记录:
1.依次发送以下指令(发送新行)
AT
AT+CWMODE=1
AT+CWDHCP=1,1
AT+CWJAP="Redmi K40 Gaming","87654321"
AT+CIPSTART="TCP","quan.suning.com",80
(或者AT+CIPSTART="TCP","tianqiapi.com",80)
AT+CIPSEND=5
GET
2.收到以下回复
+IPD,549:HTTP/1.1 400 Bad Request
Server: volc-dcdn
Date: Mon, 08 Apr 2024 08:24:04 GMT
Content-Type: text/html
Content-Length: 229
Connection: close
via: n173-202-129.bdcdn-cqcu.ToB
x-request-ip: 123.147.247.116
x-tt-trace-tag: id=5
x-dsa-trace-id: 1712564644336f8062f09b326e686b8e9fc9e5937c
X-Dsa-Origin-Status: -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr/>Powered by volc-dcdn<hr><center>tengine</center>
</body>
</html>
3.时间信息在Date里面
需要提取Date里面的内容
4.参考博客:
使用ESP8266和STM32获取网络时间并在OLED上显示-物联沃-IOTWORD物联网https://www.iotword.com/12251.html
WiFi模块(ESP8266)获取时间、天气API AT指令串口调试_esp8266 wifi模块获取时间51-CSDN博客https://blog.csdn.net/xl22126/article/details/105859067
利用苏宁API接口获取北京时间授时给esp8266使用 - 代码先锋网 (codeleading.com)https://www.codeleading.com/article/33635325432/
5.注意这是北京时间,与重庆时间相差八个小时 ,小时需要加8
三、代码: