Hi,
> We've been here before... > > http://comments.gmane.org/gmane.comp.handhelds.ofono/13552 > > Something like this is definitely needed... SIM's from at least one > carrier in Sweden fail to provide the MNC length. The SIM that showed the bug in our case was from a guy in Pakistan. So it seems that these SIMs are used by more operators than one would expect. > The MNC can only be one value and that value can even change depending on > whether you're > operating the same SIM in a 2G device or 3G device. So trying length 3 when > in reality it is 2 > can and most likely will get you into trouble. I do not think this can happen. For a given MCC, the length of the MNC is always the same, or at least that is the recommendation of the ITU. > I might be convinced to default to MNC length 2 in that case > > Regards, > -Denis I do not think this is a good idea. Taking a look the ITU database, countries like USA, Canada, or Colombia have MNC length == 3. As the relationship between MCC and MNC is deterministic, when we know the MCC we can directly find out the MNC length. I agree in that trying first length 2, then 3 is not very elegant. But if we do not do that I see two possible solutions: 1.- Store a table statically or in a file with the correspondence between MCC and MNC length. I foresee maintenance problems with this approach. 2.- Add a function in the provision driver so we can ask for the MNC length for a given MCC, which would be invoked when MNC length is not found in EFad. The implementation would search in the provisioning DB: it could return the length of the first MNC found for that MCC (it must be the same for all networks for that MCC). Opinions on this? Thanks, Alfonso _______________________________________________ ofono mailing list [email protected] https://lists.ofono.org/mailman/listinfo/ofono
