[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] How to capture fixed length burst of samples (to

From: Zhonghua
Subject: Re: [Discuss-gnuradio] How to capture fixed length burst of samples (to avoid overflow)
Date: Thu, 01 Mar 2012 12:57:29 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20120216 Thunderbird/3.1.19

On 03/01/2012 12:22 PM, Rickard Radio wrote:
Hi list,

Two questions:
a)  I would like to know the easiest way (of low complexity) to capture a 
certain length/number of samples (or time period), preferably in gnuradio, and 
then automagically turn off the uhd-reception (and save received samples to 
disk) ?!

b)  Are there any other (kernel, uhd, gnuradio) buffers and settings than "net.core.wmem_max" and 
"net.core.rmem_max"  (set with "sysctl" command in Linux) which affect transmit and 
receive buffering for uhd/gnuradio ?

Background: I am capturing bursts of samples at very high sampling rate (like 25 MSPS @ 
16 bit I&Q, or 50 MSPS @ 8 bit I&Q) and save them to disk for further offline 
processing. But for now I have to manually cancel the application (CTRL-C) after a few 
seconds to avoid overflow since writing to a normal HDD does not keep up for saving in 
continuos real time (which anyway quickly creates too large files). Also, I have tried 
to maximize receive (and transmit) buffering (through mentioned buffers) in order to 
capture (and buffer) as long sequences as possible in RAM before saving them to disk 
and get the inevitable overflows (resulting in loss of received samples). However, to 
avoid overflow without manual interception I would like to capture just as much as the 
RAM-buffers can hold (or less) and then automatically turn off the reception so that 
the burst of samples can be saved to disk without any overflows and loss of samples.  
Feels like it should be an easy way to accomplish
   this but how ?!   FYI: Hardware is USRP N210.

Any help appreciated!

/ Rickard
Discuss-gnuradio mailing list
Hi Rickard,

Maybe you can use the new module of 'stream_selector' provided by great Josh to control your stream. Some simpler ways can also achieve that purpose, such as using 'lock' to control your stream or just set your receiver's gain dynamically. You can bypass the received data to a vector sink simultaneously when you receive them to a buffer, and calculate the length of this vector sink. Once the length meets your requirement, you stop the receiving stream and save these data. After that open the stream again.
I don't know could that help you or not.

Good lucky,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]