Basic (Idiotic) questions about ModemManager / mmcli / libqmi / modems / life
Ajay Garg
ajaygargnsit at gmail.com
Sun Aug 14 03:35:47 UTC 2016
Thanks Thomas.
On Sat, Aug 13, 2016 at 11:27 PM, Thomas Schäfer <tschaefer at t-online.de> wrote:
> Am Samstag, 13. August 2016, 22:26:43 schrieb Ajay Garg:
>> Thanks Thomas.
>>
>> On Sat, Aug 13, 2016 at 10:11 PM, <tschaefer at t-online.de> wrote:
>> > Am 13.08.2016 17:28 schrieb Ajay Garg <ajaygargnsit at gmail.com>:
>> >> Thanks Thomas.
>> >>
>> >>
>> >> Question 2 :
>> >> =========
>> >>
>> >> Let's take a modem working in QMI-mode.
>> >>
>> >> With the "qcserial" and "qmi_wwan" drivers installed, and NO OTHER
>> >> VENDOR-SPECIFIC drivers (sierra/zte/huawei/any-other) required or
>> >> installed, the modem (after it is inserted in the USB-slot), will have
>> >>
>> >> the following two created ::
>> >> * /dev/cdc-... device-identifier
>> >> * a wwan network-interface (visible via "ifconfig" command)
>> >>
>> >> Above two will be created, irrespective of whether or not
>> >> ModemManager/mmcli is compiled/running with
>> >> QMI_DEVICE_OPEN_FLAGS_PROXY set or not.
>> >>
>> >> Is my understanding correct?
>> >
>> > The creation of the device files is made by the kernel/udev. Sometimes
>> > "option" is also loaded, so you have some additional serial ports.
>>
>> Question-3
>> ============
>>
>> Ok, so does this mean that none/one of qcserial/qmi_wwan are required?
>> Or both are required to have the wwan-network-interface working properly?
>
> qmi_wwan is a kernel module (part of the kernel). qcserial too.
>
> But I have only user experience with qmi_wwan. Most of my modem use only
> qmi_wwan.
>
> You need
>
> Kernel with qmi_wwan --> ModemManager with qmi-support--> NetworkManager-->NM-
> GUI
>
> In every layer you can use libs/cli, e.g. qmicli, mmcli, nmcli.
>
>>
>> In other words, if I understand correctly,
>>
>> * /dev/cdc-... would be created, but not by qcserial/qmi_wwan,
>> but by udev/kernel.
>
> No. qmi_wwan is part of the kernel.
>
>
>> * wwan network-interface will be created by one or more of
>> qcserial/qmi_wwan
>> * qcserial/qmi_wwan are definitely required for function of
>> wwan-interface.
>
> yes.
>
> Dear list.
> If I am wrong, pleas correct me.
>
Thomas,
Since no one else replied, I will assume that all my assumptions and
each one of your assertions are correct :)
So, the story so far ::
a)
As soon as a QMI-modem is plugged in, the kernel presents the
following two interfaces AUTOMATICALLY ::
* /dev/cdc-... QMI-port interface
* a wwan-interface
Kernel takes the help of udev/qcserial/qmi_wwan for the above, and
each of these three modules/drivers are required for proper
functioning of QMI-modem.
This will happen even if none of user-apps like
NetworkManager/ModemManager/mmcli/qmicli are even installed. This is
all the kernel's playground till now.
b)
Now, on systems like Ubuntu, NetworkManager and ModemManager start by default.
If version of libqmi on the system is greater than 1.7, then a
daemon-process "qmi-proxy" will be spawned by ModemManager (since
ModemManager starts automatically on system-boot), and all
QMI-requests/responses will be routed via "qmi-proxy".
c)
In user-space, the user may play with the modem via following tools ::
* mmcli (via mmcli <-> ModemManager <-> qmi-proxy <->
/dev/cdc-.. <-> modem)
* qmicli (via qmicli <-> qmi-proxy <-> /dev/cdc-.. <-> modem)
* any custom user-qmi-app (via user-qmi-app <-> qmi-proxy <->
/dev/cdc-.. <-> modem)
Important thing to note in this step is that from mmcli / qmcli /
user-qmi-app perspective, each app thinks that the app has exclusive
control of /dev/cdc-.. <-> modem. Obviously, this is being made
possible via concurrent/serialized handing of requests by qmi-proxy.
Kindly correct me if any of my cumulative understanding is wrong till
this point.
Question 4 :
=========
Is it 100% safe to mix the usage of qmicli / mmcli (or any any other
custom-user-app for that matter)? This is assuming that none of the
apps will shutdown/reinstantiate /dev/cdc-.. QMI-port.
For example, can we instantiate a connection via qmicli, and then read
the stored SMSes via mmcli, and then may be run some other command via
qmicli again on the same modem?
I am assuming that qmicli and mmcli are stateless applications (i.e.
they do not maintain any INTERNAL states for any modem).
Will be grateful to have a confirmation / rejection on my hypothesis
of question 4.
Thanks and Regards,
Ajay
>
> Thomas
>
>
>
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
--
Regards,
Ajay
More information about the ModemManager-devel
mailing list