AndroidVerified in the current app

MQTT Client for Android

Connect to an MQTT broker from Android, subscribe to topics, and publish test messages with optional TLS and authentication.

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

  1. Enter the broker host, port, and MQTT version.
  2. Configure TLS and authentication to match the broker.
  3. Connect and subscribe to a narrowly scoped test topic.
  4. 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

Topic permissions and retained messages are controlled by the broker. Avoid publishing to production command topics without authorization. TLS validation and credential hygiene remain essential.

Connection settings

Typical MQTT broker settings
SettingTypical value
HostThe broker's IP address or name, for example a Mosquitto or Home Assistant server at 192.168.1.10
Port1883 for plain MQTT, 8883 for MQTT over TLS
ProtocolMQTT 3.1.1 or MQTT 5
TLSOn for port 8883. Allow invalid certificates is meant for a self-signed test broker and applies to that connection only
User name and passwordAs configured on the broker; leave empty for an anonymous test broker
Client IDMust 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

MQTT problems and fixes
SymptomLikely cause
Not authorized / bad user name or passwordWrong credentials, or the broker's access rules do not allow the topic
Timeout on connectWrong port, a firewall, or a broker that listens only on localhost (Mosquitto 2 needs an explicit listener for remote clients)
TLS handshake failsTLS enabled on the plain port 1883, or a certificate name that does not match the host
Keeps disconnectingAnother client uses the same client ID
Subscribed but nothing arrivesTopic 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.

Keep a network toolbox in your pocket.

Network Toolkit is free on Google Play, needs no account and works on your local network.