zero2zero

Architecture & Protocol Reference (v0.1.0)

Technical overview of how zero2zero links a Flipper Zero (STM32WB55) with Kali Linux on CardputerZero over Bluetooth Low Energy (BLE).

1. Design Split

2. System Overview

+---------------------------------------+        BLE 5.0 Encrypted GATT         +-----------------------------------------------+
|       Flipper Zero (STM32WB55)        |  Service: 8fe5b3d5-2e7f-4a98-2a48-... |          CardputerZero (Kali Linux)           |
|                                       | <-----------------------------------> |                                               |
|  * Native BLE Serial/RPC Profile      |   TX   (...61fe): Indicate PB.Main    |  * BlueZ Gio D-Bus + Kernel MGMT HCI Tuning   |
|    (Auto-opens RpcOwnerBle)           |   RX   (...62fe): WriteCmd PB.Main    |  * In-process Agent1 6-digit Passkey Handler  |
|  * zero2zero.fap (v0.1.0)             |   FLOW (...63fe): Notify   >u32 cred  |  * z2zd (/run/zero2zero/rpc.sock JSON-Lines)  |
|    |- Mode A: RpcAppSystem Duplex     |   STAT (...64fe): R/W/Not  RPC=1      |      ^                                        |
|    |  (PB_App.DataExchange #65)       |                                       |      +---------------+------------------------+
|    |- Live CC1101 -> rtl_433 Stream   |                                       |  * z2z-ui (C)    * z2z (CLI)    * jobs.d/     |
|    |- IR Blaster & TSOP Learn         |                                       |    /dev/fb_lcd     Shell/SSH      Job Runner  |
|    +- Mode B: /ext/apps_data/         |                                       |                                               |
|       zero2zero/{request,response}    |                                       +-----------------------------------------------+
+---------------------------------------+

3. Transport & Protocol Stack

3.1 BlueZ BLE GATT & Kernel MGMT Tuning (python/z2z/ble_transport.py)

3.2 Wire Protobuf Codec (python/z2z/proto.py)

Encodes and decodes varint-prefixed PB.Main frames directly in Python stdlib:

3.3 Flipper Companion App (flipper_app/zero2zero_app.c)

4. Repository Layout