-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Conversation
The conventional scanner was opening and immediately cancelling a new StreamIQ session on every channel hop (~100 ms dwell). The Airspy driver needs a brief teardown window before a new transfer can start, so rapid close/reopen produced 'airspy: stream already active' on every other channel advance. Fix: open one IQ stream at Run() startup and keep it alive for the lifetime of the scanner. SetCenterFreq retunes the hardware; the running stream delivers samples at the new frequency within a few ms. The stream is only reopened if the device disconnects (stream channel closes), providing natural recovery without close/open churn. Internal changes: - Scanner.Run: open one persistent stream; reopen only on stream-died - Scanner.scanWindow: return (broken, streamDied bool) so Run can distinguish device disconnect from normal dwell expiry - Scanner.beginDwell: take ctx instead of streamCtx/cancel; return streamDied bool; no longer cancels/owns the stream lifetime Broker-side diagnostics added in this branch: - cmd/gophertrunk/daemon.go: iqPrimaryOwner map + owner labels on all openSingleChannelIQ call sites and on cc/wideband primary claims - diagnosticIQSource wrapper on the conventional scanner IQ path logs every direct StreamIQ open attempt/result at DEBUG level (WARN on failure) so stream contention is identifiable from logs with log.level: debug Docs: install-windows.md troubleshooting table now covers 'conv: StreamIQ failed / airspy: stream already active' with guidance on reading the new diagnostic log fields (primary_owner, owner). Validated on host DBI-NUC-01 (Airspy R2, Windows 10.0 build 26300): - Before: continuous WARN 'conv: StreamIQ failed' loop at ~3 Hz - After: single 'conv: opening IQ stream' at startup; 18 min stable runtime with zero StreamIQ errors; goroutine count stable at 36-37; heap steady at 2-3 MB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The conventional scanner was opening and immediately cancelling a new
StreamIQ session on every channel hop (~100 ms dwell). The Airspy driver
needs a brief teardown window before a new transfer can start, so rapid
close/reopen produced 'airspy: stream already active' on every other
channel advance.
Fix: open one IQ stream at Run() startup and keep it alive for the
lifetime of the scanner. SetCenterFreq retunes the hardware; the
running stream delivers samples at the new frequency within a few ms.
The stream is only reopened if the device disconnects (stream channel
closes), providing natural recovery without close/open churn.
Changes
cmd/gophertrunk/daemon.go: iqPrimaryOwner map + owner labels on all
openSingleChannelIQ call sites and on cc/wideband primary claims
diagnosticIQSource wrapper on the conventional scanner IQ path logs
every direct StreamIQ open attempt/result at DEBUG level (WARN on
failure) so stream contention is identifiable from logs with
log.level: debug
Test plan
make vet testis green locallymake integrationis green locally (if the change touches thedaemon)
changed) — describe the dongle / capture used
Breaking changes
N/A
Docs / CHANGELOG
Linked issues
Addresses #686