<div dir="ltr"><div><div><div><div><div><div><div>Hi Harald,<br><br></div><div>No problem. I totally understand thanks for the reply!<br></div><div><br>> So I suggest we move the existing mncc-python repository into gerrit,<br>
> and then you can submit whatever you think is missing in mncc-python?<br><br></div>Yes, please thanks! As far as I remember there was just 1 issue <br>when I used mncc-python with OsmocomBB on real network.<br></div>I can confirm this again and push the fix there if it still exists. So you can verify it accordingly.<br><br>> A general suggestion (independent of Osmocom): Please always put license<br>
> information in your code.<br><br></div><div>Ok I wasn't aware of this protocol. I read and understood that I need to include GNU PL<br></div><div>and cite if a 3rd party library is used (also check its license conditions)<br></div><div>If I'm contributing to an existing then keep the original license intact (also check its conditions)<br></div><div><br>> If you work on existing code, then please properly clone the original<br>> repository and then add your patches on top of it.<br><br></div>Yes, my apologies I did clone from git. However I must have messed up.<br><br>> The way how to properly solve this (normally) is that Layer1 is sending<br>
something like "ready to send (RTS) indications" to Layer2<br>> L1CTL doesn't have this so far,<br>> Please also keep future osmocom-bb related questions to the<br>
baseband-devel list, thanks!<br><br></div><div>Very interesting reply, thanks! <br>Sure baseband-devel list, I was thinking the same that it should have been there, <br>so other developers would be aware of it.<br></div><div><br>> I'm happy to review it once there is a repo based on the original one<br>
> with change sets to review.  We can also move osmo-sim-auth to gerrit so<br>
> you can submit your patches there.<br><br></div>Yes, please thank you! Sorry about not maintaining history.<br><br></div>I have just added other SIM card related API's like fetch - IMSI, LAI, <span class="gmail-m_-992833381050751401gmail-pl-s"><span class="gmail-m_-992833381050751401gmail-pl-pds"></span>ICCID<span class="gmail-m_-992833381050751401gmail-pl-pds"></span></span> write LOCI etc. <br>(A full fledged sim reader/writer of a SIM card) <br>Let us keep it in osmo-sim-auth for now.<br><br>If
 it is accepted by Osmocom, then later can be merged with Pysim with a 
different executable? <br>(Although it was built for programmable SIM card -
 agreed) We can discuss!<br><br></div>Thanks,<br></div>Gerard<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 29, 2017 at 12:51 AM, Harald Welte <span dir="ltr"><<a href="mailto:laforge@gnumonks.org" target="_blank">laforge@gnumonks.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Gerard,<br>
