There are two different metadata types:
1) Inline
2) Detached

Here, you are using the detached headers. With detached, the raw samples are in 
a file, say myfile.sc16, and the metadata in myfile.sc16.hdr. See [1] for more 
information on GNURadio metadata.
So suppose you have myfile.sc16 as your raw sample file. Then you generate 
headers for it, since you didn’t record it with any. You also need to give 
gr_mkheader -l num_samps so it knows how long the file is. For sc16 you just do 
file_size_bytes/4 to get # of samples in a file.

# gr_mkheader -r 1.8e6 -t sc16 -f 408e6 myfile.sc16

This generates the file: myfile.sc16.hdr containing the file type, center 
frequency, sample rate, etc. This is simply my convention, but the metadata is 
“linked” to the raw samples by the filename
raw data: myfile.sc16, where sc16 specifies the file format.
metadata: myfile.sc16.hdr

Then, you can give this to gr_fileman to convert the type:

# gr_fileman myfile.sc16 myfile.fc32 -o fc32

gr_fileman looks for filename.hdr for the detached header info. So in this 
case, it files myfile.sc16.hdr, and should happily convert for you.

PWG





[1] http://gnuradio.org/doc/doxygen/page_metadata.html
On Dec 1, 2016, at 9:45 AM, AndroidT Tester 
<itestandroid2...@gmail.com<mailto:itestandroid2...@gmail.com>> wrote:

Thank you Paul, I never heard of gr-analysis before.
So I tried this:

gr_mkheader -r 1.8e6 -t sc16 -f 408e6 myheader

This only created myheader.hdr file. How can I link this to my actual recording 
sample which is 16-bit IQ pair and then convert it to CFile?
Do I concatenate the files? put myheader.hdr at top of my recording?
Sorry again for these newbie questions



On Thu, Dec 1, 2016 at 11:32 AM, Garver, Paul W 
<garv...@gatech.edu<mailto:garv...@gatech.edu>> wrote:
Please copy the list next time so other folks can respond besides me.

Just attach a file sink to the ishort to complex block. There’s also a 
command-line tool called gr_fileman in gr-analysis [1] which will do this, but 
the file needs headers. If you don’t have them, you can generate with 
gr_mkheader in gr-analysis.

[1] https://github.com/garverp/gr-analysis

Hope this helps,
PWG

On Dec 1, 2016, at 9:22 AM, AndroidT Tester 
<itestandroid2...@gmail.com<mailto:itestandroid2...@gmail.com>> wrote:

Now, how can I convert this to a CFILE format where I can play it in Gqrx? 
Thank you

On Wed, Nov 30, 2016 at 11:34 AM, AndroidT Tester 
<itestandroid2...@gmail.com<mailto:itestandroid2...@gmail.com>> wrote:
Thank you very much! It worked :)

On Wed, Nov 30, 2016 at 11:04 AM, Garver, Paul W 
<garv...@gatech.edu<mailto:garv...@gatech.edu>> wrote:
Use a file source block with “short” type into an “Ishort to Complex” block. 
The Ishort to Complex block will de-interleave the shorts into complex samples.

PWG
> On Nov 30, 2016, at 8:55 AM, AndroidT Tester 
> <itestandroid2...@gmail.com<mailto:itestandroid2...@gmail.com>> wrote:
>
> Hey guys,
>
> I have a sample file with IQ pairs, each I and Q is 16-bits, I want to load 
> this in GNURadio companion using File source sink, but I'm not sure how can I 
> specify 16-bit format for I and 16-bit for Q in Gnuradio companion and then 
> connect it to lets say FFT or Waterfall widget. Can someone advise a bit?
>
> Thank you!
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org<mailto: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

Reply via email to