Re: [MM 0.6] Plumb up the SPN display-rule bits
- From: Nathan Williams <njw google com>
- To: Aleksander Morgado <aleksander lanedo com>
- Cc: networkmanager-list gnome org
- Subject: Re: [MM 0.6] Plumb up the SPN display-rule bits
- Date: Fri, 9 Mar 2012 09:30:40 -0500
On Fri, Mar 9, 2012 at 8:19 AM, Aleksander Morgado <aleksander lanedo com>
The command to get the SPDI in the code didn't work for me:
<-- +CRSM: 103,0
With that change on, the list is properly parsed:
$ mmcli -i 0
Properties | imsi : '214040106373910'
| id : '8934041110059281105'
| operator id : '21404'
| operator name : 'Yoigo'
| operator SPDI list : '21401,21407'
| show PLMN at home : no
| show op name roaming : no
My operator is Yoigo (21404), and I get 2 operators in the SPDI list:
21401 (Vodafone) and 21407 (Movistar). But, I'm not sure about the
flags, I believe I should have gotten a 'yes' in 'show PLMN at home',
will check that later.
For a quick check, grep for the 28486 query - if 'show PLMN at home' is true, the first byte of the response will be 01; this is reporting that the first byte of the response is 00.
A possible fix to handle the case where we don't know how much we can
read would be to try to read the first bytes of the record (3 or 4 or 5
just in case) to get the full record length of the record, assuming 1-3
bytes max for the size field, so we read "A3" + size encoded in 1 or 2
or 3 bytes + "80"); and once we know the whole record size, read the
exact list size.
Yeah, I thought about this, but had hoped to avoid it (If the record is present at all, there will be a minimum of 7 bytes - A3058003FFFFFF - so I think that's the right amount for an initial read).
Don't know, but that very first read may fail I guess, if an empty SPDI
list is found (not sure if that will be "A3028000" or "A300") and we try
to read more than that and the modem doesn't allow it.
On some cards the SPDI just isn't present and the whole thing returns an error (the same can happen with the SPN). It's a tiny bit noisy in the logs, but the correct (empty) results show up in the properties.
And a side note; it seems that the SIM initialization sequence is not
properly run after getting SIM-PIN unlocked, will take care of that myself.
OK, I'm glad this wasn't just me. I'll hold off on reporting my crashes until you hit this.
] [Thread Prev