Skip to content

DEV-1372: fail the C# HIL's SD-logging item on a docked or USB unit - #229

Merged
JongChern merged 1 commit into
masterfrom
DEV-1372_hil_refuse_docked_logging
Nov 2, 2026
Merged

JongChern merged 1 commit into
masterfrom
DEV-1372_hil_refuse_docked_logging

Conversation

@JongChern

Copy link
Copy Markdown
Contributor

Why

Docked, or with USB plugged into a Shimmer3R, LogAndStream ACKs a start of SD logging and then ignores it (Shimmer3 LogAndStream v1.01.002+, Shimmer3R v1.01.004+). In the 29 Oct release run, stream.log_and_battery passed on both units without logging anything:

  • The Shimmer3 was docked (Docked:True in its status). The API marked it not logging, and the item only noted "logging not seen".
  • The Shimmer3R had USB plugged in (USB:Plugged). The API showed it logging all the same.

What

stream.log_and_battery is the only item that starts SD logging. Before it configures or starts anything, it checks the status the connect read: bit 0 of the first byte for docked, and bit 0 of a Shimmer3R's second byte for USB. If either is set, it fails at once, saying which, and to take the unit off the dock and USB.

This is the same check, with the same wording, as the Android HIL's checkCanLog (ShimmerResearch/ShimmerAndroidAPI#143).

  • Link.WhyCannotLog(): the API keeps the USB bit in a protected field with no getter, so the suite reads it by reflection, as it already does for the battery reading.
  • Items.CheckCanLog(), called first in stream.log_and_battery.
  • tools/hil/README.md: the items table and the setup notes say the item needs an SD card in the unit, off the dock and USB.

The suite only. No API change, and no new items.

Tested

  • The HIL project builds (run-csharp-hil.ps1 -List).
  • On hardware, stream.log_and_battery:
    • Shimmer3R (LogAndStream 1.1.25) over Classic, with USB plugged in: failed at once with "the unit reports USB plugged in: the firmware will not start SD logging, so this item cannot run. Take the unit off the dock and USB, then run it again".
    • The other three runs (the Shimmer3R over BLE, the Shimmer3 over both) didn't connect, so the check never ran. Another host had the Shimmer3 at the time.
  • The docked path hasn't been run on hardware. It reads the same status reply that showed Docked:True for the Shimmer3 in the 29 Oct run.

🤖 Generated with Claude Code

Docked, or with USB plugged into a Shimmer3R, LogAndStream ACKs a start
of SD logging and then ignores it. stream.log_and_battery passed that way
in the 29 Oct release run: BE69 was docked and 2F31 on USB, and neither
logged anything.

The item now reads the status the connect read (docked: byte 0 bit 0;
USB: a Shimmer3R's byte 1 bit 0) and fails before it starts, saying which
and to take the unit off the dock and USB. Same check and wording as the
Android HIL's checkCanLog (ShimmerAndroidAPI PR 143). The README's items
table and setup notes say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JongChern
JongChern merged commit f65fb5d into master Nov 2, 2026
2 checks passed
@JongChern
JongChern deleted the DEV-1372_hil_refuse_docked_logging branch November 2, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant