[PATCH 2/2 v2] huawei: implement modem reset via +CFUN=16 for MU736

Ben Chan benchan at chromium.org
Wed Aug 14 07:52:58 PDT 2013


I haven't seen AT+CFUN=16 supported by other Huawei modems, except MU736.
 Perhaps Franko can confirm.

In any case, I'd think using AT+CFUN=16 is a only temporary workaround
until the MU736 firmware fixes AT^RESET. It's kinda weird that MU736
responds to AT^RESET but doesn't reset the modem.  For new models, I hope
the firmware supports AT^RESET properly :)


On Wed, Aug 14, 2013 at 12:36 AM, Aleksander Morgado
<aleksander at lanedo.com>wrote:

> On 14/08/13 09:33, Aleksander Morgado wrote:
> > On 14/08/13 09:01, Ben Chan wrote:
> >> ---
> >>  plugins/huawei/mm-broadband-modem-huawei.c | 13 ++++++++++++-
> >>  1 file changed, 12 insertions(+), 1 deletion(-)
> >>
> >
> > Pushed, thanks.
> >
>
> Second thoughts after pushing, as always :)
>
> Just wondering:
>
>  * Is it possible to run AT+CFUN=? and get whether the modem supports
> AT+CFUN=16?
>
>  * Does AT+CFUN=16 always mean reset?
>
> If both above are TRUE, can we instead maybe check whether AT+CFUN=16 is
> supported and use it for reset if so, and otherwise fallback to ^RESET?
> That should avoid having to match the model; and therefore less
> maintenance burden when new models are released...
>
>
>
> >> diff --git a/plugins/huawei/mm-broadband-modem-huawei.c
> b/plugins/huawei/mm-broadband-modem-huawei.c
> >> index c34acc2..f356102 100644
> >> --- a/plugins/huawei/mm-broadband-modem-huawei.c
> >> +++ b/plugins/huawei/mm-broadband-modem-huawei.c
> >> @@ -437,8 +437,19 @@ reset (MMIfaceModem *self,
> >>         GAsyncReadyCallback callback,
> >>         gpointer user_data)
> >>  {
> >> +    const gchar *command;
> >> +
> >> +    /* Unlike other Huawei modems that support AT^RESET for resetting
> the modem,
> >> +     * Huawei MU736 supports AT^RESET but does not reset the modem
> upon receiving
> >> +     * AT^RESET. It does, however, support resetting itself via
> AT+CFUN=16.
> >> +     */
> >> +    if (g_strcmp0 (mm_iface_modem_get_model (self), "MU736") == 0)
> >> +        command = "+CFUN=16";
> >> +    else
> >> +        command = "^RESET";
> >> +
> >>      mm_base_modem_at_command (MM_BASE_MODEM (self),
> >> -                              "^RESET",
> >> +                              command,
> >>                                3,
> >>                                FALSE,
> >>                                callback,
> >>
> >
> >
>
>
> --
> Aleksander
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20130814/6487d1c7/attachment-0001.html>


More information about the ModemManager-devel mailing list