[PATCH] Support 51.011 EFecc format.

Denis Kenzior denkenz at gmail.com
Thu Dec 17 20:09:58 PST 2009


Hi Andrew,

> > This means that any subsequent reads on a device/sim combination of a
> > different generation will give potentially different results.  I'd still
> > like us to cache SIM files according to phase if possible.  This seems to
> > be the safest / sanest approach.
> 
> You're right.  Attached patch adds the SIM phase to the index of the
> cache.  I used EFphase to figure out the SIM phase becuase this way
> seems the least hacky.  This lets us remove some of the autodetection
> of things that depend on the phase in other places in ofono, but right
> now the autodetection can only be a gain for us so I'm not touching
> it.

So I think this is the right approach, but lets tweak it a bit.  According to 
51.011 EFphase can always be read.  So even if 51.011 tells us to read it 
after PIN has been verified there's nothing (theoretically) preventing us from 
doing so earlier.

Thus we can do it in one of two ways

1. Read EFphase on startup and block the rest of the sim file queue until we 
determined the phase.  Then kick off the sim file ops queue as normal.  Here we 
can even shortcut the 'select' operation since we always know the length of 
the file.  Just use read_binary straight away here.

2. Proceed as we do today, but do not cache any file until we know EFphase.  
For EFecc we make sure that EFphase is read after EFecc.  This results in us 
always reading EFecc at startup.

It is important to note that in both approaches we get rid of the race 
conditions of running the sim ops queue and querying cpin & imsi in parallel.

> 
> Do you see any way caching EFecc could have unwanted consequences?
> 

Personally I don't see foresee any issues with us doing so, but in the end it 
might be up to the carriers to tell us what they prefer.  

Regards,
-Denis


More information about the ofono mailing list