This is quite old mail, but I forgot to CC the list back then. ------- Välitetty viesti --------- Lähettäjä: Antti Kaijanmäki <antti kaijanmaki net> Vastaanottaja: Dan Williams <dcbw redhat com> Aihe: Re: Stop this APN madness! Päiväys: Mon, 25 Aug 2008 07:05:10 +0300 pe, 2008-08-22 kello 11:05 -0400, Dan Williams kirjoitti: > On Fri, 2008-08-22 at 13:46 +0300, Antti Kaijanmäki wrote: > > Hi, <snip> > > > > So it's not safe to blindly override CID 1 or anything else for that > > matter. > > Probably not. As an enhancement, NM should: > > 1) Issue AT+CGDCONT=? to get the allowable range of CID slots; not all > devices conform to the standard here of course so you have to quirk > stuff. Some phones may have fewer than 10 slots. Some devices may have > all slots filled. > > 2) Iterate over all the slots with AT+CGDCONT? and search for the > user-specified APN. > > 3) If the user-specified APN is found, use that slot. > > 4) If the user-specified APN is not found, use a free slot. > > 3) If there are no free slots, use the last slot and overwrite whatever > is there. this is almost exactly what I proposed :) great! let's do it! > > Now let's talk about APNs, shall we. Once again you hear a lot of "just > > use 'internet' as APN and you should be ready to go". Well that might be > > true for some providers, but just for example take a look provider > > information of India[3]. > > That's where MBCA comes into play, to gently ask the user which APN they > need :) Yes, that's the whole point of MBCA :) > > On most cases if you use wrong APN you just don't get connected. No true > > harm there except frustrated users. But now a more disturbing scenario; > > some service providers have multiple billing methods for mobile > > broadband. There's at least constant monthly fees, pay-per-Mb and even > > pay-per-time. The selection between these is done by selecting a > > specific APN. > > > > Just think for a minute here if we just blindly issue *99* and that's a > > pay-per-Mb APN (CID 1) when the user thinks he has constant monthly fee > > (CID 2). Or "internet" is the pay-per-Mb APN of users service provider. > > Or we break the users phone by overriding CID 1 with something. > > I think if you don't enter an APN, it'll just use the default APN which > should have been set up from your provider as such. Of course that > might be the wrong APN, but at some point the user needs to take > responsbility for knowing how to operate their equipment. Umm, there's nothing that states that CID 1 contains the default APN. > > Okay. Enough hot air. Now some concrete solutions. > > > > on nm-connection-editor: > > * remove the dial number entry and move the APN entry to it's place > > Probably; I'm not aware of any mobile broadband providers that don't use > the standard numbers, so we can hide this for now. > > > * under the hood set gsm.number to ### (see below for explanation) > > Well, we'd just make it NULL/blank actually, that means "not present". OK. What ever :) > > NM (or modem-manager): > > * when mobile broadband connection is activated check the dial number > > * if the number is not ###, just dial the damn thing > > - don't set APN or anything. User clearly knows which CID is correct. > > You can find wrong directions all over the web. What I'd prefer to do > is require an APN, and if the APN is not present, dial the default APN. > In conjunction with that, make it really easy to select the APN via the > assistant and require this on creation of the connection. Perhaps don't > immediately connect GSM-based devices from the applet, but bring up the > mobile broadband wizard and select an APN for the connection first. As I said there's no such thing as default APN. We can't trust what ever that's set to CID 1 is correct. Indeed we should bring up MBCA if compiled in or the manual mobile broadband settings dialog if MBCA is not available. > > * if the number is ### do something smart > > - first check if specified APN is already assigned to some CID > > - get the list using "AT+CGDCONT?" and iterate that > > - if found, use that CID for dialing (ATD*99***<cid>#) > > Yes. > > > - if the APN is not set then try to append it to the list > > - AT+CGDCONT=<cids+1>,"IP",<apn> > > Yup, but subject to the maximum number of CIDs available which has to be > queried too. > > > - check that it really was appended to the list and use it > > - if appending fails for some reason just override CID 1 > > - AT+CGDCONT=1,"IP",<apn> > > - good fail safe would be storing the original CID to a file so > > that it can be manually restored if we manage to break someones phone. > > Maybe, but that's icing on the cake after doing the rest of the stuff. > I'm a big fan of not coding something until you actually find out it's > needed. So you need at least one user with bricked phone? :) -- Antti
Attachment:
signature.asc
Description: Digitaalisesti allekirjoitettu viestin osa