Re: [MM] [PATCH] novatel-lte: use $NWMDN to read own number when +CNUM fails



The number(s) returned by +CNUM include the number return by $NWMDN. Ideally, we should be able to just use +CNUM. But probably due to some firmware issue, +CNUM sometimes returns ERROR unexpectedly shortly after the SIM interface becomes ready. It also returns ERROR for an unactivated SIM.    $NWMDN seems to always behave properly, so that this patch uses it as a fallback.   And also because $NWMDN only returns one number, I still try +CNUM first when possible.

Thanks,
Ben

On Mon, Nov 5, 2012 at 4:48 AM, Aleksander Morgado <aleksander lanedo com> wrote:
On 04/11/12 02:00, Ben Chan wrote:
> +CNUM may return ERROR when the modem fails to read the own numbers from
> the SIM card or when the SIM card hasn't been activated. Use $NWMDN to
> read the MDN as a fallback, which distinguishes these two cases.

Just wondering, shouldn't the plugin try to read always both? OwnNumbers
is an array of strings, you can both the one retrieved from +CNUM (if
any) and the MDN in there.

--
Aleksander



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]