discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Control the speed of a source block based on the samp


From: Damindra Bandara
Subject: [Discuss-gnuradio] Control the speed of a source block based on the sample rate
Date: Wed, 28 Sep 2016 10:51:09 -0400

Hi,

I have created a  source block as an oot module that gets an application layer message(message size is 160bytes) to send via USRP. The source block is connected to a packet encoder followed by QPSK modulator and a USRP sink block. If the application message rate is low, the source block generates some additional messages with the same packet size. This is done to ensure that the receiver stays synchronized even the messages are sent irregularly to avoid packet losses during the synchronization period (This action is required because of the time taken for phase synchronization).

The way I implemented this is by monitoring the 'noutput_items' variable at the work() function and generating messages until the (outputbuffer-data)<msg_size  and then returning it. This approach works fine for smaller sample rates of the USRP or throttle. However, when I increase the sample rate, the block starts to act weird. This is what happens. Everything works fine for some time(the time varies from run to run). Then it loses a huge chunk of packets(sometimes even 1000 packets) between the source to encoder interface (I have numbered the messages generated by the source block and when I observe from the encoder I noticed that the messages are missing ). When this happens it also changes the offset of the packets.
(For example, if my initial message is 'xxxxxxx<num>yyyyy....yy , it changes to something like x<num>yyyy............xxxxxxx'). After a while, it synchronizes back. This repeats. 

From what I understand the noutput_items shows how many bits that has to be passed to the next block. Am I misunderstanding something?  I appreciate if someone could help me to solve this problem.

Thank you,
Damindra




--
Damindra Savithri Bandara,
Ph.D. in Information Technology (Candidate)
George Mason University,
Fairfax,
Virginia

reply via email to

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