{"id":28451632,"url":"https://github.com/kcxt/pts-pico-firmware","last_synced_at":"2026-06-11T05:31:17.548Z","repository":{"id":189743261,"uuid":"672406622","full_name":"kcxt/pts-pico-firmware","owner":"kcxt","description":"Fork of https://git.sr.ht/~martijnbraam/pts-pico-firmware with some additional fixes to be upstreamed.","archived":false,"fork":false,"pushed_at":"2023-08-22T22:08:05.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"qcom-fixes","last_synced_at":"2025-10-05T01:31:16.241Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kcxt.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":"2023-07-30T01:18:26.000Z","updated_at":"2024-03-03T14:21:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a8aaa6e-66a0-4c6c-a596-14544faacbf1","html_url":"https://github.com/kcxt/pts-pico-firmware","commit_stats":null,"previous_names":["calebccff/pts-pico-firmware","kcxt/pts-pico-firmware"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kcxt/pts-pico-firmware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcxt%2Fpts-pico-firmware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcxt%2Fpts-pico-firmware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcxt%2Fpts-pico-firmware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcxt%2Fpts-pico-firmware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kcxt","download_url":"https://codeload.github.com/kcxt/pts-pico-firmware/tar.gz/refs/heads/qcom-fixes","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcxt%2Fpts-pico-firmware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34184779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-06-06T16:11:33.984Z","updated_at":"2026-06-11T05:31:17.521Z","avatar_url":"https://github.com/kcxt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pmostest pico\n\nThis is the firmware for the Raspberry Pi Pico that is providing the\ninterface between the control computer and the phone under test.\n\nThe task of the Pico device is to automate pressing the buttons on the device\nand act like an USB to UART adapter for the serial debug port. The Pico\nalso has the ability to switch off the power to the phone by interrupting\nthe power lines in the USB connection.\n\n![Block diagram](https://brixitcdn.net/metainfo/picotest-diagram.png)\n\nThe Pico firmware uses tinyusb to create two USB ACM devices that will show up\nas two USB serial devices on the host machine. The first port is used to\nsend commands to the firmware to control buttons and power. The second port\nis passed through to hardware UART lines hooked up to test points in the phone.\n\n## Control protocol\n\nThe firmware has a very simple control protocol, based on the protocol that\nis used by [CDBA](https://github.com/andersson/cdba). The protocol works by\nsending commands as single characters. The commands are:\n\n```\nP - Enable power to the device\np - Disable power to the device\nB - Press the power button\nb - Release the power button\nR - Hold the key to enter the bootloader\nr - Release the key to enter the bootloader\n```\n\nThe uppercase character is always used to enable a function and lowercase\nto disable it.\n\nThe firmware will not echo the commands or respond. Only when an invalid command\nis sent an error message will be returned.\n\n## UART passthrough\n\nThe second ttyACM device created by the firmware emulates a standard USB-to-UART\nconverter and passes through to `uart1` of the Pico. The port defaults to\nthe 9600-8-N-1 mode expected by most operating systems. At the moment it's\nonly possible to change the baudrate, not the start and stop bits.\n\n## Wiring\n\nFirmware pinout:\n\n| pin  | function                            |\n|------|-------------------------------------|\n| GP2  | Power button                        |\n| GP3  | Flashing button (volume down or up) |\n| GP4  | Uart passthrough TX                 |\n| GP5  | Uart passthrough RX                 |\n| GP22 | External power enable               |\n\n## Funding\n\nThis project was funded through the [NGI0 PET](https://nlnet.nl/PET) Fund, a fund established\nby [NLnet](https://nlnet.nl/) with\nfinancial support from the European Commission's [Next Generation Internet](https://ngi.eu/) programme, under the aegis\nof\nDG Communications Networks, Content and Technology under grant agreement No 825310.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcxt%2Fpts-pico-firmware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkcxt%2Fpts-pico-firmware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcxt%2Fpts-pico-firmware/lists"}