Use the MQTT broker service

MQTT is a lightweight publish/subscribe messaging protocol for the Internet of Things (IoT) applications, designed to connect devices using a small footprint and minimum network bandwidth.

Your TX54 device includes an MQTT broker service that serves as an intermediary between MQTT clients. The broker receives and distributes client messages.

Required configuration items

Additional configuration Items


  Web

  1. Log into Digi Remote Manager, or log into the local Web UI as a user with full Admin access rights.
  2. Access the device configuration:

  3. Click Services > MQTT broker.
  4. Click Enable.
  5. (Optional) For Port, type the port number for the MQTT broker to listen for incoming connections. The default is 1883.
  6. Click to toggle on Debug to write MQTT debug messages to the system log.
  7. Click to toggle on Allow anonymous clients to allow connections from clients that do not provide a username.
  8. By default, the MQTT broker will allow clients without client IDs to connect, and will generate a client ID for them. To disable, click to toggle off Allow zero length client id.

  9. Click to toggle on Use username as client id. When enabled, the broker will replace the client ID with the username, which will prevent one client from disconnecting another by using the same client ID.

  10. Add a client:

    1. Click to expand Clients.

    2. Click to add a client.

    3. Type the Username and Password for the client.

    4. Add a topic to control this client's access to:

      1. Click to expand Topic access control list.

      2. Click to add a topic.

      3. For Topic, type the topic. The signal level wildcard, +, and multi-level wildcard, #, are supported.

      4. For Access, select the level of access that the client will have:

        • Read

        • Write

        • Read/write

        • Deny

      5. Click again to add additional topics.

    5. Click again to add additional clients.

  11. Click to expand Encryption.

  12. For Type, select either None or PSK.

    • If PSK is selected:

      1. Click to enable Use PSK identity as username to use the PSK identity sent by the client as its username.

      2. (Optional) For Identifier, type a string that identifies the listener and is sent to the clients.

      3. Click to expand Pre-shared keys.

      4. Click to add a pre-shared key.

      5. For Identity, type the identity sent to the client.

      6. For Key, type or paste the pre-shared key in hexadecimal format that is associated with the client identity.

      7. Click again to add additional pre-shared keys.

  13. Click to expand Topic access control list.

    The topic access control lists controls what topics clients can access. If no topics are included, then clients have access to all topics. If any topics are listed, access is restricted to only the listed topics.

    • To restrict access for anonymous clients to particular topics:

      1. Click to expand Anonymous.

      2. Click to add a topic.

      3. For Topic, type the topic. The signal level wildcard, +, and multi-level wildcard, #, are supported.

      4. For Access, select the level of access that the client will have:

        • Read

        • Write

        • Read/write

        • Deny

      5. Click again to add additional topics.

    • To restrict access to topics based on pattern substitution:

      1. Click to expand Pattern.

      2. Click to add a topic.

      3. For Topic, type the topic. The variables %c and %u can be used as substitutes for the client ID or username. If a variable is used, it can be the only text for that level of the hierarchy..

      4. For Access, select the level of access that the client will have:

        • Read

        • Write

        • Read/write

        • Deny

      5. Click again to add additional topics.

  14. See Information Technology for Public Transport (ITxPT) support for information about configuring the NTP service for ITxPT.

  15. Click Apply to save the configuration and apply the change.