Skip to content

fix(mmwave): no false MR60BHA2 detection on empty UART (#1107)#1119

Merged
ruvnet merged 1 commit into
mainfrom
fix/1107-mmwave-false-detect
Jun 17, 2026
Merged

fix(mmwave): no false MR60BHA2 detection on empty UART (#1107)#1119
ruvnet merged 1 commit into
mainfrom
fix/1107-mmwave-false-detect

Conversation

@ruvnet

@ruvnet ruvnet commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Fixes the false-detection half of #1107.

Root cause: probe_at_baud() counted bare 0x01 (MR60_SOF) bytes and declared MR60BHA2 on as little as one (mr60_sof_seen > 0 fallback). A floating UART1 with no sensor reads line noise full of 0x01s → Detected MR60BHA2 at 115200 baud (caps=0x000f) with no hardware.

Fix: a candidate must now be a validated 8-byte header0x01 + a correct header checksum over bytes 0..6 (mr60_calc_checksum) + a known frame type (0x0A__ / 0x0F09) — and clear the existing ≥3-frame threshold. The weak single-hit fallback is removed. A real MR60 streams valid frames continuously, so genuine detection is unaffected; noise can no longer pass.

Scope/honesty: this resolves the false-detection (problem 1). The sendto ENOMEM + yield=0pps (problem 2) is most likely a separate network-path issue (unreachable target IP → LWIP buffer exhaustion, same signature as a dead UDP target) — I've asked the reporter to confirm target reachability on the issue. Compile-validated by CI; I could not test on the exact N16R8 rig.

🤖 Generated with claude-flow

… on empty UART (#1107)

probe_at_baud counted bare 0x01 (SOF) bytes and declared MR60BHA2 on a single one.
A floating UART1 with no sensor reads noise full of 0x01s → false 'Detected MR60BHA2
(caps=0x000f)'. Now a candidate must be a full 8-byte header with a valid header
checksum (bytes 0..6) AND a known frame type (0x0A__ / 0x0F09), and clear the ≥3
threshold; removed the weak single-hit fallback. Real sensors stream valid frames
continuously, so detection of present hardware is unaffected.

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet ruvnet merged commit cb30988 into main Jun 17, 2026
41 checks passed
@ruvnet ruvnet deleted the fix/1107-mmwave-false-detect branch June 17, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant