推荐使用阿里云官方库 demo https://github.com/kingwsi/aliyun-iot
ESP8266 MQTT(aliyun)通信,使用ESP-01S验证过
搬运整合的
使用&&相关资源
阿里云iot控制台 https://iot.console.aliyun.com/
测试使用 一键生成接入信息 https://x223222981.gitee.io/aliyun_mqttpassword_get/
PubSubClient ArduinoJson
找到PubSubClient.h
文件
- 将
MQTT_MAX_PACKET_SIZE
改为MQTT_MAX_PACKET_SIZE 1024
- 将
MQTT_KEEPALIVE
改为MQTT_KEEPALIVE 60