Add reliable Android BLE ride recorder

This commit is contained in:
Jay
2026-08-20 12:40:39 -04:00
parent 3bad2275cc
commit 6e408a3048
40 changed files with 2781 additions and 120 deletions
+5
View File
@@ -6,6 +6,7 @@ import struct
BLE_FRAGMENT_HEADER = struct.Struct("<IHH")
BLE_ACK = struct.Struct("<4sI")
BLE_BEGIN_SESSION = struct.Struct("<4sQ")
BLE_MIN_FRAME_SIZE = 36
BLE_MAX_FRAME_SIZE = 196
@@ -64,3 +65,7 @@ class BleFrameReassembler:
def encode_ack(packet_sequence: int) -> bytes:
return BLE_ACK.pack(b"ACK1", packet_sequence & 0xFFFFFFFF)
def encode_begin_session(session_token: int) -> bytes:
return BLE_BEGIN_SESSION.pack(b"BGN1", session_token & 0xFFFFFFFFFFFFFFFF)