<br>
sorry for the delayed response, sometimes there are simply too many<br>
tasks and mails to handle :/<br>
<br>
On Fri, May 19, 2017 at 10:28:56PM -0700, Gerard Lawrence Pinto wrote:<br>
> Congrats on OsmoCon 2017!<br>
<br>
thanks!<br>
<span class=""><br>
> I have been working with OsmocomBB, osmo-sim-auth, mncc-python<br>
> projects in Osmocom.<br>
<br>
</span>great.  The important part is now to make sure those changes don't live<br>
somewhere out there but to think how they can be merged mainline!<br>
<span class=""><br>
> To begin with I have committed:<br>
</span>> I) MNCC with OsmocomBB - *<a href="https://github.com/GerardPinto/call-control-mncc-sap" rel="noreferrer" target="_blank">https://github.com/<wbr>GerardPinto/call-control-mncc-<wbr>sap</a><br>
> <<a href="https://github.com/GerardPinto/call-control-mncc-sap" rel="noreferrer" target="_blank">https://github.com/<wbr>GerardPinto/call-control-mncc-<wbr>sap</a>>* (Has both<br>
<span class="">> implementations in Python and C + Tested voice with gsm-fr with gsm audio<br>
> file - works great).<br>
>    -  Some of which can be committed to mncc-python? (In order to support<br>
> MNCC with OsmocomBB too) Although, Harald told me it was built for OpenNITB<br>
> - I'm not sure, the relevance of this contribution to this repo?<br>
<br>
</span>MNCC should be virtually the same, whether on OsmocomBB or on OsmoNITB<br>
(or now OsmoMSC).  Let's avoid having different implementations and<br>
different repositories.  At least regarding the python code, please<br>
submit your changes to mncc-python<br>
<br>
We generally try to avoid fragmentation of code but want to have one<br>
implementation of a given functionality within the project.  So what's<br>
needed is the knowledge of what exactly is missing or needs<br>
modification/improvement in mncc-python, not another implementation with<br>
unclear status on what are advantages/disadvantages of either of them.<br>
<br>
So I suggest we move the existing mncc-python repository into gerrit,<br>
and then you can submit whatever you think is missing in mncc-python?<br>
How does that sound?<br>
<br>
A general suggestion (independent of Osmocom): Please always put license<br>
information in your code.  Otherwise it is not clear if anyone is able<br>
to use it (and under what terms).<br>
<br>
> *Issues faced*: File: l23api.c |  function: l1ctl_rx_traffic_req()<br>
<span class="">> 264 bits (33 bytes) of voice codec are interleaved into 456 bits. The DAC,<br>
> ciphering/deciphering , RF etc. work on 114 bits at a time so, 114 x 4 =<br>
> 456.<br>
> So Layer23 sends 4 - 114 bits into the queue to Layer1 in function =><br>
> l1ctl_rx_traffic_req<br>
</span>> *Code*: num = l1a_txq_msgb_count(&l1s.tx_<wbr>queue[L1S_CHAN_TRAFFIC])<br>
<span class="">> if num > 4 dropping traffic frame. (114 x 4)<br>
> The code above indicates if queue has any (114 x 4) bits drop the incoming<br>
> voice request.<br>
<br>
</span>Well, GSM is a TDMA system and everything has to happen with regard to<br>
the TDMA clock as defined by the BTS (clock master).   So you cannot<br>
send voice frames faster than the TDMA clock is transmitting them.<br>
<br>
> *My Question is*: If I happened to send voice packets 33 bytes really fast.<br>
<span class="">> There should be some kind of buffer rather than a check (Code) and drop<br>
> frame? - OR this case can never happen?<br>
<br>
</span>The way how to properly solve this (normally) is that Layer1 is sending<br>
something like "ready to send (RTS) indications" to Layer2, and Layer2<br>
then knows it has to send another frame.  This way, the timing is<br>
defined by L1.  However, as there is latency between L1 and L2 (serial<br>
line, operating system scheduling, ...) there actually needs to be a bit<br>
of a buffer or an "advancement" of the RTS indications to compensate for<br>
that.<br>
<br>
L1CTL doesn't have this so far, but it would of course be appreciated if<br>
somebody would make it more robust and contribute related patches.<br>
<br>
Please also keep future osmocom-bb related questions to the<br>
baseband-devel list, thanks!<br>
<span class=""><br>
> II) osmo-sim-auth with added other SIM related API's (still needs code<br>
> clean up, SIM response check, code re-usable, README.md etc,)<br>
</span>> * <a href="https://github.com/GerardPinto/osmo-sim-auth" rel="noreferrer" target="_blank">https://github.com/<wbr>GerardPinto/osmo-sim-auth</a><br>
> <<a href="https://github.com/GerardPinto/osmo-sim-auth" rel="noreferrer" target="_blank">https://github.com/<wbr>GerardPinto/osmo-sim-auth</a>> *<br>
<span class="">>  - I did check out PySIM (I think I can add some code to the existing<br>
> repository, with your permission).<br>
<br>
</span>If you work on existing code, then please properly clone the original<br>
repository and then add your patches on top of it.  That way one can<br>
browse the commit log and clearly look ad individual patches.  I'm<br>
unable to figure out what you did by looking at your repository, as you<br>
appear to have imported an unknown version of osmo-sim-auth without<br>
cloning the original repository and keeping history.<br>
<span class=""><br>
> Could you please let me know if my osmo-sim-auth repo? If it is correct to<br>
> combine with PySIM, with the changes done below?<br>
<br>
</span>I'm happy to review it once there is a repo based on the original one<br>
with change sets to review.  We can also move osmo-sim-auth to gerrit so<br>
you can submit your patches there.  But in order to do that, you would<br>
also have to do a proper clone of the original repo and implement your<br>
changes as commits on top.<br>
<br>
Regards,<br>
        Harald<br>
<span class="HOEnZb"><font color="#888888">--<br>
- Harald Welte <<a href="mailto:laforge@gnumonks.org">laforge@gnumonks.org</a>>           <a href="http://laforge.gnumonks.org/" rel="noreferrer" target="_blank">http://laforge.gnumonks.org/</a><br>
==============================<wbr>==============================<wbr>================<br>
"Privacy in residential applications is a desirable marketing option."<br>
                                                  (ETSI EN 300 175-7 Ch. A6)<br>
</font></span></blockquote></div><br></div>