Skip to content
realranjanPublic

About

Turn budget smartwatches (Fire-Boltt, DaFit, Realtek) into hands-free desktop air-mice for Reels/Shorts and long-range satellite GPS telemetry trackers.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

OpenWrist

OpenWrist - Smartwatch Reverse-Engineering & Telemetry Suite

Release Version Unit Tests Passing Python Version Operating System Supported Protocol MIT License


OpenWrist is an open-source reverse-engineering toolkit and systems automation daemon for consumer Bluetooth Low Energy (BLE) smartwatches powered by Realtek RTL8762 chipsets (Fire-Boltt, Noise, BoAt, DaFit, Colmi, and Zeblaze).

It turns ₹2,000–₹3,000 (~$30) budget smartwatches into:

  1. Hands-Free Desktop Gesture Controllers: Navigate vertical video feeds (YouTube Shorts, Instagram Reels, TikTok) and slide presentations using physical wrist snaps.
  2. Educational Satellite GPS Telemetry Beacons: Overcome the smartwatch's lack of onboard GNSS hardware by using a mobile edge bridge to stream real-time satellite coordinates and watch biometrics to a live desktop map HUD.

⚡ What It Does

Wrist Kinematics                  Desktop Action                        Target Application
───────────────────────────────────────────────────────────────────────────────────────────
1 Sharp Wrist Snap   ──>  Scroll Down     [Down Arrow]       YouTube Shorts / Instagram Reels
2 Quick Snaps        ──>  Scroll Up       [Up Arrow]         Previous Video / Slide
3 Rapid Snaps        ──>  Instant Boss Key [Win + D]         Minimizes All Active Windows
  • Zero Mobile Apps: No proprietary background daemons or closed-source telemetry trackers needed.
  • Zero Hardware Sniffers: Sniffed and decoded directly from Android HCI BTSnoop logs using standard Wireshark filters.
  • Driver-Level OS Input: Injects scan codes via Windows user32.keybd_event to bypass browser sandbox limitations.
  • Fast 40ms Rearm: Emits vendor Opcode 0x53 to abort the watch's 1.4-second camera shutter animation, enabling sub-second multi-flick recognition.

🚀 Quickstart (60 Seconds)

1. Installation

Clone the repository and install dependencies in editable mode:

git clone https://github.com/realranjan/OpenWrist.git
cd OpenWrist
pip install -e .

2. Discover Your Smartwatch

Wake your smartwatch display, then run the single-pass discovery scanner:

python run.py scan
======================================================================
   🔍 OPENWRIST - BLE DEVICE DISCOVERY SCANNER
======================================================================
Scanning for 6.0 seconds... Make sure watch screen is awake!

DEVICE NAME                    MAC ADDRESS          RSSI       STATUS
----------------------------------------------------------------------
FireBoltt 184                  AA:BB:CC:DD:EE:FF    -31 dBm    ✅ SMARTWATCH
----------------------------------------------------------------------

3. Verify Hardware Pairing

Send an immediate haptic vibration signal (Opcode 0x61) to test the radio pipe:

python run.py buzz --mac "AA:BB:CC:DD:EE:FF"

4. Launch Hands-Free Mode

# Hands-free YouTube Shorts / TikTok controller:
python run.py run --profile youtube_shorts

# Hands-free Instagram Reels controller:
python run.py run --profile reels

📐 System Architecture

OpenWrist is structured into two modular, independent communication pillars:

                                  ┌────────────────────────┐
                                  │ ⌚ Smartwatch (BLE 5.0)│
                                  │ Realtek RTL8762 / DaFit│
                                  └───────────┬────────────┘
                                              │
                      ┌───────────────────────┴───────────────────────┐
                      ▼                                               ▼
          [Pillar 1: Direct BLE]                           [Pillar 2: Mobile Gateway]
       Desktop Wrist Controller                         Satellite GPS & Telemetry Hub
 ┌────────────────────────────────────┐             ┌────────────────────────────────────┐
 │ • Opcode 0x66 Accelerometer Arming │             │ • Phone Bridge (HTML5 Geolocation) │
 │ • 6.0s Watchdog Keepalive Loop     │             │ • Web Bluetooth (0x180D & 0xFEE1)  │
 │ • Sliding-Window FSM (1.00s window)│             │ • 5-Second Cloud PubSub Relay      │
 │ • Direct Win32 Hardware Keys       │             │ • Interactive Satellite Map HUD    │
 │ • Desktop Dark-Theme Radar GUI     │             │ • Push Text to Watch (Opcode 0x41) │
 └────────────────────────────────────┘             └────────────────────────────────────┘

