Fix Blue FlightAware SDR Dongle ID

After trying the change the serial number of my 1090ES dongle, somehow the ID of the dongle got changed, so piAware no longer recognizes the dongle.

After the dongle got changed, here is what I see:

pi@piaware:~ $ rtl_eeprom -g realtek_oem
No supported devices found.
pi@piaware:~ $ lsusb
Bus 001 Device 003: ID 00a0:28a0 Realtek RTL2832U
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@piaware:~ $

How can I change the ID of the dongle back to what it was, so that piAware will recognize it?

Software option:

  • Get the librtlsdr source
  • Modify src/librtlsdr.c, add the “wrong” VID/PID to the known_devices array
  • Rebuild librtlsdr
  • The rebuilt rtl_eeprom should now see the dongle, use it to write corrected settings to the eeprom

Hardware option:

  • Locate the SDA/SCL pins on the EEPROM
  • Temporarily short either pin to ground, while connecting the device to the USB bus. It should enumerate with the default VID/PID. Remove the short.
  • Use rtl_eeprom to write corrected settings to the eeprom

I’m not a linux guru. Could you provide detailed instructions for the Software option?

An easier software option is to add wrong ID to file /etc/udev/rules.d/rtl-sdr.rules

(1) Create a new blank file

sudo nano add-wrong-id.sh

(2) In this newly generated file, copy-paste following code

if [[ ! -f /etc/udev/rules.d/rtl-sdr.rules ]]; then
wget -O /etc/udev/rules.d/rtl-sdr.rules https://github.com/abcd567a/temp/raw/main/rtl-sdr.rules
fi

sed -i '1i SUBSYSTEMS=="usb", ATTRS{idVendor}=="00a0", ATTRS{idProduct}=="28a0", MODE:="0666"' /etc/udev/rules.d/rtl-sdr.rules

sed -i '1i # wrong ID enabled' /etc/udev/rules.d/rtl-sdr.rules

(3) Save file

(4) Run file by following command

sudo bash add-wrong-id.sh

(5) Now open file rtl-sdr.rules by following command to check it

sudo nano /etc/udev/rules.d/rtl-sdr.rules

At top of this file you will see 2 additional lines enabling your dongle’s wrong ID 00a0:28a0 (split in 2 parts)

(6) Reboot Pi

(7) issue following command to see if dongle is detected:

rtl_test -t

(8) issue following command to set correct ID

rtl_eeprom -g realtek_oem

 

I followed the instructions, but rtl_test -t still does not recognize the dongle:

If ading wrong ID to rtl-sdr.rules did not make dongle visible to rtl_test, then follow the instructions given by @obj to rebuild librtlsdr & rtl-sdr from source code after modifying file rtl-sdr/src/librtlsdr.c

STEP-1: Install build tools & dependencies:

sudo apt update  
sudo apt install git cmake debhelper  
sudo apt install libusb-1.0-0-dev  

STEP-2: Clone source-code and modify file rtl-sdr/src/librtlsdr.c

git clone https://github.com/osmocom/rtl-sdr.git 
cd rtl-sdr  
sed -i '/PROlectrix/a \\t{ 0x00a0, 0x28a0, "Wrong ID" },' src/librtlsdr.c  

nano src/librtlsdr.c  

In file opened by last command above, scroll down to line 352 to make sure the wrong PID and VID is added.
You can also jump to this line by pressing Ctrl+w then type Wrong, and then presss Enter Key

Please see screenshot below

STEP-3: Build and install modified librtlsdr

cd ~/  
cd rtl-sdr 
sudo dpkg-buildpackage -b --no-sign  


cd ../  
sudo dpkg -i librtlsdr0_*.deb
sudo dpkg -i librtlsdr-dev_*.deb
sudo dpkg -i rtl-sdr_*.deb

STEP-4: Reboot Pi

STEP-5: issue following command to see if dongle is detected:

rtl_test -t

STEP-6: issue following command to set correct ID

rtl_eeprom -g realtek_oem

Later Addition:
Stop dump1090-fa and piaware before issuing above command.

 

 

1 Like

That worked perfectly, except for Step 6. After rebooting Pi, I had to stop dump1090 before I could set the correct ID and change the serial number.

Thanks for the help.

1 Like