Hi everyone, I added two new capabilities to the GR-SQL module, both based on command-line recordings directly from a HackRF using hackrf_transfer -r or with rtl_sdr. HackRF produces signed 8-bit samples and rtl_sdr produces unsigned 8-bit samples which need to be converted before using directly with GNURadio as complex floats. Now the grsql queries can both translate or even better use directly in a GNURadio flowgraph with the gr-sql block (which will translate on the fly).
Couple of examples: Convert entire hackrf_transfer (signed 8-bit format) to gnuradio float IQ stream from the command-line: grsql "SELECT * FROM '/tmp/myrecording.raw' ASDATATYPE HACKRF SAMPLERATE 8M STARTTIME 0.0 SAVEAS '/tmp/extracted.raw'" Extract from 10 seconds on from an rtl_sdr (unsigned 8-bit format) to gnuradio float IQ stream: grsql "SELECT * FROM '/tmp/myrecording.raw' ASDATATYPE RTLSDR SAMPLERATE 2.048M STARTTIME 10.0 SAVEAS '/tmp/extracted.raw'" If in your gnuradio grsql block you use something like this for the sql, it'll let you read the rtl_sdr file on the fly and output the correct float32 complex: SELECT * FROM '/tmp/myrecording.raw' ASDATATYPE HACKRF SAMPLERATE 8M STARTTIME 0.0 As always let me know if/when you run into any bugs! ---------- Forwarded message ---------- From: Ghost Op <ghosto...@gmail.com> Date: Sun, Sep 24, 2017 at 2:08 PM Subject: [Discuss-gnuradio] New GR-SQL Module To: discuss-gnuradio@gnu.org Hi everyone, Back from GRCon2017 (one of the best conferences I've been to) and had some time for some more module development. During the conference in one of the working sessions there was a suggestion for a module that would allow you to query really large IQ files with a SQL-like syntax. Made sense, 500 GB file but you only want a minute or two of the sample rather than having to go through the whole thing. So I put one together and posted up on github (https://github.com/ghostop14/gr-sql). Basic to start. Has a command-line tool called grsql (the readme has some examples) to extract portions to a new file, and a flowgraph block to play excerpt directly. Basic syntax: Get the total time length of a file: grsql "select TIMELENGTH FROM '/tmp/myrecording_593MHz_6.2MSPS.raw' ASDATATYPE complex SAMPLERATE 6.2M" Extracting data from 45.2 seconds to 80 seconds into the save to a new file: grsql "SELECT * FROM '/tmp/myrecording_593MHz_6.2MSPS.raw' ASDATATYPE complex SAMPLERATE 6.2M STARTTIME 45.2 ENDTIME 80.0 SAVEAS '/tmp/extracted.raw'" In the flowgraph block, saveas doesn't apply but you can play specific time ranges back directly from the flowgraph without needing to extract from the file (if you're looking for a signal in the recording). If you're working on some blind analysis, if you extract a sample to a new file, you may want to use the gr-filerepeater block up on my github too. It'll let you put delays between replays so that any blocks looking for signal continuity won't get too "confused" by going directly from the end of a sample immediately to the first sample creating a weird signal discontinuity as it "jumps". gr-filerepeater will let it go "quiet" for a specified period of time so the blocks can settle before trying to decode / demod again. Anyway it's alpha/beta but it works. If you run into any bugs or are working with some big files and want any particular features, drop me a note. If all looks pretty solid and there's interest I can set up a pull to integrate it into pybombs for an easier install. Mike _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio