修改emqx的配置文件,开启CoAP网关
cd /chz/install/emqx/emqx
vim etc/emqx.conf
<<<< 添加以下内容,开启CoAP网关
gateway {
coap {
connection_required = true
enable = true
enable_stats = true
heartbeat = "86400s"
idle_timeout = "86400s"
listeners {
udp {
default {
bind = "5683"
max_conn_rate = 1000
max_connections = 1024000
}
}
}
mountpoint = ""
notify_type = qos
publish_qos = coap
subscribe_qos = coap
}
}
>>>>
启动emqx
cd /chz/install/emqx/emqx
bin/emqx foreground