From eda94f5754d6ec69a22b7fb1cd539d8910ddc8f7 Mon Sep 17 00:00:00 2001 From: JianBo He Date: Thu, 16 Sep 2021 09:27:31 +0800 Subject: [PATCH] chore(gw): more comment for coap options --- apps/emqx_gateway/etc/emqx_gateway.conf | 71 ++++++++++++++++++++----- 1 file changed, 57 insertions(+), 14 deletions(-) diff --git a/apps/emqx_gateway/etc/emqx_gateway.conf b/apps/emqx_gateway/etc/emqx_gateway.conf index 2ce48bf75..2e5797f50 100644 --- a/apps/emqx_gateway/etc/emqx_gateway.conf +++ b/apps/emqx_gateway/etc/emqx_gateway.conf @@ -29,13 +29,11 @@ gateway.stomp { password = "${Packet.headers.passcode}" } - authentication: [ - # { - # name = "authenticator1" - # type = "password-based:built-in-database" - # user_id_type = clientid - # } - ] + authentication: { + name = "authenticator1" + type = "password-based:built-in-database" + user_id_type = clientid + } listeners.tcp.default { bind = 61613 @@ -98,16 +96,55 @@ gateway.coap { ## When publishing or subscribing, prefix all topics with a mountpoint string. mountpoint = "" - notify_type = qos + ## Enable or disable connection mode + ## If true, you need to establish a connection before send any publish/subscribe + ## requests + ## + ## Default: false + #connection_required = false - ## if true, you need to establish a connection before use - connection_required = false - subscribe_qos = qos0 - publish_qos = qos1 + ## The Notification Message Type. + ## The notification message will be delivered to the CoAP client if a new + ## message received on an observed topic. + ## The type of delivered coap message can be set to: + ## - non: Non-confirmable + ## - con: Confirmable + ## - qos: Mapping from QoS type of the recevied message. + ## QoS0 -> non, QoS1,2 -> con. + ## + ## Enum: non | con | qos + ## Default: qos + #notify_type = qos + + ## The *Default QoS Level* indicator for subscribe request. + ## This option specifies the QoS level for the CoAP Client when establishing + ## a subscription membership, if the subscribe request is not carried `qos` + ## option. + ## The indicator can be set to: + ## - qos0, qos1, qos2: Fixed default QoS level + ## - coap: Dynamic QoS level by the message type of subscribe request + ## * qos0: If the subscribe request is non-confirmable + ## * qos1: If the subscribe request is confirmable + ## + ## Enum: qos0 | qos1 | qos2 | coap + ## Default: coap + #subscribe_qos = coap + + ## The *Default QoS Level* indicator for publish request. + ## This option specifies the QoS level for the CoAP Client when publishing a + ## message to EMQ X PUB/SUB system, if the publish request is not carried `qos` + ## option. + ## The indicator can be set to: + ## - qos0, qos1, qos2: Fixed default QoS level + ## - coap: Dynamic QoS level by the message type of publish request + ## * qos0: If the publish request is non-confirmable + ## * qos1: If the publish request is confirmable + ## + ## Enum: qos0 | qos1 | qos2 | coap + #publish_qos = coap listeners.udp.default { bind = 5683 - acceptors = 4 max_connections = 102400 max_conn_rate = 1000 @@ -133,6 +170,7 @@ gateway.coap { dtls.keyfile = "{{ platform_etc_dir }}/certs/key.pem" dtls.certfile = "{{ platform_etc_dir }}/certs/cert.pem" dtls.cacertfile = "{{ platform_etc_dir }}/certs/cacert.pem" + dtls.handshake_timeout = 15s } } @@ -219,9 +257,14 @@ gateway.lwm2m { xml_dir = "{{ platform_etc_dir }}/lwm2m_xml" + ## + ## lifetime_min = 1s + lifetime_max = 86400s - qmode_time_windonw = 22 + + qmode_time_window = 22 + auto_observe = false ## always | contains_object_list