E1750 Reloaded - QMI - STATIC - DHCP - IPv4

Aleksander Morgado aleksander at aleksander.es
Mon Aug 11 01:13:45 PDT 2014


On Sun, Aug 10, 2014 at 10:41 PM, poma <pomidorabelisima at gmail.com> wrote:
> Fallback to MM_BEARER_IP_METHOD_DHCP if can't "ping-pong" with the Google Public DNS
>
> ---
>  src/mm-bearer-qmi.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c
> index c25b9f7..b632b69 100644
> --- a/src/mm-bearer-qmi.c
> +++ b/src/mm-bearer-qmi.c
> @@ -337,6 +337,13 @@ get_ipv4_config (QmiMessageWdsGetCurrentSettingsOutput *output, guint32 mtu)
>          mm_dbg ("       MTU: %d", mtu);
>      }
>
> +    if (system("ping -q -c2 8.8.8.8")) {
> +        mm_bearer_ip_config_set_method (config, MM_BEARER_IP_METHOD_DHCP);
> +        mm_info ("STATIC ain't workin, let's go DHCP");
> +    } else {
> +        mm_info ("we're staying STATIC, but here we're already connected so someone should check does STATIC actually works");
> +    }
> +
>      return config;

:) No, that won't work. Not every APN gives you access to the
Internet, some users may use APNs that give them access to private
networks managed by the operators. I've worked with such a case in the
past.

I'd rather just fall back to DHCP for IPv4 instead of adding that ping
(Huawei-only?). I tried to test the issue with my Huawei QMI modem but
unfortunately it seems to be broken (doesn't detect the SIM properly);
Dan also said that he would check that with his modems.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list