<p style="white-space: pre-wrap; word-wrap: break-word;">It seems default (having no "tx-attenuation" line in osmo-bts VTY) ends up setting TxGain to 73Db with this patch applied:</p><p style="white-space: pre-wrap; word-wrap: break-word;">-- Transceiver active with 1 channel(s)<br>Thu Nov 29 14:09:49 2018 DMAIN <0000> Transceiver.cpp:724 [tid=139633425098496] command is POWEROFF<br>Thu Nov 29 14:09:49 2018 DMAIN <0000> Transceiver.cpp:724 [tid=139633425098496] command is RXTUNE 1782200<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Transceiver.cpp:724 [tid=139633425098496] command is TXTUNE 1877200<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Transceiver.cpp:724 [tid=139633425098496] command is SETTSC 7<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Transceiver.cpp:826 [tid=139633425098496] Changing TSC from 0 to 7<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Transceiver.cpp:724 [tid=139633425098496] command is POWERON<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Transceiver.cpp:253 [tid=139633425098496] Starting the transceiver<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> radioInterface.cpp:169 [tid=139633425098496] Starting radio device<br>Thu Nov 29 14:09:50 2018 DDEV <0001> LMSDevice.cpp:212 [tid=139633425098496] starting LMS...<br>Thu Nov 29 14:09:50 2018 DDEV <0001> LMSDevice.cpp:316 [tid=139633425098496] Setting TX gain to 64 dB.<br>Thu Nov 29 14:09:50 2018 DDEV <0001> LMSDevice.cpp:336 [tid=139633425098496] Setting RX gain to 36.5 dB.<br>Thu Nov 29 14:09:50 2018 DDEV <0001> LMSDevice.cpp:383 [tid=139633425098496] Initial timestamp 27500<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> radioInterface.cpp:190 [tid=139633425098496] Radio started<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Threads.cpp:116 [tid=139633422538496] Thread 139633422538496 (task 1885) set name: TxLower<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Threads.cpp:116 [tid=139633422444288] Thread 139633422444288 (task 1886) set name: RxLower<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Threads.cpp:116 [tid=139633422284544] Thread 139633422284544 (task 1887) set name: RxUpper0<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Threads.cpp:116 [tid=139633422157568] Thread 139633422157568 (task 1888) set name: TxUpper0<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Transceiver.cpp:724 [tid=139633425098496] command is SETRXGAIN 1<br>Thu Nov 29 14:09:50 2018 DDEV <0001> LMSDevice.cpp:336 [tid=139633425098496] Setting RX gain to 1 dB.<br>Thu Nov 29 14:09:50 2018 DMAIN <0000> Transceiver.cpp:724 [tid=139633425098496] command is SETPOWER 0<br>Thu Nov 29 14:09:50 2018 DDEV <0001> LMSDevice.cpp:316 [tid=139633425098496] Setting TX gain to 73 dB.</p><p style="white-space: pre-wrap; word-wrap: break-word;"><br>So basically SETPOWER 0 means apply 0 attenuation, which gets passed this way:<br>rfGain = mRadio->setTxGain(mRadio->maxTxGain() - (double) atten, chan);</p><p style="white-space: pre-wrap; word-wrap: break-word;">So I think we should set maxTxGain() to 64dB instead of 73dB for it to be applied nicely.</p><p><a href="https://gerrit.osmocom.org/12008">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12008">change 12008</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12008"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-trx </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Id018b27b1d8a2f48d60b29e688583c9a5ac49a81 </div>
<div style="display:none"> Gerrit-Change-Number: 12008 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 29 Nov 2018 13:18:05 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>