RFAnalyzer icon indicating copy to clipboard operation
RFAnalyzer copied to clipboard

Can't load IQ file into SDR#

Open SonnyJim opened this issue 10 years ago • 5 comments
trafficstars

Just comes up with 'invalid file' :\

SonnyJim avatar Apr 11 '15 15:04 SonnyJim

That's correct. RF Analyzer produces files similar to hackrf_transfer -r (when used with a HackRF). These files are missing the WAV header which is required by SDR#. hackrf_transfer has the -w option to prepend this header. I might add this feature to RF Analyzer too. For now I just wrote a short python script that does the job: https://github.com/demantz/RFAnalyzer/blob/master/tools/prepWAV.py

I tested it with a files recorded by HackRF. I guess this doesn't work with RTL-SDR since the rtl-sdr driver outputs unsigned values (the HackRF outputs signed values). But I didn't tested it. Does anybody know which values to write in the WAV header in order to state that it contains unsigned bytes?

Anyway I hope this helps!

demantz avatar Apr 18 '15 11:04 demantz

Works fine on RTL SDR, Please build into program though as its a bit of a PITA to convert!

Thanks so much :)

jamesweech avatar Apr 18 '15 21:04 jamesweech

Note on the RTL SDR on SDR# it does not show the frequency only 0.0

jamesweech avatar Apr 18 '15 21:04 jamesweech

Hi, I have this error:

Write WAV header... Traceback (most recent call last): File "prepWAV.py", line 65, in writeWavHeader(outFile, filesize, args.samplerate) File "prepWAV.py", line 21, in writeWavHeader file.write(struct.pack('4s', "RIFF")) struct.error: argument for 's' must be a bytes object

lucapgt avatar Jul 29 '19 09:07 lucapgt

Hello, I had the same error as you, use python2 to launch the script, it worked for me :)

Snowolf842 avatar Aug 07 '19 12:08 Snowolf842