Monday, February 28, 2011

Re: [Discuss-gnuradio] Re: UHD Announcement - February 25rd 2011

diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc
index 4598e54..b8b99a4 100644
--- a/gr-uhd/lib/gr_uhd_usrp_sink.cc
+++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc
@@ -45,7 +45,8 @@ public:
num_channels, num_channels, io_type.size
)),
_type(io_type),
- _nchan(num_channels)
+ _nchan(num_channels),
+ _has_time_spec(_nchan > 1)
{
_dev = uhd::usrp::multi_usrp::make(device_addr);
}
@@ -172,7 +173,7 @@ public:
//send a mid-burst packet with time spec
_metadata.start_of_burst = false;
_metadata.end_of_burst = false;
- _metadata.has_time_spec = true;
+ _metadata.has_time_spec = _has_time_spec;

size_t num_sent = _dev->get_device()->send(
input_items, noutput_items, _metadata,
@@ -189,7 +190,7 @@ public:
bool start(void){
_metadata.start_of_burst = true;
_metadata.end_of_burst = false;
- _metadata.has_time_spec = true;
+ _metadata.has_time_spec = _has_time_spec;
_metadata.time_spec = get_time_now() + uhd::time_spec_t(0.01);

_dev->get_device()->send(
@@ -217,6 +218,7 @@ protected:
uhd::usrp::multi_usrp::sptr _dev;
const uhd::io_type_t _type;
size_t _nchan;
+ bool _has_time_spec;
uhd::tx_metadata_t _metadata;
double _sample_rate;
};
On 02/28/2011 08:21 AM, Feng Andrew Ge wrote:
> Josh,
>
> Thanks for sharing the information and your changes sound quite reasonable.
>
> However, it seems that your changes have introduced some bugs at the
> transmitter side. I updated my system using your new code (following
> your instructions in your Feb. 24's email titled "Re: GRC + N210 +
> RFX2200 + UHD not working"); then I ran python-based benchmark_tx.py. I
> tested two cases: in the first case, I sent packets continuously and it
> worked well; in the second case, I sent packets every second and the
> transmitter side could send only about 10~12 packets, then stopped
> sending data into USRP2 (based on observation from wireshark results).
> Both cases used 1500B for each packet and the send-buff-size was 100kB.
>

I think this is a problem in gr-uhd:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/lib/gr_uhd_usrp_sink.cc?h=next#n183

I am putting a time stamp into the packet. This is helpful for a
multi-channel continuous transmission, but not single channel
non-continuous.

Can you apply the diff attached and let me know if that fixes the problem?

Thanks,
-Josh

No comments:

Post a Comment