<div dir="ltr"><div>I haven't seen AT+CFUN=16 supported by other Huawei modems, except MU736. Perhaps Franko can confirm.</div><div><br></div><div>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 :)</div>
<div><div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 14, 2013 at 12:36 AM, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@lanedo.com" target="_blank">aleksander@lanedo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 14/08/13 09:33, Aleksander Morgado wrote:<br>
> On 14/08/13 09:01, Ben Chan wrote:<br>
>> ---<br>
>> plugins/huawei/mm-broadband-modem-huawei.c | 13 ++++++++++++-<br>
>> 1 file changed, 12 insertions(+), 1 deletion(-)<br>
>><br>
><br>
> Pushed, thanks.<br>
><br>
<br>
</div>Second thoughts after pushing, as always :)<br>
<br>
Just wondering:<br>
<br>
* Is it possible to run AT+CFUN=? and get whether the modem supports<br>
AT+CFUN=16?<br>
<br>
* Does AT+CFUN=16 always mean reset?<br>
<br>
If both above are TRUE, can we instead maybe check whether AT+CFUN=16 is<br>
supported and use it for reset if so, and otherwise fallback to ^RESET?<br>
That should avoid having to match the model; and therefore less<br>
maintenance burden when new models are released...<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
>> diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c<br>
>> index c34acc2..f356102 100644<br>
>> --- a/plugins/huawei/mm-broadband-modem-huawei.c<br>
>> +++ b/plugins/huawei/mm-broadband-modem-huawei.c<br>
>> @@ -437,8 +437,19 @@ reset (MMIfaceModem *self,<br>
>> GAsyncReadyCallback callback,<br>
>> gpointer user_data)<br>
>> {<br>
>> + const gchar *command;<br>
>> +<br>
>> + /* Unlike other Huawei modems that support AT^RESET for resetting the modem,<br>
>> + * Huawei MU736 supports AT^RESET but does not reset the modem upon receiving<br>
>> + * AT^RESET. It does, however, support resetting itself via AT+CFUN=16.<br>
>> + */<br>
>> + if (g_strcmp0 (mm_iface_modem_get_model (self), "MU736") == 0)<br>
>> + command = "+CFUN=16";<br>
>> + else<br>
>> + command = "^RESET";<br>
>> +<br>
>> mm_base_modem_at_command (MM_BASE_MODEM (self),<br>
>> - "^RESET",<br>
>> + command,<br>
>> 3,<br>
>> FALSE,<br>
>> callback,<br>
>><br>
><br>
><br>
<br>
<br>
--<br>
Aleksander<br>
</div></div></blockquote></div><br></div></div></div></div>