Home » Projects » Software Projects » Dual Channel SDR Recording Accomplished

Dual Channel SDR Recording Accomplished

dual channel sdr recording

 

Here is a quick description of how I accomplished dual channel SDR recording for time-shifted diversity reception. Turned out to be fairly easy.

Most folks use WAV files (Resource Interchange File Format or RIFF) to save I/Q data from their radios. This approach, invented by Microsoft and IBM in 1991 works well and has become a standard. But WAV file drivers are complicated to code, so I started off with something different and easier.

Most programming languages provide ready made file streaming components. File streaming is just a way to transfer large amounts of data continuously in smaller chunks. Delphi has such a component called a Buffered File Stream.

As described earlier, I already designed an object to store and move I/Q data through my SDR on a continuous basis. So, I thought, why not just use that mechanism for recording and playback?

Shown above is the basic format I use for dual channel SDR recording. It’s a proprietary approach, but who cares? I am the only user. And since my approach already contains two channels in frames or chunks, I don’t need to worry about interleaving data to keep everything synchronized.

Another benefit is that my data objects already contain all the information about the recording such as frequency, sampling rate, time and date – whatever I want. These things are not easy to store in the standard WAV format without lots of customization.

Dual Channel SDR Recording Structure

Each file starts with a Header which describes the data type, the number of frames or chunks contained, and any other information. Once my program reads this header, it knows exactly what to do with the subsequent data.

Then, each frame or chunk is saved in a standard format which is written to the hard drive in real time as the data arrives. The total number of frames are counted and that total is written back into the Header when the recording ends.

My program names the file with the Time and Date. You can change the file name later to something more descriptive. The actual name of the file is irrelevant, as all the required information for decoding is contained in the file.

For the real techies among you, I used a Windows operating system Event to signal back to the file player when it needs to provide more data to keep the stream running properly

One comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.