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



On Wed, 2008-08-27 at 12:54 +0200, Pablo Martí wrote:
> 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 :)
> 
> <snip>
> >
> > 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:
> 
> 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
> 
> 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)
> 
> 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)
> 
> 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) ->
> 
> 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? :)

For the moment for CDMA, just expose the minimal functionality for init,
dialing, hardware info (vendor, manufacturer, etc), signal RSSI, and add
GetESN() and GetMEID() methods (ESN/MEID are CDMA's IMEI).  We'll work
out the rest later once we find out how many of the CDMA modems actually
have open & accessible commands for these things.  I don't know anyone
that actually has a PIN on their CDMA card, and it's less useful there
since there's no SIM with CDMA anyway.

Some Sierra parts expose the GPS functionality though one of the TTY
interfaces with custom AT commands (yes, an AT command to get lat/long)
so maybe you want a org.freedesktop.ModemManager.GPS interface too :)
But that can come later.

Dan




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