{"id":19525512,"url":"https://github.com/onekeyhq/bluetooth-firmware-touch","last_synced_at":"2025-04-26T10:30:48.764Z","repository":{"id":103044310,"uuid":"562757452","full_name":"OneKeyHQ/bluetooth-firmware-touch","owner":"OneKeyHQ","description":"BLE firmware used by OneKey hardware devices.","archived":false,"fork":false,"pushed_at":"2025-03-10T08:31:14.000Z","size":48771,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T11:23:35.280Z","etag":null,"topics":["embedded-software"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OneKeyHQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-11-07T07:38:55.000Z","updated_at":"2025-02-28T07:39:38.000Z","dependencies_parsed_at":"2024-08-09T08:29:53.729Z","dependency_job_id":"5ef0080d-5a72-40c6-b499-cfcbea974d21","html_url":"https://github.com/OneKeyHQ/bluetooth-firmware-touch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneKeyHQ%2Fbluetooth-firmware-touch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneKeyHQ%2Fbluetooth-firmware-touch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneKeyHQ%2Fbluetooth-firmware-touch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneKeyHQ%2Fbluetooth-firmware-touch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OneKeyHQ","download_url":"https://codeload.github.com/OneKeyHQ/bluetooth-firmware-touch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250972510,"owners_count":21516372,"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":["embedded-software"],"created_at":"2024-11-11T01:05:16.520Z","updated_at":"2025-04-26T10:30:43.748Z","avatar_url":"https://github.com/OneKeyHQ.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OneKey Touch Bluetooth Firmware\n\nThis repo contains bluetooth firmware for OneKey Touch\n\nThe firmware is based on NRF5 SDK 16.0.0, and build with Makefile\n\n## How to build\n\n```shell\n# make sure you have cmake, Python 3, amd aarm-none-eabi toolchain available in PATH\n\n# export your OWN key for firmware signing\nexport BT_SIG_PK=$(cat \u003c\u003cEOF\n-----BEGIN EC PRIVATE KEY-----\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n-----END EC PRIVATE KEY-----\nEOF\n)\n\n# build binaries first\n./make_binaries.sh\n\n# then convert binaries to images with signature\n./make_images.sh\n```\n\n## How to verify firmware hash\n\nInstall Python 3.x\n\nDownload latest `ota.bin`, open a terminal in the same folder, invoke python, then run following code\n\n```python\nimport struct, hashlib\n\nwith open(\"ota.bin\", mode=\"br\") as f:\n    f.seek(0x0C)\n    codelen = struct.unpack(\"i\", f.read(4))[0] - 512\n    f.seek(0x600)\n    print(\"\".join(format(x, \"02x\") for x in hashlib.sha256(f.read(codelen)).digest()))\n```\n\nSingle line version\n\n```python\nexec(\"\"\"\\nimport struct, hashlib\\nwith open(\"ota.bin\", mode=\"br\") as f:\\n    f.seek(0x0C)\\n    codelen = struct.unpack(\"i\", f.read(4))[0] - 512\\n    f.seek(0x600)\\n    print(\"\".join(format(x, \"02x\") for x in hashlib.sha256(f.read(codelen)).digest()))\\n\"\"\")\n```\n\n## License\n\nPlease check License.md for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonekeyhq%2Fbluetooth-firmware-touch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonekeyhq%2Fbluetooth-firmware-touch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonekeyhq%2Fbluetooth-firmware-touch/lists"}