Re: [ANNOUNCE] ModemManager (for GSM and CDMA)

On Thu, Jul 31, 2008 at 5:10 PM, Tambet Ingo <tambet gmail com> wrote:
> Announcing ModemManager.

The ModemManager announcement struck me on holidays, thats why I
didn't say anything :)

> Q: You API sucks!
> A: If there's something you'd like to change, either to add new
> methods or to modify the existing ones, let me know, it's not set in
> the stone.

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":

#define MM_DBUS_SERVICE              "org.freedesktop.ModemManager"
#define MM_DBUS_PATH                 "/org/freedesktop/ModemManager"
#define MM_DBUS_INTERFACE            "org.freedesktop.ModemManager"
#define MM_DBUS_INTERFACE_MODEM      "org.freedesktop.ModemManager.Modem"
#define MM_DBUS_INTERFACE_GSM_MODEM  "org.freedesktop.ModemManager.Modem.Gsm"
#define MM_DBUS_INTERFACE_CDMA_MODEM "org.freedesktop.ModemManager.Modem.Cdma"

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:


org.freedesktop.ModemManager.Modem.Gsm.Card: SIM/Card related operations
  - DisableEcho() ->
  - EnableEcho() ->
  - Enable(b enable) ->  (This is the Enable method of ModemManager, I
think it goes here but I might be completely wrong here :)
  - GetCharset -> s
  - GetCharsets() -> as
  - GetIMEI() -> s
  - GetIMSI() -> s
  - GetManufacturer() -> s
  - GetModel() -> s
  - GetVersion() -> s  (Firmware version)
  - ResetSettings() ->  (ATZ)
  - SetCharset(s charset) ->

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)

  - 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)

  - 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) ->

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? :)

Best regards,

Pablo Martí ||
python -c "print '706d6172746940776172702e6573'.decode('hex')"

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