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.
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 paired BLE with a USB fallback, and my ESP32-S3 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.

