[PATCH] modem-helpers,sim: auto-detect if ICCID response is character swapped

Dan Williams dcbw at redhat.com
Thu Sep 26 09:37:58 PDT 2013


On Thu, 2013-09-26 at 08:17 -0700, Ben Chan wrote:
> On Thu, Sep 26, 2013 at 12:04 AM, Ben Chan <benchan at chromium.org> wrote:
> 
> >
> >
> >
> > On Wed, Sep 25, 2013 at 11:41 PM, Aleksander Morgado <
> > aleksander at lanedo.com> wrote:
> >
> >> On 09/26/2013 02:33 AM, Ben Chan wrote:
> >> > This patch modifies mm_3gpp_parse_iccid() to auto-detect if an ICCID
> >> > response is character swapped or not by comparsing the major industry
> >> > identifier part of the ICCID response to the known value (89) for
> >> > telecommunication purposes. This addresses the issue where the same AT
> >> > command (e.g. AT^ICCID used by the huawei plugin) does not report ICCID
> >> > in a consistent format.
> >>
> >> This one looks fine to me; but I'm not sure whether Dan was asking for
> >> just warning if an ICCID didn't start with 89 (instead of returning an
> >> error).
> >>
> >>
> > Another data point: I examined 2 callbox test SIMs and their ICCIDs also
> > start with 89. So testing equipments also seem to follow the standard.
> >
> >
> >
> I discussed with Huawei engineers. They also suggested checking the leading
> digits. Dan, if you prefer raising a warning instead of an error, I can
> revise the patch to address that. Though I think an error would be easier
> to spot.

An error is fine with me for now, and the message you've currently got
in the patch is fine for now too.  Though maybe we should put a comment
into the code there to just say something like "FIXME: we know this
doesn't work with non-telecom SIMs, revisit if we find any" or something
like that?  Not critical though, so if you'd prefer not to, that's fine
with me too.

Dan



More information about the ModemManager-devel mailing list