discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Transmission time control from python level


From: Nowlan, Sean
Subject: Re: [Discuss-gnuradio] Transmission time control from python level
Date: Thu, 12 Jul 2012 13:44:42 +0000

Timestamps (tx_time), start-of-burst (tx_sob) and end-of-burst (tx_eob) tags have to be affixed to samples in the work function of an upstream block (before the UHD sink block). The UHD sink block interprets these stream tags and controls the USRP accordingly, but it doesn’t implement the scheduling itself. Your upstream block needs to know how many samples per 1-second burst (which obviously depends on your USRP sample rate) and affix tx_time, tx_sob, and tx_eob tags to the correct samples.

 

IIRC, one of the stream tags examples already implements the aforementioned algorithm. You just need to lift it and perhaps put it in a new block in line with your GR/GRC processing chain.

 

Sean

 

From: discuss-gnuradio-bounces+address@hidden [mailto:discuss-gnuradio-bounces+address@hidden On Behalf Of Nazmul Islam
Sent: Thursday, July 12, 2012 7:00 AM
To: address@hidden
Cc: address@hidden
Subject: Re: [Discuss-gnuradio] Transmission time control from python level

 

Hi Josh,

 

Thanks a lot for your reply. Can I control the TX stream from the GRC generated python code? In other words, can I change the UHD:USRP source/sink parameters to set up the time stamps or controlling the scheduling?

 

Thanks,

 

Nazmul

On Sun, Jul 8, 2012 at 12:30 AM, Josh Blum <address@hidden> wrote:



On 07/07/2012 09:30 AM, Nazmul Islam wrote:
> I have three USRP's and I want them to transmit a continuous stream of
> repeated GLFSR source in non-overlapping manner. In other words, each
> transmitter will transmit the source for 1 second and then pause for 5
> seconds. All transmitters will transmit during the 'odd' seconds so that
> there is a 1 second gap between the sources. This process should continue
> for ever.
>
> Currently, I am controlling the starting and stopping time of the flow
> graphs to achieve my goals. Unfortunately, the code/flowgraph sometimes
> hangs after 15-20 starts. I am using the following code:
>
> ............
> tb = GLFSR_transmitter()   # The Tx flowgraph : GLFSR source (float) -->
> RRC filter --> USRP Sink
>
> var = 1
>
> while var == 1:     # This process should run forever
>
>      time.sleep(1-time.time() + int(time.time()))
>
>      condition = ((int(time.time())%6) == 0)       # The transmitter will
> transmit after every 6 seconds
>
>      if (condition):
>
>           print time.time()
>
>           tb.start()
>
>           sleep(1)      # The transmitter runs for 1 second
>
>           tb.stop()
>
>           tb.wait()
> ............................
>

You really dont want to stop and start the flow graph. TX streams can be
controlled with stream tags. Links to header docs and example here:
http://code.ettus.com/redmine/ettus/projects/uhd/wiki/GNU_Radio_UHD#Using-UHD-with-GNU-Radio


> My USRP's don't seem to like this frequent starting and stopping of flow
> graphs, especially when I am transmitting at 15-20 MS/s rate. I am using
> USRP N210 (SBX daughterboards) and the latest gnuradio images. What other
> things can I do to achieve this timing control? I am looking for options in
> python level since my C++ OOP background is not strong. Josh talked about
> some python based blocks (

> ttps://github.com/guruofquality/gnuradio/tree/python_blocks2<https://github.com/guruofquality/gnuradio/tree/python_blocks2>)

All that stuff + instructions and coding guide can be found here
https://github.com/guruofquality/grextras/wiki

-josh

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

 


 

--
Muhammad Nazmul Islam

Graduate Student
Electrical & Computer Engineering
Wireless Information & Networking Laboratory
Rutgers, USA.


reply via email to

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