{"id":13767025,"url":"https://github.com/albsod/pinetime-hypnos","last_synced_at":"2025-05-10T22:31:29.098Z","repository":{"id":77615316,"uuid":"252703534","full_name":"albsod/pinetime-hypnos","owner":"albsod","description":"Zephyr firmware for the nRF52832 PineTime smartwatch","archived":false,"fork":false,"pushed_at":"2022-12-27T15:35:26.000Z","size":43219,"stargazers_count":75,"open_issues_count":10,"forks_count":20,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-10T15:56:24.376Z","etag":null,"topics":["firmware","pinetime","zephyr"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/albsod.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":"2020-04-03T10:42:12.000Z","updated_at":"2024-12-28T20:03:35.000Z","dependencies_parsed_at":"2023-07-16T17:45:33.497Z","dependency_job_id":null,"html_url":"https://github.com/albsod/pinetime-hypnos","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albsod%2Fpinetime-hypnos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albsod%2Fpinetime-hypnos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albsod%2Fpinetime-hypnos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albsod%2Fpinetime-hypnos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/albsod","download_url":"https://codeload.github.com/albsod/pinetime-hypnos/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":["firmware","pinetime","zephyr"],"created_at":"2024-08-03T16:01:03.686Z","updated_at":"2025-05-10T22:31:28.420Z","avatar_url":"https://github.com/albsod.png","language":"C","funding_links":[],"categories":["Projects by Operating System"],"sub_categories":["Zephyr"],"readme":"# Hypnos\n\nThis is a [Zephyr](https://www.zephyrproject.org/)-based firmware for the\n[PineTime](https://www.pine64.org/pinetime/) and P8 smartwatches.\n\n\u003cimg src=\"app/hypnos/watch_photo.jpg\" title=\"Hypnos watch (CC BY-SA 4.0)\"\u003e\n\n\u003e **Hypnos**, son of Night and Darkness\u003c/br\u003e\n\u003e He is said to be a calm and gentle god, as he helps humans in need and, due to their sleep, owns\n\u003e half of their lives.\u003csup\u003e[1](https://en.wikipedia.org/wiki/Hypnos)\u003c/sup\u003e\n\n## Features and roadmap\n\n- [x] 100 % Free Software\n- [x] Battery life: about one week\n- [x] Battery status: get state of charge and whether it's charging\n- [x] Clock: accurately increment current time\n- [x] Time and date synchronization with Bluetooth-connected device\n- [x] Touch sensor: tap to light up the display, swipe to display version information\n- [x] LVGL graphics: show time, date, battery and Bluetooth status\n- [x] Support for the PineTime bootloader\n- [x] Over-the-air firmware updates (SMP over BLE)\n- [x] Optional debug output via JLink RTT\n- [ ] Show notifications from Bluetooth-connected device\n- [ ] Set alarm\n- [ ] Wrist vibration\n- [ ] Quick glance via lift-to-wake\n\n## Developer getting started guide\n\nThis document assumes that you run a GNU/Linux or Mac operating system.\n\n### Set up the development environment\n\nFollow Zephyr's [Getting Started\nGuide](https://docs.zephyrproject.org/latest/getting_started/index.html) up to\nstep 3.2 \"Get the Zephyr source code\". Here you should run the commands below\ninstead of the ones in the guide:\n\n```\n$ git clone https://github.com/endian-albin/pinetime-hypnos\n$ cd pinetime-hypnos\n$ west init -l app/\n$ west update\n```\n\nThen complete the remaining steps under section 3 and 4. Finally, run `make\ntools`.\n\n### Build and flash Hypnos\n\nRun `make` to build everything with the defaults or `make help` to view all the\noptions and targets.\n\nThen connect your in-circuit programmer and run `make flash`. To install\nwithout a programmer, see Firmware updates below.\n\n### Build and flash the bootloader\n\nTo install or upgrade the bootloader, follow Lup Yuen's [build\ninstructions](https://lupyuen.github.io/pinetime-rust-mynewt/articles/mcuboot#build-and-flash-mcuboot-bootloader)\nor [fetch the prebuilt\nbinary](https://github.com/lupyuen/pinetime-rust-mynewt/releases/tag/v5.0.4).\n\nThen flash it to the beginning of the internal memory:\n```\npyocd flash -e sector -t nrf52 bootloader-image.bin\n```\n\n## Firmware updates\n\n### SMP over Bluetooth LE\n\nHypnos supports firmware image management over the Simple Management Protocol.\n\nTo make use of this feature, get the\n[mcumgr](https://github.com/apache/mynewt-mcumgr#command-line-tool) command-line\ntool. Then run the commands below to list, upload, test and confirm firmware\nimages over BLE:\n\n```\n# mcumgr --conntype=\"ble\" --connstring ctlr_name=hci0,peer_name='Hypnos' image list\n# mcumgr --conntype=\"ble\" --connstring ctlr_name=hci0,peer_name='Hypnos' image upload hypnos-mcuboot-app-img.bin\n# mcumgr --conntype=\"ble\" --connstring ctlr_name=hci0,peer_name='Hypnos' image test \u003chash of slot-1 image\u003e\n# mcumgr --conntype=\"ble\" --connstring ctlr_name=hci0,peer_name='Hypnos' reset\n# mcumgr --conntype=\"ble\" --connstring ctlr_name=hci0,peer_name='Hypnos' image confirm\n```\n\nIf you are unhappy with the new image, simply run the `reset` command again\ninstead of `image confirm` to revert to the old one. If the image has already\nbeen confirmed but you still want to revert, simply run the commands above but\nskip the upload step or perform a manual rollback (see below). [See this\ndocument for more\ninformation](https://docs.zephyrproject.org/latest/samples/subsys/mgmt/mcumgr/smp_svr/README.html).\n\n### DFU over Bluetooth LE\n\nTo install Hypnos over the air from\n[InfiniTime](https://github.com/JF002/Pinetime), run `make dfu` to create a\n(Nordic) DFU package and upload it using\n[ota-dfu.py](https://github.com/JF002/Pinetime/tree/master/bootloader/ota-dfu-python)\nor nRF Connect.\n\n### Manual rollback\n\nVersion 5 of Lup Yuen's bootloader allows you to revert to the old firmware\nimage by holding the button during boot.\n\n## Copying\n\nThis software may be used under the terms of the Apache License 2.0, unless\nexplicitly stated otherwise.\n\nThe documentation contained in this README and on the wiki are under the CC\nBY-SA 4.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbsod%2Fpinetime-hypnos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbsod%2Fpinetime-hypnos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbsod%2Fpinetime-hypnos/lists"}