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



On Mon, 2012-03-12 at 14:28 +0100, Aleksander Morgado wrote:
> Hey,
> 
> >>         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). 
> >>
> >>
> >> Here's a version that does the 7-then-more retry. It works on my SIM
> >> (retrying from 7 to 34 bytes, even though the entries are all FFFFFF);
> >> see what you think.
> >>
> > 
> > That worked very well for me.
> > 
> > Now that we have the 3 values we needed from the SIM card (2 flags +
> > SPDI list), we could now also implement the "RequiredNameDisplay"
> > property which contains the whole logic for us, as Dan suggested
> > earlier. Given that this value depends on the current 3GPP operator ID,
> > I would really include that new property in the 3GPP interface. Will try
> > to implement this later on today.
> > 
> 
> I pushed now a '06-api-display-rules' branch in upstream git; with the
> changes discussed here and a new "RequiredDisplayName" property.
> 
> Dan, Nathan, are you guys happy with the new branch? I'm not very
> convinced yet about the flag property names...

Need to check it out; but this is what Marcel is always talking about
when he says that "you really need to implement the SIM filesystem"
since I believe you can actually read the lengths of various EF records
out of the SIM using using some of the various commands, and thus you
know what length to request and you don't have to retry with other
lengths.  That's not foolproof though, since some firmware
implementations are simply dumb.  I ran into the length problem a few
times when trying to read the IMSI and the MNC length; same thing there
where some modems want one length and others want another, even though
it's exactly the same damn SIM just swapped between devices.

Dan




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