<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/14586">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">trx_toolkit/fake_trx.py: introduce a TRXC command for C/I simulation<br><br>Change-Id: I7080effbbc1022d1884c6d6f0cb580eba8e514ff<br>---<br>M src/target/trx_toolkit/fake_trx.py<br>1 file changed, 28 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/86/14586/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py</span><br><span>index 12bcb80..641dd07 100755</span><br><span>--- a/src/target/trx_toolkit/fake_trx.py</span><br><span>+++ b/src/target/trx_toolkit/fake_trx.py</span><br><span>@@ -63,8 +63,15 @@</span><br><span>         from (rssi_base - rssi_rand_threshold)</span><br><span>                 to (rssi_base + rssi_rand_threshold).</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       Please note that randomization of both RSSI and ToA is optional,</span><br><span style="color: hsl(0, 100%, 40%);">-        and can be enabled from the control interface.</span><br><span style="color: hsl(120, 100%, 40%);">+          - C/I (Carrier-to-Interference ratio) - value in dB, computed from</span><br><span style="color: hsl(120, 100%, 40%);">+      the training sequence of each received burst, by comparing the</span><br><span style="color: hsl(120, 100%, 40%);">+        "ideal" training sequence with the actual one. A pair of both</span><br><span style="color: hsl(120, 100%, 40%);">+       base and threshold values defines a range of C/I randomization:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       from (ci_base - ci_rand_threshold)</span><br><span style="color: hsl(120, 100%, 40%);">+              to (ci_base + ci_rand_threshold).</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   Please note that the randomization is optional and disabled by default.</span><br><span> </span><br><span>  == Timing Advance handling</span><br><span> </span><br><span>@@ -250,6 +257,25 @@</span><br><span>                        self.rssi_base += int(request[1])</span><br><span>                    return 0</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+          # C/I simulation</span><br><span style="color: hsl(120, 100%, 40%);">+              # Absolute form: CMD FAKE_CI <BASE> <THRESH></span><br><span style="color: hsl(120, 100%, 40%);">+              elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 2):</span><br><span style="color: hsl(120, 100%, 40%);">+                        log.debug("(%s) Recv FAKE_CI cmd" % self)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                 # Parse and apply both base and threshold</span><br><span style="color: hsl(120, 100%, 40%);">+                     self.ci_base = int(request[1])</span><br><span style="color: hsl(120, 100%, 40%);">+                        self.ci_rand_threshold = int(request[2])</span><br><span style="color: hsl(120, 100%, 40%);">+                      return 0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+            # C/I simulation</span><br><span style="color: hsl(120, 100%, 40%);">+              # Relative form: CMD FAKE_CI <+-BASE_DELTA></span><br><span style="color: hsl(120, 100%, 40%);">+             elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 1):</span><br><span style="color: hsl(120, 100%, 40%);">+                        log.debug("(%s) Recv FAKE_CI cmd" % self)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                 # Parse and apply delta</span><br><span style="color: hsl(120, 100%, 40%);">+                       self.ci_base += int(request[1])</span><br><span style="color: hsl(120, 100%, 40%);">+                       return 0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>           # Path loss simulation: burst dropping</span><br><span>               # Syntax: CMD FAKE_DROP <AMOUNT></span><br><span>               # Dropping pattern: fn % 1 == 0</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmocom-bb/+/14586">change 14586</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/c/osmocom-bb/+/14586"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7080effbbc1022d1884c6d6f0cb580eba8e514ff </div>
<div style="display:none"> Gerrit-Change-Number: 14586 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>