gateway.lwm2m.conf.example 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ##--------------------------------------------------------------------
  2. ## Gateway LwM2M
  3. ##
  4. ## Add a LwM2M gateway
  5. ##--------------------------------------------------------------------
  6. ## Note: This is an example of how to configure this feature
  7. ## you should copy and paste the below data into the emqx.conf for working
  8. gateway.lwm2m {
  9. ## When publishing or subscribing, prefix all topics with a mountpoint string.
  10. ## It's a way that you can use to implement isolation of message routing between different
  11. ## gateway protocols
  12. mountpoint = "lwm2m/"
  13. ## The Directory for LwM2M Resource definition.
  14. xml_dir = "etc/lwm2m_xml/"
  15. ## Automatically observe the object list of REGISTER packet.
  16. auto_observe = false
  17. ## Minimum value of lifetime allowed to be set by the LwM2M client.
  18. lifetime_min = 1s
  19. ## Maximum value of lifetime allowed to be set by the LwM2M client.
  20. lifetime_max = 86400s
  21. ## The value of the time window during which the network link is considered valid by
  22. ## the LwM2M Gateway in QMode mode.
  23. qmode_time_window = 22s
  24. ## Topic configuration for LwM2M's gateway publishing and subscription.
  25. translators {
  26. ## The topic for receiving downstream commands.
  27. ## For each new LwM2M client that succeeds in going online, the gateway creates a
  28. ## subscription relationship to receive downstream commands and send it to the LwM2M client
  29. command { topic = "dn/#" }
  30. ## The topic for gateway to publish the notify events from LwM2M client.
  31. ## After succeed observe a resource of LwM2M client, Gateway will send the notify events
  32. ## via this topic, if the client reports any resource changes
  33. notify { topic = "up/notify" }
  34. ## The topic for gateway to publish the register events from LwM2M client.
  35. register { topic = "up/register" },
  36. ## The topic for gateway to publish the acknowledge events from LwM2M client.
  37. response { topic = "up/resp" },
  38. ## The topic for gateway to publish the update events from LwM2M client.
  39. update { topic = "up/resp" }
  40. }
  41. ## Policy for publishing UPDATE event message.<br/>
  42. ## - always: send update events as long as the UPDATE request is received.<br/>
  43. ## - contains_object_list: send update events only if the UPDATE request carries any Object List"""
  44. update_msg_publish_condition = always
  45. listeners.udp.default {
  46. bind = "0.0.0.0:5784"
  47. }
  48. }