Re: Modem Initialization



2011/4/18 Vincenzo Romano <vincenzo romano notorand it>:
> 2011/4/15 Dan Williams <dcbw redhat com>:
>> On Fri, 2011-04-15 at 12:37 +0200, Vincenzo Romano wrote:
>>> 2011/4/14 Dan Williams <dcbw redhat com>:
>>> > On Thu, 2011-04-14 at 16:20 +0200, Vincenzo Romano wrote:
>>> >> 2011/4/14 Aleksander Morgado <aleksander lanedo com>:
>>> >> >
>>> >> >> >> > 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


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