How to Unbrick an RTL-SDR Dongle with Corrupted USB IDs
If you have ever attempted to program serial numbers or tweak EEPROM settings on an RTL-SDR dongle—like a FlightAware or RadarBox Flight Stick—only to have it vanish from your system, you know the frustration. You can see the device using the lsusb command, but nothing else can detect the device, or librtlsdr or rtl_eeprom insist there are no supported devices found. I got into this situation by trying to change the serial number of my AirNav Radar FlightStick. I tried searching every forum but was never able to resolve the issue, but out of desperation I tried Google Gemini, and it found a solution.
Here is what happened, why standard tools fail, and how to patch librtlsdr from source to force-flash factory defaults back onto your bricked SDR.
The Problem: Corrupt Vendor and Product IDs
Every USB device broadcasts a Vendor ID (VID) and Product ID (PID) so the host OS knows which driver to attach. Standard Realtek RTL2832U SDR dongles expect a VID/PID pair of 0bda:2838.
During an incomplete write, power glitch, or corrupted EEPROM flash, those bits can shift. In many cases—especially with RadarBox Flight Sticks—the VID corrupts from 0bda to 0ba0:
Bus 001 Device 004: ID 0ba0:2838 Unknown Device
When you run standard rtl_sdr utilities, the underlying C library (librtlsdr) checks the USB bus against a hardcoded whitelist of known TV tuner IDs. Because 0ba0:2838 is not in that whitelist, librtlsdr ignores the physical chip entirely and reports:
No supported devices found.
Because the software refuses to open the USB handle, standard commands like rtl_eeprom will not work out of the box.
The Solution: Patching librtlsdr
To fix this, we can pull down the rtl-sdr source code, add our corrupted VID/PID pair to the library's device lookup table, compile modified binaries, and use rtl_eeprom to write clean Realtek OEM parameters back to the EEPROM.
Step 1: Install Build Dependencies
First, install the necessary build tools and USB development headers:
sudo apt update
sudo apt install -y build-essential cmake libusb-1.0-0-dev git
Step 2: Clone the rtl-sdr Source Code
Fetch the official Osmocom repository:
git clone https://github.com/osmocom/rtl-sdr.git
cd rtl-sdr
Step 3: Patch librtlsdr.c
Open src/librtlsdr.c in your text editor:
nano src/librtlsdr.c
Locate the known_devices[] array (typically near the top of the file). It looks like this:
static struct rtl_device known_devices[] = {
{ 0x0bda, 0x2832, "Generic RTL2832U" },
{ 0x0bda, 0x2838, "Realtek RTL2832U OEM" },
...
Add your corrupted VID/PID pair directly into this struct array:
{ 0x0ba0, 0x2838, "Corrupted RadarBox Stick" },
Save and exit the file (Ctrl+O, Enter, Ctrl+X).
Step 4: Compile the Patched Tools
Create a build directory, run CMake, and compile:
mkdir build && cd build
cmake ../ -DDETACH_KERNEL_DRIVER=ON
make
You now have a custom version of rtl_eeprom sitting inside build/src/ that recognizes your corrupted stick.
Step 5: Restore the Factory EEPROM
With the corrupted SDR plugged in, execute your newly compiled rtl_eeprom binary using the -g realtek_oem flag to force-write clean factory settings back to the chip:
sudo ./src/rtl_eeprom -g realtek_oem
You will see output similar to this:
Found Corrupted RadarBox Stick
Current configuration:
__________________________________________
Vendor ID: 0x0ba0
Product ID: 0x2838
Manufacturer: Realtek
Product: RTL2838UHIDIR
Serial number: 1090
Serial number enabled: yes
IR endpoint enabled: yes
Remote wakeup enabled: no
__________________________________________
New configuration:
Realtek default OEM with EEPROM
__________________________________________
Vendor ID: 0x0bda
Product ID: 0x2838
Manufacturer: Realtek
Product: RTL2838UHIDIR
Serial number: 00000001
Serial number enabled: yes
IR endpoint enabled: yes
Remote wakeup enabled: no
__________________________________________
Write new configuration to device [y/n]? y
Writing configuration...
Configuration successfully written.
Please unplug and replug the device.
You can see that I tried to set the serial number to 1090, which is less than the required 8 characters. As per the instructions, be sure to remove the stick and re-add it so that your system sees the correct device information.
Step 6: Verify the Fix
Your SDR is unbricked and ready to be passed back into your container or feeder stack.
Running rtl_eeprom should show the device like this:
Found 1 device(s):
0: Generic RTL2832U OEM

Comments
Post a Comment