{"id":25168301,"url":"https://github.com/mortara/ps2usb","last_synced_at":"2025-06-14T05:07:16.683Z","repository":{"id":275918886,"uuid":"927122248","full_name":"mortara/PS2USB","owner":"mortara","description":"A USB HID to PS/2 computer adapter","archived":false,"fork":false,"pushed_at":"2025-03-17T06:22:24.000Z","size":632,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T05:07:13.687Z","etag":null,"topics":["keyboard","mouse","ps2","ps2-controller","usb"],"latest_commit_sha":null,"homepage":"https://www.mortara.org","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/mortara.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,"zenodo":null}},"created_at":"2025-02-04T12:50:54.000Z","updated_at":"2025-05-01T14:24:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ae05583-6d81-48e3-a8c5-facabc66cb90","html_url":"https://github.com/mortara/PS2USB","commit_stats":null,"previous_names":["mortara/ps2usb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mortara/PS2USB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortara%2FPS2USB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortara%2FPS2USB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortara%2FPS2USB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortara%2FPS2USB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mortara","download_url":"https://codeload.github.com/mortara/PS2USB/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortara%2FPS2USB/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259763091,"owners_count":22907411,"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":["keyboard","mouse","ps2","ps2-controller","usb"],"created_at":"2025-02-09T07:16:44.581Z","updated_at":"2025-06-14T05:07:16.642Z","avatar_url":"https://github.com/mortara.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# USB HID to PS/2 adapter\n\nThis is an adapter to use USB Mouse and Keyboard on old computers with PS/2 connectors, based on an ESP32-S3.\n\nThis is currently very much WIP and a lot of things don't work as expected.\n\n## Libraries\n\nThis project makes ue of the following libs:\n - https://github.com/hrko/esp32-ps2dev (I forked it to try some stuff)\n - https://github.com/mallardtheduck/EspUsbHost  (I forked it to try some stuff)\n - https://github.com/mathieucarbou/MycilaWebSerial\n - https://github.com/mathieucarbou/AsyncTCP\n - https://github.com/mathieucarbou/ESPAsyncWebServer\n\n## Development\n\nI was using PlatformIO initially but since i need more recent USB features of esp-idf, i switched to pioarduino:\nhttps://github.com/pioarduino\n\n## Hardware\n\nI am using a ESP32-S3-WROOM-1. \n\n### PS/2 cables \n\nThe PS/2 cables are wired like this:\n\nPS/2          |   ESP32-S3 PIN\n--------------|----------------\nMouse CLK     |   17\nMouse DATA    |   16\nMouse GND     |   GND\nMouse +5v     |   5v \nKeyboard CLK  |   5\nKeyboard DATA |   4\nKeyboard GND  |   GND\nKeyboard +5v  |   VBUS of USB socket\n\n### USB Socket\nThere is a USB Type-A socket connected like this:\n\nUSB          |   ESP32-S3 PIN\n-------------|-----------------\nD+           |   21\nD-           |   20\nGND          |   GND\nVBus         |   PS/2 Keyboard 5v\n\nI have routed the +5v lines of the PS/2 cables through a dip switch block so i can decide if the ESP or the USB device\nwill be powered by the PS/2 cables or not.\n\n### Configuration\n\nI've also attached 4 Pins of the ESP to a DIP Switch block in order to have config options:\n\nESP32 PIN    |   Option\n-------------|----------------\n38           |  Puts the device in OTA only mode\n39           |  Swaps the PS/2 cables pins\n40           |  Deactivates wifi, webserver, ota, webserial\n41           |  currently unused\n\nThe Pins are set to HIGH with internal pullups and the dip switch connects them to GND when set to ON\n\n## Problems\n\nCurrently my main problem is the USB Host implementation on the ESP32:\n - It seems to have problems with USB hubs\n - Mice with high dpi (16bit coordinate values)\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmortara%2Fps2usb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmortara%2Fps2usb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmortara%2Fps2usb/lists"}