OpenWrist System Architecture Diagram


🔬 How the Gesture Engine Works

1. Accelerometer Power-Saving & Arming (Opcode 0x66)

Consumer smartwatches have small 200mAh batteries. To avoid draining the cell in hours, firmware disables high-frequency sensor streaming over BLE.

Writing 0x01 with Opcode 0x66 to vendor characteristic 0xFEE2 arms internal G-sensor interrupts. When a sudden wrist snap occurs, the peripheral emits notification packets on 0xFEE3:

Host Write (0xFEE2)    ──>  FE EA 20 06 66 01       (Arm G-sensor interrupts)
Watch Notify (0xFEE3)  <──  FE EA 20 06 66 01       (Wrist flick detected!)

2. The 6.0-Second Watchdog Heartbeat

If the peripheral does not receive a command packet within 6.0 seconds, the firmware automatically drops the gesture mode and sleeps. OpenWrist runs an asynchronous background worker that emits a keepalive heartbeat every 5.5 seconds to sustain continuous streaming.

3. The 1.4-Second Shutter Lock & Fast-Abort Trick (Opcode 0x53)

By default, the watch firmware freezes the display for 1.4 seconds playing a camera shutter animation, ignoring all subsequent wrist snaps.

OpenWrist intercepts incoming flick notifications and immediately writes Opcode 0x53 (CMD_RETURN_HOME) back to 0xFEE2. This cancels the animation in under 40ms, restoring the G-sensor for rapid multi-taps.

