Re: [ANNOUNCE] ModemManager (for GSM and CDMA)
- From: "Tambet Ingo" <tambet gmail com>
- To: "Pablo Martí" <pmarti warp es>
- Cc: network manager <networkmanager-list gnome org>
- Subject: Re: [ANNOUNCE] ModemManager (for GSM and CDMA)
- Date: Wed, 27 Aug 2008 17:35:01 +0300
Hey,
First of all, thanks for your comments!
On Wed, Aug 27, 2008 at 1:54 PM, Pablo Martí <pmarti warp es> wrote:
> The Wader project has started to port its API to the one defined by
> ModemManager. While doing so we've got some input for the API design.
> The interfaces currently defined are too "flat":
<snip>
> This interfaces might be enough for ModemManager's purposes as MM is
> just interested on 5/6 commands, but for projects like Wader where we
> export 40+ methods this flat namespace is nothing but ideal. The
> exported methods could be grouped into five different areas:
>
> o.f.MM.M.G.Card
> o.f.MM.M.G.Contacts
> o.f.MM.M.G.Network
> o.f.MM.M.G.PIN
> o.f.MM.M.G.SMS
Yeah, agreed.
I reordered the interfaces a bit:
> org.freedesktop.ModemManager.Modem.Gsm.Card: SIM/Card related operations
> - DisableEcho() ->
> - EnableEcho() ->
These do not do anything useful from the API user's perspective and
shouldn't be included in the public API.
> - Enable(b enable) -> (This is the Enable method of ModemManager, I
> think it goes here but I might be completely wrong here :)
Yes. Enable() means initialize the card and check if any secrets are
needed (PIN/PUK).
> - GetCharset -> s
> - GetCharsets() -> as
> - SetCharset(s charset) ->
Do we need these? Do the modems support UTF8? If they do, let's just
default to that. The reason I don't like there much is that they seem
a bit too low level.
> - GetIMEI() -> s
> - GetIMSI() -> s
> - GetManufacturer() -> s
> - GetModel() -> s
> - GetVersion() -> s (Firmware version)
All good ones.
> - ResetSettings() -> (ATZ)
That's what Enable(True) does (among other things).
> org.freedesktop.ModemManager.Modem.Gsm.Network:
> - GetRegistrationStatus() -> (uu) (AT+CREG?)
> - GetInfo() -> (su) (AT+COPS?)
> - GetNames() -> a(ussuu) (AT+COPS=?)
> - GetRoamingIDs() -> as (AT+CPOL?)
> - GetSignalQuality() -> u
> - SetRegistrationNotification(b enable) ->
> - SetInfoFormat(u mode, u format) -> (i.e. AT+COPS=3,0)
> - RegisterWithNetID(s netid) ->
>
> - CregReceived(u status) -> (signal)
> - SignalQuality(u rssi) -> (signal)
I think these are too low level. I'd much prefer the current ones from
ModemManager.
> org.freedesktop.ModemManager.Modem.Gsm.PIN:
> - Change(s oldpin, s newpin) ->
> - Check() -> u (Returns the SIM auth state, to check it against an enum)
> - Enable(s pin) ->
> - Disable(s pin) ->
> - Send(s pin) ->
> - SendPUK(s puk, s pin) ->
Not sure about these. Currently, Check() is part of
Gsm.Card.Enable(True). Enable(pin)/Disable(pin) could be one method
with a boolean argument. What's the difference (code wise) between
Send() and SendPUK()? So that would leave us with 3 methods:
Enable(bool), Send(string), Change(string, string). If so, maybe they
can be part of the Gsm.Card interface?
For the following methods I don't have strong preferences because I've
never used any of these features and thus don't have any hands on
experience. I'd really appreciate if other interested parties
(Telefonica?) could comment these.
> org.freedesktop.ModemManager.Modem.Gsm.Contacts: Contact related operations:
> - Add(s name, s number) -> u
> - Delete(u index) ->
> - Find(s pattern) -> a(uss)
> - Get(u index) -> (uss)
> - GetPhonebookSize() -> u (Could be renamed to GetSize() ?)
> - List() -> a(uss)
Looks good to me.
> org.freedesktop.ModemManager.Modem.Gsm.SMS: SMS related operations:
> - Delete(u index) ->
> - Get(u index) -> (ussd) (The last double is the time when it
> was received)
> - GetFormat() -> u (AT+CPBF?)
> - GetSMSC() -> s
> - List() -> a(ussd)
> - Save(s text, s number) -> u
> - Send -> u
> - SendFromStorage(u index)
> - SetFormat(u format) ->
> - SetIndication(u mode, u mt, u bm, u ds, u bfr) -> (AT+CNMI=mode,mt,..)
> - SetSMSC(s smsc) ->
>
> - SMSReceived(u index, s where) (signal)
>
> This is just food for thought, what think about such an API the
> different parties involved?
> I've tried to clarify in parentheses all the methods that might be
> misleading or might be controversial, with either its purpose or the
> correspondent AT command. I think that standard interfaces such as
> {SMS, Contacts}.{Delete, List, Get} should definitely go in. Other
> methods (specially its naming) are somewhat more controversial and
> I'll be happy to discuss 'em.
>
> I've attached this interfaces to the Gsm (WCDMA) part, we still need
> to decide what to do with CDMA... Dan? :)
Tambet
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]