|
@@ -2,171 +2,164 @@
|
|
|
## EMQ X Gateway configurations
|
|
## EMQ X Gateway configurations
|
|
|
##--------------------------------------------------------------------
|
|
##--------------------------------------------------------------------
|
|
|
|
|
|
|
|
-gateway: {
|
|
|
|
|
-
|
|
|
|
|
- stomp: {
|
|
|
|
|
-
|
|
|
|
|
- frame: {
|
|
|
|
|
- max_headers: 10
|
|
|
|
|
- max_headers_length: 1024
|
|
|
|
|
- max_body_length: 8192
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- clientinfo_override: {
|
|
|
|
|
- username: "${Packet.headers.login}"
|
|
|
|
|
- password: "${Packet.headers.passcode}"
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- authentication: {
|
|
|
|
|
- enable: true
|
|
|
|
|
- authenticators: [
|
|
|
|
|
- {
|
|
|
|
|
- name: "authenticator1"
|
|
|
|
|
- mechanism: password-based
|
|
|
|
|
- server_type: built-in-database
|
|
|
|
|
- user_id_type: clientid
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- listener.tcp.1: {
|
|
|
|
|
- bind: 61613
|
|
|
|
|
- acceptors: 16
|
|
|
|
|
- max_connections: 1024000
|
|
|
|
|
- max_conn_rate: 1000
|
|
|
|
|
- active_n: 100
|
|
|
|
|
- }
|
|
|
|
|
|
|
+## TODO: These configuration options are temporary example here.
|
|
|
|
|
+## In the final version, it will be commented out.
|
|
|
|
|
+
|
|
|
|
|
+gateway.stomp {
|
|
|
|
|
+ frame: {
|
|
|
|
|
+ max_headers: 10
|
|
|
|
|
+ max_headers_length: 1024
|
|
|
|
|
+ max_body_length: 8192
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- coap: {
|
|
|
|
|
|
|
+ clientinfo_override: {
|
|
|
|
|
+ username: "${Packet.headers.login}"
|
|
|
|
|
+ password: "${Packet.headers.passcode}"
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- enable_stats: false
|
|
|
|
|
|
|
+ authentication: {
|
|
|
|
|
+ enable: true
|
|
|
|
|
+ authenticators: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "authenticator1"
|
|
|
|
|
+ mechanism: password-based
|
|
|
|
|
+ server_type: built-in-database
|
|
|
|
|
+ user_id_type: clientid
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- authentication: {
|
|
|
|
|
- enable: true
|
|
|
|
|
- authenticators: [
|
|
|
|
|
- {
|
|
|
|
|
- name: "authenticator1"
|
|
|
|
|
- mechanism: password-based
|
|
|
|
|
- server_type: built-in-database
|
|
|
|
|
- user_id_type: clientid
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ listener.tcp.1: {
|
|
|
|
|
+ bind: 61613
|
|
|
|
|
+ acceptors: 16
|
|
|
|
|
+ max_connections: 1024000
|
|
|
|
|
+ max_conn_rate: 1000
|
|
|
|
|
+ active_n: 100
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- #authentication.enable: false
|
|
|
|
|
|
|
+gateway.coap: {
|
|
|
|
|
|
|
|
- heartbeat: 30s
|
|
|
|
|
- notify_type: qos
|
|
|
|
|
- subscribe_qos: qos0
|
|
|
|
|
- publish_qos: qos1
|
|
|
|
|
- listener.udp.1: {
|
|
|
|
|
- bind: 5683
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ enable_stats: false
|
|
|
|
|
|
|
|
- mqttsn: {
|
|
|
|
|
- ## The MQTT-SN Gateway ID in ADVERTISE message.
|
|
|
|
|
- gateway_id: 1
|
|
|
|
|
-
|
|
|
|
|
- ## Enable broadcast this gateway to WLAN
|
|
|
|
|
- broadcast: true
|
|
|
|
|
-
|
|
|
|
|
- ## To control whether write statistics data into ETS table
|
|
|
|
|
- ## for dashbord to read.
|
|
|
|
|
- enable_stats: true
|
|
|
|
|
-
|
|
|
|
|
- ## To control whether accept and process the received
|
|
|
|
|
- ## publish message with qos=-1.
|
|
|
|
|
- enable_qos3: true
|
|
|
|
|
-
|
|
|
|
|
- ## Idle timeout for a MQTT-SN channel
|
|
|
|
|
- idle_timeout: 30s
|
|
|
|
|
-
|
|
|
|
|
- ## The pre-defined topic name corresponding to the pre-defined topic
|
|
|
|
|
- ## id of N.
|
|
|
|
|
- ## Note that the pre-defined topic id of 0 is reserved.
|
|
|
|
|
- predefined: [
|
|
|
|
|
- { id: 1
|
|
|
|
|
- topic: "/predefined/topic/name/hello"
|
|
|
|
|
- },
|
|
|
|
|
- { id: 2
|
|
|
|
|
- topic: "/predefined/topic/name/nice"
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
-
|
|
|
|
|
- ### ClientInfo override
|
|
|
|
|
- clientinfo_override: {
|
|
|
|
|
- username: "mqtt_sn_user"
|
|
|
|
|
- password: "abc"
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- listener.udp.1: {
|
|
|
|
|
- bind: 1884
|
|
|
|
|
- max_connections: 10240000
|
|
|
|
|
- max_conn_rate: 1000
|
|
|
|
|
|
|
+ #authentication.enable: false
|
|
|
|
|
+ authentication: {
|
|
|
|
|
+ enable: true
|
|
|
|
|
+ authenticators: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "authenticator1"
|
|
|
|
|
+ mechanism: password-based
|
|
|
|
|
+ server_type: built-in-database
|
|
|
|
|
+ user_id_type: clientid
|
|
|
}
|
|
}
|
|
|
|
|
+ ]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- ## Extension Protocol Gateway
|
|
|
|
|
- exproto: {
|
|
|
|
|
- ## The gRPC server to accept requests
|
|
|
|
|
- server: {
|
|
|
|
|
- bind: 9100
|
|
|
|
|
- #ssl.keyfile:
|
|
|
|
|
- #ssl.certfile:
|
|
|
|
|
- #ssl.cacertfile:
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ heartbeat: 30s
|
|
|
|
|
+ notify_type: qos
|
|
|
|
|
+ subscribe_qos: qos0
|
|
|
|
|
+ publish_qos: qos1
|
|
|
|
|
+ listener.udp.1: {
|
|
|
|
|
+ bind: 5683
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- handler: {
|
|
|
|
|
- address: "http://127.0.0.1:9001"
|
|
|
|
|
- #ssl.keyfile:
|
|
|
|
|
- #ssl.certfile:
|
|
|
|
|
- #ssl.cacertfile:
|
|
|
|
|
|
|
+gateway.mqttsn: {
|
|
|
|
|
+ ## The MQTT-SN Gateway ID in ADVERTISE message.
|
|
|
|
|
+ gateway_id: 1
|
|
|
|
|
+
|
|
|
|
|
+ ## Enable broadcast this gateway to WLAN
|
|
|
|
|
+ broadcast: true
|
|
|
|
|
+
|
|
|
|
|
+ ## To control whether write statistics data into ETS table
|
|
|
|
|
+ ## for dashbord to read.
|
|
|
|
|
+ enable_stats: true
|
|
|
|
|
+
|
|
|
|
|
+ ## To control whether accept and process the received
|
|
|
|
|
+ ## publish message with qos=-1.
|
|
|
|
|
+ enable_qos3: true
|
|
|
|
|
+
|
|
|
|
|
+ ## Idle timeout for a MQTT-SN channel
|
|
|
|
|
+ idle_timeout: 30s
|
|
|
|
|
+
|
|
|
|
|
+ ## The pre-defined topic name corresponding to the pre-defined topic
|
|
|
|
|
+ ## id of N.
|
|
|
|
|
+ ## Note that the pre-defined topic id of 0 is reserved.
|
|
|
|
|
+ predefined: [
|
|
|
|
|
+ { id: 1
|
|
|
|
|
+ topic: "/predefined/topic/name/hello"
|
|
|
|
|
+ },
|
|
|
|
|
+ { id: 2
|
|
|
|
|
+ topic: "/predefined/topic/name/nice"
|
|
|
}
|
|
}
|
|
|
|
|
+ ]
|
|
|
|
|
|
|
|
- authentication.enable: false
|
|
|
|
|
|
|
+ ### ClientInfo override
|
|
|
|
|
+ clientinfo_override: {
|
|
|
|
|
+ username: "mqtt_sn_user"
|
|
|
|
|
+ password: "abc"
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- listener.tcp.1: {
|
|
|
|
|
- bind: 7993
|
|
|
|
|
- acceptors: 8
|
|
|
|
|
- max_connections: 10240
|
|
|
|
|
- max_conn_rate: 1000
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ listener.udp.1: {
|
|
|
|
|
+ bind: 1884
|
|
|
|
|
+ max_connections: 10240000
|
|
|
|
|
+ max_conn_rate: 1000
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- #listener.ssl.1: {}
|
|
|
|
|
- #listener.udp.1: {}
|
|
|
|
|
- #listener.dtls.1: {}
|
|
|
|
|
|
|
+gateway.exproto: {
|
|
|
|
|
+ ## The gRPC server to accept requests
|
|
|
|
|
+ server: {
|
|
|
|
|
+ bind: 9100
|
|
|
|
|
+ #ssl.keyfile:
|
|
|
|
|
+ #ssl.certfile:
|
|
|
|
|
+ #ssl.cacertfile:
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ handler: {
|
|
|
|
|
+ address: "http://127.0.0.1:9001"
|
|
|
|
|
+ #ssl.keyfile:
|
|
|
|
|
+ #ssl.certfile:
|
|
|
|
|
+ #ssl.cacertfile:
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- lwm2m: {
|
|
|
|
|
|
|
+ authentication.enable: false
|
|
|
|
|
|
|
|
- xml_dir: "{{ platform_etc_dir }}/lwm2m_xml"
|
|
|
|
|
|
|
+ listener.tcp.1: {
|
|
|
|
|
+ bind: 7993
|
|
|
|
|
+ acceptors: 8
|
|
|
|
|
+ max_connections: 10240
|
|
|
|
|
+ max_conn_rate: 1000
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- lifetime_min: 1s
|
|
|
|
|
|
|
+ #listener.ssl.1: {}
|
|
|
|
|
+ #listener.udp.1: {}
|
|
|
|
|
+ #listener.dtls.1: {}
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- lifetime_max: 86400s
|
|
|
|
|
|
|
+gateway.lwm2m: {
|
|
|
|
|
|
|
|
- qmode_time_windonw: 22
|
|
|
|
|
|
|
+ xml_dir: "{{ platform_etc_dir }}/lwm2m_xml"
|
|
|
|
|
|
|
|
- auto_observe: false
|
|
|
|
|
|
|
+ lifetime_min: 1s
|
|
|
|
|
+ lifetime_max: 86400s
|
|
|
|
|
+ qmode_time_windonw: 22
|
|
|
|
|
+ auto_observe: false
|
|
|
|
|
|
|
|
- mountpoint: "lwm2m/%e/"
|
|
|
|
|
|
|
+ mountpoint: "lwm2m/%e/"
|
|
|
|
|
|
|
|
- ## always | contains_object_list
|
|
|
|
|
- update_msg_publish_condition: contains_object_list
|
|
|
|
|
|
|
+ ## always | contains_object_list
|
|
|
|
|
+ update_msg_publish_condition: contains_object_list
|
|
|
|
|
|
|
|
- translators: {
|
|
|
|
|
- command: "dn/#"
|
|
|
|
|
- response: "up/resp"
|
|
|
|
|
- notify: "up/notify"
|
|
|
|
|
- register: "up/resp"
|
|
|
|
|
- update: "up/resp"
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ translators: {
|
|
|
|
|
+ command: "dn/#"
|
|
|
|
|
+ response: "up/resp"
|
|
|
|
|
+ notify: "up/notify"
|
|
|
|
|
+ register: "up/resp"
|
|
|
|
|
+ update: "up/resp"
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- listener.udp.1 {
|
|
|
|
|
- bind: 5783
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ listener.udp.1 {
|
|
|
|
|
+ bind: 5783
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|