Restoring a damaged SDR device - without a C compiler

M105

Member
Joined
Sep 13, 2005
Messages
414
So I somehow damaged an SDR trying to change its serial number with sdr_eeprom. It turned into a Bulk Storage device! After reading this post I had an idea.
Since I had no C compiler and didn't want to set all that up I decided to try editing the librtlsdr.dll file that comes with sdr_eeprom so that it would have a matching VID and PID for my screwed up device. It WORKED!
Steps:
1. Use Zadig to force the driver on the Bulk Storage Device (the damaged SDR) I showed both 0 and 1 of these so I put the driver on both.
2. Use Device Manager to get the VID and PID of the damaged device. (under USB devices) In my case the VID was DAFF and the PID was 2838
3. Make a backup of librtlsdr.dll. You will need to restore it later.
4. Using a hex editor look around byte F600 in the librtlsdr.dll file and you will find an array of VID RID numbers. The second one in that list is: DA 0B 38 28 which matches VID 0BDA and PID 2838 (note the bytes are reversed) This corresponds to a generic RTL2832U OEM. I chose this one because the 2838 was already correct for my damaged dongle so I thought it was probably the original PID and that only the VID was corrupt.
5. So, I edited this entry to read FF DA 38 28 and saved the file. This matched the VID and PID of my damaged device.
6. I ran rtl_eeprom and it found my damaged device. I used the -g command to write the eeprom image for an RTL2832U OEM to it.
7. To my surprise it worked and restored the dongle!
8. Now I replaced the modified dll file with the original file and used rtl_eeprom.exe to change the serial number.

Now with different devices and different scenarios you may have to do things a little differently but the key point here is that you can enable rtl_eeprom.exe to find your device if you are able to edit an entry in that array to match your corrupted device's VID and PID.

I hope this helps someone who wants to try it, and like me, doesn't have the tools to recompile the source code for rtl_eeprom and the dll files. I very much thank the author of the post I linked above for it gave me hope that if I could get my corrupted VID and PID into the .dll file my device could be saved.

I have one other tip for using rtl_eeprom.exe. REMOVE all other dongles and work on only one at a time! I think my crash happened because I was using the -d command instead of just doing it with one dongle as device 0.
 

vagrant

ker-muhj-uhn
Joined
Nov 19, 2005
Messages
3,583
Location
California
I have one other tip for using rtl_eeprom.exe. REMOVE all other dongles and work on only one at a time! I think my crash happened because I was using the -d command instead of just doing it with one dongle as device 0.

I have changed the serial number on dongles and never had multiple plugged in during that process to ensure clarity. Your experiment is interesting and would be worth a try if needed.
 

merlin

Active Member
Joined
Jul 3, 2003
Messages
3,564
Location
DN32su
I use ST-Link for all my SPI work, never tried an SDR dongle thogh. If you have multiple dongles, just be sure you new serial number is different or you will have a collision.
You won't need any compiler unless you are writing your own firmware.
 
Top