Dear All,
As i being experimenting with USRP and GNU Radio, i notice that some of
the
last packet of my data that i receive is keep inside the USB buffer.
this
data will be flush out to my PC only if i transmit (receive) new data. i
believe that this is due to the minimum byte data needed by the USB
buffer
(fusb_block_size - 512). so even though there is some receive packet
inside
the USRP, it won’t be send to the PC until it is a group of 512 byte of
data. am i correct?
so at the transmitter, i should send an extra 512byte of data for each
of my
last packet that is transmitted for one session…
please help me to confirm my understanding… thank you very much in
advance
for any help.
Adib
View this message in context:
http://www.nabble.com/usrp-usb-buffer-minimum-requirement-tp25166744p25166744.html
Sent from the GnuRadio mailing list archive at Nabble.com.
adib_sairi wrote:
last packet that is transmitted for one session…
I think there is more to it than just the usrp and usb. Today I have
been working on a test- case
where I have the following flow- graph (in c++ if that might matter)
file_sink-> “some blocks” -> file_sink
If the file- sink was not exactly 8k = 8192 bytes large the whole flow-
graph gave unpredictable output in terms of size of the output. Note
that I used “repeat = false” in the file- source.
I’m not sure if it’s the number of items in the source or the size of
it, since it in my case is the same (using a bit- file- source).
Hope this helps (and that someone else has more input)
//Mattias
On Thu, Aug 27, 2009 at 12:46:13PM +0200, Mattias K. wrote:
adib_sairi wrote:
Dear All,
As i being experimenting with USRP and GNU Radio, i notice that some of the
last packet of my data that i receive is keep inside the USB buffer. this
data will be flush out to my PC only if i transmit (receive) new data. i
believe that this is due to the minimum byte data needed by the USB buffer
(fusb_block_size - 512). so even though there is some receive packet inside
the USRP, it won’t be send to the PC until it is a group of 512 byte of
data. am i correct?
Yes.
that I used “repeat = false” in the file- source.
I’m not sure if it’s the number of items in the source or the size of
it, since it in my case is the same (using a bit- file- source).
The length of the output should be reproducible from run to run.
(Assuming you let it run to completion and aren’t ^C-ing it.)
If it’s not, there’s a bug somewhere (unless you’re deliberately
introducing some random input to the system somewhere).
Hope this helps (and that someone else has more input)
//Mattias
Eric
Mattias K. wrote:
inside
file_sink-> “some blocks” -> file_sink
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
File sinks use the stdio library, which by default buffers data, and it
only gets flushed out to your file at 8K intervals. This can cause
some strangeness sometimes, for sure.
There should be a way to ask the Gnu Radio library to do an fflush()
after every write.
–
Marcus L.
Principal Investigator, Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org