Hypnos

A Zephyr-based firmware for the PineTime and P8 smartwatches. It provides a complete open-source operating environment featuring BLE time synchronization, LVGL-powered graphics, and over-the-air firmware updates via MCUBoot.

Hypnos

Overview

Hypnos is a specialized open-source firmware designed for the PineTime and P8 smartwatches, built upon the Zephyr Real-Time Operating System. Named after the Greek god of sleep, Hypnos aims to provide a calm and gentle user experience while maintaining high efficiency and a robust feature set. It serves as a comprehensive alternative to factory firmware, offering users full control over their wearable hardware through 100% free software.

Key Features and Capabilities

The project focuses on delivering essential smartwatch functionality with a strong emphasis on battery longevity and reliability. Currently, Hypnos achieves approximately one week of battery life on a single charge.

Core features include:

  • Time and Date Management: Accurate clock incrementing with synchronization capabilities via Bluetooth-connected devices.
  • User Interface: A touch-responsive interface powered by the LVGL (Light and Versatile Graphics Library), displaying time, date, battery status, and Bluetooth connectivity.
  • Power Management: Real-time battery status monitoring, including state of charge and charging indicators.
  • Interaction: Tap-to-wake functionality and swipe gestures to access system information.

Technical Architecture

Hypnos leverages the Zephyr RTOS ecosystem to handle hardware abstraction and multi-tasking. This choice allows the project to benefit from Zephyr’s extensive driver support for the Nordic Semiconductor nRF52 series SoC found in the PineTime.

The graphics stack utilizes LVGL to render a clean, readable interface on the watch’s small form factor display. For firmware management, Hypnos integrates deeply with MCUBoot, enabling secure bootloading and robust update mechanisms.

Firmware Management and OTA Updates

One of the standout technical aspects of Hypnos is its support for modern firmware update protocols. It implements the Simple Management Protocol (SMP) over Bluetooth LE, allowing developers and users to manage firmware images wirelessly. Using the mcumgr command-line tool, users can list, upload, test, and confirm new firmware images without needing a physical debug probe.

Additionally, Hypnos supports Device Firmware Upgrade (DFU) packages compatible with InfiniTime and nRF Connect, making it accessible for users transitioning from other firmware projects. A manual rollback feature is also available, allowing users to revert to previous firmware versions by holding the physical button during the boot sequence.

Development Environment

Developing for Hypnos follows the standard Zephyr workflow using the west meta-tool. The project includes a comprehensive Makefile to simplify common tasks such as building the application, generating MCUBoot-compatible images, and creating DFU packages.

For debugging, Hypnos provides optional output via JLink RTT, which is essential for real-time monitoring without requiring a dedicated serial port. The project is designed to be built for multiple targets, primarily the PineTime and the P8 smartwatch, with configuration handled through Zephyr’s Kconfig system.