阿里云(esp-aliyun)云端下发解绑信息,设备端SDK报错

maxchentt
Posts: 15
Joined: Sat Jan 14, 2023 11:00 am

阿里云(esp-aliyun)云端下发解绑信息,设备端SDK报错

Postby maxchentt » Sat Jan 14, 2023 12:51 pm

芯片:esp-32
ESP_IDF:v4.2
SDK:github:https://github.com/espressif/esp-aliyun

设备配网成功后,云端操作解绑设备(手机上天猫精灵app操作删除设备)
查询阿里云官方文档显示,云端会下发一个解绑事件通知:{"identifier":"awss.BindNotify","value":{"Operation":"Unbind"}}
(阿里云官方文档链接:https://help.aliyun.com/document_detail ... so-4xu-865
通过esp32串口日志(idf.py monitor)查看设备接收到对应的信息,但是是警告信息,如下(日志内容中设备信息我用引号代替了):
...
[wrn] iotx_cloud_conn_mqtt_event_handle(178): bypass 178 bytes on [/sys/"productkey"/"DeviceName"/_thing/event/notify]
...

查看smart_light例程:esp-aliyun\examples\solutions\smart_light\components\linkkit_handle\linkkit_solo.c
linkkit_solo.c中没有找到处理这个事件通知的函数

重新查看sdk中:
esp-aliyun\iotkit-embedded\dev_model\iotx_cm_mqtt.c
第177行 topic_handle_func == NULL
具体原因不了解

附阿里云生活物联平台中该设备的topic列表:
/sys/"ProductKey"/"DeviceName"/thing/event/property/post (发布)
/sys/"ProductKey"/"DeviceName"/thing/service/property/set (订阅)
/sys/"ProductKey"/"DeviceName"/thing/event/${tsl.event.identifer}/post (发布)
/sys/"ProductKey"/"DeviceName"/thing/service/${tsl.event.identifer} (订阅)
/sys/"ProductKey"/"DeviceName"/thing/deviceinfo/update (发布)

求助:能否指出具体处理云端下发解绑信息的处理函数在哪里,或者说明一下为何topic_handle_func == NULL,谢谢!

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

Re: 阿里云(esp-aliyun)云端下发解绑信息,设备端SDK报错

Postby ESP_YJM » Wed Feb 08, 2023 8:24 am

esp-aliyun 版本很老了,不支持该 topic,你可以使用该工程,https://github.com/espressif/esp-ali-smartliving,这个支持 {"identifier":"awss.BindNotify","value":{"Operation":"Unbind"}}

Who is online

Users browsing this forum: No registered users and 14 guests