fcc
fcc
Prompt
I want a detailed, practical project plan (not code yet) for building an open-source library, usable from Python and C#, that lets developers control Bluetooth earbuds built on the Airoha AB1563E chip. A desktop app replacing the vendor's companion app (flyCC) is a second deliverable that consumes the library. Ask me up to 5 clarifying questions only if they would materially change the plan, otherwise proceed with stated assumptions. ## The device - AirPods Pro 2 clone, "v5.3 lite tiger builder", Airoha AB1563E chip. - Official app is "flyCC", which is laggy. It controls the buds over Bluetooth (BLE vs classic RFCOMM not yet confirmed). - flyCC features to replicate: noise control (Off / Transparency / Adaptive / Noise Cancellation), ANC filter preset, EQ preset select, automatic ear detection toggle, wind noise reduction toggle plus sensitivity, EMP (enhanced multi-point) connect mode, long-press actions for left and right bud, call control gestures (answer/end), game mode toggle, case voice control, voice control, battery level. ## My background and setup - Software developer, strong in C# and Java, learning C++ (w64devkit g++, Zed editor). Developing on Windows. Android phone with Bluetooth HCI snoop log available. - I use an agentic coding workflow (OpenCode) with a strong model for planning and a fast model for implementation, so the plan should produce specs a coding agent can follow. ## Deliverables, in priority order 1. A documented protocol spec for AB1563E-based earbuds (docs/protocol.md) plus captured-packet fixtures (tests/fixtures/). 2. A Python library (pip-installable) with a clean public API, e.g. device.set_noise_control(mode), device.set_eq(preset), device.get_battery(). It must work standalone. 3. A C# library (NuGet-packable) with the same API, async-friendly, usable from any .NET app. 4. A shared C++ core both libraries wrap (or tell me if I should implement each natively first and unify later). It is pure protocol: build command bytes, parse incoming bytes, fire callbacks, no Bluetooth I/O, exposed through a flat extern "C" API with a host-supplied send_bytes callback. 5. A desktop app (Avalonia + C#) built only on the public library API, so the app proves the library is usable. The platform Bluetooth transport sits behind an interface. Android later. ## Intended method (challenge this if you disagree) - Reverse engineer the protocol from (a) an HCI snoop log captured while toggling one flyCC setting at a time, and (b) the flyCC APK analysed with jadx, for interoperability with my own device. - Prototype in Python (bleak for BLE, or RFCOMM/socket if classic) to verify each command on the real buds, then port to C++ using the Python as reference and the fixtures as shared test vectors. - Open source, MIT licence. No flyCC APK or decompiled code in the repo, protocol documented as facts only, all code written by me. No "AirPods" or "flyCC" in the project name, "not affiliated" disclaimer, README honestly states the protocol came from traffic and interoperability analysis. Fixtures redacted of Bluetooth addresses. - Safety: the code must only be able to send an allowlist of verified opcodes, because Airoha RACE includes flash/firmware commands that can brick the device. Reference projects: auracast-research/race-toolkit (Python, security research, covers RACE transports and framing but not ANC/EQ settings), and bosectl (Bose) and FreeBuddies (Huawei) as layout/documentation models. - Open question for you to weigh: should the Python library ship first as pure Python (fastest for users) with the C++ core following later, or should the C++ core come first? Learning C++ is one of my goals, but the library's usefulness matters more. ## Current status [EDIT THIS: e.g. "Nothing done yet" / "Captured HCI log, have APK, haven't decoded" / "Python script can read battery"] ## What I want back 1. A phase-by-phase plan with concrete steps, deliverables and "done when" checks for each phase. 2. For the reverse-engineering phase: how to structure the capture session, what to look for in Wireshark and jadx (including how to detect obfuscation or native .so code and what to do then), and how to decide between BLE GATT and RFCOMM. 3. Recommended repo structure (monorepo vs library repo plus app repo), and CI that runs unit tests against the fixtures for both Python and C++. 4. The C API design principles and an example header for the first 5 functions. 5. Public API design for the libraries: method list, naming, error handling, device discovery and connection, how events (e.g. ANC mode changed on the buds) are exposed, and how third parties could add support for other AB156x devices or firmware variants. 6. A testing strategy that works without the earbuds attached, and a safe procedure for testing on real hardware. 7. Packaging and versioning (PyPI, NuGet), docs, and examples a stranger could follow in 10 minutes. 8. Risks, likely failure points and fallbacks (heavy obfuscation, buds accepting only one connection, clone firmware deviating from standard Airoha protocols). 9. A realistic timeline assuming about 5 to 10 hours a week. 10. A task list I can hand to a coding agent, each task small, specified and verifiable. Be direct and technically precise. Flag anything in my architecture you think is a mistake and say what you'd do instead.
Response not available