# BLE vs Wi-Fi vs MQTT for IoT apps: which link to use
URL: https://alexmitrovic.com/blog/ble-vs-wifi-vs-mqtt-iot-app
Last updated: 2026-11-29

> BLE, local Wi-Fi or MQTT through the cloud for an IoT app? Range, speed, power, setup and offline use compared, and the combinations that work.

[Wi-Fi & IoT](https://alexmitrovic.com/blog#wi-fi-iot)

# BLE vs Wi-Fi vs MQTT for an IoT app: which link to use, and when to combine them

BLE, local Wi-Fi or MQTT through the cloud for an IoT app? Range, speed, power, setup and offline use compared, and the combinations that work.

By [Alex Mitrovic](https://alexmitrovic.com/about)Published 29 November 20263 min read

## On this page

1. [BLE vs Wi-Fi (local) vs MQTT (cloud) at a glance](https://alexmitrovic.com/blog/ble-vs-wifi-vs-mqtt-iot-app#compare)
2. [When BLE alone is enough](https://alexmitrovic.com/blog/ble-vs-wifi-vs-mqtt-iot-app#ble)
3. [When Wi-Fi on the local network makes sense](https://alexmitrovic.com/blog/ble-vs-wifi-vs-mqtt-iot-app#wifi)
4. [When you need MQTT and the cloud](https://alexmitrovic.com/blog/ble-vs-wifi-vs-mqtt-iot-app#mqtt)
5. [The combinations that work](https://alexmitrovic.com/blog/ble-vs-wifi-vs-mqtt-iot-app#combine)
6. [The real problem: one device state](https://alexmitrovic.com/blog/ble-vs-wifi-vs-mqtt-iot-app#state)
7. [FAQ](https://alexmitrovic.com/blog/ble-vs-wifi-vs-mqtt-iot-app#faq)
8. [Sources](https://alexmitrovic.com/blog/ble-vs-wifi-vs-mqtt-iot-app#sources)

**Stuck on this in a real app?** I fix it on real phones, usually within a week.

[Book a free call](https://alexmitrovic.com/contact)

Short answer

Use BLE for setup and for control when the phone is near the device and battery life matters; Wi-Fi on the local network for fast, frequent control at home without the cloud; and MQTT through a cloud broker for control and state when the phone is away from home. Most successful connected products combine them: BLE for onboarding, Wi-Fi or MQTT for everyday use.

## Key takeaways

- BLE wins on power and setup, and works with no network at all; it loses on range and remote access.
- Local Wi-Fi wins on speed and latency at home, and keeps working when the internet is down.
- MQTT through the cloud is the only one that works from anywhere, at the cost of a backend.
- Combining links is normal; the hard part is one device state across all of them.
- Decide early: the choice shapes the hardware, the firmware and the app.

“Should our device use BLE or Wi-Fi?” comes up early in most hardware projects I talk to. There's no single right answer, but there are clear trade-offs, and most products end up using two links, not one. Here's the comparison from the app's side.

## BLE vs Wi-Fi (local) vs MQTT (cloud) at a glance

|  | BLE | Wi-Fi on the local network | MQTT through the cloud
| Works away from home | No | No | Yes
| Works without internet | Yes | Yes (LAN only) | No
| Typical range | Same room to a house | The home network | Anywhere
| Device power use | Very low; runs on coin cells | High; usually mains or big batteries | Same as Wi-Fi, plus keeping a connection open
| Speed and latency | Up to ~100+ KB/s best case, low latency nearby | Fast, low latency | Fast enough; latency depends on the broker and network
| Setup for the user | Pair once, in the app | Needs provisioning first | Provisioning + account linking
| Infrastructure you run | None | None | A broker and backend, with security and accounts
| App complexity | BLE stack quirks per phone | Discovery (mDNS), local permission on iOS | Auth, reconnection, offline queues
| Good for | Wearables, sensors, locks, setup of everything | Smart home devices used at home | Remote control, notifications, fleets

## When BLE alone is enough

If the user is always near the device when using it (a wearable, a tool, a sensor read on demand, a lock at the door), BLE alone keeps the product simple: no backend, no accounts, no Wi-Fi setup, and long battery life. The app takes on the work of syncing data to the cloud when it has a connection.

The costs: no control from away, and Android and iOS each have their own BLE behavior to handle. That's the work the rest of this blog is about.

## When Wi-Fi on the local network makes sense

Mains-powered home devices (heaters, plugs, lights, appliances) usually sit on Wi-Fi anyway. Talking to them directly on the home network is fast and keeps working when the internet is down. The app finds them with mDNS (Bonjour on iOS, NSD on Android) and talks over HTTP, WebSockets or a small TCP protocol. On iOS 14 and later, local network access needs its own permission prompt.

## When you need MQTT and the cloud

As soon as users expect to control the device from work, or get a notification when something happens, the device has to reach a server. MQTT is a common choice: a light publish/subscribe protocol where the device and the app both connect to a broker. The app side needs care: authentication per user and device, reconnecting when the phone changes networks, and not trusting a stale “last known state” as the current one.

## The combinations that work

| Pattern | How it works | Typical product
| BLE setup → Wi-Fi + cloud | Onboard over BLE, provision Wi-Fi, then local control at home and MQTT away | Thermostats, heaters, plugs, cameras
| BLE + phone as gateway | Device talks BLE only; the app syncs its data to the cloud when it can | Wearables, sensors, medical-style devices
| BLE + USB fallback | BLE for everyday use, USB for service, large transfers or recovery | Controllers, installer tools
| Wi-Fi + cloud, BLE for recovery | Normal use over the network; BLE to re-provision when Wi-Fi changes | Appliances

I've built several of these: the [floor-heating controller](https://alexmitrovic.com/work/floor-heating-controller) paired BLE with a USB fallback, and my [ESP32-S3 device](https://alexmitrovic.com/work/esp32-iot-device) is set up over BLE and then joins Wi-Fi.

## The real problem: one device state

With more than one link, the device's state can arrive from several places at different times. The classic bug: the app shows “off” from a cached cloud message while the device, reachable over BLE, is on. The rules I use:

- One source of truth per device in the app, fed by all links.
- Every state carries a timestamp or sequence number from the device, so newer always wins.
- Commands are confirmed by the device, whichever link they went over.
- The UI shows when state is stale, instead of pretending.

Matter and Thread are worth a look for smart home products; Matter uses BLE for commissioning and Wi-Fi or Thread for control. Add your view on Matter if you have hands-on experience; otherwise leave this sentence as is.

## FAQ

### Is BLE or Wi-Fi better for an IoT device?

BLE is better for battery-powered devices used nearby and for setup; Wi-Fi is better for mains-powered devices that need fast control at home or a cloud connection. Many products use both: BLE to set up, Wi-Fi for everyday use.

### Can a BLE device be controlled remotely?

Not by itself: BLE needs the phone nearby. For remote control, either the device also connects to Wi-Fi and a cloud service, or a gateway (a hub or a phone at home) relays commands.

### Is MQTT a replacement for BLE?

No, they solve different problems. MQTT is a protocol for talking to a server over the internet; BLE is a short-range radio link. Many apps use BLE to set up a device and MQTT to control it from anywhere afterwards.

## Sources

- [MQTT.org](https://mqtt.org/)
- [Android Developers: Network service discovery](https://developer.android.com/develop/connectivity/wifi/use-nsd)
- [Bluetooth SIG: Bluetooth Low Energy overview](https://www.bluetooth.com/learn-about-bluetooth/tech-overview/)
- [Connectivity Standards Alliance: Matter](https://csa-iot.org/all-solutions/matter/)

**Written by Alex Mitrovic**, an Android and iOS developer who builds reliable apps for Bluetooth and IoT devices and tests every fix on real phones. If your app has this problem on phones you can't pin down, the [BLE reliability audit](https://alexmitrovic.com/services/ble-reliability-audit) finds out why in about a week. [About me](https://alexmitrovic.com/about) · [LinkedIn](https://www.linkedin.com/in/aleksmitro98/)

## Read next

[Article### Wi-Fi provisioning over BLE: getting IoT devices online without losing usersGetting an IoT device onto Wi-Fi from an Android or iOS app: BLE provisioning vs SoftAP, ESP32 provisioning, confirmation and the errors to handle.](https://alexmitrovic.com/blog/wifi-provisioning-over-ble)

[**App****BLE setup****On the home Wi-Fi** Service### IoT app developmentAndroid and iOS apps for IoT devices beyond Bluetooth: Wi-Fi provisioning, local control, MQTT and cloud, USB serial, and one device state.](https://alexmitrovic.com/services/iot-app-development)

[**Thermostat****App** Industry### Smart home & HVAC appsAndroid and iOS apps for smart thermostats, floor heating and HVAC devices: BLE setup, Wi-Fi and cloud control, OTA and one reliable device state.](https://alexmitrovic.com/for/smart-home)

## Seeing this in your own app?

Send me the phone models and what the logs say. On a short call I'll tell you where I'd look first.

[Book a free call](https://alexmitrovic.com/contact)

Free · NDA on request · reply within 1–2 working days
