Posts

Showing posts with the label WAV

Convert RF Analyzer IQ files to SDR# wav

4.8.2020 Convert RF Analyzer IQ files to SDR# wav RF Analyzer Android app can record IQ (HackRF) files. SDR# cannot load IQ files stored with RF Analyzer. I found this Python script but it does not work in Python 3 (3.6.6) https://github.com/demantz/RFAnalyzer/blob/master/tools/prepWAV.py Struct.error: argument for 's' must be a bytes object I modified def writeWavHeader a bit and now SDR# can load those IQ files def writeWavHeader(file, datasize, samplerate):     file.write(struct.pack('4s', bytes("RIFF", 'utf-8')))     file.write(struct.pack('I', datasize+36))     file.write(struct.pack('4s', bytes("WAVE", 'utf-8')))     file.write(struct.pack('4s', bytes("fmt ", 'utf-8')))     file.write(struct.pack('I', 16))     file.write(struct.pack('H', 1))     file.write(struct.pack('H', 2))     file.write(struct.pack('I', samplerate))     file.write(struct.pack(...

C# - convert Android RF Analyzer IQ file to SDR# wav format

Image
15.8.2020 C# - convert Android RF Analyzer IQ file to SDR# wav format Uses default RF Analyzer IQ file recording format (1000000 samples per second, 2 channels, 8 bits per sample) VS 2019 Community Edition .NET Framework 4.6.1 CnvIQtoWav.exe CnvIQtoWav.exe.config https://github.com/OH1GIU-P/CnvIQtoWav   Code can be optimized by using byte array operations                     BinaryReader br = new BinaryReader(File.Open(infile, FileMode.Open));                     bw.Write(br.ReadBytes((int)fileLen));                     /*for (uint i = 0; i < fileLen; i++)                     {     ...