Hi Ivan, Thanks for the update. But I think there is a problem in osmo-trx. Your previous update (achemeris/umtrx-fixes branch) was allowing tx gain values between -18 and +7 dbm. I can successfully use that code. Now in uhd_device::setTxGain function UHDDevice.cpp line 535
usrp_dev->get_device()->get_tree()- >access<double>(tx_vga1_gain_path).set(UMTRX_VGA1_DEF); usrp_dev->get_device()->get_tree()- >access<double>(tx_vga2_gain_path).set(UMTRX_VGA2_DEF); does not ever take into consideration the given db value and it sets VGA1 to -18 and VGA2 to +23 hardcodedly. I understand that they are the best values for signal quality and you can limit the ranges in upstream, but as far as I understand it does more. Could you check that. Thank you for your efforts. yavuz On Friday 26 September 2014 18:22:27 you wrote: > Hi Yavuz and Arif, > > Procedure for setting tx gains was broken. > So that osmo-trx and all uhd examples (like tx_samples_from_file) > didn't set tx gains properly. > We have fixed these bugs and now you can update and rebuild uhd > (fairwaves/umtrx branch) and osmo-trx (achemeris/umtrx-fixes branch) > and these problems should go away. > > Thank you for your contribution and reports! > > 2014-09-22 17:06 GMT+04:00 Yavuz Mert <[email protected]>: > > Hi Ivan, > > Thank you for the fixes, that definetely works now. > > Now in init_gains function, tx_gain_min is set to -18 db and tx_gain_max > > is > > set to 7 db. > > Using setTxGain i can set the TX gain to given values between -18 and 7 > > db, > > altough tx_gains[chan] is still returned as -28 db from get_tx_gain(). > > I am just wondering are these the correct range values the umtrx board > > supports. Umtrx about page states the RF output power as "100mW @ 900MHz, > > 50mW @ 1800MHz RF output power". > > This is already a valuable improvement and I can live with it, but I am > > just wondering about higher output power values. > > Also thank you Arif for your contribution. > > > > yavuz > > > > On Saturday 20 September 2014 19:55:22 Ivan Kluchnikov wrote: > >> Try to clone and compile osmo-trx from: > >> git clone git://git.osmocom.org/osmo-trx > >> git checkout achemeris/umtrx-fixes > >> > >> 20 сент. 2014 г. 18:20 пользователь "Arif" <[email protected]> написал: > >> > Ivan Kluchnikov <Ivan.Kluchnikov <at> fairwaves.ru> writes: > >> > > Hi Yavuz, > >> > > Try to use achemeris/umtrx-fixes branch for osmo-trx. > >> > > > >> > > Also check that you use the latest version of UHD from > >> > > >> > https://github.com/fairwaves/UHD-Fairwave > >> > > >> > > If you have old version of FPGA and ZPU, flash current FPGA and ZPU > >> > > >> > images: http://umtrx.org/hardware/flashing/ > >> > > >> > > 18 сент. 2014 г. 21:49 пользователь "Arif" <arif.i84 <at> gmail.com> > >> > > >> > написал:Yavuz Mert <yavuzmertt <at> gmail.com> writes: > >> > > > Hi, > >> > > > I have a problem setting tx power in osmo-trx. I debugged and found > >> > > > >> > > that > >> > > > >> > > > correct gain value is passed to uhd_device::setTxGain. But whatever > >> > > > >> > > value is > >> > > > >> > > > set to usrp_dev->set_tx_gain, usrp_dev->get_tx_gain(chan) returns > >> > > >> > -28 > >> > > >> > > db. > >> > > > >> > > > In uhd_device::setTxGain(double db, size_t chan) I put a printf to > >> > > > >> > > see > >> > > > >> > > > values. > >> > > > > >> > > > usrp_dev->set_tx_gain(db, chan); > >> > > > tx_gains[chan] = usrp_dev->get_tx_gain(chan); > >> > > > printf("Written %f, read %f\n", > >> > > > >> > > db,tx_gains[chan]);fflush(stdout); > >> > > > >> > > > Written 21.000000, read -28.000000 > >> > > > Written 11.000000, read -28.000000 > >> > > > Written -35.000000, read -28.000000 > >> > > > > >> > > > But despite the read values, actually the power is somewhat > >> > > > changed. > >> > > >> > I > >> > > >> > > plugged > >> > > > >> > > > TX1 to spectrum analyzer and set TX gain from -35 to 21 in 2 db > >> > > >> > steps. > >> > > >> > > Until > >> > > > >> > > > -5 db the signal gradually increases, but from -5db to -3db it > >> > > > drops > >> > > > >> > > down to > >> > > > >> > > > lowest. Is there something I should pay attention while using > >> > > > higher > >> > > > >> > > gain > >> > > > >> > > > values. Meanwhile I do not play with RX gain or noise level, leave > >> > > > >> > > them at > >> > > > >> > > > default values.
