Skip to content

stream_web: Added API call for IQ sample capture#1

Open
hunterhubble wants to merge 17 commits into
mainfrom
iq-capture
Open

stream_web: Added API call for IQ sample capture#1
hunterhubble wants to merge 17 commits into
mainfrom
iq-capture

Conversation

@hunterhubble

Copy link
Copy Markdown
Owner

This will be helpful for E2E testing with real hardware.

Also increased decode to 0.75S. 13 Byte packets are 60 symbols, 60 * 8.8ms = about 528ms, longer than previous 0.5s. Makes it so I can get the whole packet of IQ samples when making td_iq post request

hunterhubble and others added 15 commits June 5, 2026 17:53
Added repository dispatch so that the latest sdr-docker
rebuild with PyPI updates to hubble-satnet-decoder

Also increased TD_WINDOW_S from 0.5 to 0.75 to be able to view
the entire packet on 13 byte payloads (which are slightly
longer than 0.5s)

Coincides with commit d112a78 in hubble-satnet-decoder

Signed-off-by: hunterhubble <hunter@hubble.com>
…ispatch-clean

feat: docker.yml: Rebuild latest on update to decoder
Add an sdr_connected boolean to the /api/status response, derived from
state.rx_connected, so clients can detect whether the SDR hardware is
currently open. With no Pluto attached the RX thread retries the open
forever in the background while Flask still serves the API, so callers
previously had no way to distinguish 'no hardware' from 'quiet sky'.
- Added 'Preamble Symbols' tab next to the packet in the time
domain. This is a zoom in on the preamble symbols to tell if theres anything wrong
with the radio CW.

Signed-off-by: hunterhubble <hunter@hubble.com>
- The lines that mark the beginning and end of each symbol
now match the symbol when zoomed in on the preambles

Signed-off-by: hunterhubble <hunter@hubble.com>
- Moved symbol timing correction, timing crossing function, and
rise/fall time functions out of spectrogram.py for maintainability
- Same functions as before, but with better organization. Keeping
spectrogram.py for solely spectrogram creation.

Signed-off-by: hunterhubble <hunter@hubble.com>
feat: Added tab for preamble symbol zoom in
- Includes pdu_n_corr and header_n_corr as items of the packet,
so we can see the RS corrections per packet

Signed-off-by: hunterhubble <hunter@hubble.com>
Signed-off-by: hunterhubble <hunter@hubble.com>
- Runs pyhubblenetwork tests for each PR to sdr-docker.
- Also gives option to build image with local version of
hubble-satnet-decoder. This is to run CI tests with sdr-docker
on pyhubblenetwork with PRs to hubble-satnet-decoder

Signed-off-by: hunterhubble <hunter@hubble.com>
- Changed timing info to match what's found with zoomed in image
- Also able to verify the timing correction by looking at zoom in
- Purpose of this change is to make it so we only have to poll
/packets to get all the information we need, because polling that
and /td_info lagged the live spectrogram viewer

Signed-off-by: hunterhubble <hunter@hubble.com>
Previously, we decoded 1s windows of IQ samples, that were appended by 0.5s
chunks. That chunk ended up being 0.55-0.58 seconds worth of chunks. This
made it common for packets with 13 byte payloads to be missed if their
preamble began in the very beginning of the chunk, because it would be cut
off when the chunk was appeneded to the window.

Increases the DECODE_INTERVAL_S to 0.6s, which more accurately reflects the
amount that the window advances. Increases to deocde window to 1.5s so that
longer packets don't get lost.

The wider, overlapping window decodes one packet on multiple passes, so add
strict content+time de-duplication: two decodes are merged only if device id,
auth tag AND payload match and their start times are within 1 s. Genuinely distinct
packets are never merged.

Signed-off-by: hunterhubble <hunter@hubble.com>
fix: Increase window to decode 13 byte payloads
Helpful for:
- Extra signal processing through numpy or matplotlib
- Recording samples with pyhubblenetwork
- Testing Satellite hardware with IQ samples from real devices
- Determining the frequency of a continuous tone

Signed-off-by: hunterhubble <hunter@hubble.com>
@hunterhubble hunterhubble force-pushed the iq-capture branch 4 times, most recently from dea3b4d to 557713c Compare July 8, 2026 20:31
- Created /record_analyze API endpoint to record IQ samples,
attempt to decode from them, then provides a log of statistics
to match our satellite protocol in a plain text format
- Statistics include frequency, amplitude, and timing per symbol.
From this, we can tell if it matches frequency hopping, see any
amplitude drop-offs, and observe timing violations

- Also refactored some code to turn into functions I can call in
analyze.py

Signed-off-by: hunterhubble <hunter@hubble.com>
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.

2 participants