extend BLE outage cushion from hardware evidence
This commit is contained in:
+13
-2
@@ -24,6 +24,7 @@ from trikke_protocol import (
|
||||
)
|
||||
|
||||
DEVICE_NAME = "TrikkeSensor"
|
||||
SERVICE_UUID = "7d2ea000-f75b-4a9b-8fbe-3d4c2a1e9c10"
|
||||
DATA_UUID = "7d2ea000-f75b-4a9b-8fbe-3d4c2a1e9c11"
|
||||
ACK_UUID = "7d2ea000-f75b-4a9b-8fbe-3d4c2a1e9c12"
|
||||
|
||||
@@ -97,7 +98,9 @@ async def capture(args: argparse.Namespace) -> int:
|
||||
if device is None:
|
||||
print(f"Scanning for {args.name}...")
|
||||
device = await BleakScanner.find_device_by_name(
|
||||
args.name, timeout=5.0
|
||||
args.name,
|
||||
timeout=5.0,
|
||||
service_uuids=[SERVICE_UUID],
|
||||
)
|
||||
if device is None:
|
||||
await asyncio.sleep(0.5)
|
||||
@@ -185,8 +188,16 @@ async def capture(args: argparse.Namespace) -> int:
|
||||
f"fragment_rejects={reassembler.rejected_fragment_count}, "
|
||||
f"callback_drops={callback_drop_count}, "
|
||||
f"packet_gaps={integrity.packet_gap_count}, "
|
||||
f"packet_resets={integrity.packet_reset_count}, "
|
||||
f"sample_gaps={integrity.sample_gap_count}, "
|
||||
f"crc_errors={parser.crc_errors}, "
|
||||
f"sample_resets={integrity.sample_reset_count}, "
|
||||
f"timing_anomalies={integrity.timing_anomaly_count}, "
|
||||
"timestamp_saturation_frames="
|
||||
f"{integrity.timestamp_saturation_frame_count}, "
|
||||
f"startup_crc_rejects={parser.startup_crc_errors}, "
|
||||
f"stream_crc_errors={parser.crc_errors}, "
|
||||
f"header_errors={parser.header_errors}, "
|
||||
f"skipped_nonframe_bytes={parser.skipped_bytes}, "
|
||||
f"trailing_partial_bytes={parser.buffered_bytes}"
|
||||
)
|
||||
print(
|
||||
|
||||
Reference in New Issue
Block a user