How to capture fixed length burst of samples (to avoid overflow)

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

On 03/01/2012 12:22 PM, Rickard R. wrote:

Any help appreciated!

/ Rickard


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
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,

Zhonghua

The UHD “rx_samples_to_file” example will do this for you.

–n

On 03/01/2012 10:57 AM, Nick F. wrote:

a)  I would like to know the easiest way (of low complexity) to
rate (like 25 MSPS @ 16 bit I&Q, or 50 MSPS @ 8 bit I&Q) and save
RAM-buffers can hold (or less) and then automatically turn off the
[email protected] <mailto:[email protected]>
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
You can also use the head block in a custom flowgraph and use some math
and knowledge of the sample rate to stop operation after a given time.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs