Close
0%
0%

OFFgrid-SDR

RTL-SDR sticks need some love, This self-contained web receiver does just that

Similar projects worth following
A self-contained web receiver for RTL-SDR sticks (tested with the RTL-SDR Blog V4), built for listening to FM, medium wave and shortwave broadcasts - anywhere, with or without an internet connection. Everything - radio libraries, DSP, fonts - is inside index.html. Nothing is downloaded when it runs.

OFFgrid-SDR

Offline RTL-SDR receiver for your browser Source & downloads: github.com/diddy-boy/OFFgrid-SDR

A self-contained web receiver for RTL-SDR sticks (tested with the RTL-SDR Blog V4), built for listening to FM, medium wave and shortwave broadcasts — anywhere, with or without an internet connection. Everything — radio libraries, DSP, fonts — is inside index.html. Nothing is downloaded when it runs.

Demonstration Video

==== HOW TO RUN ====

1. Put index.html anywhere (a USB pen drive works too). It's the whole receiver: one file, nothing else needed. Grab it from GitHub — open index.html in the repo and click "Download raw file".

2. Open index.html in Google Chrome, Microsoft Edge, or Opera (desktop or Android). Safari and Firefox do not support WebUSB, so the stick cannot be used there.

3. Plug in the stick, press Power on, and pick the stick in the browser's USB chooser.

-- No stick handy? Try the demo --

Open index.html?demo for simulated stations — no hardware required.

(In Chrome: open index.html, add ?demo to the end of the address bar, press Enter.)

A "Demo stations" list appears — press Power on, then click any station:

FM

• 98.8 — stereo + RDS (name, RadioText, clock) — try Stereo / Wide / Mono

• 99.3 — weak stereo, RDS comes and goes — try Mono

• 100.0 — mono talk station, RDS "News"

• 101.1 — classical, stereo, RDS

Shortwave, 49 m band — one station per filter, all visible on the waterfall at once:

• 5.950 — clean reference station

• 5.985 — a whistle from a nearby carrier — click Notch

• 6.010 — selective fading — switch AM to SAM

• 6.070 — mains hum — Hum 50 Hz filter

• 6.120 — electric-fence clicks — Blanker

• 6.190 — weak and hissy — Noise reduction

Shortwave, 41 m band — SSB, CW and weather fax:

• 7.210 — SSB voice, LSB (a little noisy) — try the noise filters

• 7.240 — SSB voice, USB — switch to LSB to hear the difference; try the SSB filter widths

• 7.275 — CW Morse beacon, 20 WPM — the CW decoder shows its message: "OFFGRID-SDR DESIGNED BY DIDDY"

• 7.330 — AM broadcaster — compare its loudness with SSB

• 7.395 — fast CW Morse beacon, 35 WPM — the decoder learns the speed by itself

• 7.425 — weather fax — the decoder draws a test chart

Mystery

• 4.625 — a simulated Buzzer (UVB-76), with its 25-buzzes-a-minute rhythm

==== ONE-TIME DRIVER SETUP ====

The browser must be allowed to talk to the stick directly.

Windows: Run Zadig, go to Options → List All Devices, choose "Bulk-In, Interface (Interface 0)" / RTL2838UHIDIR, select WinUSB, and click Replace Driver.

Linux: four steps, then check.

1. Stop the TV driver loading at boot:

        echo 'blacklist dvb_usb_rtl28xxu' | sudo tee /etc/modprobe.d/rtl-sdr-blacklist.conf

2. Unload it now (the blacklist alone does not unload a driver that is already running — skipping this causes "setRegBuffer failed" errors):

        sudo modprobe -r rtl2832_sdr dvb_usb_rtl28xxu

(or simply reboot)

3. Give your user access to the stick:

        echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE="0666"' | sudo tee /etc/udev/rules.d/20-rtlsdr.rules

        sudo udevadm control --reload-rules && sudo udevadm trigger

4. Unplug the stick and plug it back in.

Check: lsmod | grep -i rtl28 should print nothing.

Snap Chromium (Ubuntu): also run sudo snap connect chromium:raw-usb.

Also stop anything else using the stick (rtl_tcp, rtl_433, gqrx, SDR++).

(OFFgrid-SDR also retries USB commands that Linux reports as "stalled" — up to 5 times, waiting a little longer each time — which otherwise stopped the stick starting up on some Linux systems.)

