{"id":13766947,"url":"https://github.com/bosmoment/PineTime-apps","last_synced_at":"2025-05-10T22:31:26.646Z","repository":{"id":215976104,"uuid":"229423995","full_name":"bosmoment/PineTime-apps","owner":"bosmoment","description":"Firmware for the PineTime based on RIOT, NimBLE and LittleVGL","archived":true,"fork":false,"pushed_at":"2020-03-09T13:38:41.000Z","size":965,"stargazers_count":79,"open_issues_count":9,"forks_count":32,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-17T02:34:20.777Z","etag":null,"topics":["c","embedded","littlefs","littlevgl","nimble","pinetime","riot","riot-os"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bosmoment.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-21T12:25:42.000Z","updated_at":"2024-06-05T12:47:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"d05ec1c6-71ec-457b-9bef-54444042a830","html_url":"https://github.com/bosmoment/PineTime-apps","commit_stats":null,"previous_names":["bosmoment/pinetime-apps"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bosmoment%2FPineTime-apps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bosmoment%2FPineTime-apps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bosmoment%2FPineTime-apps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bosmoment%2FPineTime-apps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bosmoment","download_url":"https://codeload.github.com/bosmoment/PineTime-apps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492529,"owners_count":21916959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","embedded","littlefs","littlevgl","nimble","pinetime","riot","riot-os"],"created_at":"2024-08-03T16:01:02.848Z","updated_at":"2025-05-10T22:31:25.976Z","avatar_url":"https://github.com/bosmoment.png","language":"C","funding_links":[],"categories":["Projects by Operating System"],"sub_categories":["RIOT"],"readme":"[![Build Status](https://api.cirrus-ci.com/github/bosmoment/PineTime-apps.svg)](https://cirrus-ci.com/github/bosmoment/PineTime-apps)\n\n# Bosmoment-style Pinetime firmware applications\n\nFriendly firmware applications for the Pinetime!\n\nThis repository contains a number of applications and helper modules specific\nfor the [PineTime] open source smartwatch. \n\nHighlights:\n\n- Built on top of [RIOT], an open source embedded operating system\n- Apache [NimBLE] as an open-source bluetooth 5.0 stack.\n- [LittlevGL] for the user interface.\n\n### Pre-build Binaries\n\nFresh binaries from the CI:\n\n- [PineTime.elf](https://api.cirrus-ci.com/v1/artifact/github/bosmoment/PineTime-apps/build/binaries/PineTime.elf)\n- [PineTime.bin](https://api.cirrus-ci.com/v1/artifact/github/bosmoment/PineTime-apps/build/binaries/PineTime.bin)\n\n## Features\n\n- *Bluetooth LE*: provided by Nimble\n- *Bluetooth pairing support*\n- *Time synchronisation*: Bluetooth GATT Current Time Service client\n- *Time keeping*: nRF52832 RTC for ticks per second time/date updates\n- *Graphical user interface*: via LittleVGL.\n- *Touch screen driver*: a cst816s touch screen driver with gesture support is included in the RIOT fork\n\nAnd the default watch face screen includes:\n- *Time/date*: Both time and date are shown on the main watch face with the\n               time taking up the majority of the space.\n- *Battery status*: Battery status is available on the main screen\n- *Bluetooth status*: Bluetooth connection and advertisement mode is shown on\n                      the screen\n\nMultiple watch faces are supported with smooth scrolling between the different\nfaces. For now two dummy watch faces, one for notifications and one for\nactivity, are included as proof of concept.\n\n## Structure\n\nThe project is separated into a number of directories:\n\n- *RIOT*: The RIOT submodule used for compilation\n- *apps*: Contains firmware applications for the PineTime.\n- *modules*: Additional modules written to support the firmware applications\n- *widgets*: A collection of small user applications or watch faces for the end\n  user of the PineTime, for example: a stopwatch widget; a configuration\n  widget; a heartbeat graph widget, a notification watch face.\n\n## Getting started\n\n### Repository setup\n\nWhen checking out this repository, don't forget to initialize the RIOT submodule\ncontained within this repository with:\n\n```Shellsession\ngit submodule init\ngit submodule update\n```\n\n### Building applications\n\nApplications are contained in the `apps` dir with a single application per\ndirectory. The `pinetime` application should give you a good starting point.\n\nUse `make all` in the application directory to build the firmware, `make flash`\nto flash it on the target and `make term` to get a serial connection to the\ndevice. \n\n### Development\n\nAs the project is based on RIOT, it helps to get familiar with RIOT and check\nwhich functionality is provided by the OS.\nThere is a [quick start] guide available for RIOT to get familiar with RIOT's\nbuild system and to validate your toolchain functionality. Doxygen-based API\ndocumentation is also available there.\n\nCurrently the Segger J-Link tools are used for flashing the application. It is\npossible to use a different programmer by overriding the settings in the\n`Makefile.include` for the `pinetime` board in the RIOT tree. \n\n## Bluetooth LE\n\nCurrently the firmware is always advertising if no connection is active. As\nsoon as a host connects to the PineTime, the advertising is stopped and\ncontinues when the host disconnects.\n\nBonding is available and useable, but the bonds are not persistent between\nreboots. (see Planned features).\n\nA custom UUID is included in the advertisement to recognise the device by:\n```\n9851dc0a-b04a-1399-5646-3b38788cb1c5\n```\n\nThis UUID can be used for Bluetooth LE filters in Android and such. The device\nname itself can be customized to your liking and is not used for identifying the\ndevice.\n\n### Companion phone app\n\nA fork of [GadgetBridge] is available with support for this firmware. The fork\nuses the custom UUID specified above to filter and identify the device.\n\nThe GadgetBridge app should pick up the device when scanning and allow pairing\nwith the device. As long as the PineTime remembers the bond, the app and the\nPinetime should be able to restore the secure connection.\n\nThe GadgetBridge fork is configured to only allow encrypted reads to the current\ntime characteristic. The PineTime firmware automatically requests pairing when \nit receives an insufficient encryption error back from the app when requesting\nthe time.\n\n## Tips\n\n- STDIO is implemented via the Segger RTT protocol. It is non-blocking by\n  default, blocking mode can be enabled by adding\n  `STDIO_RTT_ENABLE_BLOCKING_STDOUT` to the CFLAGS. **Note**: the firmware will\n  block (hang) on STDIO if no RTT client is attached.\n\n- The directory where a RIOT tree is expected can be overridden by setting the\n  `RIOTBASE` variable in the application makefile or from the command line.\n\n- A fork of the Android [GadgetBridge] application is available with basic\n  support for this RIOT PineTime application.\n\n- By default the watchdog timer is running with a 5 second timeout. Every second\n  the controller will kick the watchdog timer to reset the timeout, unless the\n  button is pressed. A long press of the button will effectively cause a\n  watchdog timer reset of the system.\n\n## Planned features\n\n- Device side Bluetooth key code confirmation (Only the host verifies the\n  pairing code at the moment, the firmware always confirms the code as valid)\n- Persistent Bluetooth bonds\n- Secure over the air updates\n\n[PineTIme]: https://www.pine64.org/pinetime/\n[RIOT]: https://github.com/RIOT-os/RIOT/\n[NimBLE]: https://github.com/apache/mynewt-nimble\n[LittleVGL]: https://github.com/littlevgl/lvgl\n[quick start]: https://doc.riot-os.org/index.html#the-quickest-start\n[GadgetBridge]: https://codeberg.org/bergzand/Gadgetbridge/src/branch/riotwatch/initial\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbosmoment%2FPineTime-apps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbosmoment%2FPineTime-apps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbosmoment%2FPineTime-apps/lists"}