Hi Ivan,<div><br></div><div>Any reasons why this can't be done without bits hand-coding?</div><div><div class="head" style="font-weight:bold;margin-top:1em;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp<br>index 17120f9..711fb61 100644<br>--- a/<a href="http://cgit.osmocom.org/cgit/osmo-pcu/tree/src/gprs_rlcmac.cpp?id=bbbd79d6f1abd4e7f865f72c15878e0f32f252c3" style="color:blue;text-decoration:none">src/gprs_rlcmac.cpp</a><br>

+++ b/<a href="http://cgit.osmocom.org/cgit/osmo-pcu/tree/src/gprs_rlcmac.cpp?id=c7e7f6868b6f24346424dee904f4e76d3f216ff4" style="color:blue;text-decoration:none">src/gprs_rlcmac.cpp</a></div><div class="hunk" style="color:rgb(0,0,153);font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

@@ -718,6 +718,35 @@ int write_immediate_assignment(bitvec * dest, uint8_t downlink, uint8_t ra, uint</div><div class="ctx" style="color:rgb(51,51,51);font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

                return wp/8;</div><div class="ctx" style="color:rgb(51,51,51);font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)"> }</div><div class="ctx" style="color:rgb(51,51,51);font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+int write_paging_request(bitvec * dest, uint8_t *ptmsi, uint16_t ptmsi_len)</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+{</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+   unsigned wp = 0;</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+    bitvec_write_field(dest, wp,0x0,4);  // Skip Indicator</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+       bitvec_write_field(dest, wp,0x6,4);  // Protocol Discriminator</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+       bitvec_write_field(dest, wp,0x21,8); // Paging Request Message Type</div>

<div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+       bitvec_write_field(dest, wp,0x0,4);  // Page Mode</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+    bitvec_write_field(dest, wp,0x0,4);  // Channel Needed</div>

<div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+       // Mobile Identity</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+   bitvec_write_field(dest, wp,ptmsi_len+1,8);  // Mobile Identity length</div>

<div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+ bitvec_write_field(dest, wp,0xf,4);          // unused</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+       bitvec_write_field(dest, wp,0x4,4);          // PTMSI type</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+   for (int i = 0; i < ptmsi_len; i++)</div>

<div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+ {</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+               bitvec_write_field(dest, wp,ptmsi[i],8); // PTMSI</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+    }</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+       bitvec_write_field(dest, wp,0x0,1); // "L" NLN(PCH) = off</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+  bitvec_write_field(dest, wp,0x0,1); // "L" Priority1 = off</div>

<div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+ bitvec_write_field(dest, wp,0x1,1); // "L" Priority2 = off</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+       bitvec_write_field(dest, wp,0x0,1); // "L" Group Call information = off</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+    bitvec_write_field(dest, wp,0x0,1); // "H" Packet Page Indication 1 = packet paging procedure</div>

<div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+ bitvec_write_field(dest, wp,0x1,1); // "H" Packet Page Indication 2 = packet paging procedure</div>

<div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+ bitvec_write_field(dest, wp,0x3,2); // spare padding</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+       return wp/8;</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">+}</div><div class="add" style="color:green;font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

+</div><div class="ctx" style="color:rgb(51,51,51);font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)"> void write_packet_uplink_ack(RlcMacDownlink_t * block, uint8_t tfi, uint32_t tlli, uint8_t fi, uint8_t bsn)</div>

<div class="ctx" style="color:rgb(51,51,51);font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)"> {</div><div class="ctx" style="color:rgb(51,51,51);font-family:monospace;font-size:13px;white-space:pre;background-color:rgb(255,255,255)">

        // Packet Uplink Ack/Nack  TS 44.060 11.2.28</div><br><div class="gmail_quote">On Fri, Jun 29, 2012 at 7:54 PM, git repository hosting <span dir="ltr"><<a href="mailto:gitosis@osmocom.org" target="_blank">gitosis@osmocom.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is an automated email from the git hooks/post-receive script. It was<br>
generated because a ref change was pushed to the repository containing<br>
the project "UNNAMED PROJECT".<br>
<br>
The branch, master has been updated<br>
       via  c7e7f6868b6f24346424dee904f4e76d3f216ff4 (commit)<br>
       via  bbbd79d6f1abd4e7f865f72c15878e0f32f252c3 (commit)<br>
      from  34460b84072e7ec4c1bafe502aa9d6d859858c0a (commit)<br>
<br>
Those revisions listed above that are new to this repository have<br>
not appeared on any other notification email; so we list those<br>
revisions in full, below.<br>
<br>
- Log -----------------------------------------------------------------<br>
<a href="http://cgit.osmocom.org/cgit/osmo-pcu/commit/?id=c7e7f6868b6f24346424dee904f4e76d3f216ff4" target="_blank">http://cgit.osmocom.org/cgit/osmo-pcu/commit/?id=c7e7f6868b6f24346424dee904f4e76d3f216ff4</a><br>
<br>
commit c7e7f6868b6f24346424dee904f4e76d3f216ff4<br>
Author: Ivan Kluchnikov <<a href="mailto:kluchnikovi@gmail.com">kluchnikovi@gmail.com</a>><br>
Date:   Fri Jun 29 22:53:15 2012 +0400<br>
<br>
    Implemented Paging procedure on CCCH.<br>
    Added functions:<br>
    - gprs_bssgp_pcu_rx_paging_ps() for handling paging message from BSSGP;<br>
    - write_paging_request() for writing paging request message;<br>
    - gprs_rlcmac_paging_request() and pcu_l1if_tx_pch() for sending paging request message to BTS.<br>
<br>
<a href="http://cgit.osmocom.org/cgit/osmo-pcu/commit/?id=bbbd79d6f1abd4e7f865f72c15878e0f32f252c3" target="_blank">http://cgit.osmocom.org/cgit/osmo-pcu/commit/?id=bbbd79d6f1abd4e7f865f72c15878e0f32f252c3</a><br>
<br>
commit bbbd79d6f1abd4e7f865f72c15878e0f32f252c3<br>
Author: Ivan Kluchnikov <<a href="mailto:kluchnikovi@gmail.com">kluchnikovi@gmail.com</a>><br>
Date:   Fri Jun 29 20:30:10 2012 +0400<br>
<br>
    Fixed DL TBF establishment on CCCH.<br>
    We shouldn't use paging procedure for DL TBF establishment, if we didn't receive paging message from BSSGP.<br>
<br>
-----------------------------------------------------------------------<br>
<br>
Summary of changes:<br>
 src/gprs_bssgp_pcu.cpp |   34 +++++++++++++++---------------<br>
 src/gprs_rlcmac.cpp    |   54 +++++++++++++++++++++++++++++++++++++----------<br>
 src/gprs_rlcmac.h      |    3 +-<br>
 src/pcu_l1_if.cpp      |   11 +++++++++<br>
 src/pcu_l1_if.h        |    1 +<br>
 5 files changed, 73 insertions(+), 30 deletions(-)<br>
<br>
<br>
hooks/post-receive<br>
<span class="HOEnZb"><font color="#888888">--<br>
UNNAMED PROJECT<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>Alexander Chemeris.<br>CEO, Fairwaves LLC / ООО УмРадио<br><a href="http://fairwaves.ru" target="_blank">http://fairwaves.ru</a><br>
</div>