Dear all,

I used USRP N200 with LFRX +UHD to design a receiver, which works well to 
continuously receive data. I am trying to control the received data streaming 
using PPS to trigger received data storing, which is storing the received data 
into a data file for 1ms after receiver detecting the edge of the PPS signal 
every second. 

I tried the approach introduced in gnuradio apps, rx_timed_samples, detecting 
the PPS signal, then setup streaming, then filled meta-data by recv(). 
Eventually, I got to know stream_cmd and recv() are not swigged in gnuradio, 
which means it cannot be implemented in Python.

I got to know the USRP source already tags the samples with a timestamp and I 
do not need to control when streaming begins, because the downstream block 
determine the time of any sample using "metadata". 

1. I am wondering how to fill meta-data in Python if device.recv() is not 
swigged? I need to use the PPS signal to trigger the received data storage for 
1ms every second after detecting the edge of PPS signal every second.
I am using the follow setting method to detect the PPS signal:

    self.clk_cfg = uhd.clock_config()
    self.clk_cfg.pps_source = uhd.clock_config.PPS_SMA
    self.clk_cfg.pps_polarity = uhd.clock_config.PPS_NEG
    self._usrp2.set_clock_config(self.clk_cfg, uhd.ALL_MBOARDS)
    self._usrp2.set_time_unknown_pps(uhd.time_spec(0.0))

2. This PPS setting is done just after the usrp device is created. The PPS 
signal could be detected while usrp device is setup. I am also wondering if 
this approach could make usrp detect PPS signal every second or only once when 
the usrp device is setup?

Any suggestion will be really appreciated!! I am dying to know how this 
scheduling issue could work in Python.

Thanks,
Yan
 
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to