tahnok/colmi_r02_client — reverse-engineered prompt
Reverse engineered prompt
Build me a Python client for the Colmi R02 smart ring family that works fully offline and comes with clear docs. I want a simple command line tool plus a Python library that people can import for their own scripts.
It should scan for nearby rings, connect by Bluetooth address or by name, show device info and battery level, read real time heart rate and blood oxygen, pull step data and heart rate history, set the ring time, change heart rate logging settings, reboot the ring, and let me send raw commands for testing. Please also add a sync command that saves everything we can read into a local SQLite database.
Make it work for the Colmi R02, R06, and R10, and probably other rings that use the QRing app. Keep it easy to read, with good docstrings, tests for packet parsing and the database schema, and examples in the docs for both the command line and library use. If you need details, check current BLE docs and the ring protocol notes online.
Want more depth? Deep Reverse