[PATCH] huawei: fix ^ICCID parsing

Ben Chan benchan at chromium.org
Wed Sep 25 09:08:44 PDT 2013


On Wed, Sep 25, 2013 at 7:09 AM, Aleksander Morgado
<aleksander at lanedo.com> wrote:
> On 09/25/2013 02:56 PM, Dan Williams wrote:
>>> Seems like some modems swap digits in ^ICCID response and some don't.
>>> > We may need to compute the check digit to determine which format to
>>> > use.
>> Ben and I talked about this yesterday; every Huawei modem I have, from
>> the E160g (really old) to a new E397 (recent) swaps the digits in the
>> ^ICCID response.  These are all Qualcomm-based devices.
>>
>> But I think the E3xxx devices are HiSilicon-based devices, not Qualcomm
>> ones.  Which would mean completely different firmware, and probably a
>> completely different team, which probably interpreted the ICCID command
>> specs completely differently (if there were any).  Not sure about the
>> MU736 though.
>
> Using the checksum in the ICCID would be a good way, and easy to
> implement I guess. Another option would be to just check the first two
> digits to see if they're 89 or 98 :) '89' is the ISO 7812 Major Industry
> Identifier for telecomm purposes. Have you guys ever seen a ICCID in a
> SIM card not starting with 89?

Dan, that's an interesting observation. All the modems I've tested so
far are non-Qualcomm based. I'll test a Qualcomm-based modem today.

Regarding the check digit approach, it may depend on the SIM issuers.
Some ICCIDs have 19+1 digits or 18+1 digits. Some may not have the
check digit?


More information about the ModemManager-devel mailing list