From 9fdb46df9fce131291322416f5814abd3c8534d3 Mon Sep 17 00:00:00 2001 From: JongChern Date: Sat, 24 Oct 2026 07:55:33 +0800 Subject: [PATCH] DEV-1291 Android HIL: count inStream's replies over BLE too inStream counts the battery and status replies it gets from the log, by the lines Android's own Classic parser writes ("IN STREAM: VBATT_RESPONSE"). Over BLE the driver's parser runs instead, and it words them "In-stream received = [0x94] VBATT_RESPONSE", so every BLE run reported 0 replies to 15 reads and failed, although the driver logged all of them. It now counts each transport's own line. With that, inStream over BLE on a Shimmer3R decoded 15 of 15 battery and 15 of 15 status replies, with no command timeout or parser error, on driver 0.11.9_beta (without DEV-1291's fix) and 0.11.11_beta alike: over BLE the reads are queued, so no reply lands in the pause after a logging stop. Co-Authored-By: Claude Opus 5.5 --- .../java/com/shimmerresearch/hiltest/HilScenariosTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ShimmerAndroidInstrumentDriver/shimmerHilTest/src/androidTest/java/com/shimmerresearch/hiltest/HilScenariosTest.java b/ShimmerAndroidInstrumentDriver/shimmerHilTest/src/androidTest/java/com/shimmerresearch/hiltest/HilScenariosTest.java index 24bf703..6dfeab8 100644 --- a/ShimmerAndroidInstrumentDriver/shimmerHilTest/src/androidTest/java/com/shimmerresearch/hiltest/HilScenariosTest.java +++ b/ShimmerAndroidInstrumentDriver/shimmerHilTest/src/androidTest/java/com/shimmerresearch/hiltest/HilScenariosTest.java @@ -478,7 +478,11 @@ private final class LogTally { /** Adds the lines logged since the marker. Called soon after it, before the phone's small log buffer rolls past it. */ void add(String marker) { - int[] c = session.logCountsSince(marker, new String[] {"IN STREAM: VBATT_RESPONSE"}, new String[] {"IN STREAM: STATUS_RESPONSE"}, + // Each parser words a reply differently: Android's own over Classic, the driver's over BLE + boolean ble = "ble".equals(session.transport); + String[] battery = {ble ? "In-stream received = [0x94] VBATT_RESPONSE" : "IN STREAM: VBATT_RESPONSE"}; + String[] status = {ble ? "In-stream received = [0x71] STATUS_RESPONSE" : "IN STREAM: STATUS_RESPONSE"}; + int[] c = session.logCountsSince(marker, battery, status, new String[] {"with no data packet before it"}, COMMAND_TIMEOUTS, ShimmerSession.PARSER_ERRORS); if (c == null) { complete = false;