4. Sliding-Window Finite-State Machine (FSM)

       [IDLE]
         │ (Wrist Flick #1)
         ▼
      [WINDOW OPEN] ──(Flick #2 within 1.0s)──> [DOUBLE FLICK]
         │                                            │
         │ (Timer expires: 1.0s)                      │ (Flick #3)
         ▼                                            ▼
 [DISPATCH 1 FLICK]                          [INSTANT BOSS KEY!]
   Scroll Down ⏭️                              Minimize Windows (Win+D)
  • Sliding Window (1.00s): When the first flick arrives, a collection timer opens. Subsequent flicks increment the count.
  • Recoil Debounce Gap (0.28s): Physical wrist recoil generates an automatic bounce. Any interrupt within 280ms of the previous flick is rejected as mechanical chatter.
  • Post-Action Lockout (0.40s): After an action fires, interrupts are locked out for 400ms to allow your wrist to return to rest without false triggers.
  • Instant Boss Key: 3 rapid snaps trigger Win + D immediately, bypassing the 1.00s window timer.

📡 Master Opcode Reference

The Realtek RTL8762 chipset communicates over proprietary GATT service 0000feea-0000-1000-8000-00805f9b34fb:

Opcode Pipe Direction Function Payload Structure & Behavior
0x66 (102) FEE2 Out $\to$ Watch Arm Camera/G-Sensor {0x01} arms sensor interrupt. 6s keepalive loop prevents timeout.
0x66 (102) FEE3 In $\gets$ Watch Wrist Flick Event Emitted when 3-axis accelerometer registers a sharp wrist snap.
0x53 (83) FEE2 Out $\to$ Watch Return Home / Fast Abort {} cancels 1.4s camera shutter animation, enabling sub-second multi-flick detection.
0x67 (103) FEE3 In $\gets$ Watch Watch Touch Media Keys Touch events: 0 Play/Pause, 1 Prev, 2 Next, 4 Vol+, 5 Vol-.
0x61 (97) FEE2 Out $\to$ Watch Find Watch / Buzz {} activates the physical watch vibration motor.
0x62 (98) FEE3 In $\gets$ Watch Find Phone Toggle Watch-initiated alert trigger. Incoming {0x00} start, {!=0} stop.
0x52 (82) FEE2 Out $\to$ Watch Calibrate Accelerometer {} zeroes and re-calibrates the 3-axis onboard accelerometer.
0x41 (65) FEE2 Out $\to$ Watch Push Screen Message [type: 1B] + "Title:Body" (UTF-8). Injects dialog onto watch display.
0x44 (68) FEE2 Out $\to$ Watch Now Playing Music Info [0x00] + "Track - Artist". Displays active music metadata on watch.
0x31 (49) FEE2 Out $\to$ Watch Synchronize Time 4-byte big-endian epoch + {0x08} (GMT+8 internal baseline).
0x43 (67) FEE2 Out $\to$ Watch Inject Weather Forecast [0x00, condition, temp_c] + lunar(8B) + city(8B).
0x18 (24) FEE2 Out $\to$ Watch Raise to Wake Toggle {0x01} enable, {0x00} disable.
0x68 (104) FEE2 Out $\to$ Watch Dynamic HR Stream {0x00} starts continuous optical heart-rate sensor streaming.

Tip

Reverse-Engineering Your Own Smartwatch:
Want to reverse-engineer your own watch (BoAt, Noise, Amazfit, Colmi)? Read our step-by-step Universal Reverse-Engineering Cookbook.


🛰️ Educational Satellite GPS & Telemetry Gateway

Budget smartwatches lack onboard GNSS hardware. OpenWrist pairs the watch with an assisted mobile web bridge (phone_bridge.html) to deliver continuous, long-range telemetry tracking:

OpenWrist Satellite Telemetry Architecture Diagram

How the Gateway Operates:

  1. Satellite GNSS Fix: The mobile phone locks onto satellite GPS (navigator.geolocation) with multi-constellation accuracy ($\pm 3\text{m}$).
  2. Watch Biometrics via Web BLE: The phone browser pairs directly with the watch over the Web Bluetooth API, streaming live heart-rate (GATT 0x180D) and step counts (0xFEE1).
  3. Cloud Pub/Sub Relay: The mobile gateway beams unified JSON telemetry packets over 4G/5G every 5 seconds to an HTTP pub/sub relay (ntfy.sh), bypassing the physical 10-meter BLE radio range limit.
  4. Live Desktop HUD: live_map.html plots incoming coordinates on a live satellite map HUD with metric displays and millisecond audit logs.
  5. Bi-Directional Messaging: Typing a message on the desktop pushes text down through the relay to the phone, which writes Opcode 0x41 over BLE to vibrate the watch and display the message on the wearer's wrist.
# Start the telemetry server & open the desktop map HUD:
python run.py telemetry

Note

Educational & Security Research Disclaimer:
This telemetry module was developed strictly as an educational case study in IoT edge-relay architecture and privacy research, demonstrating the ease with which consumer BLE hardware and browser geolocation APIs can be orchestrated into real-time tracking beacons.


🎯 Built-in Gesture Profiles

Profile ID Target Application 1 Flick 2 Flicks 3 Flicks (Instant)
youtube_shorts (Default) YouTube Shorts / TikTok ⏭️ [down] (Next Short) ⏮️ [up] (Prev Short) 🛡️ [win + d] (Boss Key)
reels Instagram Reels Web 👇 [down] (Next Reel) 👆 [up] (Prev Reel) 🛡️ [win + d] (Boss Key)
media Spotify / VLC / Netflix ⏯️ [playpause] ⏭️ [nexttrack] 🔇 [volumemute]
presentation Keynote / PowerPoint ➡️ [right] (Next Slide) ⬅️ [left] (Prev Slide) ⏹️ [b] (Blank Screen)
reading Kindle / PDF Viewer 📄 [pagedown] 📃 [pageup] 🔝 [home]

Switch profiles from the command line:

python run.py run --profile presentation

🛠️ Subsystem Breakdown

Subsystem Technologies & APIs Role & Implementation Details
BLE Hardware Transport Bleak >= 0.21.0, Bluetooth 5.0 GATT, WinRT Asynchronous client handling peripheral discovery, MTU negotiation, keepalive loops, and GATT notifications on vendor pipe 0xFEE3.
Protocol Reverse-Engineering Realtek RTL8762, DaFit V1/V2 framing, Android BTSnoop, Wireshark Proprietary binary opcode disassembler; custom BTSnoop extractor parses HCI pcap packets from Android bugreports without hardware sniffers.
Core Concurrency & Logic Python 3.9+, asyncio, dataclasses, Python unittest Event-driven architecture with sliding-window FSM; 37 unit tests executing in under 15 milliseconds with zero external mock services.
Desktop OS & Automation Win32 API (ctypes.windll.user32.keybd_event), pyautogui >= 0.9.54 Direct hardware scan code injection bypassing browser application sandboxes; cross-platform keyboard fallback for Linux and macOS.
Desktop GUI Dashboard Python tkinter, Canvas Drawing Engine Zero-dependency modern dark-theme dashboard featuring real-time polar gesture radar, countdown ring, device pairing, and calibration sliders.
Web Telemetry & Satellite HUD Web Bluetooth API, HTML5 Geolocation API, Screen Wake Lock API, Leaflet.js Browser-native gateway streaming GNSS fixes ($\pm 3\text{m}$) and optical pulse (GATT 0x180D); embedded Python HTTP server and PubSub relay.

🧪 Testing & Verification

OpenWrist includes a zero-dependency, comprehensive unit test suite covering protocol framing, FSM state transitions, input dispatchers, config management, and snoop log parsing:

python -m unittest discover tests
.....................................
----------------------------------------------------------------------
Ran 37 tests in 0.012s

OK

All 37 unit tests run in milliseconds using standard library unittest with zero network, hardware, or external service dependencies.


📚 Dedicated Documentation Guides

Guide Description Subsystem Link
🎮 Wrist Gesture Controller Guide In-depth manual covering FSM timing, multi-snap debounce, profiles, Win32 hardware key injection, and the fast 0x53 re-arm trick. docs/gesture-control/
🛰️ Satellite GPS & Telemetry Guide Complete guide on the zero-tap mobile bridge, Web Bluetooth heart-rate/steps streaming, live satellite HUD, and bi-directional text push. docs/telemetry-gps/
🔬 Reverse-Engineering Masterclass & Cookbook Exhaustive guide on extracting Android BTSnoop logs without hardware sniffers, Wireshark filters, opcode tables, and a universal cookbook to reverse-engineer your own watch. docs/REVERSE_ENGINEERING.md

💻 CLI Reference

usage: openwrist [-h] {run,scan,sniff,buzz,simulate,snoop-extract,profiles,gui,telemetry,telemetry-send} ...

Subcommands:
  run             Run the background gesture controller daemon
  scan            Scan for nearby BLE smartwatches
  sniff           Sniff raw BLE packets from the watch
  buzz            Vibrate/buzz the smartwatch (Find Watch)
  simulate        Locally simulate a gesture count without BLE hardware
  snoop-extract   Extract BTSnoop pcap from an Android bugreport text file
  profiles        List available gesture profiles and hotkeys
  gui             Launch the graphical desktop interface
  telemetry       Launch live GPS & biometric telemetry receiver & HUD
  telemetry-send  Send a message to smartwatch screen via telemetry relay

📁 Repository Structure

OpenWrist/
├── .github/
│   ├── workflows/ci.yml           # Cross-platform matrix test workflow (Win/macOS/Ubuntu)
│   ├── ISSUE_TEMPLATE/            # Bug report and device request templates
│   └── pull_request_template.md   # PR guidelines
├── docs/
│   ├── assets/                    # Technical architecture & CAD vector diagrams
│   ├── gesture-control/           # Dedicated Gesture Controller guide
│   ├── telemetry-gps/             # Dedicated Satellite Telemetry & HUD guide
│   ├── LAUNCH_KIT.md              # Social media launch kit & Medium deep-dive article
│   └── REVERSE_ENGINEERING.md     # Protocol deconstruction & "How to do yours too"
├── src/
│   └── watchgesture/
│       ├── core/
│       │   ├── client.py          # Asynchronous Bleak BLE client & keepalive worker
│       │   ├── dispatcher.py      # Dual-backend input execution (Win32 & PyAutoGUI)
│       │   ├── engine.py          # Finite-state machine (sliding window, debounce, lockout)
│       │   ├── protocol.py        # V1/V2 packet builders, reassembler & opcode specs
│       │   └── scanner.py         # BLE peripheral discovery and smartwatch matcher
│       ├── gui/
│       │   └── app.py             # Tkinter dark-theme GUI with live gesture radar
│       ├── profiles/
│       │   └── default_profiles.py# Built-in profile mappings
│       ├── telemetry/
│       │   ├── models.py          # Strongly typed telemetry data models
│       │   ├── server.py          # HTTP host and multi-threaded relay stream reader
│       │   └── web/
│       │       ├── live_map.html  # Desktop satellite map HUD & message pusher
│       │       └── phone_bridge.html # Zero-tap mobile GPS & Web Bluetooth gateway
│       ├── utils/
│       │   ├── snoop.py           # Android BTSnoop/BTSnooz bugreport extractor
│       │   └── win32.py           # Driver-level Win32 hardware virtual key injection
│       ├── cli.py                 # Multi-command CLI argument parser
│       └── config.py              # Persistent user configuration management
├── tests/                         # Complete 37-test suite
├── config.example.json            # Public configuration template
├── pyproject.toml                 # PEP 621 packaging standard
└── run.py                         # Unified 1-click launcher

📄 License

This project is open-source under the MIT License.

About

Turn budget smartwatches (Fire-Boltt, DaFit, Realtek) into hands-free desktop air-mice for Reels/Shorts and long-range satellite GPS telemetry trackers.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages