Skip to content

BattleTime

BattleTime is a firmware for the PineTime smartwatch, written in Rust.

It aims to combine the best parts of the two existing PineTime firmwares:

  • from InfiniTime: a polished UI, long battery life, speed, and wide companion app support through standard BLE services;
  • from wasp-os: apps that are easy to write and install over Bluetooth without reflashing, a desktop simulator, and a live console for development.

Goals

  • Apps in Preact, no Rust needed. Apps and watch faces are written as Preact components in TypeScript, with Signals for state, and previewed in a browser. The compiler turns them into compact bytecode for the watch, so writing an app takes web skills, not Rust or embedded knowledge.
  • Loadable apps. Apps and watch faces install over BLE, with no reflash.
  • Apps built from shared parts. Widgets, functions, images and fonts that apps have in common live in the firmware and its shared library, and apps assemble them, so each app is small, easy to write and light on RAM, the scarcest resource on the watch.
  • Pure Rust. The whole firmware is Rust, including the Bluetooth stack: the TrouBLE host on BattleTime's own radio controller, built on Embassy.
  • Safe updates. A bad firmware image rolls back by itself.
  • Battery life. The watch sleeps whenever it can.
  • Companion apps. It works with Gadgetbridge and the other apps InfiniTime supports, and has a companion app of its own.

Status

Early work. The drivers, the bootloader, a firmware with a watch face, a launcher and apps, and the reloader all run on a PineTime. On 2026-10-11 the reloader moved a watch from wasp-os onto BattleTime, and firmware updates over Bluetooth and the button-hold recovery have worked on it since. Moving a watch from InfiniTime has run only in the emulator.

This repository

  • battletime/ is the watch: the firmware, bootloader, apps, faces, simulator and their tests. Run its commands from inside it.
  • companion/ is the BattleTime Companion, the phone and desktop app that installs apps, updates the firmware and forwards notifications. See its README.
  • docs/ is the documentation for both, also published as the website.
  • tools/ builds the watch images, packages firmware updates and measures memory use. tools/appbuilder/ is the App Builder, a VS Code extension that builds apps from a palette of widgets, events and effects with the simulated watch beside the code.

nix develop gives the watch's toolchain and nix develop .#companion the companion's; both work from anywhere in the repository.

To try the firmware without a watch, run it in PineTimeEmulator, as testing.md describes.

Documentation

The docs are also on the website, https://beatlink.github.io/BattleTime/, in four parts.

Using the watch — start at the guide.

The companion app — start at the companion guide: connecting a watch, installing apps, phone features, watch data, firmware updates and the command line.

Writing apps — start at writing apps, then the app reference, testing apps, companion plugins and the app store.

How it is built — start at the architecture, which leads to the drivers, services, firmware, bootloader, Bluetooth, storage and memory map pages. Open work is in to do.

Credits

BattleTime stands on the work of these projects and the people behind them.

The watch firmwares it grew from

  • InfiniTime: the user interface, watch faces, apps, Bluetooth services and icon artwork BattleTime follows.
  • wasp-os: loadable apps, the desktop simulator, and its apps and faces.
  • PinetimeLite: its watch faces.
  • ZephyrLabs' Watchfaces, by ZephyrLabs and jlukanc1: the faces from its collection.

What the watch is built on

The companion, tools and website

License

BattleTime is free software under the GNU General Public License, version 3 or (at your option) any later version. The full text is in LICENSE.