Skip to content

BlogFor companies

Bluetooth LE and IoT app development: Flutter apps that talk to hardware reliably

Your device works, but the app keeps losing it after updates, in pockets or when the screen locks. We explain in plain words why Bluetooth LE apps fail, the architecture and tests that fix it, and how to check an IoT app development company. The examples come from our own BLE projects: the HopX game controller and Bluetooth printing in SalesCompanion.

For companies19 min readPublished By Eryk Kruk, CEO
Left: four HopX game screens on phones, a red grid tunnel and bottle-cap game scenes with timers and points. Right: a SalesCompanion screen for adding an invoice, with a print button at the bottom.
Two Bluetooth LE apps we built: HopX games for a BLE controller cap (left) and SalesCompanion, a field sales app that prints invoices on a Bluetooth thermal printer (right, Polish interface).

When a Bluetooth LE device keeps dropping out, the cause is rarely the device itself. It is the app that talks to it over Bluetooth, and that is where IoT app development succeeds or fails. You have probably heard complaints like these: the app cannot find the device, it worked until the phone updated, the printout stopped halfway.

Short answer: a reliable app for your device needs more than a working demo. It must find and connect to the device every time, reconnect on its own after a drop, keep working when the phone locks the screen or updates its OS, and cope with firmware (the software inside your device) that does not follow the spec to the letter. If you are choosing an IoT app development company, ask how they handle each of those, and ask to see a Bluetooth LE app of theirs that works in the field.

Why it matters: every failed connection ends as a support call, a return or a one-star review, and your customers blame your device, not their phone. This article is for companies with a device: a controller, a printer, a sensor, a medical or consumer gadget. IoT (the Internet of Things) simply means devices like these that talk to an app or the internet.

