Re: [MM 0.6] Plumb up the SPN display-rule bits



On Fri, Mar 9, 2012 at 8:19 AM, Aleksander Morgado <aleksander lanedo com> wrote:
Hey Nathan,
The command to get the SPDI in the code didn't work for me:
--> AT+CRSM=176,28621,0,0,255
<-- +CRSM: 103,0
   OK

Ah, bummer.

 
With that change on, the list is properly parsed:
$ mmcli -i 0
SIM '/org/freedesktop/ModemManager1/SIM/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.

    - Nathan
 


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