diff options
| author | Arslaan Pathan <[email protected]> | 2026-03-30 18:04:12 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-03-30 18:04:12 +1300 |
| commit | e983de9c60e7b0e4264878c19dab8e45962efa10 (patch) | |
| tree | 98182e70e94200c75b5386f9be06c575e80b9d5e | |
| parent | 528af273c97b74a710d5f620474da91c7557591b (diff) | |
| download | zwzn-freefit-re-e983de9c60e7b0e4264878c19dab8e45962efa10.tar.xz zwzn-freefit-re-e983de9c60e7b0e4264878c19dab8e45962efa10.zip | |
Fix markdown rendering or smth like that
| -rw-r--r-- | FereFit_syncTime_BLE.py | 2 | ||||
| -rw-r--r-- | README.md | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/FereFit_syncTime_BLE.py b/FereFit_syncTime_BLE.py index 0076127..55866aa 100644 --- a/FereFit_syncTime_BLE.py +++ b/FereFit_syncTime_BLE.py @@ -24,6 +24,8 @@ async def sync(device_name: str): await client.write_gatt_char("6E40FC20-B5A3-F393-E0A9-E50E24DCCA9E", packet) print(f"Time synced! ts={ts} offset={offset}") except Exception as e: + import traceback + traceback.print_exc() print(f"Failed: {e}") if __name__ == "__main__": @@ -180,6 +180,7 @@ byte[14+] = raw RGB565 pixel data (up to chunk size bytes) **Image format:** + - Resolution: 240x296 (actual display size, not 240x280 as advertised) - Format: Raw RGB565, no headers - Byte order: High byte first, low byte second (big endian) @@ -187,22 +188,24 @@ byte[14+] = raw RGB565 pixel data (up to chunk size bytes) - Color conversion: RGB888 -> RGB565 = ((R>>3)<<11) | ((G>>2)<<5) | (B>>3) **MTU/chunk settings:** + - Fixed packet size: 148 bytes - Data payload per chunk: 140 bytes - Header size: 14 bytes **Chunked data example:** + - 240x296 = 142,080 bytes total - 142,080 / 140 = 1,015 chunks **Response (notify/6E40FC21):** + - Header ACK: `0xE4 0x51 0x02 ... 0x00` (byte[9] = 0x00 for success) - Chunk ACK: `0xE4 0x52 0x02 ... 0x00` (byte[9] = 0x00 for success) -**Test script:** `FereFit_enterMakeDial_BLE.py` - **Notes:** - UI overlay (time/date) only appears if byte[15] = 0x01 + - Text color is presumably set via bytes[17-18] (RGB565) [unconfirmed] - The watch does NOT automatically overlay UI - you must enable it - Actual display height is 296, not 280 (white bar appears at bottom with 280) @@ -210,7 +213,7 @@ byte[14+] = raw RGB565 pixel data (up to chunk size bytes) ## Scripts and tests -Located in the root of this git repo are some test scripts and files to get you going with your own implementations. BLE implementations are written in Python + the bleak library from PyPI. +Located in the root of this git repo are some test scripts and files to get you going with your own implementations. BLE implementations are written in Python + the bleak library from PyPI. enterMakeDial requires Pillow. The following scripts are available: @@ -218,6 +221,7 @@ The following scripts are available: - FereFit_switchFindBand_BLE.py --- vibrates the watch for 5 seconds - FereFit_configRealTimeMeasure_BLE.py --- measures heart rate, TODO add more measurements later - FereFit_sendMessage_BLE.py --- sends a test message/notification of your choosing to the watch +- FereFit_enterMakeDial_BLE.py --- uploads an image of your choosing to the watch face They are named after FereFit, one of the names of the app, because I am decompiling the FereFit APK (even though it's all one codebase under different names, the app detects which one it's meant to be using functions such as isFereFit() and isHomieFit(), etc and just sets the UI and API to that). They will probably stay that way because I can't be bothered to rename them to freefit, and therefore future ones will also be named after FereFit for consistency or something like that. |
