The MQTT client helps test broker connectivity and topic traffic from an Android device. It is useful during IoT development when you need to confirm that a broker, credentials, and topic path work from the client network.
How it works
MQTT uses a broker to route published messages to subscribers. The verified implementation offers MQTT 3.1.1 or 5 options, authentication, TLS, subscribe, and publish workflows.
How to use it in Network Toolkit
- Enter the broker host, port, and MQTT version.
- Configure TLS and authentication to match the broker.
- Connect and subscribe to a narrowly scoped test topic.
- Publish a harmless test message and verify delivery.
What information you can see
- Connection state and broker errors
- Messages received on subscribed topics
- Publish results
- Protocol, TLS, and authentication feedback
Common use cases
- Test an IoT broker from WiFi
- Verify credentials and TLS settings
- Observe a device telemetry topic
- Publish a controlled test command in a lab
Limitations and Android considerations
Connection settings
| Setting | Typical value |
|---|---|
| Host | The broker's IP address or name, for example a Mosquitto or Home Assistant server at 192.168.1.10 |
| Port | 1883 for plain MQTT, 8883 for MQTT over TLS |
| Protocol | MQTT 3.1.1 or MQTT 5 |
| TLS | On for port 8883. Allow invalid certificates is meant for a self-signed test broker and applies to that connection only |
| User name and password | As configured on the broker; leave empty for an anonymous test broker |
| Client ID | Must be unique: two clients with the same ID keep disconnecting each other |
Topics and wildcards
Topics are paths such as home/kitchen/temperature. When subscribing, + matches one level (home/+/temperature) and # matches everything below a level (sensors/#). Subscribing to # on a busy broker floods the screen, so start with a narrow filter.
QoS and retained messages
- QoS 0 delivers at most once, without confirmation.
- QoS 1 delivers at least once; duplicates are possible.
- QoS 2 delivers exactly once, with the most overhead.
- Retain makes the broker keep the last message on a topic and send it to every new subscriber. Publishing an empty retained message clears it.
Troubleshooting MQTT connections
| Symptom | Likely cause |
|---|---|
| Not authorized / bad user name or password | Wrong credentials, or the broker's access rules do not allow the topic |
| Timeout on connect | Wrong port, a firewall, or a broker that listens only on localhost (Mosquitto 2 needs an explicit listener for remote clients) |
| TLS handshake fails | TLS enabled on the plain port 1883, or a certificate name that does not match the host |
| Keeps disconnecting | Another client uses the same client ID |
| Subscribed but nothing arrives | Topic spelled differently (topics are case-sensitive) or nothing is being published |
Related network tools
Port Scanner for Android, Ping Tool for Android, Network Scanner for Android can help confirm the result from another angle.
Frequently asked questions
Which MQTT versions are available?
The current implementation exposes MQTT 3.1.1 and MQTT 5 options.
Why can the TCP port be open while MQTT fails?
The broker can reject the protocol version, client identifier, credentials, TLS settings, or topic permissions.
Is MQTT traffic encrypted?
Only when the connection is configured to use TLS. Plain MQTT does not encrypt message contents.
Which MQTT versions does the Android client support?
MQTT 3.1.1 and MQTT 5, with or without TLS.
Can I connect to a Home Assistant or Mosquitto broker?
Yes. Use the broker's address, port 1883 (or 8883 with TLS) and a user name and password the broker accepts.

