# Not recording it all

**URL:** <https://www.ruby-forum.com/t/not-recording-it-all/237675>\
**Category:** GNU Radio\
**Created:** [November 23, 2013, 4:45pm UTC](https://www.ruby-forum.com/t/not-recording-it-all/237675 "2013-11-23T16:45:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [November 23, 2013, 4:45pm UTC](https://www.ruby-forum.com/t/not-recording-it-all/237675/1 "2013-11-23T16:45:46Z")

</div>

I ran my “record” setup for over 10 seconds, but when I run the data  
file  
back through my “playback” I only get about two seconds (if that) of  
result. What happened to all the data, and how can I change things next  
time to get all the data?

My record setup is as follows:

Rate: 50M  
USRP Source  
Low Pass Filter  
Decimation: 50  
Cutoff Freq: 15M  
Transition Width: 5M  
File Sink

Paul B. Huter

---

<div class="post-metadata">

**Author:** ![Paul\_BSHuter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@Paul\_BSHuter](https://www.ruby-forum.com/u/Paul_BSHuter)\
**Post date:** [November 23, 2013, 4:55pm UTC](https://www.ruby-forum.com/t/not-recording-it-all/237675/2 "2013-11-23T16:55:42Z")

</div>

On Sat, Nov 23, 2013 at 10:44 AM, Paul B. Huter [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ```
> Decimation: 50
> Cutoff Freq: 15M
> Transition Width: 5M
> 
> ```
> 
> File Sink
> 
> Paul B. Huter

Try this. You only want to capture for a certain length of time, which  
means a certain number of samples. So put a gr::blocks::head block  
between the filter and file sink. The number of items you’ll want is  
going to be samp\_rate (samps/sec) \* time (secs) (and we know samp\_rate  
here is 1 Msps). That will store exactly that many samples and then  
shut down the application.

Tom

---

<div class="post-metadata">

**Author:** ![Paul\_BSHuter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@Paul\_BSHuter](https://www.ruby-forum.com/u/Paul_BSHuter)\
**Post date:** [November 23, 2013, 5:03pm UTC](https://www.ruby-forum.com/t/not-recording-it-all/237675/3 "2013-11-23T17:03:18Z")

</div>

Thanks, Tom. Just to clarify, the 1Msps comes from the sample rate of  
50M  
and the decimation of 50, correct? Also, is this going to record 10  
seconds  
of “real-time” data? I was having issues with real-time, due to the  
large  
data stream, so will this record data from t=0 to t=10, just not in  
real-time?

Paul B. Huter

---

<div class="post-metadata">

**Author:** ![Paul\_BSHuter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@Paul\_BSHuter](https://www.ruby-forum.com/u/Paul_BSHuter)\
**Post date:** [November 23, 2013, 5:09pm UTC](https://www.ruby-forum.com/t/not-recording-it-all/237675/4 "2013-11-23T17:09:09Z")

</div>

On Sat, Nov 23, 2013 at 11:02 AM, Paul B. Huter [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Thanks, Tom. Just to clarify, the 1Msps comes from the sample rate of 50M  
> and the decimation of 50, correct? Also, is this going to record 10 seconds  
> of “real-time” data? I was having issues with real-time, due to the large  
> data stream, so will this record data from t=0 to t=10, just not in  
> real-time?
> 
> Paul B. Huter

If you’re not running in real time, then you’re dropping samples. The  
way these devices work is that they drop packets of samples, which can  
be quite a lot of data. So you’ll store in your file sink 10 seconds  
worth of data, but if you’re dropping samples, it won’t be 10  
consecutive seconds of data.

But I just realized something. We’ve been trying to help you out  
constructing your filters and everything, but why are you setting your  
input sample rate to 50 MHz only to down-convert in software? The USRP  
will do that for you! You can ask the USRP to set the channel and  
sampling rate to what you want, then you just take that input and  
capture it. It’s done it all for you! And since you’re talking about  
just taking samples for a small amount of time, it’s not like you’re  
trying to use this concept to quickly change channels instantaneously.  
So why not let the hardware do the work for you?

Tom

---

<div class="post-metadata">

**Author:** ![Paul\_BSHuter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@Paul\_BSHuter](https://www.ruby-forum.com/u/Paul_BSHuter)\
**Post date:** [November 23, 2013, 5:41pm UTC](https://www.ruby-forum.com/t/not-recording-it-all/237675/5 "2013-11-23T17:41:52Z")

</div>

Can I do that through GNU Radio, or is that a configuration I need to  
make  
through the USRP (ie Do I need to run the setup for the USRP)?

Paul B. Huter
