设备命令下发
LwM2M对象资源
物联网平台向设备设备异步命令,物联网平台通过LwM2M的/19/1/0资源对象将命令打包到LwM2M write消息的payload里下发给设备。
Operation |
CoAP Method |
URI |
Success |
Failure |
---|---|---|---|---|
Write |
PUT |
/19/1/0 |
2.04 Changed |
4.00 Bad Request, 4.04 Not Found, 4.01 Unauthorized, 4.05 Method Not Allowed, 4.06 Not Acceptable |
请求示例
假设最终通过编解码插件编码后的二进制value为c4 0d 5a 6e 96 0b c3 0e 2b 30 37,则下发样例如下:
CON-PUT MID=48587, Token=2d82e7f54b, OptionSet={"Uri-Path":["19","1","0"], "Content-Format":"application/octet-stream"}, c4 0d 5a 6e 96 0b c3 0e 2b 30 37
响应示例
ACK-2.04 MID=48587, Token=2d82e7f54b, OptionSet={"Content-Format":"application/octet-stream"}, no payload