You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

The MQTT Tools refer to a configuration interface for managing MQTT connections and exploring data structures interactively. Its purpose is configuring, connecting, and visualizing data exchanged via the MQTT protocol. Main functionalities include managing MQTT connections, simulating MQTT message publication, and data visualization. Applications include IoT sensor monitoring, application development, and debugging in MQTT connectivity.

On this page:


Understanding the MQTT Tools

MQTT Tools provides functionalities for managing MQTT communications.

Connecting and disconnecting

Use the Connect button to connect to the target MQTT broker. If you are already connected, use the Disconnect button to finish your connection. The connection status appears beside the buttons.

MQTT Broker options

The MQTT Broker Connection options include a Local Built-in Broker, allowing users to start or stop the broker with command buttons and adjust settings via the TMQTT Broker Settings dialog. The Solution Connection option enables selection from predefined MQTT Tag Providers to generate connection strings. In contrast, the Remote Broker URL option permits URL entry for external brokers, with configurable parameters accessible through the MQTT Broker Connection dialog to manage IoT device communications.

Local Built-in Broker

This configuration option allows the user to use a built-in MQTT broker that is integrated within the tool. The green play button starts the broker, and the red stop button stops it.

When you click on the gear icon next to the command buttons, it opens the TMQTT Broker Settings dialog window. This configuration dialog has two tabs: General and Local/Remote.

General

This tab has the following configuration items:

Backlog: This setting manages the queue of pending messages that the broker can handle. Proper configuration ensures the broker effectively manages high volumes of messages without dropping or delaying data.

DisableRetainedFile: This checkbox option disables retained message storage. Disabling it can improve performance and reduce storage needs but may cause clients to miss important retained messages.

Max PendingMessagesPerClientOut: This setting specifies the maximum number of pending messages allowed per client. It prevents any single client from overwhelming the broker, ensuring fair resource allocation and avoiding potential denial of service conditions.

User Credentials: This table manages user authentication details, including UserName and Password. Proper user authentication secures the broker, preventing unauthorized access to the IoT network and ensuring only authenticated clients can publish or subscribe to topics.

Client Connections: This table manages client connections, including ClientName, Topic, and permissions (Can Subscribe, Can Publish). Managing client permissions controls access to topics, ensuring clients access only authorized data, enhancing security and data integrity.

Local/Remote

This tab has similar configuration item for both, Local and Remote. The difference is that the Remote has additional configuration items.

Local

Listening Port: This field specifies the port on which the broker listens for incoming MQTT connections. The default is 1883. Proper configuration ensures the broker accepts connections on the correct port, establishing and maintaining communication.

Certificate File: This field uploads the SSL/TLS certificate file used for secure connections. Using SSL/TLS certificates encrypts data in transit, protecting against eavesdropping and tampering, and securing communication between clients and the broker.

Certificate Password: This field enters the password for the SSL/TLS certificate. This adds an additional security layer by protecting the certificate itself, ensuring only authorized personnel can configure or update the certificate for secure communications.

SSL Protocols: These options select the desired security protocol (none, TSL, TSL 1.0, TSL 1.2). Choosing the appropriate SSL/TLS protocol encrypts data transmitted between clients and the broker, protecting against security threats and ensuring compliance with industry standards.

Remote

The settings for remote MQTT broker include the previous items and the following:

Broker URL: Specifies the address of the remote MQTT broker.

KeepAlive: This setting configures the keep-alive interval for maintaining the connection. It ensures the connection remains open by sending periodic keep-alive messages, preventing inadvertent disconnection and ensuring consistent data flow between clients and the broker.

WebSocket: This checkbox option enables WebSocket connections for MQTT. WebSockets allow MQTT to be used over web-based applications, integrating MQTT communication into web interfaces and applications that use web protocols, broadening the applicability and accessibility of MQTT communication.

Allow Untrusted Certificates: This checkbox option permits using untrusted SSL/TLS certificates. This flexibility aids development and testing environments where strict security measures are not required. However, this setting should be avoided in production environments due to potential security risks.

