<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/17692">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tests/coding: add 11-bit Access Burst samples from a real phone<br><br>This change adds several soft-bit (-127 .. 127) sequences containing<br>EGPRS Packet Channel Request message (11-bit, payload only) sent by<br>an EGPRS capable phone, and captured on the BTS/PCU side using a<br>tool from the TRX Toolkit - trx_sniff.py.<br><br>As can be seen from the test output, none of decoded RA11 values<br>looks like a valid EGPRS Packet Channel Request message (see<br>table 11.2.5a.2 of 3GPP TS 44.060). All test sequences contain<br>the same message with several random bits:<br><br>  < EGPRS Packet channel request message content > ::=<br>      < Signalling : 110011  < RandomBits : bit (5) > >;<br><br>since the phone was trying to perform Attach Request. It seems<br>the bit order of decoded messages is somehow wrong.<br><br>Change-Id: Id80e471d252b9416217b56f4c8c0a8f5f1289fee<br>Related: OS#1548<br>---<br>M tests/coding/coding_test.c<br>M tests/coding/coding_test.ok<br>2 files changed, 60 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/92/17692/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c</span><br><span>index 2ae95f8..17ddfaa 100644</span><br><span>--- a/tests/coding/coding_test.c</span><br><span>+++ b/tests/coding/coding_test.c</span><br><span>@@ -185,6 +185,22 @@</span><br><span>     printd("\n");</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static void test_rach_11bit_sample(uint8_t bsic, const sbit_t *payload)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+  int n_errors, n_bits_total;</span><br><span style="color: hsl(120, 100%, 40%);">+   uint16_t ra11;</span><br><span style="color: hsl(120, 100%, 40%);">+        int rc;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Decode, correcting errors */</span><br><span style="color: hsl(120, 100%, 40%);">+       rc = gsm0503_rach_ext_decode_ber(&ra11, payload, bsic, &n_errors, &n_bits_total);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (rc) {</span><br><span style="color: hsl(120, 100%, 40%);">+             printf("%s(): decoding failed (rc=%d)\n", __func__, rc);</span><br><span style="color: hsl(120, 100%, 40%);">+            return;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   printf("Decoded RA11: 0x%03x\n", ra11);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static void test_sch(uint8_t *info)</span><br><span> {</span><br><span>   uint8_t result[4];</span><br><span>@@ -376,6 +392,39 @@</span><br><span>    0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 },</span><br><span> };</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* 11-bit Access Burst soft-bits (payload only) from an EGPRS capable phone (BSIC 63) */</span><br><span style="color: hsl(120, 100%, 40%);">+static const sbit_t test_rach_11bit[6][36] = {</span><br><span style="color: hsl(120, 100%, 40%);">+       {  103,  109, -108, -110,  107,  108, -106, -120, -121,</span><br><span style="color: hsl(120, 100%, 40%);">+         -120, -105,  122, -104, -109,  108,  109, -109, -111,</span><br><span style="color: hsl(120, 100%, 40%);">+          107,  111, -105, -119, -121, -104,  122, -120,  121,</span><br><span style="color: hsl(120, 100%, 40%);">+          -99, -121, -120, -122, -106,  109,  109, -108, -111  },</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  {  103,  109, -109, -109,  106,  107, -106, -121, -121,</span><br><span style="color: hsl(120, 100%, 40%);">+         -120, -106,  121, -120,  117, -122,  101,  109, -122,</span><br><span style="color: hsl(120, 100%, 40%);">+          120, -120,  101,  118,  120,  102, -125,  101,  110,</span><br><span style="color: hsl(120, 100%, 40%);">+         -120,  121, -101, -121, -118, -121, -106,  108,  121  },</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  { -121, -122, -104,  123, -104, -108,  122, -104, -121,</span><br><span style="color: hsl(120, 100%, 40%);">+         -121, -102,  124, -105, -110,  107,  109, -108, -109,</span><br><span style="color: hsl(120, 100%, 40%);">+          121, -122,  101,  107, -121,  105,  108, -110, -107,</span><br><span style="color: hsl(120, 100%, 40%);">+          124, -104, -109,  120, -122,  100,  122,  104, -123  },</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  { -122, -123, -103,  123, -105, -109,  122, -105, -121,</span><br><span style="color: hsl(120, 100%, 40%);">+         -120, -104,  122, -120,  121, -101, -122, -120, -120,</span><br><span style="color: hsl(120, 100%, 40%);">+         -119, -105,  120, -106, -108,  123, -104, -113,  105,</span><br><span style="color: hsl(120, 100%, 40%);">+          122,  101, -122,  119, -122,  117, -121,  119, -122  },</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  {  105,  110, -109, -109,  107,  108, -108, -120, -120,</span><br><span style="color: hsl(120, 100%, 40%);">+         -121, -106,  121, -104, -107,  106,  108, -108, -108,</span><br><span style="color: hsl(120, 100%, 40%);">+          108,  107, -105, -120, -122, -104,  122, -119,  121,</span><br><span style="color: hsl(120, 100%, 40%);">+         -103, -122, -118, -120, -106,  108,  108, -110, -111  },</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  {  120, -103, -123, -104,  119, -121,  100,  123,  106,</span><br><span style="color: hsl(120, 100%, 40%);">+         -109, -107,  121, -122,  118, -121,  103,  108, -122,</span><br><span style="color: hsl(120, 100%, 40%);">+          120, -119,  121, -103, -121, -119, -121, -103,  124,</span><br><span style="color: hsl(120, 100%, 40%);">+         -106, -108,  122, -103, -106,  121, -120,  119, -121  },</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> uint8_t test_speech_fr[33];</span><br><span> uint8_t test_speech_efr[31];</span><br><span> uint8_t test_speech_hr[15];</span><br><span>@@ -402,6 +451,10 @@</span><br><span>                test_rach_ext(0x1a, i);</span><br><span>      }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ for (i = 0; i < ARRAY_SIZE(test_rach_11bit); i++)</span><br><span style="color: hsl(120, 100%, 40%);">+          test_rach_11bit_sample(0x3f, test_rach_11bit[i]);</span><br><span style="color: hsl(120, 100%, 40%);">+     printf("\n");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    for (i = 0; i < len_l2; i++)</span><br><span>              test_sch(test_l2[i]);</span><br><span> </span><br><span>diff --git a/tests/coding/coding_test.ok b/tests/coding/coding_test.ok</span><br><span>index 2005f6e..496ce89 100644</span><br><span>--- a/tests/coding/coding_test.ok</span><br><span>+++ b/tests/coding/coding_test.ok</span><br><span>@@ -40,6 +40,13 @@</span><br><span> Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 </span><br><span> xcch_decode: n_errors=60 n_bits_total=456 ber=0.13</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+Decoded RA11: 0x7cc</span><br><span style="color: hsl(120, 100%, 40%);">+Decoded RA11: 0x6cc</span><br><span style="color: hsl(120, 100%, 40%);">+Decoded RA11: 0x7cd</span><br><span style="color: hsl(120, 100%, 40%);">+Decoded RA11: 0x4cd</span><br><span style="color: hsl(120, 100%, 40%);">+Decoded RA11: 0x7cc</span><br><span style="color: hsl(120, 100%, 40%);">+Decoded RA11: 0x6ce</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> Encoding: 03 03 01 00 </span><br><span> U-Bits: 111001110011000011100111001100001101001111000000000011010000011010110111111100</span><br><span> S-Bits: 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 81 7f 81 7f 81 81 7f 81 81 81 81 81 81 81 7f 7f </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/17692">change 17692</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/libosmocore/+/17692"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id80e471d252b9416217b56f4c8c0a8f5f1289fee </div>
<div style="display:none"> Gerrit-Change-Number: 17692 </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>