2. 准备工作
请务必先学习以下内容,再继续看本篇文章:
OneNet 的产品创建与设备接入视频教程:点此处跳转
OneNet 软件包简介与使用说明:点此处跳转
AT Device 软件包简介与使用说明:点此处跳转
《RT-Thread 编程指南》中 AT 组件的章节 :点此处跳转
Paho MQTT 软件包简介与使用说明:点此处跳转
以上内容是十分重要的预备知识,不要偷懒略过上述内容的学习噢。
3. 配置工程
首先,要想清楚第四周的整个工程需要依赖什么工具才能正常工作,简单来说,我们需要将 ESP8266 对接到
OneNet 云,而 ESP8266 通过 AT Device 控制的,所以现在目标是明确的:开启 AT 和 ESP8266,并配置 OneNet
软件包中的相关参数。
开启 AT 和 ESP8266,ESP8266 的 WIFI 账号和密码需要写对,不然连不上网,自然就对接不上 OneNet 了:
开启 OneNet,完成相关参数配置,其中 device id 、 auth info 、 api key 、 product id 、 master/product
apikey 这些参数如何配置请查看 OneNet 的产品创建与设备接入视频教程:点此处跳转
值得一提的是,OneNet 软件包是需要依赖 paho-mqtt、webclient、cJSON 的,选中 OneNet 后,以上三个选项也
会被自动选中,如下图:
RT-Thread online packages --->
IoT - internet of things --->
[*] AT DEVICE: RT-Thread AT component porting or samples for different device --->
[*] Espressif ESP8266 --->
(testwifi) WIFI ssid
(12345678) WIFI password
(uart2) AT client device name
(512) The maximum length of receive line buffer
RT-Thread online packages --->
IoT - internet of things --->
IoT Cloud --->
[*] OneNET: China Mobile OneNet cloud SDK for RT-Thread --->
[ ] Enable OneNET sample
[*] Enable support MQTT protocol
[ ] Enable OneNET automatic register device
(534342011) device id
(201907091115) auth info
(IFzqRGOjq530YSyFY6EMda45Xdw=) api key
(258302) product id
(FV=ssEvYvHcKqN0=ZdTjM6NrGv0=) master/product apikey
评论0
最新资源