We build Flutter apps (Flutter is Google's toolkit for one app that runs on both iPhone and Android) that talk to hardware over Bluetooth Low Energy (BLE), the power-saving version of Bluetooth most gadgets use to send small pieces of data to a phone. Two of our projects run through this article: the games for the HopX controller cap and Bluetooth printing in SalesCompanion, a field sales app we have built for over 4 years. The rest comes from the official Apple and Android documentation, as of November 2026.

What does a reliable device app need? Six things a demo never proves

In short: a reliable hardware-connected app finds your device, connects on the first try, exchanges data without losing any, reconnects by itself after a drop and keeps working in the background and after OS updates. When something goes wrong, it tells the user what to do and leaves a log your team can read.

  • Connects every time. Pairing takes one tap, and the app finds the right unit even in a room full of others.
  • Recovers on its own. A short drop is invisible to the user. A long one ends with a clear message, not a frozen screen.
  • Never loses a command. Every write (a command or data the app sends to the device) is confirmed. A write that failed is sent again or reported.
  • Survives the phone. Locked screens, power saving modes, new iOS and Android versions and new permission rules.
  • Handles firmware quirks. Devices that answer slowly, accept the wrong packet size or change behaviour after a firmware update.
  • Explains failures. A log, a timestamped diary of every connection state, so a bug from the field can be reproduced in the office.

A demo that connects on a developer's desk proves none of this. The gap between that demo and the list above is where most of the work in a BLE app goes. The business side: every missing item turns into support time, returns and bad reviews after launch, when each fix also means a new release and a new round of store review.

Why do Bluetooth LE apps lose the connection? Seven causes and their fixes

In short: Bluetooth LE apps fail in the real world because the phone, not the device, sets the rules. New iOS and Android versions change permissions and background limits, phones negotiate different packet sizes, and the radio shares the 2.4 GHz band with Wi-Fi and with the people walking between the phone and the device.

Think of the phone as a landlord and your app as a tenant. Every new iOS or Android version can change the house rules, and an app that ignores them gets locked out, even though your device has not changed at all.

Why BLE apps break, and what fixes it, as of November 2026
What breaksWhat the user seesWhat fixes it
PermissionsThe device list stays empty after an OS updateThe right permission for each OS version, explained, with a plan for a refusal
PairingThe app connects to the wrong unit, or asks to pair every timeScan only for your device's service, show a unit ID, remember the pairing
ReconnectionThe app says connected, but nothing happensConnection logic that notices the drop and reconnects with growing pauses (see the architecture below)
Background limitsData stops when the screen locksThe iOS background mode and state restoration, an Android foreground service
MTU (packet size)Large transfers cut off or arrive broken on some phonesRead the negotiated size and split data to fit
Writes sent too fastCommands get lost under loadA queue that sends one write at a time and waits for the answer
Interference and distanceDrops in a pocket, a crowd or a metal caseTimeouts, retries and tests in the real place of use

Permissions: why the device list is empty after an OS update

On Android 12 and later, an app needs the runtime permissions BLUETOOTH_SCAN to look for devices and BLUETOOTH_CONNECT to talk to paired ones. A runtime permission is a question the phone asks the user while the app is running. On Android 11 and lower, scanning needed precise location instead (Android Bluetooth permissions). An app built around the old rules finds nothing on a new phone. On iOS, an app that uses Bluetooth must declare a purpose string, NSBluetoothAlwaysUsageDescription: a short sentence on why the app needs Bluetooth, which iOS shows in the permission prompt.

Background limits: why data stops when the screen locks

On iOS, a suspended app (one the system has paused to save battery) cannot do any Bluetooth work unless it declares the bluetooth-central background mode. With it, the app can still connect and exchange data, but background scans must name the device's service, run less often, and the app gets around 10 seconds of work per wake-up (Apple Core Bluetooth background guide). If iOS ends the app to free memory, state restoration lets the system relaunch it for a Bluetooth event, so the user does not have to open it again.

On Android, long work in the background runs as a foreground service: work the app does while it shows a notification, so the system knows not to stop it. On Android 14 and later, every foreground service must declare a type. Long Bluetooth sessions use the connectedDevice type with its own permission, and for continuous transfers to a device Google points to the companion device manager, an Android feature that links an app to one specific device (Android foreground service types).

Packet size (MTU): why big transfers break on some phones

The MTU sets the largest packet a single Bluetooth LE write can carry. It works like a courier with a size limit per box: a big shipment has to be split into boxes that fit. From Android 14, the system asks for 517 bytes on the first MTU request and ignores later ones. Google warns that a device which accepts any size without really supporting it can break large transfers from Android 14 phones, and the fix may need a firmware update (Android 14 behavior changes). The app must read the size it actually got and split data to fit.

What architecture keeps a BLE connection alive? One owner, five states, one queue

In short: an architecture that keeps a BLE connection alive treats the connection as a state machine, not a yes or no flag. A state machine is a design where the app is always in exactly one named state, such as connecting or ready, with a rule for what comes next. Writes leave a queue one at a time, and every change of state is logged.

Think of a phone call. You dial, it rings, you talk, and if the line goes dead you notice and call back. An app that only stores connected: yes or no is like someone who keeps talking into a dead line, sure the call is still on. The state machine is the part that notices the silence and redials.

A Bluetooth LE connection as a state machine in five states. One: scan only for the device's own service. Two: connect, with a timeout. Three: set up the link, which means agreeing the packet size (MTU), finding the services and subscribing to notifications. Four: ready, where writes leave a queue one at a time and each waits for its answer. Five: link lost, the app reconnects with growing pauses between attempts and goes back to step two. Every change of state is logged with a timestamp.1ScanOnly for your device's service2ConnectWith a timeout, never forever3Set up the linkMTU, services, notifications4ReadyOne write at a time, from a queue5Link lostReconnect with growing pausesback to connectEvery state change logged with a timestamp
The connection as five states. A drop sends the app back to connecting, with a growing pause between attempts.
  • One owner of the connection. A single service in the app owns the Bluetooth link. Screens ask it for data and never talk to the radio directly.
  • States, not flags. Scanning, connecting, setting up, ready and lost. Each state has a timeout, so the app never waits forever.
  • A write queue. Like a shop with one till: one customer at a time, and the next one waits until the receipt is printed. One write at a time, each waiting for its answer. Android even has a status code for a write sent to a busy device, ERROR_GATT_WRITE_REQUEST_BUSY, where GATT is the set of rules BLE devices use to exchange data (BluetoothStatusCodes).
  • Retries with growing pauses. After a drop, try again at once, then after longer and longer pauses, up to a limit. Then tell the user what to check.
  • Commands that are safe to repeat. Give each command an ID, so the device can ignore a copy sent twice after a drop.
  • Logs you can read. Every state change, error code and firmware version, with a timestamp, attached to bug reports.

Agree the protocol, the exact messages the app and the device exchange, with the firmware team early. Small decisions on the device side, such as an acknowledgement for every command or a firmware version in the advertisement (the short signal a device broadcasts so phones can find it), save weeks of work in the app.

Why it matters for your budget: this structure is cheap to set up at the start and expensive to add after launch, when every fix needs a new release, store review and another round of tests across phones.

Flutter Bluetooth LE: which plugin to pick, which licence to check and when to go native

In short: for most Flutter Bluetooth LE apps, a plugin (a ready-made package of code) covers scanning, connecting, reading, writing and notifications on iOS and Android from one codebase. The two common choices are flutter_blue_plus and flutter_reactive_ble. Background sessions, state restoration and long transfers often need some native code, written in Apple's and Google's own languages, Swift and Kotlin, next to the plugin.

Flutter BLE plugins, as of November 2026
What you compareflutter_blue_plusflutter_reactive_ble
Version2.3.145.6.0
Publisher on pub.devjamcorder.commeethue.com
PlatformsAndroid, iOS, macOS, Linux, Windows, web (features differ by platform)Android, iOS
LicenceFree for personal, nonprofit and educational use; for-profit use needs a commercial licenceBSD-3-Clause

Check the licence before you start: flutter_blue_plus needs a commercial licence for for-profit use, while flutter_reactive_ble is BSD-3-Clause, a licence that allows commercial use for free. The flutter_blue_plus docs call background use an advanced case and say you may have to fork the plugin, which means keeping your own modified copy of its code. They also note that iPhones negotiate the MTU on their own, typically 135 to 255 bytes.

Our rule: start with a plugin, keep all Bluetooth code behind one service in the app, and move a piece to native code only when a test on a real device shows the plugin cannot do it. That keeps one codebase for iPhone and Android, so you pay for most features once, and for native work only where a real test proves you need it. Some thermal printers use Bluetooth Classic, the older Bluetooth that wireless headphones typically use, instead of BLE, and those need a different plugin or native code altogether.

How do you test a BLE app? A device matrix and seven field tests

In short: you test a BLE app on a matrix of real phones and real device units, in the conditions where people will use it: moving, at a distance, through pockets and walls, on low battery and after OS and firmware updates. Simulators, programs that imitate a phone on a computer, do not give you a real Bluetooth radio, so most of this testing happens in hand.

The device matrix: which phones, systems and units to test

A device matrix is the list of phones, system versions and device units the app is tested on before every release. Write it down and agree it before the build, so nobody argues later about what was supported.

  • Phones. The newest and the oldest iPhone you support, plus Android phones from at least three makers. Bluetooth behaviour on Android varies between makers, so one phone is never enough.
  • OS versions. The current iOS and Android, the previous ones, and the beta of the next release before it ships.
  • Device units. More than one unit, and every firmware version still in the field.

Seven stress tests that copy real life

Stress tests for a BLE app
TestHowPass when
MotionShake, spin and toss the device while it sends dataDrops are short and recovered without the user noticing
DistanceWalk away until the link drops, then come backThe app reconnects by itself and says what happened
ObstaclesPhone in a pocket, a bag, behind a wall or in a crowdCommands are confirmed or reported, never lost silently
BatteryLow device battery and phone power saving modeThe app warns early and keeps the link as long as it can
BackgroundLock the screen, switch apps, leave it for an hourData still arrives, or the app resumes cleanly
UpdatesNew OS version, new firmware, app update over an old pairingNo new pairing needed, no lost settings
Long runHours of continuous useNo memory growth and no slowdown

Automate what you can: a test phone or a small rig that repeats the same commands for hours finds timing bugs a person never sees. Keep a written test script for the rest, and run it before every release. A bug caught here costs an afternoon. The same bug caught by your customers costs a release, support time and reviews.

HopX: how a game controller stays playable through spins, tosses and shakes

In short: for HopX, Codigee builds the mobile games for a Bluetooth controller shaped like a bottle cap. The hardest requirement was simple to say: the game must not stop when the player spins, tosses or shakes the controller. Here is the story in three steps.

  • The problemA controller in constant motion. Spins, tosses and shakes strain the system, and the device may briefly lose the Bluetooth link. Any interruption had to go unnoticed, or be handled so well that the player stays in the game.
  • What we didFlutter for the app, Unity only for the games. Flutter runs the app on iOS and Android, and Unity, a game engine, runs only where the games need it. Some moves push the sensor readings to their maximum, so sensor fusion, which combines the accelerometer and the gyroscope into one picture of movement, needed ongoing research.
  • The resultFrom a test app to a working product. HopX grew from a test application into a fully operational product, with Bluetooth, motion sensors and games in one Flutter app.
Four HopX game screens on phones: a red grid tunnel on a tall screen, and three wide bottle-cap game scenes with a timer, points and a start screen.
HopX: the games we build for a Bluetooth controller shaped like a bottle cap. Screens from the HopX project.

Planning games or 3D scenes inside an app for your device? The same approach is our offer for Unity inside your Flutter app. What a brief like HopX teaches for any device that moves:

  • Design for the drop. If the device can lose the link mid-move, decide early what the user sees during a short drop and after a long one.
  • Hide short gaps. Keep the last known state on screen, so a brief disconnection does not freeze the game.
  • Test the real moves. Spins and tosses on a desk are not the same as in a player's hand.
  • Keep the link apart from the screens. A game scene can restart without touching the Bluetooth connection.

SalesCompanion: printing invoices at the counter over Bluetooth, with no vendor SDK

In short: reps using SalesCompanion print sales documents and orders at the counter on Bluetooth thermal printers, 58 and 80 mm wide, without depending on any printer maker's software. A vendor SDK is the ready-made code a printer maker supplies for its own printers; we did not use one.

  • The problemDifferent printers, no signal. Reps carry different printer models, use both iPhones and Android phones, and often work in stores and warehouses with no signal. Printing had to work for all of them.
  • What we didOur own print layer. We wrote our own print layer from scratch on raw Bluetooth Low Energy, with no vendor SDK. The new Bluetooth printing shipped in April 2025.
  • The resultPrinting that fits the client's process. The app prints sales documents and orders on 58 and 80 mm printers, and a client company can even require a printout before a document is saved.
SalesCompanion screen for adding a document: invoice type with automatic numbering, payment method, products and a print button at the bottom
SalesCompanion: adding an invoice at the counter, with the print button at the bottom. Screen from the live app, Polish interface.

What this means for your device:

  • No lock-in to one brand. Vendor SDKs can tie you to one printer brand and lag behind new iOS and Android versions.
  • Updates on your schedule. A print layer of your own is updated together with the app, not when a vendor gets round to it.
  • Works without signal. The printer talks to the phone, not to the internet, so printing works in a warehouse with no coverage.
  • Your rules in the app. Rules such as print before save can be switched on per client company.

Two of our Flutter developers maintain the SalesCompanion app under an SLA, a contract with agreed response times, and since the rewrite a new version ships almost every week. If what you need is a field sales app for reps, try the ready-made SalesCompanion first and build your own only for what it cannot do.

How to choose an IoT app development company: six questions, and our answers

In short: choose a company that has a Bluetooth LE app working in the field, can show you how it handles drops, background limits and firmware updates, and lets you talk to the engineers who will build yours. A polished demo video tells you nothing about any of that.

Large agencies, freelancers and specialist teams can all build BLE apps. Ask each of them the same six questions and compare the answers, not the sales decks. Here are the questions, what a good answer includes, and how we answer them, with proof from our projects.

Six questions for an IoT app development company, and how Codigee answers them
QuestionA good answer includesOur answer, with proof
Show me a BLE app that works in the field.A live app, not a prototype or a videoHopX, games for a BLE controller cap, and SalesCompanion, printing over raw BLE, built for over 4 years
What happens when the link drops?States, timeouts, retries and what the user seesThe five-state model above. In HopX, short drops had to go unnoticed by the player
How will we see progress on real phones?Regular builds you can install yourselfA new build on your phone every week, so you test on your own devices too
How do you handle background work and permissions?iOS background mode, Android 12 permissions, Android 14 service types, by nameOn the risk list you get in Prototype to Plan, before the full build starts
How will we debug problems from the field?Logs, firmware versions, a way to reproduce a customer's bugSalesCompanion: 398 test files and a new version almost every week since the rewrite
Who owns the code and the store accounts?You, from day oneYours from day one: repository, cloud account, App Store and Google Play accounts

Why a small senior team wins on hardware projects. On a BLE project, most problems sit between the app, the phone and the firmware, so the answer has to come from someone who has seen them before. With us, the people on your first call are the senior engineers who write and release the code, with no layers of account managers in between. That is how two of our developers keep SalesCompanion shipping almost every week.

We are rated 5.0 on Clutch from 19 reviews, Clutch named us among the Top Flutter Developers in Poland in 2026, and we are listed in Google's Flutter Consultants directory. You get a fixed price per milestone, and you can see how a project runs from the first call to launch. More for teams like yours is on Codigee for companies.

Taking over an existing app that keeps dropping the connection? Start with a mobile app audit before a takeover.

How much does IoT app development cost? Our prices for a device app

In short: at Codigee, a first release of an app for your device starts from $15k, typically $15-50k, in 8-12 weeks, for iOS and Android from one Flutter codebase. The device, its firmware and its certification are separate costs. What moves the price is the protocol, background work, the number of device models and how much field testing you need.

Codigee prices for a device app, in USD, as of November 2026
ScopePriceWhen it fits
Prototype to Plan$5kScope, key screens and a fixed price per milestone. 1-2 weeks, credited to the build
MVP / App Launchfrom $15k, typically $15-50kA new app for your device, with a backend and an admin panel, in 8-12 weeks
App Audit$5-8kAn existing BLE app that drops the connection, with a fixed plan at the end
Carefrom $2k/monthUpdates for new iOS, Android and firmware versions after launch
Team up$60/hOur Flutter experts on your team, minimum 120 h a month

Every stage has a fixed price agreed before it starts, so you know the cost before you commit, and apps we build come with a 6-month guarantee. All our prices are on the pricing page. For everything that drives the cost of an app, read how much it costs to build an app. And bring the device to the first call: an hour with the real hardware tells us more than any spec sheet.

Common questions

01What is BLE app development?

BLE app development is building a mobile app that talks to a device over Bluetooth Low Energy: finding it, connecting, reading and writing data, and reconnecting after drops. The hard part is reliability across phones, OS versions, background limits and firmware versions, not the first connection.

02Is Flutter good for Bluetooth LE apps?

Yes, for most devices. Plugins such as flutter_blue_plus and flutter_reactive_ble cover scanning, connecting, reads, writes and notifications on iOS and Android from one codebase. Background sessions and state restoration often need some native Swift or Kotlin code next to the plugin.

03Why does my BLE app disconnect when the phone is locked?

On iOS, a suspended app cannot use Bluetooth unless it declares the bluetooth-central background mode, and even then background work is limited. On Android 14 and later, long sessions need a foreground service of the connectedDevice type. Both have to be built in on purpose.

04Which permissions does a Bluetooth app need?

On Android 12 and later, BLUETOOTH_SCAN to find devices and BLUETOOTH_CONNECT to talk to them. Android 11 and lower needed precise location for scanning. On iOS, the app must declare NSBluetoothAlwaysUsageDescription, a purpose string shown in the permission prompt.

05Can you build an app for our device without the vendor's SDK?

Often, yes, if the device speaks standard Bluetooth LE and you can share its protocol. In SalesCompanion, we wrote our own print layer on raw BLE for 58 and 80 mm thermal printers, with no vendor SDK.

06How much does an IoT app development company charge?

At Codigee, a first release of an app for your device starts from $15k, typically $15-50k, in 8-12 weeks, and the final price depends on scope. An audit of an existing BLE app costs $5-8k. The hardware and firmware are separate costs.

Was this article useful?

Rate this article

Keep reading.

All posts

Let's make something together.

No overengineering. No wasted time. Just straight-up execution.

Or book a call with Eryk (opens the booking calendar)[email protected]
Who are you?
Budget