The message "TMQTTBroker is running" confirms that the broker is active. Additionally, there are the following options: 

Enable Trace: When enabled, it provides the option to enable tracing of MQTT messages. It logs detailed information about MQTT messages, including their content, source, destination, and timestamps.

Enable Raw View Mode: When selected, it displays the raw data of MQTT messages without any formatting or parsing, providing a clear view of the actual transmitted data. It presents raw data and low-level information for debugging. It shows unprocessed data streams, memory contents, register values, and network packets, facilitating in-depth troubleshooting.


Solution Connection

This configuration option has a dropdown menu that lets users select predefined MQTT Tag Providers to discover their data. When selected, the Solution Connection option generates a connection string with the connection details of the selected Tag Provider. It contains the parameters for connecting to the target MQTT Tag Provider or, in other words, the details for connecting to the MQTT broker.

Enabling this configuration requires creating an MQTT External Tag Provider. For more details, refer to the External TagProviders.


Remote Broker URL

Allows the user to enter the URL of a remote MQTT broker. The settings gear icon next to the field may open additional configuration options for the remote broker connection.

Specifies the Remote Broker URL to connect to an external MQTT broker, allowing for integration with external data sources. When you click on the gear icon next to the Remote Broker URL field, it opens the MQTT Broker Connection dialog window.

The Broker Settings dialog allows users to configure the connection parameters for a remote MQTT broker. This configuration establishes a reliable and secure connection to the broker, managing the communication between IoT devices and applications. There are following configuration items:

Field

Description

Broker URL

Specifies the address of the MQTT broker. This is typically an IP address or a domain name (e.g., localhost).

Port

Indicates the port number used for the connection. The default MQTT port is 1883.

ClientID

A unique identifier for the client connecting to the broker. This ensures that each client can be uniquely identified.

Username

Optional field for the username required for authentication with the broker.

Password

Optional field for the password required for authentication with the broker.

Certificate File

Path to the SSL certificate file used for secure connections. This is important for encrypted communication.

Certificate Password

Password for the SSL certificate file, ensuring secure access to the certificate.

Network Security

Specifies the security protocol used (e.g., None, SSL, TLS). Determines the encryption level for the connection. Network security options for MQTT brokers include: 

None, which applies no encryption or protocols, suitable for secure or isolated networks but risky in public settings. 

TLS 1.0, an early TLS version enhancing SSL 3.0 security, is now outdated, vulnerable to attacks like POODLE and BEAST, and generally discouraged. 

TLS 1.1 improves over TLS 1.0 by addressing initialization vector issues but remains outdated and susceptible to attacks, with limited support for new standards. 

TLS 1.2 offers significant security upgrades, supports modern cryptographic algorithms like AEAD ciphers, ensuring data confidentiality and integrity, and is the recommended secure protocol for network communications until TLS 1.3 sees wider adoption.

WebSocket

Checkbox option to enable WebSocket connections. This is useful for scenarios where traditional MQTT ports are blocked.

QoS

The Quality of Service (QoS) levels in MQTT define the guarantee of message delivery between the sender and the receiver. The available QoS levels are:

AtMostOnce: Ensures that each message is delivered at least once to the receiver. This level may result in duplicate messages but guarantees that no message is lost.

AtLeastOnce: Guarantees that a message is delivered at most once, meaning it might not be delivered at all. This level is suitable for scenarios where occasional message loss is acceptable but duplicate messages are not.

ExactlyOnce: Ensures that each message is delivered exactly once. This is the highest level of service, preventing both message loss and duplication, but it incurs the highest overhead.

KeepAlive (sec)

Time interval in seconds to keep the connection alive. Ensures that the connection remains open even if no messages are sent.

MQTT Publisher Simulator

A tool for simulating MQTT publications, providing a environment for testing and validation.

Control Options: Easily start (Run) or stop (Stop) the simulator as needed, offering control over your simulation scenarios.


Configuring the MQTT Tools

To access the MQTT Tools, go to Data Explorer / MQTT Tools.


Working with the MQTT Tools



In this section:

The root page @parent could not be found in space v10.

  • No labels