Re: PATCH: Auto-Enable WWAN after PIN entry



On Fri, 2012-07-20 at 07:16 +0200, richter ecos de wrote:
> Hi,
> 
> there seems to be a lot of questions about automatically starting GSM connections, but not so much answers..
> 
> Here is a patch that solves it at least for me. It does the following:
> 
> - Wait for starting of the devices until all connections are read
> - Check if there is any gsm connection that should be automatically started
> - If yes, ask for the PIN (or use the saved one)
> - After successful Pin entry, enable WWAN (which will in turn start the auto connections)
> - If there is no auto start gsm connection, don't ask for the PIN and don't enable WWAN. This makes sure WWAN is only enable (and GSM cards powered up), if necessary and it will make sure the user will not be bother with a PIN dialog, unless it's necessary to start a connection (it's very annoying at least for me, if I get this PIN dialog, because I have a build in gsm modem when I am working via LAN or WLAN).
> 
> If later on a connection is started manually and the PIN is not known, then the PIN is requested from the user.
> 
> BTW. Is there a reason why there exists two sorts of PIN dialogs? I think it would be better to use just one dialog and also to always tie the PIN to SIM ID like it is done in the startup dialog?
> 
> Hopefully this patch is helpful for somebody

Great, that is mainly what I had in mind WRT autoconnect.  But as Marius
says, it only solves it for nm-applet, and not for other DEs.  However,
I'm not sure we can solve it in general unless we modify the NM secret
agent API, which we certainly could do.

If we did move this functionality more into NM, then we'd add a second
class of GetSecrets() type functions for a device, where the existing
ones are for a connection.  ModemManager gives us a SIM ID and a Device
ID, and we'd pass these to this function, which would then ask whatever
registered agent for the secrets.  The agent could look them up and
return then, and depending on that response, NM could enable the device
or not, in conjunction with the current rfkill/airplane mode status and
whether any connections matching that device had autoconnect=true.

Dan




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