Key Takeaways:
- A connected product can expose one Bluetooth endpoint and still contain several components with their own firmware, so confirm which one the app can actually update before scoping.
- A controller can be updated directly, through an intermediary such as the display, or only with a service tool, and each route brings different supplier and firmware dependencies.
- Test file delivery separately from flashing, and define which bytes each checksum covers and which component calculates it.
- A completed transfer is not a completed update: read the running version from the target component after restart.
- On the Egret project, matching the protocol to real device behavior and fixing a backend hash mismatch made OTA display firmware updates for the Unit shippable on Android and iOS.
A connected product often exposes one Bluetooth endpoint, while the firmware that needs updating sits on another component. Stormotion ran into exactly this while adding over-the-air (OTA) firmware updates for Egret’s Unit model: the app reached the display, but the motor controller sat behind it. This guide shows how to find the right update path, what to test on real hardware, and how we shipped OTA updates for Egret on Android and iOS while controller updates through the display stayed tied to supplier support.
What can actually be updated?
A connected product can expose one Bluetooth endpoint and still contain several components with their own firmware. A phone connects to a scooter’s display while a separate controller runs the motor. A fitness console handles the user interface while another board controls the machine. A wearable exposes its main processor to the app while a sensor module runs its own firmware. The component the app reaches is often not the one that needs the update.
Update path | What has to be true | Where to start testing |
|---|---|---|
Direct to the controller | The controller exposes an update interface the phone or gateway can use. Its update software can receive, validate, and activate the intended image. | Use a production-representative controller with the supported firmware and confirm its running version after reboot. |
Through an intermediary | The display, gateway, or module can forward the correct image over its link to the controller and report what the downstream component did. Both components’ firmware versions may affect compatibility. | Test with the stock intermediary and the target controller together. Read the installed version from the controller after reconnecting. |
Service-tool route | A technician can update the controller with a programmer, service module, or other approved tooling. | Verify the service procedure and document which units it can recover or bring onto the supported update path. |
The route sets the scope of the work. A direct update usually fits inside the current app and firmware interfaces. A relayed update may also depend on a supplier firmware change, a minimum version on the intermediary, or a staged upgrade for units already in the field. If the only working route requires swapping a module on the bench, the team has demonstrated a service procedure, not an OTA update; the user-facing route still needs its own test. The IETF firmware update architecture describes how delivery and installation responsibilities are split across systems.
6 lessons for building and testing controller OTA
1. Give each component its own acceptance criteria
Name the physical target, supported hardware revision, starting firmware versions, delivery route, and expected result. “Update the device” leaves room for a passing display test to be counted as a successful controller update. Put each component on its own acceptance row, even when the app presents a single update screen.
For a controller update through a stock display, a good acceptance criterion reads: “With a supported display and controller version, install the approved controller image through the companion app. After restart, reconnect, read the expected version from the controller, and complete the approved functional check.” If the display needs an update first, give that step its own expected state and failure behavior. Decide whether the user can resume after the first step succeeds and the second fails.
2. Test file delivery separately from flashing
Give the lab team a controlled way to exercise the updater with a known-good test image. This takes download and release eligibility out of the test. Keep the firmware validation and device protections in place. Then run the production-like path with the same approved artifact served by the backend to a device in the same starting state.
If the local path succeeds and the server path fails, you can inspect selection, download, and file validation before changing the Bluetooth transfer. If both fail at the same device stage, investigate the transport or the target’s response. Keep a simple test record that shows which stage passed, which build ran, and what version the target reported afterward.
const digest = await sha256(downloadedImage);
if (digest !== manifest.sha256) {
rejectUpdate('Downloaded image does not match the published hash');
return;
} 3. Be explicit about what each integrity check covers
A delivery check verifies that the bytes received match the expected artifact. A device-side check covers a different protocol stage, such as verifying the image during finalization. Write down which bytes each check covers and which component calculates it. A binary image, its text encoding, and its archive container contain the same firmware but produce different digests. On the Egret project, exactly this kind of mismatch blocked server-delivered updates, as the case study below shows.
// The bytes are converted to a string and re-encoded,
// so the digest no longer matches the file
hash.update(imageBytes.toString('binary'));
// Hash the exact bytes the device will receive
hash.update(imageBytes); Firmware authenticity needs a trusted way to verify the source and integrity of the image. An ordinary checksum catches accidental corruption but does not prove where the image came from. For an authenticated update design, agree with the firmware owner on what is signed, where verification happens, and how updates are authorized for the intended component and hardware revision. NIST firmware resiliency guidance and the IETF firmware manifest information model provide reference points for those decisions.
4. Verify the running firmware after activation
The last acknowledged packet marks the end of a transfer, not the end of the update. The device still has to validate the image, activate it, restart, and in some designs report back over the intermediary. When the app reconnects, it can be talking to the display while the controller still runs its previous version.
Track those milestones independently. Useful engineering states include “file verified,” “transfer complete,” “device accepted image,” and “target version verified.” If the connection drops around restart, the app has to reconnect and query the target before it declares the outcome. Agree with the firmware team on how to represent an outcome the app cannot yet verify. For updates that affect physical behavior, follow the version check with a device-specific functional test on approved hardware.
5. Plan repeatable tests around version rules
Some devices reject a reinstall or downgrade. Others accept an image transfer but boot only a newer version. Either behavior turns a good test into a one-shot exercise. Ask how the updater compares versions, whether a separate sequence number governs eligibility, and what happens after the first successful installation. Firmware version, sequence number, and permitted recovery behavior often follow different rules.
Ask the supplier for a series of valid test releases, spare devices at known starting versions, or an approved lab reset procedure. Record versions for the intermediary and controller before each run. When comparing iOS and Android, give both an equivalent starting state. Otherwise, the second platform gets a different result simply because the first one already updated the device.
6. Confirm supplier support on production-representative hardware
Ask the supplier to demonstrate the required route with the parts and firmware versions that will ship. Clarify who owns the update protocol, provides reference files, interprets final status, and explains recovery after an interrupted update. Ask for a known-good image and a reference flow your team can use on the bench. A service demo with substitute hardware can help with diagnosis, but it leaves the stock-hardware route unproven.
If the supplier cannot yet demonstrate downstream updating, define what ships independently and what depends on supplier firmware. A display update is often valuable on its own. If the controller is the release requirement, keep it tied to a controller-specific acceptance test.
Your app reaches the display, but the firmware that needs updating sits on the controller? Let's map the update path for your hardware before it blocks a release.
Book a call with Roman
Case study: OTA firmware updates for Egret e-scooters
Egret is a Hamburg-based premium e-scooter brand. Its companion app connects riders to their scooters over Bluetooth, and Stormotion develops the app with native Bluetooth modules for Android and iOS. For Egret’s new Unit model, the goal was to deliver firmware updates from the app.
Why controller updates through the stock display stalled
The original plan was to update the motor controller through the display already installed on the scooter. On the bench, the supplier’s tooling flashed the controller only through a separate display module connected for the procedure, and support for relaying controller updates through the stock display was not confirmed.
Shipping a reliable update path first
We scoped the first OTA release to the display, the component the app could update directly. Waiting for the supplier to support controller relaying would have blocked the whole feature. The tradeoff: controller updates through the display remain a separate step tied to supplier firmware.
Aligning the update flow with real device behavior
The supplier documentation for the display update protocol differed from the device’s behavior: the write address, the packet length, and the finalization message, which required the image length and a CRC-32 the documentation did not describe. The documented flow did not produce a working update, and waiting for corrected documentation would have stalled testing. We captured the Bluetooth exchange of the supplier’s working tool and aligned our implementation with the actual write address, packet length, and finalization message. One cost remains: our flow waits for the scooter to acknowledge each packet, while the supplier tool does not, so an update takes slightly longer.
We found the CRC-32 algorithm in the source of an older supplier app, ported it to Kotlin and Swift, and pinned it with unit tests against a reference image, so a later change cannot silently break the final step.
Testing flashing separately from delivery
Before connecting the updater to the backend, we added a mode that flashes a file selected on the phone. Testers could validate flashing on the bench without depending on downloads or release eligibility, and we then built the same flow natively on iOS.
That separation paid off when server-delivered updates later failed validation. Because the local-file path already worked, the investigation went straight to delivery. The backend computed the file’s SHA-256 hash from a text-converted copy of the image, while the app hashed the downloaded binary. Hashing the binary bytes on both sides fixed the mismatch.
What shipped and what still depends on the supplier
Egret’s QA confirmed the update flow on Android and iOS, and OTA display firmware updates for the Unit shipped in the next companion app release. QA sign-off confirms the release, not update success rates in the field. Updating the controller through the stock display still depends on supplier firmware support.
How to scope an OTA controller update
Start with a working session between product, mobile, backend, and firmware owners. For a new product, settle the update route before the hardware and interfaces are locked. For an existing product, map which deployed hardware and firmware combinations can already support the route and which need a prerequisite update or a service procedure.
Before committing to a release | What to agree on |
|---|---|
Supported hardware | List target components, hardware revisions, minimum starting versions, and the actual route for each combination. |
Supplier handoff | Obtain reference hardware, valid test images, protocol documentation, what each final status code means, and an approved recovery procedure. |
Acceptance | Record the target’s running version and the result of a functional check. Define how the app reports failure, a pending verification, or a confirmed installation. |
Test coverage | Run the approved local-file test and the production-like delivery test. Cover incompatible images, interrupted transfer, and reconnecting after activation. Retest on each supported mobile platform. |
Release ownership | Assign owners for image publication, eligibility, device-side support, and incident response. If your systems support staged enablement, agree on the first eligible group and what would pause expansion. |
Treat the app release and firmware availability as separate operational milestones. The app can be approved while a compatible image is still awaiting validation. Where telemetry is available, distinguish download, transfer, device acceptance, and post-restart verification so support can locate a failure without reproducing the entire update.
Start with proof on the target component
A controller OTA plan is ready to estimate when the team can name the component, show the path to it, and describe what will prove the new firmware is running. That same proof helps product, firmware, and mobile teams make release decisions when a supplier dependency or test failure changes the scope.
Adding firmware updates to a connected product? Talk to Stormotion about mapping the update path, building the app-side integration alongside your firmware team, and testing it on real hardware. Learn more about our hardware companion app development services.


