{"id":23316866,"url":"https://github.com/rigor789/mirabox-streamdock-node","last_synced_at":"2025-04-14T11:31:10.647Z","repository":{"id":264941570,"uuid":"859353906","full_name":"rigor789/mirabox-streamdock-node","owner":"rigor789","description":"MiraBox StreamDock reverse-engineered communication protocol example","archived":false,"fork":false,"pushed_at":"2024-09-18T14:22:22.000Z","size":166,"stargazers_count":17,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T13:43:40.056Z","etag":null,"topics":["mirabox","mirabox293","node","protocol","reverse-engineering","streamdock","streamdock293","usb","usb-hid"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/rigor789.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-09-18T14:18:14.000Z","updated_at":"2025-03-26T01:08:52.000Z","dependencies_parsed_at":"2024-11-27T00:16:48.276Z","dependency_job_id":null,"html_url":"https://github.com/rigor789/mirabox-streamdock-node","commit_stats":null,"previous_names":["rigor789/mirabox-streamdock-node"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigor789%2Fmirabox-streamdock-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigor789%2Fmirabox-streamdock-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigor789%2Fmirabox-streamdock-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigor789%2Fmirabox-streamdock-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rigor789","download_url":"https://codeload.github.com/rigor789/mirabox-streamdock-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248871735,"owners_count":21175282,"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":["mirabox","mirabox293","node","protocol","reverse-engineering","streamdock","streamdock293","usb","usb-hid"],"created_at":"2024-12-20T16:14:35.874Z","updated_at":"2025-04-14T11:31:10.596Z","avatar_url":"https://github.com/rigor789.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiraBox StreamDock reverse-engineer\n\nThe MiraBox StreamDock has semi-oss drivers that have the USB HID logic inside a pre-compiled library. Out of curiousity, I reverse engineered the USB packets and wrote this demo to show how one might control the device directly without the official drivers.\n\n![MiraBox StreamDock running this demo](https://github.com/user-attachments/assets/f2c56dfb-0cb7-40cc-9816-999c73a06d31)\n\nThis is just an experiment, and possibly has some bugs, and potential for improvements.\n\n## Supported Functions\n\n- read firmware version\n- wake screen\n- clear screen\n- refresh\n- set brightness\n- set key image\n- set boot image\n- receive key presses\n\n\u003e **Note:** Only tested on **MiraBox 293**.\n\n## API\n\n```ts\nimport { StreamDock, USBBackend } from \"./streamdock\";\n\ninterface USBBackend {\n  send(data: Buffer): Promise\u003cvoid\u003e;\n  receive(byteSize?: number): Promise\u003cBuffer\u003e;\n  controlTransfer(\n    bmRequestType: number,\n    bRequest: number,\n    wValue: number,\n    wIndex: number,\n    wLength: number\n  ): Promise\u003cBuffer | number | undefined\u003e;\n}\n\nconst backend: USBBackend;\nconst sd = new StreamDock(backend);\n\nconsole.log(await sd.getFirmwareVersion());\nawait sd.wakeScreen();\nawait sd.clearScreen();\nawait sd.setBrightness(0x19);\nawait sd.setKeyImage(i, path.join(process.cwd(), \"test1.png\"));\nawait sd.setBootImage(path.join(process.cwd(), \"logo.jpg\"));\n\nwhile (true) {\n  const { keyId, state } = await sd.receiveKeyPress();\n  console.log(\"Key\", keyId, \"state\", state);\n}\n```\n\nSee [Main Demo](./src/index.ts) for a concrete example.\n\n## Run the repo\n\n1. clone\n1. `npm install`\n1. `npm start`\n\n\u003e **Note**: on macos, I need to run `sudo npm start` to be able to access the usb HID device.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frigor789%2Fmirabox-streamdock-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frigor789%2Fmirabox-streamdock-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frigor789%2Fmirabox-streamdock-node/lists"}