[USRP-users] Receiving samples with dealy at regular intervals

kamal kumar jeldi jeldi.kamal2011 at gmail.com
Tue Apr 14 09:56:28 EDT 2015

Hi All,

P.S : This is the contiguous mail to the mail with the same subject in the
April,2015 threads. I am unable to get reply mail so happened to make it
this way

Hello Marcus,

Thanks for your suggestion to use rx_timed_samples.cpp example code for
receiving data samples with delay at regular intervals, Here I present the
visual representation again,

<--NRXP1-->  <--RXP--> <--NRXP-->  <--RXP--><--NRXP-->  <--RXP--> and so on
|                     ||-------------||
||-------------||                    ||-------------| and so on

NRXP1 : No receiving period with value less than NRXP
NRXP : No receiving period
RXP: receiving period

stop receiving for 10us initially and then receive some 80 samples and from
next on stop receiving for 22us and then receive 80 samples and go on...

so after getting some inspiration form rx_timed_samples.cpp and
rx_samples_to_file.cpp example code I came up with this code:

bool stream_changed = false;
stream_cmd.num_samps = 80;
stream_cmd.stream_now = false;
stream_cmd.time_spec = uhd::time_spec_t(0,NRXP1,1000000);

while(condition to start loop)


            std::cout << "Stream altered" << std::endl;
            stream_cmd.time_spec = uhd::time_spec_t(0,22,1000000);
            stream_changed = true;

       //some error checking code on meta_data received from board

The above code compiles, but during runtime it throws with the following

*Error: Receive error : ERROR_CODE_LATE_COMMAND*

please help me.. Thanks in advance :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20150414/dee4bc43/attachment-0002.html>

More information about the USRP-users mailing list