模拟CoAP设备接入
平台创建设备
创建COAP直连产品、物模型、COAP直连设备,设备访问令牌
创建COAP的直连设备,的方式与创建MQTT直连设备的方式相同,参照MQTT直连设备创建即可,注意的是,将协议选择为COAP即可。
模拟COAP直连设备接入
使用工具连接平台
使用coap客户端模拟设备发送消息 "{"temperature": 27.4}",topic 为 v1/devices/me/telemetry
coap-client -m put -e "{"temperature": 27.4}" "coap://120.77.x.x:5683/api/v1/${AuthToken}/telemetry"
1
- AuthToken:使用设备的AuthToken