All Projects → bosmoment → Pinetime Apps

bosmoment / Pinetime Apps

Licence: lgpl-2.1
Firmware for the PineTime based on RIOT, NimBLE and LittleVGL

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Pinetime Apps

Wasmjit
Small Embeddable WebAssembly Runtime
Stars: ✭ 1,063 (+1463.24%)
Mutual labels:  embedded
Spiffs
Wear-leveled SPI flash file system for embedded devices
Stars: ✭ 1,105 (+1525%)
Mutual labels:  embedded
Stm32l4xx Hal
A Hardware abstraction layer for the stm32l432xx series chips written in rust.
Stars: ✭ 65 (-4.41%)
Mutual labels:  embedded
Luos
Luos technology main lib
Stars: ✭ 55 (-19.12%)
Mutual labels:  embedded
Couchbase Lite C
C language bindings for the Couchbase Lite embedded NoSQL database engine
Stars: ✭ 58 (-14.71%)
Mutual labels:  embedded
Expr
Fast and lightweight math expression evaluator in C99
Stars: ✭ 61 (-10.29%)
Mutual labels:  embedded
Octoslack
OctoPrint plugin for Slack, Mattermost, Pushbullet, Pushover, Rocket.Chat, Discord, Riot/Matrix, & Microsoft Teams
Stars: ✭ 50 (-26.47%)
Mutual labels:  riot
Blinker Library
An IoT Solution,Blinker library for embedded hardware. Works with Arduino, ESP8266, ESP32.
Stars: ✭ 1,095 (+1510.29%)
Mutual labels:  embedded
Gobusybox
Tools for compiling many Go commands into one binary to save space. Builds are supported in vendor-based Go, module-based Go, and bazel with Starlark.
Stars: ✭ 60 (-11.76%)
Mutual labels:  embedded
Incubator Nuttx Apps
Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS
Stars: ✭ 65 (-4.41%)
Mutual labels:  embedded
Gdbstub
A simple, dependency-free GDB stub that can be easily dropped in to your project.
Stars: ✭ 56 (-17.65%)
Mutual labels:  embedded
Reed Solomon
Reed Solomon BCH encoder and decoder
Stars: ✭ 57 (-16.18%)
Mutual labels:  embedded
Claudb
ClauDB is a REDIS implementation in Java
Stars: ✭ 64 (-5.88%)
Mutual labels:  embedded
Mylinux
myLinux is a small UNIX like OS for embedded systems based on Westermo NetBox
Stars: ✭ 53 (-22.06%)
Mutual labels:  embedded
Pocket Tensor
Run Keras models from a C++ application on embedded devices
Stars: ✭ 65 (-4.41%)
Mutual labels:  embedded
Webfsd
A simple HTTP server for mostly static content written in C
Stars: ✭ 50 (-26.47%)
Mutual labels:  embedded
Awesome Embedded Linux
A curated list of awesome Embedded Linux resources.
Stars: ✭ 60 (-11.76%)
Mutual labels:  embedded
Lwmqtt
a light weight MQTT implementation
Stars: ✭ 67 (-1.47%)
Mutual labels:  embedded
Go Hardware
A directory of hardware related libs, tools, and tutorials for Go
Stars: ✭ 1,137 (+1572.06%)
Mutual labels:  embedded
Simavr
simavr is a lean, mean and hackable AVR simulator for linux & OSX
Stars: ✭ 1,135 (+1569.12%)
Mutual labels:  embedded

Build Status

Bosmoment-style Pinetime firmware applications

Friendly firmware applications for the Pinetime!

This repository contains a number of applications and helper modules specific for the PineTime open source smartwatch.

Highlights:

  • Built on top of RIOT, an open source embedded operating system
  • Apache NimBLE as an open-source bluetooth 5.0 stack.
  • LittlevGL for the user interface.

Pre-build Binaries

Fresh binaries from the CI:

Features

  • Bluetooth LE: provided by Nimble
  • Bluetooth pairing support
  • Time synchronisation: Bluetooth GATT Current Time Service client
  • Time keeping: nRF52832 RTC for ticks per second time/date updates
  • Graphical user interface: via LittleVGL.
  • Touch screen driver: a cst816s touch screen driver with gesture support is included in the RIOT fork

And the default watch face screen includes:

  • Time/date: Both time and date are shown on the main watch face with the time taking up the majority of the space.
  • Battery status: Battery status is available on the main screen
  • Bluetooth status: Bluetooth connection and advertisement mode is shown on the screen

Multiple watch faces are supported with smooth scrolling between the different faces. For now two dummy watch faces, one for notifications and one for activity, are included as proof of concept.

Structure

The project is separated into a number of directories:

  • RIOT: The RIOT submodule used for compilation
  • apps: Contains firmware applications for the PineTime.
  • modules: Additional modules written to support the firmware applications
  • widgets: A collection of small user applications or watch faces for the end user of the PineTime, for example: a stopwatch widget; a configuration widget; a heartbeat graph widget, a notification watch face.

Getting started

Repository setup

When checking out this repository, don't forget to initialize the RIOT submodule contained within this repository with:

git submodule init
git submodule update

Building applications

Applications are contained in the apps dir with a single application per directory. The pinetime application should give you a good starting point.

Use make all in the application directory to build the firmware, make flash to flash it on the target and make term to get a serial connection to the device.

Development

As the project is based on RIOT, it helps to get familiar with RIOT and check which functionality is provided by the OS. There is a quick start guide available for RIOT to get familiar with RIOT's build system and to validate your toolchain functionality. Doxygen-based API documentation is also available there.

Currently the Segger J-Link tools are used for flashing the application. It is possible to use a different programmer by overriding the settings in the Makefile.include for the pinetime board in the RIOT tree.

Bluetooth LE

Currently the firmware is always advertising if no connection is active. As soon as a host connects to the PineTime, the advertising is stopped and continues when the host disconnects.

Bonding is available and useable, but the bonds are not persistent between reboots. (see Planned features).

A custom UUID is included in the advertisement to recognise the device by:

9851dc0a-b04a-1399-5646-3b38788cb1c5

This UUID can be used for Bluetooth LE filters in Android and such. The device name itself can be customized to your liking and is not used for identifying the device.

Companion phone app

A fork of GadgetBridge is available with support for this firmware. The fork uses the custom UUID specified above to filter and identify the device.

The GadgetBridge app should pick up the device when scanning and allow pairing with the device. As long as the PineTime remembers the bond, the app and the Pinetime should be able to restore the secure connection.

The GadgetBridge fork is configured to only allow encrypted reads to the current time characteristic. The PineTime firmware automatically requests pairing when it receives an insufficient encryption error back from the app when requesting the time.

Tips

  • STDIO is implemented via the Segger RTT protocol. It is non-blocking by default, blocking mode can be enabled by adding STDIO_RTT_ENABLE_BLOCKING_STDOUT to the CFLAGS. Note: the firmware will block (hang) on STDIO if no RTT client is attached.

  • The directory where a RIOT tree is expected can be overridden by setting the RIOTBASE variable in the application makefile or from the command line.

  • A fork of the Android GadgetBridge application is available with basic support for this RIOT PineTime application.

  • By default the watchdog timer is running with a 5 second timeout. Every second the controller will kick the watchdog timer to reset the timeout, unless the button is pressed. A long press of the button will effectively cause a watchdog timer reset of the system.

Planned features

  • Device side Bluetooth key code confirmation (Only the host verifies the pairing code at the moment, the firmware always confirms the code as valid)
  • Persistent Bluetooth bonds
  • Secure over the air updates
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].