Re: Modem Initialization
On Mon, 2011-04-18 at 11:18 +0200, Vincenzo Romano wrote: > 2011/4/18 Vincenzo Romano : > > 2011/4/18 Vincenzo Romano : > >> 2011/4/15 Dan Williams : > >>> On Fri, 2011-04-15 at 12:37 +0200, Vincenzo Romano wrote: > >>>> 2011/4/14 Dan Williams : > >>>> > On Thu, 2011-04-14 at 16:20 +0200, Vincenzo Romano wrote: > >>>> >> 2011/4/14 Aleksander Morgado : > >>>> >> > > >>>> >> >> >> > Where on earth happens the modem initialization in > >>>> >> >> >> > NetWorkmanager? > >>>> >> >> >> > My interest is for GSM/3G modems as well as for POTS/ISDN > >>>> >> >> >> > modems. > >>>> >> >> >> > I've tried to browse the source code but it's quite difficult. > >>>> >> >> >> > > >>>> >> >> >> > >>>> >> >> >> What I've found so far is that the initialization is done in > >>>> >> >> >> the modemmanager. > >>>> >> >> >> It looks like it's hardcoded, which looks quite weird to me. > >>>> >> >> >> I do need to make some extra optional initialization: is there > >>>> >> >> >> any > >>>> >> >> >> hook for such a > >>>> >> >> >> need? > >>>> >> >> > > >>>> >> >> > ModemManager has some generic setup steps, plus 'plugins' for > >>>> >> >> > each > >>>> >> >> > modem/vendor known to make things differently. If your modem > >>>> >> >> > needs > >>>> >> >> > specific AT commands during initialization, you'll probably need > >>>> >> >> > to > >>>> >> >> > develop a new plugin for it. > >>>> >> >> > > >>>> >> >> > Cheers, > >>>> >> >> > >>>> >> >> Among other things, I'd need to harvest the localization > >>>> >> >> information (AT+CREG) > >>>> >> >> from GSM/3G modems. 99.999% of such modems implement it but I > >>>> >> >> don't see > >>>> >> >> how to do it. > >>>> >> >> > >>>> >> >> Any idea? > >>>> >> > > >>>> >> > I believe the generic plugin already harvests location area code and > >>>> >> > cell ID whenever available in the AT+CREG? reply. Although I never > >>>> >> > tried > >>>> >> > it myself, you can possibly use the GetLocation() method in the > >>>> >> > org.freedesktop.ModemManager.Modem.Location interface (once enabled > >>>> >> > with > >>>> >> > the Enable() method). > >>>> >> > > >>>> >> > Cheers! > >>>> >> > >>>> >> That sounds great. But also needs that I have to write my own D-Bus > >>>> >> code in order > >>>> >> to enable and retrieve the localization data (lac/ci). > >>>> > > >>>> > Ok, what exactly are you trying to do here? If you can explain that, > >>>> > then maybe we can say what the best course of action here is. What > >>>> > specific initialization commands do you need to send? > >>>> > > >>>> > Yes, MM exposes location information via the D-Bus interface, because > >>>> > that's how *all* of MM's interaction with the system works, via D-Bus. > >>>> > > >>>> >> And, finally, for the other things I need to do there's no way at all. > >>>> > > >>>> > Such as? What kinds of things do you need to do? > >>>> > > >>>> > Dan > >>>> > > >>>> >> I've given a look at the modemmanager code and there seems to be no > >>>> >> hook available > >>>> >> to send AT commands before the connection or after it ended. > >>>> > >>>> For mobile boradband I need to get some network related infos, > &g
Re: Modem Initialization
2011/4/18 Vincenzo Romano : > 2011/4/18 Vincenzo Romano : >> 2011/4/15 Dan Williams : >>> On Fri, 2011-04-15 at 12:37 +0200, Vincenzo Romano wrote: >>>> 2011/4/14 Dan Williams : >>>> > On Thu, 2011-04-14 at 16:20 +0200, Vincenzo Romano wrote: >>>> >> 2011/4/14 Aleksander Morgado : >>>> >> > >>>> >> >> >> > Where on earth happens the modem initialization in >>>> >> >> >> > NetWorkmanager? >>>> >> >> >> > My interest is for GSM/3G modems as well as for POTS/ISDN >>>> >> >> >> > modems. >>>> >> >> >> > I've tried to browse the source code but it's quite difficult. >>>> >> >> >> > >>>> >> >> >> >>>> >> >> >> What I've found so far is that the initialization is done in the >>>> >> >> >> modemmanager. >>>> >> >> >> It looks like it's hardcoded, which looks quite weird to me. >>>> >> >> >> I do need to make some extra optional initialization: is there any >>>> >> >> >> hook for such a >>>> >> >> >> need? >>>> >> >> > >>>> >> >> > ModemManager has some generic setup steps, plus 'plugins' for each >>>> >> >> > modem/vendor known to make things differently. If your modem needs >>>> >> >> > specific AT commands during initialization, you'll probably need to >>>> >> >> > develop a new plugin for it. >>>> >> >> > >>>> >> >> > Cheers, >>>> >> >> >>>> >> >> Among other things, I'd need to harvest the localization information >>>> >> >> (AT+CREG) >>>> >> >> from GSM/3G modems. 99.999% of such modems implement it but I don't >>>> >> >> see >>>> >> >> how to do it. >>>> >> >> >>>> >> >> Any idea? >>>> >> > >>>> >> > I believe the generic plugin already harvests location area code and >>>> >> > cell ID whenever available in the AT+CREG? reply. Although I never >>>> >> > tried >>>> >> > it myself, you can possibly use the GetLocation() method in the >>>> >> > org.freedesktop.ModemManager.Modem.Location interface (once enabled >>>> >> > with >>>> >> > the Enable() method). >>>> >> > >>>> >> > Cheers! >>>> >> >>>> >> That sounds great. But also needs that I have to write my own D-Bus >>>> >> code in order >>>> >> to enable and retrieve the localization data (lac/ci). >>>> > >>>> > Ok, what exactly are you trying to do here? If you can explain that, >>>> > then maybe we can say what the best course of action here is. What >>>> > specific initialization commands do you need to send? >>>> > >>>> > Yes, MM exposes location information via the D-Bus interface, because >>>> > that's how *all* of MM's interaction with the system works, via D-Bus. >>>> > >>>> >> And, finally, for the other things I need to do there's no way at all. >>>> > >>>> > Such as? What kinds of things do you need to do? >>>> > >>>> > Dan >>>> > >>>> >> I've given a look at the modemmanager code and there seems to be no >>>> >> hook available >>>> >> to send AT commands before the connection or after it ended. >>>> >>>> For mobile boradband I need to get some network related infos, >>>> localization (LAC+CI) among them. >>>> What I understand is that I need to write a D-BUS client to ask >>>> the modem manager to gather the infos on my behalf. >>> >>> That's correct. There's a python example of this in ModemManager's >>> test/location.py script that enables location services on the modem and >>> reports the LAC/CI for you. That should give you an idea of the D-Bus >>> interfaces required to get the LAC/CI out. Note that the SIM PIN must >>> have been entered, a
Re: Modem Initialization
2011/4/18 Vincenzo Romano : > 2011/4/15 Dan Williams : >> On Fri, 2011-04-15 at 12:37 +0200, Vincenzo Romano wrote: >>> 2011/4/14 Dan Williams : >>> > On Thu, 2011-04-14 at 16:20 +0200, Vincenzo Romano wrote: >>> >> 2011/4/14 Aleksander Morgado : >>> >> > >>> >> >> >> > Where on earth happens the modem initialization in >>> >> >> >> > NetWorkmanager? >>> >> >> >> > My interest is for GSM/3G modems as well as for POTS/ISDN modems. >>> >> >> >> > I've tried to browse the source code but it's quite difficult. >>> >> >> >> > >>> >> >> >> >>> >> >> >> What I've found so far is that the initialization is done in the >>> >> >> >> modemmanager. >>> >> >> >> It looks like it's hardcoded, which looks quite weird to me. >>> >> >> >> I do need to make some extra optional initialization: is there any >>> >> >> >> hook for such a >>> >> >> >> need? >>> >> >> > >>> >> >> > ModemManager has some generic setup steps, plus 'plugins' for each >>> >> >> > modem/vendor known to make things differently. If your modem needs >>> >> >> > specific AT commands during initialization, you'll probably need to >>> >> >> > develop a new plugin for it. >>> >> >> > >>> >> >> > Cheers, >>> >> >> >>> >> >> Among other things, I'd need to harvest the localization information >>> >> >> (AT+CREG) >>> >> >> from GSM/3G modems. 99.999% of such modems implement it but I don't >>> >> >> see >>> >> >> how to do it. >>> >> >> >>> >> >> Any idea? >>> >> > >>> >> > I believe the generic plugin already harvests location area code and >>> >> > cell ID whenever available in the AT+CREG? reply. Although I never >>> >> > tried >>> >> > it myself, you can possibly use the GetLocation() method in the >>> >> > org.freedesktop.ModemManager.Modem.Location interface (once enabled >>> >> > with >>> >> > the Enable() method). >>> >> > >>> >> > Cheers! >>> >> >>> >> That sounds great. But also needs that I have to write my own D-Bus >>> >> code in order >>> >> to enable and retrieve the localization data (lac/ci). >>> > >>> > Ok, what exactly are you trying to do here? If you can explain that, >>> > then maybe we can say what the best course of action here is. What >>> > specific initialization commands do you need to send? >>> > >>> > Yes, MM exposes location information via the D-Bus interface, because >>> > that's how *all* of MM's interaction with the system works, via D-Bus. >>> > >>> >> And, finally, for the other things I need to do there's no way at all. >>> > >>> > Such as? What kinds of things do you need to do? >>> > >>> > Dan >>> > >>> >> I've given a look at the modemmanager code and there seems to be no >>> >> hook available >>> >> to send AT commands before the connection or after it ended. >>> >>> For mobile boradband I need to get some network related infos, >>> localization (LAC+CI) among them. >>> What I understand is that I need to write a D-BUS client to ask >>> the modem manager to gather the infos on my behalf. >> >> That's correct. There's a python example of this in ModemManager's >> test/location.py script that enables location services on the modem and >> reports the LAC/CI for you. That should give you an idea of the D-Bus >> interfaces required to get the LAC/CI out. Note that the SIM PIN must >> have been entered, and the modem enabled, before location services can >> work, because no modem will register with the network until it's (a) PIN >> unlocked and (b) powered up. Regardless of whether MM is used or not. >> >>> But for POTS and ISDN modem I just need to make some specific >>> initialization which apperas to be not possible at all. >> >> ModemManager does not (yet) handle POTS modems and will ignore them. >> Nor does MM handle ISDN since ISDN doesn't really look like a modem and >> doesn't get configured like one either. ISDN would probably be handled >> by NetworkManager instead. >> > > Hi. > Neither in ModemManager-0.4 nor in NetworkManager-0.8.3.999 there's > any location.py. > Could you please tell me where can I read such a piece software? > That looks promising, though. Found! It's not in the official distribution :-( It's here: http://cgit.freedesktop.org/ModemManager/ModemManager/tree/test ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Modem Initialization
2011/4/15 Dan Williams : > On Fri, 2011-04-15 at 12:37 +0200, Vincenzo Romano wrote: >> 2011/4/14 Dan Williams : >> > On Thu, 2011-04-14 at 16:20 +0200, Vincenzo Romano wrote: >> >> 2011/4/14 Aleksander Morgado : >> >> > >> >> >> >> > Where on earth happens the modem initialization in NetWorkmanager? >> >> >> >> > My interest is for GSM/3G modems as well as for POTS/ISDN modems. >> >> >> >> > I've tried to browse the source code but it's quite difficult. >> >> >> >> > >> >> >> >> >> >> >> >> What I've found so far is that the initialization is done in the >> >> >> >> modemmanager. >> >> >> >> It looks like it's hardcoded, which looks quite weird to me. >> >> >> >> I do need to make some extra optional initialization: is there any >> >> >> >> hook for such a >> >> >> >> need? >> >> >> > >> >> >> > ModemManager has some generic setup steps, plus 'plugins' for each >> >> >> > modem/vendor known to make things differently. If your modem needs >> >> >> > specific AT commands during initialization, you'll probably need to >> >> >> > develop a new plugin for it. >> >> >> > >> >> >> > Cheers, >> >> >> >> >> >> Among other things, I'd need to harvest the localization information >> >> >> (AT+CREG) >> >> >> from GSM/3G modems. 99.999% of such modems implement it but I don't see >> >> >> how to do it. >> >> >> >> >> >> Any idea? >> >> > >> >> > I believe the generic plugin already harvests location area code and >> >> > cell ID whenever available in the AT+CREG? reply. Although I never tried >> >> > it myself, you can possibly use the GetLocation() method in the >> >> > org.freedesktop.ModemManager.Modem.Location interface (once enabled with >> >> > the Enable() method). >> >> > >> >> > Cheers! >> >> >> >> That sounds great. But also needs that I have to write my own D-Bus >> >> code in order >> >> to enable and retrieve the localization data (lac/ci). >> > >> > Ok, what exactly are you trying to do here? If you can explain that, >> > then maybe we can say what the best course of action here is. What >> > specific initialization commands do you need to send? >> > >> > Yes, MM exposes location information via the D-Bus interface, because >> > that's how *all* of MM's interaction with the system works, via D-Bus. >> > >> >> And, finally, for the other things I need to do there's no way at all. >> > >> > Such as? What kinds of things do you need to do? >> > >> > Dan >> > >> >> I've given a look at the modemmanager code and there seems to be no >> >> hook available >> >> to send AT commands before the connection or after it ended. >> >> For mobile boradband I need to get some network related infos, >> localization (LAC+CI) among them. >> What I understand is that I need to write a D-BUS client to ask >> the modem manager to gather the infos on my behalf. > > That's correct. There's a python example of this in ModemManager's > test/location.py script that enables location services on the modem and > reports the LAC/CI for you. That should give you an idea of the D-Bus > interfaces required to get the LAC/CI out. Note that the SIM PIN must > have been entered, and the modem enabled, before location services can > work, because no modem will register with the network until it's (a) PIN > unlocked and (b) powered up. Regardless of whether MM is used or not. > >> But for POTS and ISDN modem I just need to make some specific >> initialization which apperas to be not possible at all. > > ModemManager does not (yet) handle POTS modems and will ignore them. > Nor does MM handle ISDN since ISDN doesn't really look like a modem and > doesn't get configured like one either. ISDN would probably be handled > by NetworkManager instead. > Hi. Neither in ModemManager-0.4 nor in NetworkManager-0.8.3.999 there's any location.py. Could you please tell me where can I read such a piece software? That looks promising, though. ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Modem Initialization
On Fri, 2011-04-15 at 12:37 +0200, Vincenzo Romano wrote: > 2011/4/14 Dan Williams : > > On Thu, 2011-04-14 at 16:20 +0200, Vincenzo Romano wrote: > >> 2011/4/14 Aleksander Morgado : > >> > > >> >> >> > Where on earth happens the modem initialization in NetWorkmanager? > >> >> >> > My interest is for GSM/3G modems as well as for POTS/ISDN modems. > >> >> >> > I've tried to browse the source code but it's quite difficult. > >> >> >> > > >> >> >> > >> >> >> What I've found so far is that the initialization is done in the > >> >> >> modemmanager. > >> >> >> It looks like it's hardcoded, which looks quite weird to me. > >> >> >> I do need to make some extra optional initialization: is there any > >> >> >> hook for such a > >> >> >> need? > >> >> > > >> >> > ModemManager has some generic setup steps, plus 'plugins' for each > >> >> > modem/vendor known to make things differently. If your modem needs > >> >> > specific AT commands during initialization, you'll probably need to > >> >> > develop a new plugin for it. > >> >> > > >> >> > Cheers, > >> >> > >> >> Among other things, I'd need to harvest the localization information > >> >> (AT+CREG) > >> >> from GSM/3G modems. 99.999% of such modems implement it but I don't see > >> >> how to do it. > >> >> > >> >> Any idea? > >> > > >> > I believe the generic plugin already harvests location area code and > >> > cell ID whenever available in the AT+CREG? reply. Although I never tried > >> > it myself, you can possibly use the GetLocation() method in the > >> > org.freedesktop.ModemManager.Modem.Location interface (once enabled with > >> > the Enable() method). > >> > > >> > Cheers! > >> > >> That sounds great. But also needs that I have to write my own D-Bus > >> code in order > >> to enable and retrieve the localization data (lac/ci). > > > > Ok, what exactly are you trying to do here? If you can explain that, > > then maybe we can say what the best course of action here is. What > > specific initialization commands do you need to send? > > > > Yes, MM exposes location information via the D-Bus interface, because > > that's how *all* of MM's interaction with the system works, via D-Bus. > > > >> And, finally, for the other things I need to do there's no way at all. > > > > Such as? What kinds of things do you need to do? > > > > Dan > > > >> I've given a look at the modemmanager code and there seems to be no > >> hook available > >> to send AT commands before the connection or after it ended. > > For mobile boradband I need to get some network related infos, > localization (LAC+CI) among them. > What I understand is that I need to write a D-BUS client to ask > the modem manager to gather the infos on my behalf. That's correct. There's a python example of this in ModemManager's test/location.py script that enables location services on the modem and reports the LAC/CI for you. That should give you an idea of the D-Bus interfaces required to get the LAC/CI out. Note that the SIM PIN must have been entered, and the modem enabled, before location services can work, because no modem will register with the network until it's (a) PIN unlocked and (b) powered up. Regardless of whether MM is used or not. > But for POTS and ISDN modem I just need to make some specific > initialization which apperas to be not possible at all. ModemManager does not (yet) handle POTS modems and will ignore them. Nor does MM handle ISDN since ISDN doesn't really look like a modem and doesn't get configured like one either. ISDN would probably be handled by NetworkManager instead. Dan ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: About PPP and modem initialization
On Fri, 2011-04-15 at 12:33 +0200, Vincenzo Romano wrote: > 2011/4/14 Dan Williams : > > On Mon, 2011-04-11 at 12:08 +0200, Vincenzo Romano wrote: > >> Hi. > >> What I need to do is to send a few extra commands to the 3G modem before > >> networkmanager sends the AT+CPIN= and the ATDT commands. > >> I would write down the AT sequences in a file suitable for the chat command > >> but I don't really know where to hook such a thing to (provided that there > >> is any possibility to). > > > > What sort of commands does it need? What kind of modem is it? If the > > modem deviates from the standards then we'll need to either modify an > > existing plugin, or create a new plugin for the modem. > > > > Dan > > I need for example, to get the AT+CREG details or other mobile > broadband related info. ModemManager already supports this for generic GSM/UMTS devices. If your modem isn't handled correctly by the generic plugin then we should fix up the generic plugin for quirks, or make a new plugin for your modem. But if all you need is AT+CREG then that's already covered. I assume you're just looking for LAC/CI, which I'll reply about in the other mail in the "Modem initialization" thread. Dan > >> 2011/4/8 Vincenzo Romano : > >> > 2011/4/8 Dan Williams : > >> >> On Thu, 2011-04-07 at 08:45 +0200, Vincenzo Romano wrote: > >> >>> Hi all. > >> >>> I'm trying to use NetworkManager in order to bring a 3G (mobile > >> >>> broadband) connection up automatically > >> >>> (a so called "system connection"). > >> >>> It works pretty well apart of an annoying recurring request for a PIN. > >> >>> But this is a just a minor thing. > >> >>> > >> >>> What I need to do is to send a few extra AT commands to the USB modem > >> >>> *before* the NM brings the > >> >>> connection up and to retrieve the answers from those commands. > >> >>> I've not been able to find where to hook to. > >> >> > >> >> That's done with a plugin for ModemManager for your specific modem > >> >> hardware. There's plugins for quite a few modems to handle their > >> >> various quirks including initialization stuff. > >> >> > >> >> http://cgit.freedesktop.org/ModemManager/ModemManager/tree/plugins > >> >> > >> >> Dan > >> >> > >> > > >> > > >> > Hi Dan. > >> > I don't understand fully the point. > >> > Are all those plugins part of the NM distribution? > >> > If so, where should I put my AT commands? > >> > And where should I look for the related responses? > >> > > >> > Anyway, I don't see my USB modem in that list. Should I make some > >> > customization? > >> > > >> > -- > >> > Vincenzo Romano at NotOrAnd Information Technologies > >> > Software Hardware Networking Training Support Security > >> > -- > >> > tel: +39 0823 454163 fax: +39 02700506964 cel: +39 339 8083886 > >> > -- > >> > NON QVIETIS MARIBVS NAVTA PERITVS > >> > > >> > >> > >> > > > > > > > > > ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Modem Initialization
2011/4/14 Dan Williams : > On Thu, 2011-04-14 at 16:20 +0200, Vincenzo Romano wrote: >> 2011/4/14 Aleksander Morgado : >> > >> >> >> > Where on earth happens the modem initialization in NetWorkmanager? >> >> >> > My interest is for GSM/3G modems as well as for POTS/ISDN modems. >> >> >> > I've tried to browse the source code but it's quite difficult. >> >> >> > >> >> >> >> >> >> What I've found so far is that the initialization is done in the >> >> >> modemmanager. >> >> >> It looks like it's hardcoded, which looks quite weird to me. >> >> >> I do need to make some extra optional initialization: is there any >> >> >> hook for such a >> >> >> need? >> >> > >> >> > ModemManager has some generic setup steps, plus 'plugins' for each >> >> > modem/vendor known to make things differently. If your modem needs >> >> > specific AT commands during initialization, you'll probably need to >> >> > develop a new plugin for it. >> >> > >> >> > Cheers, >> >> >> >> Among other things, I'd need to harvest the localization information >> >> (AT+CREG) >> >> from GSM/3G modems. 99.999% of such modems implement it but I don't see >> >> how to do it. >> >> >> >> Any idea? >> > >> > I believe the generic plugin already harvests location area code and >> > cell ID whenever available in the AT+CREG? reply. Although I never tried >> > it myself, you can possibly use the GetLocation() method in the >> > org.freedesktop.ModemManager.Modem.Location interface (once enabled with >> > the Enable() method). >> > >> > Cheers! >> >> That sounds great. But also needs that I have to write my own D-Bus >> code in order >> to enable and retrieve the localization data (lac/ci). > > Ok, what exactly are you trying to do here? If you can explain that, > then maybe we can say what the best course of action here is. What > specific initialization commands do you need to send? > > Yes, MM exposes location information via the D-Bus interface, because > that's how *all* of MM's interaction with the system works, via D-Bus. > >> And, finally, for the other things I need to do there's no way at all. > > Such as? What kinds of things do you need to do? > > Dan > >> I've given a look at the modemmanager code and there seems to be no >> hook available >> to send AT commands before the connection or after it ended. For mobile boradband I need to get some network related infos, localization (LAC+CI) among them. What I understand is that I need to write a D-BUS client to ask the modem manager to gather the infos on my behalf. But for POTS and ISDN modem I just need to make some specific initialization which apperas to be not possible at all. -- Vincenzo Romano at NotOrAnd Information Technologies ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: About PPP and modem initialization
2011/4/14 Dan Williams : > On Mon, 2011-04-11 at 12:08 +0200, Vincenzo Romano wrote: >> Hi. >> What I need to do is to send a few extra commands to the 3G modem before >> networkmanager sends the AT+CPIN= and the ATDT commands. >> I would write down the AT sequences in a file suitable for the chat command >> but I don't really know where to hook such a thing to (provided that there >> is any possibility to). > > What sort of commands does it need? What kind of modem is it? If the > modem deviates from the standards then we'll need to either modify an > existing plugin, or create a new plugin for the modem. > > Dan I need for example, to get the AT+CREG details or other mobile broadband related info. >> 2011/4/8 Vincenzo Romano : >> > 2011/4/8 Dan Williams : >> >> On Thu, 2011-04-07 at 08:45 +0200, Vincenzo Romano wrote: >> >>> Hi all. >> >>> I'm trying to use NetworkManager in order to bring a 3G (mobile >> >>> broadband) connection up automatically >> >>> (a so called "system connection"). >> >>> It works pretty well apart of an annoying recurring request for a PIN. >> >>> But this is a just a minor thing. >> >>> >> >>> What I need to do is to send a few extra AT commands to the USB modem >> >>> *before* the NM brings the >> >>> connection up and to retrieve the answers from those commands. >> >>> I've not been able to find where to hook to. >> >> >> >> That's done with a plugin for ModemManager for your specific modem >> >> hardware. There's plugins for quite a few modems to handle their >> >> various quirks including initialization stuff. >> >> >> >> http://cgit.freedesktop.org/ModemManager/ModemManager/tree/plugins >> >> >> >> Dan >> >> >> > >> > >> > Hi Dan. >> > I don't understand fully the point. >> > Are all those plugins part of the NM distribution? >> > If so, where should I put my AT commands? >> > And where should I look for the related responses? >> > >> > Anyway, I don't see my USB modem in that list. Should I make some >> > customization? >> > >> > -- >> > Vincenzo Romano at NotOrAnd Information Technologies >> > Software Hardware Networking Training Support Security >> > -- >> > tel: +39 0823 454163 fax: +39 02700506964 cel: +39 339 8083886 >> > -- >> > NON QVIETIS MARIBVS NAVTA PERITVS >> > >> >> >> > > > -- Vincenzo Romano at NotOrAnd Information Technologies Software Hardware Networking Training Support Security -- tel: +39 0823 454163 fax: +39 02700506964 cel: +39 339 8083886 -- NON QVIETIS MARIBVS NAVTA PERITVS ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Modem Initialization
On Thu, 2011-04-14 at 16:20 +0200, Vincenzo Romano wrote: > 2011/4/14 Aleksander Morgado : > > > >> >> > Where on earth happens the modem initialization in NetWorkmanager? > >> >> > My interest is for GSM/3G modems as well as for POTS/ISDN modems. > >> >> > I've tried to browse the source code but it's quite difficult. > >> >> > > >> >> > >> >> What I've found so far is that the initialization is done in the > >> >> modemmanager. > >> >> It looks like it's hardcoded, which looks quite weird to me. > >> >> I do need to make some extra optional initialization: is there any > >> >> hook for such a > >> >> need? > >> > > >> > ModemManager has some generic setup steps, plus 'plugins' for each > >> > modem/vendor known to make things differently. If your modem needs > >> > specific AT commands during initialization, you'll probably need to > >> > develop a new plugin for it. > >> > > >> > Cheers, > >> > >> Among other things, I'd need to harvest the localization information > >> (AT+CREG) > >> from GSM/3G modems. 99.999% of such modems implement it but I don't see > >> how to do it. > >> > >> Any idea? > > > > I believe the generic plugin already harvests location area code and > > cell ID whenever available in the AT+CREG? reply. Although I never tried > > it myself, you can possibly use the GetLocation() method in the > > org.freedesktop.ModemManager.Modem.Location interface (once enabled with > > the Enable() method). > > > > Cheers! > > That sounds great. But also needs that I have to write my own D-Bus > code in order > to enable and retrieve the localization data (lac/ci). Ok, what exactly are you trying to do here? If you can explain that, then maybe we can say what the best course of action here is. What specific initialization commands do you need to send? Yes, MM exposes location information via the D-Bus interface, because that's how *all* of MM's interaction with the system works, via D-Bus. > And, finally, for the other things I need to do there's no way at all. Such as? What kinds of things do you need to do? Dan > I've given a look at the modemmanager code and there seems to be no > hook available > to send AT commands before the connection or after it ended. > ___ > networkmanager-list mailing list > networkmanager-list@gnome.org > http://mail.gnome.org/mailman/listinfo/networkmanager-list ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: About PPP and modem initialization
On Mon, 2011-04-11 at 12:08 +0200, Vincenzo Romano wrote: > Hi. > What I need to do is to send a few extra commands to the 3G modem before > networkmanager sends the AT+CPIN= and the ATDT commands. > I would write down the AT sequences in a file suitable for the chat command > but I don't really know where to hook such a thing to (provided that there > is any possibility to). What sort of commands does it need? What kind of modem is it? If the modem deviates from the standards then we'll need to either modify an existing plugin, or create a new plugin for the modem. Dan > > 2011/4/8 Vincenzo Romano : > > 2011/4/8 Dan Williams : > >> On Thu, 2011-04-07 at 08:45 +0200, Vincenzo Romano wrote: > >>> Hi all. > >>> I'm trying to use NetworkManager in order to bring a 3G (mobile > >>> broadband) connection up automatically > >>> (a so called "system connection"). > >>> It works pretty well apart of an annoying recurring request for a PIN. > >>> But this is a just a minor thing. > >>> > >>> What I need to do is to send a few extra AT commands to the USB modem > >>> *before* the NM brings the > >>> connection up and to retrieve the answers from those commands. > >>> I've not been able to find where to hook to. > >> > >> That's done with a plugin for ModemManager for your specific modem > >> hardware. There's plugins for quite a few modems to handle their > >> various quirks including initialization stuff. > >> > >> http://cgit.freedesktop.org/ModemManager/ModemManager/tree/plugins > >> > >> Dan > >> > > > > > > Hi Dan. > > I don't understand fully the point. > > Are all those plugins part of the NM distribution? > > If so, where should I put my AT commands? > > And where should I look for the related responses? > > > > Anyway, I don't see my USB modem in that list. Should I make some > > customization? > > > > -- > > Vincenzo Romano at NotOrAnd Information Technologies > > Software Hardware Networking Training Support Security > > -- > > tel: +39 0823 454163 fax: +39 02700506964 cel: +39 339 8083886 > > -- > > NON QVIETIS MARIBVS NAVTA PERITVS > > > > > ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Modem Initialization
2011/4/14 Aleksander Morgado : > >> >> > Where on earth happens the modem initialization in NetWorkmanager? >> >> > My interest is for GSM/3G modems as well as for POTS/ISDN modems. >> >> > I've tried to browse the source code but it's quite difficult. >> >> > >> >> >> >> What I've found so far is that the initialization is done in the >> >> modemmanager. >> >> It looks like it's hardcoded, which looks quite weird to me. >> >> I do need to make some extra optional initialization: is there any >> >> hook for such a >> >> need? >> > >> > ModemManager has some generic setup steps, plus 'plugins' for each >> > modem/vendor known to make things differently. If your modem needs >> > specific AT commands during initialization, you'll probably need to >> > develop a new plugin for it. >> > >> > Cheers, >> >> Among other things, I'd need to harvest the localization information >> (AT+CREG) >> from GSM/3G modems. 99.999% of such modems implement it but I don't see >> how to do it. >> >> Any idea? > > I believe the generic plugin already harvests location area code and > cell ID whenever available in the AT+CREG? reply. Although I never tried > it myself, you can possibly use the GetLocation() method in the > org.freedesktop.ModemManager.Modem.Location interface (once enabled with > the Enable() method). > > Cheers! That sounds great. But also needs that I have to write my own D-Bus code in order to enable and retrieve the localization data (lac/ci). And, finally, for the other things I need to do there's no way at all. I've given a look at the modemmanager code and there seems to be no hook available to send AT commands before the connection or after it ended. ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Modem Initialization
> >> > Where on earth happens the modem initialization in NetWorkmanager? > >> > My interest is for GSM/3G modems as well as for POTS/ISDN modems. > >> > I've tried to browse the source code but it's quite difficult. > >> > > >> > >> What I've found so far is that the initialization is done in the > >> modemmanager. > >> It looks like it's hardcoded, which looks quite weird to me. > >> I do need to make some extra optional initialization: is there any > >> hook for such a > >> need? > > > > ModemManager has some generic setup steps, plus 'plugins' for each > > modem/vendor known to make things differently. If your modem needs > > specific AT commands during initialization, you'll probably need to > > develop a new plugin for it. > > > > Cheers, > > Among other things, I'd need to harvest the localization information (AT+CREG) > from GSM/3G modems. 99.999% of such modems implement it but I don't see > how to do it. > > Any idea? I believe the generic plugin already harvests location area code and cell ID whenever available in the AT+CREG? reply. Although I never tried it myself, you can possibly use the GetLocation() method in the org.freedesktop.ModemManager.Modem.Location interface (once enabled with the Enable() method). Cheers! -- Aleksander ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Modem Initialization
2011/4/14 Aleksander Morgado : > >> > Where on earth happens the modem initialization in NetWorkmanager? >> > My interest is for GSM/3G modems as well as for POTS/ISDN modems. >> > I've tried to browse the source code but it's quite difficult. >> > >> >> What I've found so far is that the initialization is done in the >> modemmanager. >> It looks like it's hardcoded, which looks quite weird to me. >> I do need to make some extra optional initialization: is there any >> hook for such a >> need? > > ModemManager has some generic setup steps, plus 'plugins' for each > modem/vendor known to make things differently. If your modem needs > specific AT commands during initialization, you'll probably need to > develop a new plugin for it. > > Cheers, Among other things, I'd need to harvest the localization information (AT+CREG) from GSM/3G modems. 99.999% of such modems implement it but I don't see how to do it. Any idea? ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Modem Initialization
> > Where on earth happens the modem initialization in NetWorkmanager? > > My interest is for GSM/3G modems as well as for POTS/ISDN modems. > > I've tried to browse the source code but it's quite difficult. > > > > What I've found so far is that the initialization is done in the modemmanager. > It looks like it's hardcoded, which looks quite weird to me. > I do need to make some extra optional initialization: is there any > hook for such a > need? ModemManager has some generic setup steps, plus 'plugins' for each modem/vendor known to make things differently. If your modem needs specific AT commands during initialization, you'll probably need to develop a new plugin for it. Cheers, -- Aleksander ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Modem Initialization
2011/4/14 Vincenzo Romano : > Where on earth happens the modem initialization in NetWorkmanager? > My interest is for GSM/3G modems as well as for POTS/ISDN modems. > I've tried to browse the source code but it's quite difficult. > What I've found so far is that the initialization is done in the modemmanager. It looks like it's hardcoded, which looks quite weird to me. I do need to make some extra optional initialization: is there any hook for such a need? ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Modem Initialization
Where on earth happens the modem initialization in NetWorkmanager? My interest is for GSM/3G modems as well as for POTS/ISDN modems. I've tried to browse the source code but it's quite difficult. -- Vincenzo Romano at NotOrAnd Information Technologies Software Hardware Networking Training Support Security -- NON QVIETIS MARIBVS NAVTA PERITVS ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: About PPP and modem initialization
Hi. What I need to do is to send a few extra commands to the 3G modem before networkmanager sends the AT+CPIN= and the ATDT commands. I would write down the AT sequences in a file suitable for the chat command but I don't really know where to hook such a thing to (provided that there is any possibility to). 2011/4/8 Vincenzo Romano : > 2011/4/8 Dan Williams : >> On Thu, 2011-04-07 at 08:45 +0200, Vincenzo Romano wrote: >>> Hi all. >>> I'm trying to use NetworkManager in order to bring a 3G (mobile >>> broadband) connection up automatically >>> (a so called "system connection"). >>> It works pretty well apart of an annoying recurring request for a PIN. >>> But this is a just a minor thing. >>> >>> What I need to do is to send a few extra AT commands to the USB modem >>> *before* the NM brings the >>> connection up and to retrieve the answers from those commands. >>> I've not been able to find where to hook to. >> >> That's done with a plugin for ModemManager for your specific modem >> hardware. There's plugins for quite a few modems to handle their >> various quirks including initialization stuff. >> >> http://cgit.freedesktop.org/ModemManager/ModemManager/tree/plugins >> >> Dan >> > > > Hi Dan. > I don't understand fully the point. > Are all those plugins part of the NM distribution? > If so, where should I put my AT commands? > And where should I look for the related responses? > > Anyway, I don't see my USB modem in that list. Should I make some > customization? > > -- > Vincenzo Romano at NotOrAnd Information Technologies > Software Hardware Networking Training Support Security > -- > tel: +39 0823 454163 fax: +39 02700506964 cel: +39 339 8083886 > -- > NON QVIETIS MARIBVS NAVTA PERITVS > -- Vincenzo Romano at NotOrAnd Information Technologies Software Hardware Networking Training Support Security -- tel: +39 0823 454163 fax: +39 02700506964 cel: +39 339 8083886 -- NON QVIETIS MARIBVS NAVTA PERITVS ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: About PPP and modem initialization
2011/4/8 Dan Williams : > On Thu, 2011-04-07 at 08:45 +0200, Vincenzo Romano wrote: >> Hi all. >> I'm trying to use NetworkManager in order to bring a 3G (mobile >> broadband) connection up automatically >> (a so called "system connection"). >> It works pretty well apart of an annoying recurring request for a PIN. >> But this is a just a minor thing. >> >> What I need to do is to send a few extra AT commands to the USB modem >> *before* the NM brings the >> connection up and to retrieve the answers from those commands. >> I've not been able to find where to hook to. > > That's done with a plugin for ModemManager for your specific modem > hardware. There's plugins for quite a few modems to handle their > various quirks including initialization stuff. > > http://cgit.freedesktop.org/ModemManager/ModemManager/tree/plugins > > Dan > Hi Dan. I don't understand fully the point. Are all those plugins part of the NM distribution? If so, where should I put my AT commands? And where should I look for the related responses? Anyway, I don't see my USB modem in that list. Should I make some customization? -- Vincenzo Romano at NotOrAnd Information Technologies Software Hardware Networking Training Support Security -- tel: +39 0823 454163 fax: +39 02700506964 cel: +39 339 8083886 -- NON QVIETIS MARIBVS NAVTA PERITVS ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: About PPP and modem initialization
On Thu, 2011-04-07 at 08:45 +0200, Vincenzo Romano wrote: > Hi all. > I'm trying to use NetworkManager in order to bring a 3G (mobile > broadband) connection up automatically > (a so called "system connection"). > It works pretty well apart of an annoying recurring request for a PIN. > But this is a just a minor thing. > > What I need to do is to send a few extra AT commands to the USB modem > *before* the NM brings the > connection up and to retrieve the answers from those commands. > I've not been able to find where to hook to. That's done with a plugin for ModemManager for your specific modem hardware. There's plugins for quite a few modems to handle their various quirks including initialization stuff. http://cgit.freedesktop.org/ModemManager/ModemManager/tree/plugins Dan ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
About PPP and modem initialization
Hi all. I'm trying to use NetworkManager in order to bring a 3G (mobile broadband) connection up automatically (a so called "system connection"). It works pretty well apart of an annoying recurring request for a PIN. But this is a just a minor thing. What I need to do is to send a few extra AT commands to the USB modem *before* the NM brings the connection up and to retrieve the answers from those commands. I've not been able to find where to hook to. Any hint? Thanks. -- Vincenzo Romano at NotOrAnd Information Technologies Software Hardware Networking Training Support Security -- NON QVIETIS MARIBVS NAVTA PERITVS ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
On Thu, May 29, 2008 at 7:25 PM, Pablo Martí <[EMAIL PROTECTED]> wrote: >> I'd like to try something like this for my device. > > We've been working on this as an internal R&D project till the > possible future integration with NM, but we'd be certainly happy to > have you (and anyone else) tinkering. I'll prepare a trac for next > week, I'll keep you posted http://public.warp.es/vmc The svn aint public yet (needs a SSL cert), I'll sort it out 2morrow, till then you can download a .{deb,rpm} from the download section. > >> >> Any thoughts ? >> >> Dennis >> > > > -- > Pablo Martí > http://www.linkedin.com/in/pmarti || http://www.warp.es > python -c "print '706d6172746940776172702e6573'.decode('hex')" > > > > -- > Pablo Martí > http://www.linkedin.com/in/pmarti || http://www.warp.es > python -c "print '706d6172746940776172702e6573'.decode('hex')" > -- Pablo Martí http://www.linkedin.com/in/pmarti || http://www.warp.es python -c "print '706d6172746940776172702e6573'.decode('hex')" ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
Dan Williams schreef: > On Sat, 2008-05-24 at 22:02 +0200, Dennis Noordsij wrote: > >> Hi, >> >> Some modems return ERROR to most AT commands when the SIM is still locked, >> specifically the "ATZ E0" in the initialization. >> > > BTW, which modem models do this? We're trying to get some hard data on > how often this happens. > > Dan AT+CGMI Novatel Wireless Incorporated AT+CGMM Expedite EU870D MiniCard ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
Dan Williams wrote: > On Sat, 2008-05-24 at 22:02 +0200, Dennis Noordsij wrote: >> Hi, >> >> Some modems return ERROR to most AT commands when the SIM is still locked, >> specifically the "ATZ E0" in the initialization. > > BTW, which modem models do this? We're trying to get some hard data on > how often this happens. [X] Novatel XU870 -- Stefan Seyfried R&D Team Mobile Devices| "Any ideas, John?" SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out." This footer brought to you by insane German lawmakers: SUSE Linux Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
On Sat, 2008-05-24 at 22:02 +0200, Dennis Noordsij wrote: > Hi, > > Some modems return ERROR to most AT commands when the SIM is still locked, > specifically the "ATZ E0" in the initialization. BTW, which modem models do this? We're trying to get some hard data on how often this happens. Dan > The attached patch modifies the initialization sequence to disable the local > echo (the E0 part) first, perform the SIM check, and only then continue with > the "ATZ" and further network registration, etc. > > For me, on fresh boot (SIM locked), this NetworkManager now unlocks the SIM > (it has my PIN in the keyring) and makes a perfect connection every time. > > PS I imagine this might apply to CDMA as well. > > Cheers, > Dennis > > > > Index: src/nm-gsm-device.c > === > --- src/nm-gsm-device.c(revision 3690) > +++ src/nm-gsm-device.c(working copy) > @@ -311,6 +311,50 @@ > } > > static void > +init_full_done (NMSerialDevice *device, > + int reply_index, > + gpointer user_data) > +{ > +gsm_device_set_pending (NM_GSM_DEVICE (device), 0); > + > +switch (reply_index) { > +case 0: > +do_register (device); > +break; > +case -1: > +nm_warning ("Modem second stage initialization timed out"); > +nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); > +break; > +default: > +nm_warning ("Modem second stage initialization failed"); > +nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); > +return; > +} > +} > + > + > +static void > +init_modem_full (NMSerialDevice *device) > +{ > +guint id; > +char *responses[] = { "OK", "ERROR", "ERR", NULL }; > + > +/* At this point we know that SIM has been unlocked, and we can safely > + * initialize the modem > + */ > +if (!nm_serial_device_send_command_string (device, "ATZ")) { > +nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); > +return; > +} > + > +id = nm_serial_device_wait_for_reply (device, 10, responses, responses, > init_full_done, NULL); > +if (id) > +gsm_device_set_pending (NM_GSM_DEVICE (device), id); > +else > +nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); > +} > + > +static void > enter_pin_done (NMSerialDevice *device, > int reply_index, > gpointer user_data) > @@ -321,7 +365,7 @@ > > switch (reply_index) { > case 0: > -do_register (device); > +init_modem_full (device); > break; > case -1: > nm_warning ("Did not receive response for secret"); > @@ -485,7 +529,15 @@ > guint id; > char *responses[] = { "OK", "ERROR", "ERR", NULL }; > > -if (!nm_serial_device_send_command_string (device, "ATZ E0")) { > +/* ATE0 = no local echo (i.e. echoing our own commands back to us) > + * We do not do any further initialization here, since the SIM might > + * still be locked, in which case some modems will just respond > + * with ERROR to everything we try. > + * Instead, after this step the PIN is checked, and entered if necessary, > + * and then init_modem_full(...) continues the initialization > + */ > + > +if (!nm_serial_device_send_command_string (device, "ATE0")) { > nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); > return; > } > > > ___ > NetworkManager-list mailing list > NetworkManager-list@gnome.org > http://mail.gnome.org/mailman/listinfo/networkmanager-list ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
On Thu, May 29, 2008 at 2:38 PM, Dennis Noordsij <[EMAIL PROTECTED]> wrote: > Tambet Ingo schreef: >> >> abstract all the quirks (again, much like wpa_supplicant). Currently, >> the only candidate for this is VMC, Pablo could give more information >> on that. >> >> > > Thanks for your quick reply! > > The seperate helper program is actually a nice idea IMO, makes NM more > about the logic > of managing the devices, and lets the device complexities be handled by > the external > helper program. One can then really take advantage of device specific > quirks and features, > and more easily fix/improve things without possibly disrupting support > for other devices. > > And one could more easily contribute without having to touch the NM > core, and make > everything language agnostic. > > What kind of dbus API would you propose ? What would be the workload in > NM to > adapt to use such a dbus interface ? Any additional thoughts/ideas you > have about this ? > > It would perhaps be fastest to proceed like: > - define an API which is perfect from NM's point of view > - Make the GSM (and CDMA) devices seperate helpers (i.e. maintain > current functionality) > - A helper dispatch mechanism to use the correct helper based on the HAL > data (with a fallback > on the current code if nothing more specific is found) > > At this point people can experiment with custom helpers (possibly based > on VMC) however they wish. After developing VMC for Vodafone, we started an internal prototype to DBusificate the core and integrate it with NM. Development got stalled for a while but here we are :) Small demo: [EMAIL PROTECTED]:~] $ dbus-send --type=method_call --print-reply --dest=es.warp.VMC / es.warp.VMC.GetProtocolInstance string:/org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial method return sender=:1.99 -> dest=:1.100 reply_serial=2 object path "/org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial" [EMAIL PROTECTED]:~] $ dbus-send --type=method_call --print-reply --dest=es.warp.VMC /org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial es.warp.VMC.PIN.Send string: method return sender=:1.99 -> dest=:1.103 reply_serial=2 string "OK" [EMAIL PROTECTED]:~] $ dbus-send --type=method_call --print-reply --dest=es.warp.VMC /org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial es.warp.VMC.Network.GetSignalLevel method return sender=:1.99 -> dest=:1.105 reply_serial=2 int32 28 [EMAIL PROTECTED]:~] $ dbus-send --type=method_call --print-reply --dest=es.warp.VMC /org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial org.freedesktop.DBus.Introspectable.Introspect > vmc-core.xml Attached you can find the current API > > I'd like to try something like this for my device. We've been working on this as an internal R&D project till the possible future integration with NM, but we'd be certainly happy to have you (and anyone else) tinkering. I'll prepare a trac for next week, I'll keep you posted > > Any thoughts ? > > Dennis > -- Pablo Martí http://www.linkedin.com/in/pmarti || http://www.warp.es python -c "print '706d6172746940776172702e6573'.decode('hex')" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";> " ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH] Delay full modem initialization until SIM is unlocked
(Oops I was subscribed with my gmail address...) On Thu, May 29, 2008 at 2:38 PM, Dennis Noordsij <[EMAIL PROTECTED]> wrote: > Tambet Ingo schreef: >> >> abstract all the quirks (again, much like wpa_supplicant). Currently, >> the only candidate for this is VMC, Pablo could give more information >> on that. >> >> > > Thanks for your quick reply! > > The seperate helper program is actually a nice idea IMO, makes NM more > about the logic > of managing the devices, and lets the device complexities be handled by > the external > helper program. One can then really take advantage of device specific > quirks and features, > and more easily fix/improve things without possibly disrupting support > for other devices. > > And one could more easily contribute without having to touch the NM > core, and make > everything language agnostic. > > What kind of dbus API would you propose ? What would be the workload in > NM to > adapt to use such a dbus interface ? Any additional thoughts/ideas you > have about this ? > > It would perhaps be fastest to proceed like: > - define an API which is perfect from NM's point of view > - Make the GSM (and CDMA) devices seperate helpers (i.e. maintain > current functionality) > - A helper dispatch mechanism to use the correct helper based on the HAL > data (with a fallback > on the current code if nothing more specific is found) > > At this point people can experiment with custom helpers (possibly based > on VMC) however they wish. After developing VMC for Vodafone, we started an internal prototype to DBusificate the core and integrate it with NM. Development got stalled for a while but here we are :) Small demo: [EMAIL PROTECTED]:~] $ dbus-send --type=method_call --print-reply --dest=es.warp.VMC / es.warp.VMC.GetProtocolInstance string:/org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial method return sender=:1.99 -> dest=:1.100 reply_serial=2 object path "/org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial" [EMAIL PROTECTED]:~] $ dbus-send --type=method_call --print-reply --dest=es.warp.VMC /org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial es.warp.VMC.PIN.Send string: method return sender=:1.99 -> dest=:1.103 reply_serial=2 string "OK" [EMAIL PROTECTED]:~] $ dbus-send --type=method_call --print-reply --dest=es.warp.VMC /org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial es.warp.VMC.Network.GetSignalLevel method return sender=:1.99 -> dest=:1.105 reply_serial=2 int32 28 [EMAIL PROTECTED]:~] $ dbus-send --type=method_call --print-reply --dest=es.warp.VMC /org/freedesktop/Hal/devices/usb_device_12d1_1003_noserial org.freedesktop.DBus.Introspectable.Introspect > vmc-core.xml Attached you can find the current API > > I'd like to try something like this for my device. We've been working on this as an internal R&D project till the possible future integration with NM, but we'd be certainly happy to have you (and anyone else) tinkering. I'll prepare a trac for next week, I'll keep you posted > > Any thoughts ? > > Dennis > -- Pablo Martí http://www.linkedin.com/in/pmarti || http://www.warp.es python -c "print '706d6172746940776172702e6573'.decode('hex')" -- Pablo Martí http://www.linkedin.com/in/pmarti || http://www.warp.es python -c "print '706d6172746940776172702e6573'.decode('hex')" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";> " ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
On Thu, May 29, 2008 at 02:51:33PM +0300, Tambet Ingo wrote: > On Thu, May 29, 2008 at 2:12 PM, Dennis Noordsij > > - The device supports being "on" and "off". I.e., at startup it could be > > allowed to just connect to a network. Then, setting up a data connection > > will be very fast since it doesn't have to find the network first. The > > nm-applet would allow you to disable the modem the same way you disable > > wireless; the modem can be told to turn off its radio and save power > > that way, and similarly will join a network again once the radio is > > turned back on. I think this applies to all gsm modems (AT+CFUN > > command), so perhaps does not need special HAL attributes. > > Good idea. It is marked as an optional feature in the specification, > so it might or might not work. I guess it could just be a noop if the > device doesn't support it. It should probably be a propery of > NMManager class (just like turning wireless on/off) which in turn > iterates over all registered devices and calls their enable/disable > radio method. Beware though, many cards disconnect from and reconnect to the USB bus on "at +cfun=1", so make sure to handle the hangup signal you will get from the kernel correctly and close the device so that it does not end up with a different device name. BTW: at least for Sierra Wireless cards, the CFUN setting does not seem to influence the power consumption (unless you are really using the card, but then it needs to be on anyway). But checking for it and having the possibility to switch the device actually is definitely a good idea. -- Stefan Seyfried R&D Team Mobile Devices| "Any ideas, John?" SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out." This footer brought to you by insane German lawmakers: SUSE Linux Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
Tambet Ingo schreef: > > This is actually needed for a lot of functionality, but it looks like > the monitoring device is not standardized and (almost?) every device > has it's own way of doing things. Some have proprietary binary > formats, some have AT commands. If it's done in NM, I'd like to > implement a plugin system for this, otherwise the code will get > unreadable and unmaintainable very quickly... > > Another possibility we've been considering is to delegate all the > dialup handling to an out of process helper program, much like > wpa_supplicant is used for wireless. The lack of standards and lack of > implementing existing standards in mobile devices makes it a very > difficult job to support a wide range of hardware and it probably > deserves a dedicated program. The requirements from NM are that the > program implements easy to use high level dbus interfaces that > abstract all the quirks (again, much like wpa_supplicant). Currently, > the only candidate for this is VMC, Pablo could give more information > on that. > > Thanks for your quick reply! The seperate helper program is actually a nice idea IMO, makes NM more about the logic of managing the devices, and lets the device complexities be handled by the external helper program. One can then really take advantage of device specific quirks and features, and more easily fix/improve things without possibly disrupting support for other devices. And one could more easily contribute without having to touch the NM core, and make everything language agnostic. What kind of dbus API would you propose ? What would be the workload in NM to adapt to use such a dbus interface ? Any additional thoughts/ideas you have about this ? It would perhaps be fastest to proceed like: - define an API which is perfect from NM's point of view - Make the GSM (and CDMA) devices seperate helpers (i.e. maintain current functionality) - A helper dispatch mechanism to use the correct helper based on the HAL data (with a fallback on the current code if nothing more specific is found) At this point people can experiment with custom helpers (possibly based on VMC) however they wish. I'd like to try something like this for my device. Any thoughts ? Dennis ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
On Thu, May 29, 2008 at 2:12 PM, Dennis Noordsij <[EMAIL PROTECTED]> wrote: > I'd like to further improve easy of use with gsm devices, but it would > help if someone could point me in the right direction (i.e. what needs > to be touched to implement this, does it need HAL support, does it > belong in NM, or nm-applet specific?) or comment on the following: The general design should be to add new methods/properties to NMGsmDevice class and expose these over dbus in the introspection/nm-device-gsm.xml. > - The device supports being "on" and "off". I.e., at startup it could be > allowed to just connect to a network. Then, setting up a data connection > will be very fast since it doesn't have to find the network first. The > nm-applet would allow you to disable the modem the same way you disable > wireless; the modem can be told to turn off its radio and save power > that way, and similarly will join a network again once the radio is > turned back on. I think this applies to all gsm modems (AT+CFUN > command), so perhaps does not need special HAL attributes. Good idea. It is marked as an optional feature in the specification, so it might or might not work. I guess it could just be a noop if the device doesn't support it. It should probably be a propery of NMManager class (just like turning wireless on/off) which in turn iterates over all registered devices and calls their enable/disable radio method. > - The init can be improved a bit, i.e. making sure the settings are sane > and the radio is actually on (otherwise NM will loop forever waiting for > a network to be joined). Yeah, totally. > - It would be nice if the nm-applet could display which network is being > used (once a data connection has been made) and wether it's the home > network or roaming. > > - Similarly, it would be nice to know which data mode is being used. For these two we'd need to support monitoring. See my comments to the next block. > - This device (Dell branded Novatell EU780D) has a second port which can > be used for status queries. It uses a binary protocol which turns out to > be AT commands over a variation of the Brew protocol (bitpim was helpful > to find the crc algorithm etc), Actually the Windows driver does > everything except the actual dialing and PPP over the second port. It > means with this device you are able to monitor the signal strength and > battery status (in case you're using a mobile phone as a modem over usb > or bluetooth) even while you have a data connection up. This would need > changes I guess in a lot of places, HAL to identify and tag this modem > as having this capability; a small lib to do the AT request/response > encoding, etc, but it would be really nice to have. This is actually needed for a lot of functionality, but it looks like the monitoring device is not standardized and (almost?) every device has it's own way of doing things. Some have proprietary binary formats, some have AT commands. If it's done in NM, I'd like to implement a plugin system for this, otherwise the code will get unreadable and unmaintainable very quickly... Another possibility we've been considering is to delegate all the dialup handling to an out of process helper program, much like wpa_supplicant is used for wireless. The lack of standards and lack of implementing existing standards in mobile devices makes it a very difficult job to support a wide range of hardware and it probably deserves a dedicated program. The requirements from NM are that the program implements easy to use high level dbus interfaces that abstract all the quirks (again, much like wpa_supplicant). Currently, the only candidate for this is VMC, Pablo could give more information on that. > - Not GSM specific, but relevant since data traffic is usually not > flat-fee, to have sent/received byte counters. (i.e. is this something > NM would broadcast over dbus or would nm-applet just query the device > itself?) Very good suggestion again, I'll look into doing it right away. Tambet ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
Tambet Ingo schreef: > On Sat, May 24, 2008 at 11:02 PM, Dennis Noordsij > <[EMAIL PROTECTED]> wrote: > >> Some modems return ERROR to most AT commands when the SIM is still locked, >> specifically the "ATZ E0" in the initialization. >> >> The attached patch modifies the initialization sequence to disable the local >> echo (the E0 part) first, perform the SIM check, and only then continue with >> the "ATZ" and further network registration, etc. >> >> For me, on fresh boot (SIM locked), this NetworkManager now unlocks the SIM >> (it has my PIN in the keyring) and makes a perfect connection every time. >> > > The patch looks good to me, thanks! > Hi! I'd like to further improve easy of use with gsm devices, but it would help if someone could point me in the right direction (i.e. what needs to be touched to implement this, does it need HAL support, does it belong in NM, or nm-applet specific?) or comment on the following: - The device supports being "on" and "off". I.e., at startup it could be allowed to just connect to a network. Then, setting up a data connection will be very fast since it doesn't have to find the network first. The nm-applet would allow you to disable the modem the same way you disable wireless; the modem can be told to turn off its radio and save power that way, and similarly will join a network again once the radio is turned back on. I think this applies to all gsm modems (AT+CFUN command), so perhaps does not need special HAL attributes. - The init can be improved a bit, i.e. making sure the settings are sane and the radio is actually on (otherwise NM will loop forever waiting for a network to be joined). - It would be nice if the nm-applet could display which network is being used (once a data connection has been made) and wether it's the home network or roaming. - Similarly, it would be nice to know which data mode is being used. - This device (Dell branded Novatell EU780D) has a second port which can be used for status queries. It uses a binary protocol which turns out to be AT commands over a variation of the Brew protocol (bitpim was helpful to find the crc algorithm etc), Actually the Windows driver does everything except the actual dialing and PPP over the second port. It means with this device you are able to monitor the signal strength and battery status (in case you're using a mobile phone as a modem over usb or bluetooth) even while you have a data connection up. This would need changes I guess in a lot of places, HAL to identify and tag this modem as having this capability; a small lib to do the AT request/response encoding, etc, but it would be really nice to have. - Not GSM specific, but relevant since data traffic is usually not flat-fee, to have sent/received byte counters. (i.e. is this something NM would broadcast over dbus or would nm-applet just query the device itself?) Many thanks for any pointers, Cheers Dennis ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
On Wed, 2008-05-28 at 11:14 +0300, Tambet Ingo wrote: > On Sat, May 24, 2008 at 11:02 PM, Dennis Noordsij > <[EMAIL PROTECTED]> wrote: > > Some modems return ERROR to most AT commands when the SIM is still locked, > > specifically the "ATZ E0" in the initialization. > > > > The attached patch modifies the initialization sequence to disable the > > local echo (the E0 part) first, perform the SIM check, and only then > > continue with the "ATZ" and further network registration, etc. > > > > For me, on fresh boot (SIM locked), this NetworkManager now unlocks the SIM > > (it has my PIN in the keyring) and makes a perfect connection every time. > > The patch looks good to me, thanks! > > > PS I imagine this might apply to CDMA as well. > > Does CDMA even have PIN codes? At least our code doesn't think it does. Yes, they do, but I've never actually encountered one, so until I do... Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] Delay full modem initialization until SIM is unlocked
On Sat, May 24, 2008 at 11:02 PM, Dennis Noordsij <[EMAIL PROTECTED]> wrote: > Some modems return ERROR to most AT commands when the SIM is still locked, > specifically the "ATZ E0" in the initialization. > > The attached patch modifies the initialization sequence to disable the local > echo (the E0 part) first, perform the SIM check, and only then continue with > the "ATZ" and further network registration, etc. > > For me, on fresh boot (SIM locked), this NetworkManager now unlocks the SIM > (it has my PIN in the keyring) and makes a perfect connection every time. The patch looks good to me, thanks! > PS I imagine this might apply to CDMA as well. Does CDMA even have PIN codes? At least our code doesn't think it does. Tambet ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH] Delay full modem initialization until SIM is unlocked
Hi, Some modems return ERROR to most AT commands when the SIM is still locked, specifically the "ATZ E0" in the initialization. The attached patch modifies the initialization sequence to disable the local echo (the E0 part) first, perform the SIM check, and only then continue with the "ATZ" and further network registration, etc. For me, on fresh boot (SIM locked), this NetworkManager now unlocks the SIM (it has my PIN in the keyring) and makes a perfect connection every time. PS I imagine this might apply to CDMA as well. Cheers, Dennis Index: src/nm-gsm-device.c === --- src/nm-gsm-device.c(revision 3690) +++ src/nm-gsm-device.c(working copy) @@ -311,6 +311,50 @@ } static void +init_full_done (NMSerialDevice *device, + int reply_index, + gpointer user_data) +{ +gsm_device_set_pending (NM_GSM_DEVICE (device), 0); + +switch (reply_index) { +case 0: +do_register (device); +break; +case -1: +nm_warning ("Modem second stage initialization timed out"); +nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); +break; +default: +nm_warning ("Modem second stage initialization failed"); +nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); +return; +} +} + + +static void +init_modem_full (NMSerialDevice *device) +{ +guint id; +char *responses[] = { "OK", "ERROR", "ERR", NULL }; + +/* At this point we know that SIM has been unlocked, and we can safely + * initialize the modem + */ +if (!nm_serial_device_send_command_string (device, "ATZ")) { +nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); +return; +} + +id = nm_serial_device_wait_for_reply (device, 10, responses, responses, init_full_done, NULL); +if (id) +gsm_device_set_pending (NM_GSM_DEVICE (device), id); +else +nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); +} + +static void enter_pin_done (NMSerialDevice *device, int reply_index, gpointer user_data) @@ -321,7 +365,7 @@ switch (reply_index) { case 0: -do_register (device); +init_modem_full (device); break; case -1: nm_warning ("Did not receive response for secret"); @@ -485,7 +529,15 @@ guint id; char *responses[] = { "OK", "ERROR", "ERR", NULL }; -if (!nm_serial_device_send_command_string (device, "ATZ E0")) { +/* ATE0 = no local echo (i.e. echoing our own commands back to us) + * We do not do any further initialization here, since the SIM might + * still be locked, in which case some modems will just respond + * with ERROR to everything we try. + * Instead, after this step the PIN is checked, and entered if necessary, + * and then init_modem_full(...) continues the initialization + */ + +if (!nm_serial_device_send_command_string (device, "ATE0")) { nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED); return; } ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list