{"id":38441919,"url":"https://github.com/davidgiven/telinkdebugger","last_synced_at":"2026-01-17T04:35:41.704Z","repository":{"id":240573651,"uuid":"802995083","full_name":"davidgiven/telinkdebugger","owner":"davidgiven","description":"A Raspberry Pi Pico-based debugger bridge for the Telink SWS debug protocol.","archived":false,"fork":false,"pushed_at":"2025-04-09T17:38:41.000Z","size":54,"stargazers_count":25,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T18:43:58.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidgiven.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":"2024-05-19T20:18:14.000Z","updated_at":"2025-04-09T17:36:36.000Z","dependencies_parsed_at":"2024-05-21T00:35:01.497Z","dependency_job_id":"b66692ba-12d7-4731-9f0e-38e9d8f383c9","html_url":"https://github.com/davidgiven/telinkdebugger","commit_stats":null,"previous_names":["davidgiven/telinkdebugger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidgiven/telinkdebugger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgiven%2Ftelinkdebugger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgiven%2Ftelinkdebugger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgiven%2Ftelinkdebugger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgiven%2Ftelinkdebugger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidgiven","download_url":"https://codeload.github.com/davidgiven/telinkdebugger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgiven%2Ftelinkdebugger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28495234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-17T04:35:41.611Z","updated_at":"2026-01-17T04:35:41.684Z","avatar_url":"https://github.com/davidgiven.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telink USB debugger bridge\n\n## What?\n\nThis is a poorly written and hacked together Raspberry Pi Pico-based debugger\nbridge for the Telink SWS protocol. It will allow flashing of Telink-based\ndevices via USB, so far only tested on the incredibly cheap LT716 fitness bands\nusing the Telink TLSR8232 chip.\n\nIt was put together from information pulled from these sources:\n\n- [Reverse engineering the M6 smart fitness\n  bracelet](https://rbaron.net/blog/2021/07/06/Reverse-engineering-the-M6-smart-fitness-band.html)\n  by rbaron\n- [TlsrTools](https://github.com/pvvx/TlsrTools) by pvvx@github\n\nIt would theoretically be possible to extend this into a full machine-code\ndebugger, but the relevant part of the TLSR8232 register map isn't documented\nand it would require reverse engineering and I just don't have the energy.\nPlease get in touch if you're interested.\n\n## How?\n\nYou can either get a precompiled binary from [the Github releases\npage](https://github.com/davidgiven/telinkdebugger/releases/tag/dev) or build it\nyourself. It's a standard Raspberry Pi Pico project, so you should just be able\nto run the cmakefile and it'll build. Flash a normal Pico with the resulting\nfile (no wireless necessary).\n\nThen, connect the Pico to your Telink device as follows:\n\n- Telink RX -\u003e Pico pin 1 (GPIO0)\n- Telink TX -\u003e Pico pin 2 (GPIO1)\n- Telink SWS -\u003e Pico pin 4 (GPIO2)\n- Telink RST -\u003e Pico pin 5 (GPIO3)\n\nNo extra components are needed. Just wire it up directly.\n\nWhen the Pico starts up, it'll put the Telink device into reset and expose two\nCDC serial ports via USB. The first is the control port which is used to\ncommunicate with the debugger. The second is a standard USB UART interface and\nis connected to the TX and RX pins.\n\nThere is a Python script provided for communicating with the debugger:\n\n```\n$ ./client.py --serial-port=/dev/ttyACM1 get_soc_id\nSOC ID: 0x5316\n```\n\nThe serial port provided should be that of the control port.\n\nUseful commands include:\n\n- `writeb \u003caddress\u003e \u003cvalue\u003e` --- writes a single byte to RAM\n- `dump_ram \u003caddress\u003e [\u003clength\u003e]` --- produces a hex dump of RAM at a given\naddress. (Note that RAM addresses are always 16-bit. You can't read flash with\nthis.)\n- `read_ram \u003cfilename\u003e [\u003caddress\u003e] [\u003clength\u003e]` --- reads a portion of or all\nRAM.\n- `read_flash \u003cfilename\u003e [\u003caddress\u003e] [\u003clength\u003e]` --- reads a portion of or all\nthe flash. This is very slow.\n- `write_flash \u003cfilename\u003e [\u003caddress\u003e] [\u003clength\u003e]` --- erases and then writes to\nthe flash. Only the pages needed are erased. Note that the radio calibration\nvalues are set in the factory and stored in flash at 0x77000. If you are ever\ngoing to want to use Bluetooth, don't overwrite this.\n- `run` --- takes the device out of reset.\n\nThere are others. They may or may not work.\n\nIn addition, the control protocol is faintly intended to be human readable ---\nconnect to it and type a `?` and you'll get a very brief list of commands.\n\n## Why not?\n\nThis has only been tested on a TLSR8232 and there will inevitably be problems on\nother devices. On the other hand, this will make finding bugs very easy!\n\n## Who?\n\nAll the code here has been bodged together from multiple sources, but the main\nauthor of the main bit of code is me, David Given \u003cdg@cowlark.com\u003e. I have a\nwebsite at http://cowlark.com. There may or may not be anything interesting\nthere.\n\n## License\n\nEverything here is, as far as I know, either public domain or redistributable\nunder the terms of the MIT license. See the [LICENSE.md](LICENSE.md) file for\nthe full text. For more information about the authors look at the header of each\nfile.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidgiven%2Ftelinkdebugger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidgiven%2Ftelinkdebugger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidgiven%2Ftelinkdebugger/lists"}