macOS: No configuration needed

Chromebooks: No configuration needed

Only one program can use the stick at a time — close SDR#, SDR++, etc. first.

==== SUPPORTED STICKS ====

Tested by the OFFgrid-SDR author:

• RTL-SDR Blog V4 (recommended: HF without any adapter, 4.5 V bias-tee)....

Read more »

  • OFFgrid-SDR 1.4: waterfall replay, AUTO mode and six new decoders

    diddy • 3 hours ago • 0 comments

    OFFgrid-SDR 1.4 is out, and it's the biggest update yet. It's still one file (index.html), still runs from a pen drive, and still needs no internet. But it now does a lot more than listen.

    Grab it from GitHub: github.com/diddy-boy/OFFgrid-SDR

    And no stick needed to try it: open index.html?demo, and every new feature has a simulated station to play with.

    ==== WATERFALL REPLAY: REWIND THE RADIO ====

    Ever spotted something interesting on the waterfall a moment too late? Switch on the waterfall buffer (15, 30 or 60 seconds) and OFFgrid-SDR keeps the raw radio signal in memory. Press pause, draw a box around any signal from the last few seconds, and a replay window opens with a zoomed view of that moment, playing it on a loop.

    • The replay has its own mode, filter, SSB shift and noise filters, so you can try AM, SSB or CW on the same captured moment without touching your main settings

    • Click inside the picture (or use the arrow keys or mouse wheel) to retune within the box

    • In CW, the Morse in just that section is decoded

    • A/B loops just the part you're interested in

    • Save writes two files: an MP3 of what you hear, and a raw IQ file named so SDR#, SDR++ and others open it at the right frequency

    How it works: the samples are stored as 8-bit I/Q (2 bytes each), so 30 seconds at 2.048 MS/s is about 123 MB. Each waterfall row records which stored samples it came from, so a box drawn on the picture maps exactly onto the signal. Replay runs those samples through a separate demodulator about 24 times faster than real time, so changing the mode on a replay is close to instant.

    ==== AUTO: "WHAT IS THAT SIGNAL?" ====

    AUTO is a switch. Turn it on, and every time you tune somewhere new, OFFgrid-SDR listens for a couple of seconds, works out what the signal is, switches mode and tunes precisely onto it. A banner says what it found and how sure it is.

    • Shortwave: CW, RTTY, PSK31, NAVTEX, DSC, weather fax, SSTV, Hellschreiber, AM and SSB

    • VHF/UHF: narrowband FM and airband AM

    • The FM broadcast band: wideband FM

    • It even recognises DRM digital broadcasts (which a browser can't decode) and tells you what that block of hiss is

    • If nothing is clear, it picks the band's usual mode: the right sideband on the ham bands, AM on broadcast bands, narrowband FM on VHF

    The fun part was finding a signature for each mode:

    • RTTY's two tones alternate (one on, the other off), while a Morse carrier and its keying sidebands rise and fall together. Measuring how the two tones move over time tells them apart.

    • PSK31 flips its phase. Comparing the signal's phase 15 ms apart (spanning the dip at each flip) shows reversals that no other mode has.

    • SSTV is frequency-modulated, so its strength is almost perfectly steady, unlike a voice.

    • For SSB, speech is strongest at its low end, right next to the suppressed carrier, so where the energy bunches up tells you USB from LSB.

    My favourite bug: AUTO kept "finding" a steady carrier on empty frequencies. It was the stick's own DC spike, which wasn't even in AUTO's view. The decimation filter that narrows the view lets strong signals fold back in, so a spike 22.5 kHz away appeared exactly 1.5 kHz from the dial. AUTO now ignores the spike where it folds to, as well as where it really is.

    ==== SIX NEW DECODERS ====

    • RTTY: weather, news and ham teleprinter text. It finds the shift (170, 425, 450 or 850 Hz) and the speed (45.45, 50 or 75 baud) by itself.

    • NAVTEX: maritime safety and weather messages on 518, 490 and 4209.5 kHz, with error correction (every character is sent twice).

    • DSC: ships' distress, urgency, safety and routine calls, listed with who called whom (MMSI numbers), distress calls in red. A quirk of DSC: its check bits count the zeros, so an upside-down symbol checks out too. The decoder has to work out which way up the signal is from the phasing symbols at the start of each call.

    • SSTV: slow-scan TV pictures in the Martin, Scottie and PD formats,...

    Read more »

  • Version 1.3 is available on Github

    diddy • 3 days ago • 0 comments

    OFFgrid-SDR 1.3: Panorama, Scan, an auto notch and a lot more

    OFFgrid-SDR has moved on quite a bit since version 1.1, so here's a round-up of everything new in versions 1.2 and 1.3, plus a few of the more interesting problems along the way.

    As always, it's still one file (index.html), still runs from a pen drive, and still needs no internet. Grab the latest from GitHub: github.com/diddy-boy/OFFgrid-SDR

    ==== PANORAMA: UP TO 10 MHZ AT ONCE ====

    An RTL-SDR stick can only see about 2 MHz at a time. Panorama gets round that by sweeping: it hops the stick across a wider range, takes a spectrum at each stop, and stitches the slices into one picture, up to 10 MHz wide.

    • Around me: centred on where you're tuned, 2, 4, 6, 8 or 10 MHz wide

    • Three HF slices: 0.5–10, 10–20 and 20–28.8 MHz

    • Click any signal in the panorama and the receiver tunes straight to it, ready to listen

    • Click Panorama again and you're back exactly where you were

    A 10 MHz sweep takes around half a second on a real stick.

    How it works, for the curious:

    • While sweeping, the stick switches to 10 ms sample blocks (normally 50 ms), so little time is wasted after each retune

    • After each hop, the blocks that were already on their way from the old frequency are thrown away, then one fresh block is captured

    • Only the clean middle 80% of each slice is used, avoiding the roll-off at the edges and the DC spike in the centre

    • The slices are level-matched, so the joins don't show as steps in the noise floor

    • The top HF slice stops at 28.8 MHz on purpose: that's where both the RTL-SDR Blog V4 (its upconverter) and the Nooelec (direct sampling) switch their HF input, and those switch-overs are slow. Staying below it keeps every hop fast on both sticks.

    ==== SCAN YOUR MEMORIES ====

    Press Scan, tap the memories you want scanned (they glow green), and set the squelch. Scan hops through them and stops on any with a signal, showing "SCAN: HOLDING ON A SIGNAL", then carries on 3 seconds after the signal ends. Anything you do by hand ends the scan.

    It's ideal for airband, PMR446 or a handful of favourite stations.

    ==== IDENTIFY: WHAT'S ON THIS FREQUENCY? ====

    The Identify button (above the waterfall, when online) now offers three lookups for the frequency you're tuned to:

    • What's on this frequency? A web search

    • Ask AI: asks Google's AI Mode what's usually there, given the frequency, mode and UTC time

    • Shortwave radio schedule: below 30 MHz, opens shortwave.live's schedule database for that exact frequency, showing who's scheduled and when

    Only the frequency (and for the AI, the mode and time) is sent, and only when you click. Offline, it's simply greyed out.

    ==== AUTO NOTCH: GOODBYE WHISTLES ====

    The new Notch button finds steady whistles (heterodynes from a nearby carrier, the classic shortwave annoyance) and removes each with a very narrow 20 Hz notch, within about a second.

    The first design was the textbook one, an adaptive "line enhancer" that predicts the audio and subtracts what's predictable. It removed the whistles, but it also ate the speech: over a few milliseconds a human voice is quite predictable too.

    So it was rebuilt as "detect, then notch". Every tenth of a second it takes a fine spectrum of the audio and looks for narrow peaks that stay on exactly the same frequency for about a second. A whistle does; the harmonics of a voice keep moving as the pitch changes, so they're left alone.

    The result: a whistle drops by around 40 dB, while the speech is essentially untouched. It handles up to three whistles at once and follows slowly drifting ones.

    ==== SSB FILTER WIDTHS AND PASSBAND SHIFT ====

    • The filter badge now cycles SSB through 1.8, 2, 2.4 and 2.8 kHz with one click

    • A passband shift slides the filter up or down without changing the pitch, to dodge a station just above or below

    • Both are remembered per band and saved in memories

    ==== FASTER BAND AND SAMPLE-RATE CHANGES ====

    Changing the sample rate (including going into...

    Read more »

  • Example log of Weather Fax

    diddy • 4 days ago • 0 comments

    Example of Weather Fax chart using the Nooelec RTL-SDR v5 with a YouLoop antenna

View all 3 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates