1、Link SDK3.0.1下载
https://help.aliyun.com/document_detail/96575.html?spm=a2c4g.11186623.3.3.f0f5316fIICtGM
2、根据高级系统集成SDK移植步骤生成libiot_sdk.a
和libiot_tls.a
https://helpcdn.aliyun.com/document_detail/97566.html?spm=a2c4g.11186623.6.614.50d479b7RZgb3C
3、移植ubuntu下的HAL配置文件,直接复制,参考:(开发未适配平台的HAL层)
https://help.aliyun.com/document_detail/97559.html?spm=a2c4g.11186623.6.598.795d4c93SDKdyZ
4、将
/home/miya/linux/aliyun_connect/3.x_mq_test2/output/release/bin
的mqtt-example可执行文件拷贝到
/home/miya/linux/nfs/rootfs/lib/modules/4.1.15
中,执行./mqtt-example
5、输出结果与ubuntu下的快速体验一致:
> {
> "message": "hello!"
> }
< {
< "message": "hello!"
< }
example_message_arrive|031 :: Message Arrived:
example_message_arrive|032 :: Topic : /g1uqs46Vt1T/2021_0111/user/get
example_message_arrive|033 :: Payload: {"message":"hello!"}
example_message_arrive|034 ::