{"id":50838465,"url":"https://github.com/harshmandan/open-cardi","last_synced_at":"2026-06-14T05:33:50.242Z","repository":{"id":357100600,"uuid":"1234438841","full_name":"harshmandan/open-cardi","owner":"harshmandan","description":"Web app to control Cardi Ambient LED Lights via Bluetooth ","archived":false,"fork":false,"pushed_at":"2026-05-21T07:01:50.000Z","size":2511,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T05:33:46.505Z","etag":null,"topics":["android","beken","ble","bluetooth","cardi","consmart","python","reverse-engineering","svelte","webbluetooth"],"latest_commit_sha":null,"homepage":"https://opencardi.vercel.app","language":"Svelte","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/harshmandan.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-10T07:25:56.000Z","updated_at":"2026-05-21T07:01:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/harshmandan/open-cardi","commit_stats":null,"previous_names":["harshmandan/open-cardi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/harshmandan/open-cardi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshmandan%2Fopen-cardi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshmandan%2Fopen-cardi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshmandan%2Fopen-cardi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshmandan%2Fopen-cardi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harshmandan","download_url":"https://codeload.github.com/harshmandan/open-cardi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshmandan%2Fopen-cardi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34310801,"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-14T02:00:07.365Z","response_time":62,"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":["android","beken","ble","bluetooth","cardi","consmart","python","reverse-engineering","svelte","webbluetooth"],"created_at":"2026-06-14T05:33:45.803Z","updated_at":"2026-06-14T05:33:50.234Z","avatar_url":"https://github.com/harshmandan.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003cimg src=\"./static/favicon.png\" alt=\"open-cardi\" width=\"128\" /\u003e\n\n  \u003ch1\u003eopen-cardi\u003c/h1\u003e\n\n\u003c/div\u003e\n\nA beautiful web-app replacement for the **Cardi Tech** Android app ([`com.qc.xq`](https://play.google.com/store/apps/details?id=com.qc.xq)) — controls Cardi K3 / K4 Active Ultra (and other ConSmart-family) RGB ambient lighting kits from any Chromium browser. open-cardi reverse-engineers the same BLE protocol — no Android, no ads, no tracking.\n\n\u003cimg src=\"./static/preview.png\" alt=\"app-preview\" width=\"600\" /\u003e\n\n- Website: **[opencardi.vercel.app](https://opencardi.vercel.app)**\n- Writeup: [Reverse-engineering the Cardi Tech BLE protocol](https://harsh.ink/blog/reverse-engineering-cardi-tech)\n\n## How it works\n\nThe kit's MCU is a Beken BK343x exposing a single GATT service (`0xFFF0`) with a write characteristic (`0xFFE2`, write-without-response) and a notify characteristic (`0xFFE1`). All commands are short framed packets — most are 6 bytes `ED \u003cop\u003e \u003ca\u003e \u003cb\u003e \u003cc\u003e E9`, plus a few odd ones (`FE _ EF` for zone select, `30 _ 03` for speed, `FA _ AF` for app mode).\n\nDecoded ops (from APK decompile + HCI snoop replay):\n\n| op | wire | use |\n|---|---|---|\n| color | `ED 49 R G B E9` | RGB × brightness, pre-multiplied client-side |\n| master on / off | `ED F0 …` / `ED 0F …` | global kill switch |\n| zone select | `FE z EF` | scopes the next color/pattern to one zone (1..8) |\n| pattern | `ED \u003cMods[i]\u003e 00 00 00 E9` | 23 presets, opcodes table-driven from `Mods[]` |\n| speed | `30 s 03` | 1..100, applies to current pattern |\n| mic | `ED 34 m m m E9` / `ED 33 …` | 4 reactive modes (Classic / Soft / Jump / Dance) |\n| app mode | `FA 01/02 AF` | Classic vs Starlight rendering on the MCU |\n\nThe `CardiClient` (`src/lib/ble/client.ts`) does a tiny handshake replay on connect, then everything else is fire-and-forget writes — no ACKs, no flow control. State is mirrored locally so reconnects can re-apply the last snapshot.\n\nK3 only has 2 effective zones (front-strip + footwell); K4 exposes 8. The UI hides K4-only zones behind a toggle.\n\n## Stack\n\nSvelteKit 5 (runes) · TypeScript · Tailwind v4 · Bun · Web Bluetooth · `navigator.bluetooth.requestDevice` filtered by service `0xFFF0` + name prefixes (`CarDiLits`, `iLits`, `BaoYin`, …). Served as a PWA so it installs on Android home screen; iOS needs [Bluefy](https://apps.apple.com/us/app/bluefy-web-ble-browser/id1492822055) because Safari has no Web Bluetooth.\n\n## Supported device families\n\nBy BLE name prefix (all share the ConSmart-family firmware on service `0xFFF0`):\n\n`CarDiLits` · `iLits` · `BaoYin` · `CaChuang` · `CarL` · `MTF-LIGHT` · `AIKON-LIT` · `Dream` · `Flash`\n\nTested end-to-end on Cardi K3 / K4 Active Ultra. If your kit advertises a different prefix, see **Debug** below.\n\n## Develop\n\n```sh\nbun install\nbun run dev\n```\n\n## Debug\n\nA standalone Python REPL (`debug/open-cardi.py`, Bleak) lets you talk to the kit without the web app — useful for poking unknown ops, adding a new device prefix, or verifying captures. Quick start:\n\n```sh\nuv run debug/open-cardi.py scan    # find the device\nuv run debug/open-cardi.py repl    # interactive prompt\n```\n\nSee [`debug/README.md`](debug/README.md) for the full command reference and the workflow for onboarding a new device family. For the deeper reverse-engineering walkthrough (HCI snoop capture, APK decompile with jadx, protocol replay), see the [writeup](https://harsh.ink/blog/reverse-engineering-cardi-tech).\n\n## License\n\n[MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshmandan%2Fopen-cardi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshmandan%2Fopen-cardi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshmandan%2Fopen-cardi/lists"}