Forum: GNU Radio How to use tune function?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ujala Q. (Guest)
on 2009-06-01 14:15
(Received via mailing list)
The code I am basically using for capturing samples is this:

As my code is completely based on C++, I can't use usrp.tune(self.u, 0,
self.subdev,106.2e6), instead can I use the following method from

bool usrp_standard_rx::tune(int chan, db_base_sptr db, double
usrp_tune_result *result)

in this manner:

// Set DDC center frequency
   urx->set_rx_freq (0, center_freq);
//What should be my center_freq here?

//Set Tuning Frequency
urx->tune(0, db, 106.2e6, result)

// How should I pass the value of db and result?

 // Set Number of channels

 // Set ADC PGA gain

 // Set FPGA Mux
   urx->set_mux(0x32103210); // Board A only

 // Set DDC decimation rate

 // Set DDC phase
Kutik (Guest)
on 2009-06-01 15:57
(Received via mailing list)
I use following code to tune db A, subdevice 0 :

    usrp_tune_result result;
    int site = 0; // site A

    db_base_sptr dbsrx = urx->db(site)[0];
    urx->tune(0, dbsrx, freq, &result);

Where freq is your desired center frequency.

To check the applied configuration you can use:

printf("baseband_freq: %f, ddc_freq: %f, residual_freq: %f\n",
result.baseband_freq, result.dxc_freq, result.residual_freq);

ujala wrote:
>    urx->set_decim_rate(decim);
>  // Set DDC phase
>    urx->set_ddc_phase(0,0);
> _______________________________________________
> Discuss-gnuradio mailing list
> removed_email_address@domain.invalid

View this message in context:
Sent from the GnuRadio mailing list archive at
This topic is locked and can not be replied to.