How to Use EMQX Cloud to Access CoAP Devices

EMQX Cloud Introduction

EMQX Cloud is a fully managed cloud-native MQTT service from EMQ that connects to massive IoT devices and integrates with various databases and business systems.

As the world’s first fully managed MQTT 5.0 public cloud service, EMQX Cloud provides one-stop O&M colocation and MQTT messaging services in a unique isolated environment.

In the era of the Internet of Everything, EMQX Cloud can help users quickly build industry applications for the IoT field and can help users quickly build industry applications for the IoT field, and easily realize the collection, transmission, calculation, and persistence of IoT data.

EMQX Cloud is available in dozens of countries and regions around the world, providing low-cost, secure, and reliable cloud services for 5G and Internet of Everything applications, with infrastructure computing facilities provided by cloud providers.

Introduction to the CoAP Protocol

CoAP Protocol Access to EMQX Cloud

git clone http://github.com/obgm/libcoap
cd libcoap
./autogen.sh
./configure --enable-documentation=no --enable-tests=no
make
# CoAP terminal sends the message "hello EMQX Cloud",topic 为 topic1
./examples/coap-client -m put -e "hello,EMQX Cloud" "coap://120.77.x.x:5683/mqtt/topic1?c=client1&u=emqx&p=public"
# CoAP terminal subscribe to topic1,-s 20 means the subscription is maintained for 20 seconds ./examples/coap-client -m get -s 20 "coap://120.77.x.x:5683/mqtt/topic1?c=client1&u=emqx&p=public"

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store