Delivered remotely for a business based in Frankfurt, Germany. Names withheld by agreement.
Project Overview
In connected equipment deployments, cloud dashboards and telemetry pipelines matter little if field technicians struggle to get newly mounted hardware online in the first place. Installed equipment often lives inside mechanical rooms, rooftops, or industrial basements where cellular signals fluctuate, QR labels are hard to reach, and the only reliable initial interface to the hardware is Bluetooth Low Energy (BLE).
We engineered a cross-platform mobile application using React Native, React, TypeScript, Redux, and Firebase to unify local BLE commissioning and ongoing remote monitoring into one dependable field tool. Rather than treating Bluetooth setup as an ad-hoc sequence of promise callbacks, we built an explicit commissioning state machine that handles OS-level radio quirks gracefully and transitions verified hardware seamlessly into cloud-backed operational monitoring.
Field Commissioning Bottleneck
Legacy hardware onboarding flows frequently fail at the boundary between mobile operating systems and embedded firmware. A technician scans for a unit, taps connect, submits facility Wi-Fi credentials, and watches a generic spinner until it times out with no clue whether the failure occurred during BLE pairing, MTU packet fragmentation, Wi-Fi authentication, or cloud registration. Recovering often means power-cycling equipment and starting over.
Once equipment is online, facility staff face a second disconnect when commissioning tools are separate from day-to-day monitoring apps. Technicians need a single mobile client where they can bring an unconfigured node online over BLE, confirm live sensor telemetry through Firebase before leaving the site, and return later to inspect operating status or receive fault push alerts remotely.
Architectural Strategy
Our architecture decouples transport mechanics from business state so both local BLE interactions and cloud monitoring share consistent TypeScript domain models:
- Serialized BLE command queue: All GATT discovery, descriptor subscriptions, and characteristic writes pass through a sequential TypeScript transport layer that enforces single-in-flight operations and deterministic timeouts across iOS and Android.
- Redux-driven provisioning state machine: Every stage of device onboarding—discovery, handshake, credential transfer, network verification, and cloud binding—is modeled as explicit Redux state transitions, guaranteeing predictable UI recovery when a radio drops mid-step.
- Firebase remote control plane: Once a unit registers online, Firebase Authentication, real-time cloud listeners, and Cloud Messaging take over telemetry streaming, fleet grouping, and fault alerting without requiring the technician to stay within Bluetooth range.
Core Capabilities
- Filtered BLE Discovery & Signal Sorting: Scans nearby advertisements filtered by manufacturer service UUIDs, displaying live RSSI strength and hardware serial suffixes so technicians pick the right unit inside crowded equipment rooms.
- Chunked Credential & Configuration Handoff: Negotiates optimal BLE MTU sizes and fragments Wi-Fi SSIDs, passphrases, and provisioning tokens reliably across varying Android and iOS Bluetooth chipsets.
- Interactive Network Verification over BLE: Keeps the local BLE control channel open while the device attempts to join the local network, surfacing granular firmware status codes—such as wrong passphrase, captive portal block, or broker timeout—directly on screen.
- Seamless Cloud Telemetry & Remote Control: Displays live equipment health, operational modes, and historical status changes synced via Firebase once commissioning succeeds.
- Fault Push Alerting & Fleet Grouping: Organizes commissioned hardware by site and zone, delivering targeted Firebase Cloud Messaging alerts when equipment goes offline or triggers threshold warnings.
Technical Architecture
Flow: Installed IoT hardware <-> BLE GATT transport (TypeScript serialized queue) <-> Redux state machine (React Native / React) <-> Firebase Auth, cloud telemetry & Cloud Messaging.
During commissioning, the React Native application initializes pre-flight radio and permission checks before scanning for unprovisioned BLE beacons. Selecting a target unit dispatches a Redux flow that connects to the peripheral, discovers custom GATT services, enables notifications on the status characteristic, and negotiates MTU size. Credentials entered by the technician are serialized into typed binary frames, chunked according to the active MTU, and transmitted sequentially with explicit acknowledgement checks.
While the unit connects to local Wi-Fi and registers its identity in Firebase, the app listens concurrently to both the BLE status characteristic and the expected Firebase device node. Once cloud heartbeat confirmation arrives, Redux marks provisioning complete, cleanly closes the transient BLE session, and mounts the standard Firebase telemetry listeners used for long-term monitoring and remote parameter updates.
Technology Stack
| Category | Technology detail |
|---|---|
| Mobile framework | React Native with React cross-platform UI components for iOS and Android |
| Language | TypeScript with strict typing for BLE GATT payloads and cloud schemas |
| State management | Redux with deterministic middleware for commissioning state machines |
| Local radio transport | Bluetooth Low Energy (BLE) GATT central stack with chunked writes |
| Cloud sync & auth | Firebase Authentication, Realtime/Firestore telemetry sync, and Cloud Messaging |
| Diagnostics & stability | Firebase Crashlytics and structured provisioning step logs |
| Error recovery | Automated GATT retry queues, MTU negotiation, and step-level rollback |
| Permissions & UX | Unified iOS/Android Bluetooth and location permission guidance layer |
Engineering Trade-offs & Solutions
| Architectural Dilemma | Chosen Solution & Rationale |
|---|---|
| Parallel GATT writes vs. strictly serialized command queue | Built a sequential FIFO queue for all BLE reads, writes, and descriptor updates so Android's BluetoothGatt stack never silently drops overlapping native callbacks. |
| Closing BLE immediately after credential write vs. holding channel for verification | Kept the BLE notification subscription active during network join so firmware could return actionable failure codes before the app declared success or failure. |
| Local React component state vs. centralized Redux state machine | Placed commissioning phases and device state inside Redux so navigation transitions, app backgrounding, and retry triggers stay synchronized without orphaned callbacks. |
| Custom WebSocket broker client vs. Firebase real-time sync | Adopted Firebase for authentication, device state listeners, and push alerts, eliminating separate socket-reconnection boilerplate and accelerating delivery of remote monitoring features. |
Device Identity & Transport Security
On-site BLE provisioning exposes an obvious attack surface if unauthenticated phones can overwrite credentials on installed hardware. The app authenticates technicians first through Firebase Authentication and pairs local BLE sessions using device-specific proof-of-possession tokens scanned or verified during onboarding.
Sensitive payloads—including facility Wi-Fi passphrases and provisioning secrets—are cleared from transient Redux state immediately after confirmation rather than persisted in unencrypted device storage. TypeScript strict checks prevent malformed characteristic payloads from reaching native radio buffers, while Firebase security rules enforce organization- and site-level isolation for every remote monitoring stream and command action.
Connection Reliability & State Determinism
Field environments test mobile networking far harder than office desks. Technicians frequently step behind concrete walls, toggle airplane mode, or switch phones mid-shift. By encoding explicit connection timeouts, automatic GATT disconnect cleanup, and idempotent step retries inside Redux middleware, the app prevents "zombie" Bluetooth handles that normally force users to restart Bluetooth in OS settings.
Structured diagnostic breadcrumbs recorded during each commissioning phase—anonymized of Wi-Fi secrets—flow to Firebase Crashlytics and support logs, giving engineering and support teams exact visibility into which firmware handshake step stalled on specific handset models.
Operational Outcomes
Field technicians gained a predictable, self-diagnosing onboarding workflow that guides them cleanly from unboxing to verified cloud connectivity without guessing why a unit failed to join a facility network. Facility managers and support engineers operate from the same cross-platform React Native client to monitor live device health, investigate faults remotely, and dispatch configuration updates over Firebase. For the engineering organization, isolating BLE protocol subtleties inside a typed, Redux-orchestrated transport layer turned cross-platform hardware commissioning into a maintainable, testable codebase.