Sufficient tests to determine that the WWAN0 interface is up and running?

Aleksander Morgado aleksander at aleksander.es
Mon Aug 15 14:01:12 UTC 2016


On Mon, Aug 15, 2016 at 3:52 PM, Ajay Garg <ajaygargnsit at gmail.com> wrote:
> I have a modem in QMI-mode, and through your help, I have been able to get
> it up and running.
>
>
> Now, my architecture is such ::
>
> *
> There is a python-script, which monitors the health of "wwan0" interface.
>
> *
> There is an application-binary in C, which uses POSIX-socket APIs to create
> a socket (and the socket is created from wwan0, as that is the only active
> interface).
>
>
>
> Now, things are working fine so far.
> I have put in the following tests in the python-script ::
>
> 1)
> Ensure power state: 'on' in output of "mmcli -m modem-id".
>
> 2)
> Ensure state: 'connected' in output of "mmcli -m modem-id".
>
> 3)
> Ensure there is a ipv4 address assigned to wwan0-interface.
>
>
> I run the above 3 tests every 30 seconds, and assume that if all 3 match as
> expected, then the wwan0-interface is fine (and any user-applications using
> POSIX-Socket APIs would continue to achieve new socket-instantiations fine).
>
>
>
> Are the 3 tests sufficient?
> Or any other tests should/must be put?
>
>
> Will be grateful for pointers, that could help make the wwan-interface-up
> testing bullet-proof.

Those should be enough; unless you also want to test real Internet
connectivity as well, e.g. doing a periodic ping -I wwan0 x.x.x.x.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list