<div dir="ltr">Hi Aleksander,<div><br></div><div>Thanks for the explanation. I still have lots questions about the function definition in JSON database file. Take the function "qmi_client_nas_get_system_info_finish()" as example</div>
<div><br></div><div>1. How is this function generated? I mean which section of the JSON database defines this function call.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-11 15:54 GMT+08:00 Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey hey,<br>
<div class=""><br>
><br>
> I'm new to libqmi and have some questions about the libqmi architecture:<br>
><br>
> 1. Does libqmi follow the architecture designed by Qualcomm? I mean, what's<br>
> the QMUX layer in libqmi? qmi-proxy?<br>
><br>
<br>
</div>The QMUX layer is basically ignored; we just gather what's inside of<br>
the QMUX payload as a QMI message.<br>
<br>
The qmi-proxy is a process which gets auto-started by the user of<br>
libqmi, so that multiple user processes can talk to the /dev/cdc-wdm<br>
port at the same time. Qualcomm's original driver allowed this by<br>
managing different clients directly in the kernel driver; in our case<br>
we use the qmi-proxy to handle different clients. The approach with<br>
the qmi-proxy is completely optional, e.g. you can of course run<br>
libqmi without a qmi-proxy if only one process will take care of<br>
talking QMI in your system. See:<br>
    <a href="http://sigquit.wordpress.com/2013/09/13/sharing-a-qmi-port-between-processes/" target="_blank">http://sigquit.wordpress.com/2013/09/13/sharing-a-qmi-port-between-processes/</a><br>
<div class=""><br>
> 2. Is it possible to add new functions in libqmi? Any suggestion?<br>
><br>
<br>
</div>Sure it is.<br>
<div class=""><br>
> 3. I noticed that some function might be provided by a library. For example,<br>
> I didn't get the function prototype of<br>
> "qmi_message_nas_get_signal_strength_output_get_signal_strength<br>
>  ()". Did I miss something?<br>
><br>
<br>
</div>The code for all the messages is autogenerated at compile time, from<br>
the JSON database files available under /data. The code generator is<br>
under /build-aux/qmi-codegen.<br>
<br>
Adding support for new message is just about adding the correct<br>
message definitions in the JSON database. See:<br>
    <a href="http://sigquit.wordpress.com/2012/08/20/an-introduction-to-libqmi/" target="_blank">http://sigquit.wordpress.com/2012/08/20/an-introduction-to-libqmi/</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></div><br></div>