Re: USSD interface for ModemManager



On Tue, 2010-03-09 at 17:34 -0800, Dan Williams wrote:
> On Tue, 2010-03-09 at 13:45 +0100, Pablo Martí Gamboa wrote:
> > Hi Dan, Marcel and others,
> > 
> > 
> > we would like to extend the ModemManager API so that it can handle
> > USSD commands. The USSD API of oFono [0] looks quite nice IMHO and I'd
> > like to propose a similar API:
> 
> I'd actually change two things; this API (and by extension the ofono
> one) doesn't allow clients to respond to a USSD request that is pending
> when they start up.  Say your app sends the request, then crashes or
> something.  When it's crashed, the network sends the response.  Now your
> app can't get the response when it starts back up and handle it, it
> would have to cancel the USSD session and send the request again.

I tossed this into the MM introspection/ directory with my proposed
changes; keeping the changes or dropping them doesn't make a huge
difference to me, I just thought it was a slightly more robust way of
doing the API.  Updated spec HTML attached for your review.

Dan


> A more robust API would change the NotificationReceived and
> RequestReceived signals into properties instead, which can be queried
> when your app starts up.  See below...
> 
> I did add a org.freedesktop.DBus.Properties.MmPropertiesChanged signal
> to ModemManager a bit ago, mainly to support the
> org.freedesktop.ModemManager.Modem.Enabled property.  So we can
> certainly use that.
> 
> > 
> > USSD Interface
> > ===============
> > 
> > 
> > Service org.freedesktop.ModemManager
> > Interface         org.freedesktop.ModemManager.Modem.Gsm.Ussd
> > 
> > 
> > Methods string Initiate(string command)
> > 
> > 
> > Sends a USSD command string to the network
> > initiating a session.  When the request is handled
> > by the appropriate node of the network, the
> > method returns the response or an appropriate
> > error.  The network may be awaiting further response
> > from the ME after returning from this method and no
> > new command can be initiated until this one is
> > cancelled or ended.
> > 
> > 
> > void Respond(string reply)
> > 
> > 
> > Send a response to the network either when
> > it is awaiting further input after Initiate()
> > was called or after a network-initiated request.
> > 
> > 
> > void Cancel()
> > 
> > 
> > Cancel an ongoing USSD session, mobile- or
> > network-initiated.
> > 
> > 
> > Signals 
> >                 NotificationReceived(string message)
> 
> I would change this to a read-only "NetworkNotification" property, and
> then we can use the normal D-Bus properties API to get it, and the
> MmPropertiesChanged signal to notify when it changes.
> 
> > 
> > Signal is emitted on a network-initiated USSD
> > request for which no response is needed.
> > 
> > 
> > RequestReceived(string message)
> 
> Same here, I'd suggest a read-only "NetworkRequest" property.
> 
> Obviously when there is no request from the network, these two
> properties would be empty strings.
> 
> Any thoughts on this?
> 
> Dan
> 
> > 
> > Signal is emitted on a network-initiated USSD
> > request for which a response must be sent using
> > the Respond method unless it is cancelled or
> > the request is not supported.
> > 
> > 
> > Properties string State [readonly]
> > 
> > 
> > Reflects the state of current USSD session.  The
> > values have the following meanings:
> > 
> > 
> > "idle" No active USSD session.
> > "active" A session is active between the
> > network and the ME, the ME is
> > waiting for a reply from the
> > network.
> > "user-response" The network is waiting for the
> > user's response, client must
> > call Respond().
> > 
> > 
> > 
> > 
> > It is basically a copy of their API (they nailed it down) except for
> > GetProperties and PropertiesChanged signal which are ConnMan-specific.
> > I haven't had a use-case yet for the "Respond" command (my USSD
> > petitions are simple), but it needs to be there indeed for future
> > uses. Thoughts?
> > 
> > 
> > [0] http://git.kernel.org/?p=network/ofono/ofono.git;a=blob_plain;f=doc/supplementaryservices-api.txt;hb=HEAD
> > 
> > -- 
> > 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

Title: ModemManager D-Bus Interface Specification version 0.1

ModemManager D-Bus Interface Specification

Version 0.1

Copyright (C) 2008 Novell, Inc.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Interfaces

org.freedesktop.ModemManager

Methods:

EnumerateDevices ( ) → ao

Get the list of modem devices.

Returns

devices - ao
List of object paths of modem devices known to the system.

Signals:

DeviceAdded ( o: device )

A device was added to the system.

Parameters

device - o
The object path of the newly added device.

DeviceRemoved ( o: device )

A device was removed from the system, and is no longer available.

Parameters

device - o
The object path of the device that was just removed.

Interface has no properties.

org.freedesktop.DBus.Properties

Interface has no methods.

Signals:

MmPropertiesChanged ( s: interface, a{sv}: properties )

One or more properties' values changed.

Parameters

interface - s
The D-Bus interface of the changed properties.
properties - a{sv}
The changed property names and their new values.

Interface has no properties.

org.freedesktop.ModemManager.Modem

Methods:

Enable ( b: enable ) → nothing

Enable the device. Initializes the modem.

Parameters

enable - b
True to enable the device, False to disable.

Connect ( s: number ) → nothing

Dial in.

Parameters

number - s
The number to use for dialing.

Disconnect ( ) → nothing

Disconnect modem.

GetIP4Config ( ) → (uuuu)

Request the IP4 configuration from the device. Note that it'll only be supported for IPMethod MM_MODEM_IP_METHOD_STATIC.

Returns

address - (uuuu)

GetInfo ( ) → (sss)

Get the card information (manufacturer, modem, version).

Returns

info - (sss)
Structure containing manufacturer, model, and version (revision) of the card.

Interface has no signals.

Properties:

Device - s - (read)
The modem port to use for IP configuration and traffic.
MasterDevice - s - (read)
The physical modem device reference (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system. In Linux for example, this points to a sysfs path of the usb_device object.
Driver - s - (read)
The driver handling the device.
Type - u - (read) (MM_MODEM_TYPE)
The modem type.
Enabled - b - (read)
TRUE if the modem is enabled (ie, powered and usable), FALSE if it is disabled.
UnlockRequired - s - (read)
Empty if the device is usable without an unlock code or has already been unlocked. If the device needs to be unlocked before becoming usable this property contains the specific unlock code required.  Valid unlock code values are "" (blank), "sim-pin", "sim-puk", "ph-sim-pin", "ph-fsim-pin", "ph-fsim-puk", "sim-pin2", "sim-puk2", "ph-net-pin", "ph-net-puk", "ph-netsub-pin", "ph-netsub-puk", "ph-sp-pin", "ph-sp-puk", "ph-corp-pin", and "ph-corp-puk".
IpMethod - u - (read) (MM_MODEM_IP_METHOD)
The IP configuration method.

Enumerated types:

MM_MODEM_TYPE

MM_MODEM_TYPE_GSM = 1
A GSM device.
MM_MODEM_TYPE_CDMA = 2
A CDMA device.

MM_MODEM_IP_METHOD

MM_MODEM_IP_METHOD_PPP = 0
Use PPP to get the address.
MM_MODEM_IP_METHOD_STATIC = 1
Static configuration, the modem will provide IP information.
MM_MODEM_IP_METHOD_DHCP = 2
Use DHCP

org.freedesktop.ModemManager.Modem.Simple

Methods:

Connect ( a{sv}: properties ) → nothing

Do everything needed to connect the modem.

Parameters

properties - a{sv}
Dictionary of properties needed to get the modem connected. Each implementation is free to add it's own specific key-value pairs. The predefined common ones are: 'pin' : string 'network_id' : string 'band' : uint 'network_mode' : uint 'apn' : string 'number' : string

GetStatus ( ) → a{sv}

Get the modem status.

Returns

properties - a{sv}
Dictionary of properties. Each implementation is free to add it's own specific key-value pairs. The predefined common ones are: 'state' : uint (always) 'signal_quality' : uint (state >= registered) 'operator_code' : string (state >= registered) 'operator_name' : string (state >= registered) 'band' : uint (state >= registered) 'network_mode' : uint (state >= registered)

Interface has no signals.

Interface has no properties.

org.freedesktop.ModemManager.Modem.Location

This interface allows devices to provide location information to client applications. Not all devices can provide this information, or even if they do, they may not be able to provide it while a data session is active.

Methods:

Enable ( b: enable, b: signal_location ) → nothing

Enable or disable location information gathering. This method may require the client to authenticate itself.

Parameters

enable - b
TRUE to enable location information gathering, FALSE to disable.
signal_location - b
When enabling location information gathering, this argument controls whether the device emits signals with new location information or not. When signals are emitted, any client application (including malicious ones!) can listen for location updates unless D-Bus permissions restrict these signals from certain users. If further security is desired, this argument can be set to FALSE to disable location updates via D-Bus signals and require applications to call authenticated APIs (like GetLocation) to get location information. This argument is ignored when disabling location information gathering.

GetLocation ( ) → a{uv}

Return current location information, if any. This method may require the client to authenticate itself.

Returns

Location - a{uv} (Location_Information_Map)
Dict of available location information when location information gathering is enabled. If the modem supports multiple location types it may return more than one here.

Interface has no signals.

Properties:

Capabilities - u - (read) (MM_MODEM_LOCATION_CAPABILITIES)
Location capabilities of the device.
Enabled - b - (read)
TRUE if location information gathering is enabled for this device, FALSE if it is disabled. When disabled, the device will not provide location information.
SignalsLocation - b - (read)
TRUE if location updates will be emitted via D-Bus signals, FALSE if location updates will not be emitted. See the Enable method for more information.
Location - a{uv} - (read) (Location_Information_Map)
Dict of available location information when location information gathering is enabled. If the modem supports multiple location types it may return more than one here. Note that if the device was told not to emit updated location information when location information gathering was initially enabled, this property may not return any location information for security reasons.

Sets of flags:

MM_MODEM_LOCATION_CAPABILITIES

MM_MODEM_LOCATION_CAPABILITY_UNKNOWN = 0x0
Unknown or no capabilties.
MM_MODEM_LOCATION_CAPABILITY_ANY = 0x1
Reserved.
MM_MODEM_LOCATION_CAPABILITY_GPS_NMEA = 0x2
The device is capable of providing GPS NMEA-format location information.
MM_MODEM_LOCATION_CAPABILITY_GSM_LAC_CI = 0x4
The device is capable of providing GSM Location Area Code/Cell ID location information.

Mapping types:

Location_Information_Map - a{ u: Type → v: Data }

A mapping from location type to type-specific location information.

Members

Type - u (MM_MODEM_LOCATION_CAPABILITIES)
Identifies the type and format of the associated location information. Contrary to the value description, this is not a bitfield but uses the same values as the MM_MODEM_LOCATION_CAPABILITIES bitfield.
Data - v
Contains type-specific location information. GSM_LAC_CI data is a string with the format "LAC,CI" (ex "84CD,00D30156") while GPS_NMEA is a string in NMEA-compatible format.

org.freedesktop.ModemManager.Modem.Cdma

Methods:

GetSignalQuality ( ) → u

Get the current signal quality.

Returns

quality - u
Signal quality (percent).

GetEsn ( ) → s

Get the Electronic Serial Number of the card.

Returns

esn - s
The ESN.

GetServingSystem ( ) → (usu)

Get the Service System details of the current network, if registered.

Returns

info - (usu)
A structure containing the Band Class (0 = unknown, 1 = 800 MHz, 2 = 1900 MHz), the Band ("A" - "F" as defined by IS707-A), and the System ID of the serving network.

GetRegistrationState ( ) → u, u

Get device registration state.

Returns

cdma-1x-state - u (MM_MODEM_CDMA_REGISTRATION_STATE)
CDMA 1x registration state.
evdo-state - u (MM_MODEM_CDMA_REGISTRATION_STATE)
EVDO registration state.

Signals:

SignalQuality ( u: quality )

The signal quality changed.

Parameters

quality - u
The new quality in percent, 0..100.

RegistrationStateChanged ( u: cdma-1x-state, u: evdo-state )

The device registration state changed.

Parameters

cdma-1x-state - u (MM_MODEM_CDMA_REGISTRATION_STATE)
CDMA 1x registration state.
evdo-state - u (MM_MODEM_CDMA_REGISTRATION_STATE)
EVDO registration state.

Interface has no properties.

Enumerated types:

MM_MODEM_CDMA_REGISTRATION_STATE

MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN = 0
Registration status is unknown or the device is not registered.
MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED = 1
Registered, but roaming status is unknown or cannot be provided by the device. The device may or may not be roaming.
MM_MODEM_CDMA_REGISTRATION_STATE_HOME = 2
Currently registered on the home network.
MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING = 3
Currently registered on a roaming network.

org.freedesktop.ModemManager.Modem.Gsm

Interface has no methods.

Interface has no signals.

Interface has no properties.

Enumerated types:

MM_MODEM_GSM_ALLOWED_MODE

Describes the device's current access mode preference; ie the specific technology preferences the device is allowed to use when connecting to a mobile network.
MM_MODEM_GSM_ALLOWED_MODE_ANY = 0
Any mode can be used
MM_MODEM_GSM_ALLOWED_MODE_2G_PREFERRED = 1
Prefer 2G (GPRS or EDGE)
MM_MODEM_GSM_ALLOWED_MODE_3G_PREFERRED = 2
Prefer 3G (UMTS or HSxPA)
MM_MODEM_GSM_ALLOWED_MODE_2G_ONLY = 3
Use only 2G (GPRS or EDGE)
MM_MODEM_GSM_ALLOWED_MODE_3G_ONLY = 4
Use only 3G (UMTS or HSxPA)

MM_MODEM_GSM_ACCESS_TECH

Describes various access technologies that a device uses when connected to a mobile network.
MM_MODEM_GSM_ACCESS_TECH_UNKNOWN = 0
The access technology used is unknown
MM_MODEM_GSM_ACCESS_TECH_GSM = 1
GSM
MM_MODEM_GSM_ACCESS_TECH_GSM_COMPACT = 2
Compact GSM
MM_MODEM_GSM_ACCESS_TECH_GPRS = 3
GPRS
MM_MODEM_GSM_ACCESS_TECH_EDGE = 4
EDGE (ETSI 27.007: "GSM w/EGPRS")
MM_MODEM_GSM_ACCESS_TECH_UMTS = 5
UMTS (ETSI 27.007: "UTRAN")
MM_MODEM_GSM_ACCESS_TECH_HSDPA = 6
HSDPA (ETSI 27.007: "UTRAN w/HSDPA")
MM_MODEM_GSM_ACCESS_TECH_HSUPA = 7
HSUPA (ETSI 27.007: "UTRAN w/HSUPA")
MM_MODEM_GSM_ACCESS_TECH_HSPA = 8
HSPA (ETSI 27.007: "UTRAN w/HSDPA and HSUPA")

Sets of flags:

MM_MODEM_GSM_MODE

A bitfield describing the specifc access modes and technologies supported by a device and the access technology in-use when connected to a mobile network.
MM_MODEM_GSM_MODE_UNKNOWN = 0x0
Unknown or invalid mode.
MM_MODEM_GSM_MODE_ANY = 0x1
For certain operations, allow the modem to pick any available mode.
MM_MODEM_GSM_MODE_GPRS = 0x2
GPRS
MM_MODEM_GSM_MODE_EDGE = 0x4
EDGE
MM_MODEM_GSM_MODE_UMTS = 0x8
UMTS (3G)
MM_MODEM_GSM_MODE_HSDPA = 0x10
HSDPA (3G)
MM_MODEM_GSM_MODE_2G_PREFERRED = 0x20
Prefer 2G (GPRS or EDGE)
MM_MODEM_GSM_MODE_3G_PREFERRED = 0x40
Prefer 3G (UMTS/HSDPA/HSUPA/HSPA)
MM_MODEM_GSM_MODE_2G_ONLY = 0x80
Use only 2G (GPRS or EDGE)
MM_MODEM_GSM_MODE_3G_ONLY = 0x100
Use only 3G (UMTS/HSDPA/HSUPA/HSPA)
MM_MODEM_GSM_MODE_HSUPA = 0x200
HSUPA (3G)
MM_MODEM_GSM_MODE_HSPA = 0x400
HSPA (3G)
MM_MODEM_GSM_MODE_GSM = 0x800
GSM
MM_MODEM_GSM_MODE_GSM_COMPACT = 0x1000
GSM Compact

MM_MODEM_GSM_BAND

A bitfield describing the specific radio bands supported by the device and the radio bands the device is allowed to use when connecting to a mobile network.
MM_MODEM_GSM_BAND_UNKNOWN = 0x0
Unknown or invalid band
MM_MODEM_GSM_BAND_ANY = 0x1
For certain operations, allow the modem to select a band automatically.
MM_MODEM_GSM_BAND_EGSM = 0x2
GSM/GPRS/EDGE 900 MHz
MM_MODEM_GSM_BAND_DCS = 0x4
GSM/GPRS/EDGE 1800 MHz
MM_MODEM_GSM_BAND_PCS = 0x8
GSM/GPRS/EDGE 1900 MHz
MM_MODEM_GSM_BAND_G850 = 0x10
GSM/GPRS/EDGE 850 MHz
MM_MODEM_GSM_BAND_U2100 = 0x20
WCDMA 2100 MHz (Class I)
MM_MODEM_GSM_BAND_U1800 = 0x40
WCDMA 3GPP 1800 MHz (Class III)
MM_MODEM_GSM_BAND_U17IV = 0x80
WCDMA 3GPP AWS 1700/2100 MHz (Class IV)
MM_MODEM_GSM_BAND_U800 = 0x100
WCDMA 3GPP UMTS 800 MHz (Class VI)
MM_MODEM_GSM_BAND_U850 = 0x200
WCDMA 3GPP UMTS 850 MHz (Class V)
MM_MODEM_GSM_BAND_U900 = 0x400
WCDMA 3GPP UMTS 900 MHz (Class VIII)
MM_MODEM_GSM_BAND_U17IX = 0x800
WCDMA 3GPP UMTS 1700 MHz (Class IX)

org.freedesktop.ModemManager.Modem.Gsm.Card

Methods:

GetImei ( ) → s

Get the IMEI of the card.

Returns

imei - s
The IMEI.

GetImsi ( ) → s

Get the IMSI of the SIM card.

Returns

imsi - s
The IMSI.

SendPuk ( s: puk, s: pin ) → nothing

Send the PUK and a new PIN to unlock the SIM card.

Parameters

puk - s
The PUK code.
pin - s
The PIN code.

SendPin ( s: pin ) → nothing

Send the PIN (or PUK) to unlock the SIM card.

Parameters

pin - s
The PIN code.

EnablePin ( s: pin, b: enabled ) → nothing

Enable or disable the PIN checking.

Parameters

pin - s
The PIN code.
enabled - b
True to enable PIN checking.

ChangePin ( s: old_pin, s: new_pin ) → nothing

Change the PIN code.

Parameters

old_pin - s
The current PIN code.
new_pin - s
The new PIN code.

Interface has no signals.

Properties:

SupportedBands - u - (read) (MM_MODEM_GSM_BAND)
Bands supported by the card. (Note for plugin writers: returned value must not contain ANY)
SupportedModes - u - (read) (MM_MODEM_GSM_MODE)
Network selection modes supported by the card. (Note for plugin writers: returned value must not contain ANY)

org.freedesktop.ModemManager.Modem.Gsm.Contacts

Methods:

Add ( s: name, s: number ) → u

Add a new contact to the SIM card.

Parameters

name - s
The name of the contact.
number - s
The phone number of the contact.

Returns

index - u
The index of the new contact.

Delete ( u: index ) → nothing

Delete a contact from the SIM card.

Parameters

index - u
The index of the contact.

Get ( u: index ) → (uss)

Retrieve a contact from the SIM card.

Parameters

index - u
The index of the contact.

Returns

contact - (uss)
The contact structure containing index, name, and number.

List ( ) → a(uss)

List all contacts on the SIM card.

Returns

results - a(uss)
The list of contacts where each contact has an index, name, and number.

Find ( s: pattern ) → a(uss)

Find a contact from the SIM card.

Parameters

pattern - s
The pattern to search for.

Returns

results - a(uss)
The list of matching contacts where a contact has an index, name, and number.

GetCount ( ) → u

Get the number of contacts stored on the SIM card.

Returns

count - u
The number of contacts.

Interface has no signals.

Interface has no properties.

org.freedesktop.ModemManager.Modem.Gsm.Network

Methods:

Register ( s: network_id ) → nothing

Register the device to network.

Parameters

network_id - s
The network ID to register. An empty string can be used to register to the home network.

Scan ( ) → aa{ss}

Scan for available networks.

Returns

results - aa{ss}
Found networks. It's an array of dictionaries (strings for keys and values), the list of known keys is the following: status, operator-long, operator-short, operator-num, access-tech.

SetApn ( s: apn ) → nothing

Set the APN.

Parameters

apn - s
The APN.

GetSignalQuality ( ) → u

Get the current signal quality.

Returns

quality - u
Signal quality (percent).

SetBand ( u: band ) → nothing

Sets the band the device is allowed to use when connecting to a mobile network.

Parameters

band - u (MM_MODEM_GSM_BAND)
The desired band. Only one band may be specified, and may not be UNKNOWN.

GetBand ( ) → u

Returns the current band the device is using. (Note for plugin writers: returned value must not be ANY)

Returns

band - u (MM_MODEM_GSM_BAND)
The current band.

SetNetworkMode ( u: mode ) → nothing

Set the desired mode the device may use when connecting to a mobile network (DEPRECATED; see SetAllowedMode instead).

Parameters

mode - u (MM_MODEM_GSM_NETWORK_DEPRECATED_MODE)
The desired network mode. Only one mode may be specified, and may not be UNKNOWN.

GetNetworkMode ( ) → u

Returns the current network mode of the device (DEPRECATED; does not allow returning both the saved mode preference *and* the current access technology of the device at the same time. See the AllowedMode property instead).

Returns

mode - u (MM_MODEM_GSM_NETWORK_DEPRECATED_MODE)
Returns the general network mode (ex. 2G/3G preference) of the device.

GetRegistrationInfo ( ) → (uss)

Get the registration status and the current operator (if registered).

Returns

info - (uss)
The returned information contains: * Network status. * Current operator code. * Current operator name,

SetAllowedMode ( u: mode ) → nothing

Set the access technologies a device is allowed to use when connecting to a mobile network.

Parameters

mode - u (MM_MODEM_GSM_ALLOWED_MODE)
The allowed mode. The device may not support all modes; see the org.freedesktop.ModemManager.Gsm.Card.SupportedModes property for allowed modes for each device. All devices support the "ANY" flag.

Signals:

SignalQuality ( u: quality )

The signal quality changed.

Parameters

quality - u
The new quality in percent, 0..100.

RegistrationInfo ( u: status, s: operator_code, s: operator_name )

The registration status changed.

Parameters

status - u (MM_MODEM_GSM_NETWORK_REG_STATUS)
The network status.
operator_code - s
The current operator code.
operator_name - s
The current operator name.

NetworkMode ( u: mode )

The network mode preference changed. (DEPRECATED; see documentation for GetNetworkMode/SetNetworkMode)

Parameters

mode - u (MM_MODEM_GSM_NETWORK_DEPRECATED_MODE)
The new network mode.

Properties:

AllowedMode - u - (read) (MM_MODEM_GSM_ALLOWED_MODE)
The allowed access technologies (eg 2G/3G preference) the device is allowed to use when connecting to a mobile network.
AccessTechnology - u - (read) (MM_MODEM_GSM_ACCESS_TECH)
The current network access technology used by the device to communicate with the base station. (Note to plugin writers: if the device's access technology cannot be determined, use UNKNOWN)

Enumerated types:

MM_MODEM_GSM_NETWORK_REG_STATUS

MM_MODEM_GSM_NETWORK_REG_STATUS_IDLE = 0
Not registered, not searching for new operator to register.
MM_MODEM_GSM_NETWORK_REG_STATUS_HOME = 1
Registered on home network.
MM_MODEM_GSM_NETWORK_REG_STATUS_SEARCHING = 2
Not registered, searching for new operator to register with.
MM_MODEM_GSM_NETWORK_REG_STATUS_DENIED = 3
Registration denied.
MM_MODEM_GSM_NETWORK_REG_STATUS_UNKNOWN = 4
Unknown registration status.
MM_MODEM_GSM_NETWORK_REG_STATUS_ROAMING = 5
Registered on a roaming network.

MM_MODEM_GSM_NETWORK_DEPRECATED_MODE

DEPRECATED; should not be used in new applications. Use AccessTechnology, AllowedMode, and SetAllowedMode() instead.
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_ANY = 0
Any network mode can be used
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_GPRS = 1
GPRS
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_EDGE = 2
EDGE
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_UMTS = 3
UMTS (3G)
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_HSDPA = 4
HSDPA
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_2G_PREFERRED = 5
Prefer 2G (GPRS or EDGE)
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_3G_PREFERRED = 6
Prefer 3G (UMTS/HSDPA/HSUPA/HSPA)
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_2G_ONLY = 7
Use only 2G (GPRS or EDGE)
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_3G_ONLY = 8
Use only 3G (UMTS/HSDPA/HSUPA/HSPA)
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_HSUPA = 9
HSUPA
MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_HSPA = 10
HSPA (HSDPA + HSUPA)

org.freedesktop.ModemManager.Modem.Gsm.SMS

Methods:

Delete ( u: index ) → nothing

Delete an SMS message.

Parameters

index - u
The index of the SMS.

Get ( u: index ) → a{sv}

Retrieve an SMS from the SIM card.

Parameters

index - u
The index of the SMS.

Returns

sms - a{sv}
A dictionary containing SMS properties of the SMS specified by the given index. This dictionary may contain the following key/value pairs: number : string - Phone number (mandatory) text : string - SMS text (mandatory) smsc : string - SMS service center number (optional) validity : uint (0..255) - Specifies when the SMS expires in SMSC (optional) class : uint (0..3) - Message importance and location (optional) completed: boolean - Whether all message parts have been received or not (optional)

GetFormat ( ) → u

Returns

result - u

SetFormat ( u: format ) → nothing

Parameters

format - u

GetSmsc ( ) → s

Returns

result - s

SetSmsc ( s: smsc ) → nothing

Parameters

smsc - s

List ( ) → aa{sv}

Returns

result - aa{sv}

Save ( a{sv}: properties ) → au

Parameters

properties - a{sv}
SMS properties to save with the following key values: number : string - Phone number (mandatory) text : string - SMS text (mandatory) smsc : string - SMS service center number (optional) validity : uint (0..255) - Specifies when the SMS expires in SMSC (optional) class : uint (0..3) - Message importance and location (optional)

Returns

index - au

Send ( a{sv}: properties ) → au

Parameters

properties - a{sv}
SMS properties to save with the following key values: number : string - Phone number (mandatory) text : string - SMS text (mandatory) smsc : string - SMS service center number (optional) validity : uint (0..255) - Specifies when the SMS expires in SMSC (optional) class : uint (0..3) - Message importance and location (optional)

Returns

result - au

SendFromStorage ( u: index ) → nothing

Parameters

index - u

SetIndication ( u: mode, u: mt, u: bm, u: ds, u: bfr ) → nothing

Parameters

mode - u
mt - u
bm - u
ds - u
bfr - u

Signals:

SmsReceived ( u: index, b: complete )

Emitted when any part of a new SMS has been received (but not for subsequent parts, if any). Not all parts may have been received and the message may not be complete; if it is, the 'complete' argument will be TRUE.

Parameters

index - u
Index of the new SMS.
complete - b
TRUE if all message parts have been received, otherwise FALSE.

Completed ( u: index, b: completed )

Emitted when the complete-ness status of an SMS message changes. An SMS may not necessarily be complete when the first part is received; this signal will be emitted when all parts have been received, even for single-part messages.

Parameters

index - u
The index of the SMS.
completed - b
TRUE if all message parts have been received, otherwise FALSE.

Interface has no properties.

org.freedesktop.ModemManager.Modem.Gsm.Hso

Methods:

Authenticate ( s: username, s: password ) → nothing

Authenticate using the passed user name and password.

Parameters

username - s
password - s

Interface has no signals.

Interface has no properties.

org.freedesktop.ModemManager.Modem.Gsm.Ussd

Methods:

Initiate ( s: command ) → nothing

Sends a USSD command string to the network initiating a USSD session. When the request is handled by the network, the method returns the response or an appropriate error. The network may be awaiting further response from the ME after returning from this method and no new command can be initiated until this one is cancelled or ended.

Parameters

command - s
The command to start the USSD session with.

Respond ( s: response ) → nothing

Respond to a USSD request that is either initiated by the mobile network, or that is awaiting further input after Initiate() was called.

Parameters

response - s
The response to network-initiated USSD command, or a response to a request for further input.

Cancel ( ) → nothing

Cancel an ongoing USSD session, either mobile or network initiated.

Interface has no signals.

Properties:

State - s - (read)
Indicates the state of any ongoing USSD session. Values may be one of the following: "idle" (no active session), "active" (a session is active and the mobile is waiting for a response), "user-response" (the network is waiting for the client's response, which must be sent using Respond()).
NetworkNotification - s - (read)
Contains any network-initiated request to which no USSD response is required. When no USSD session is active, or when there is no network- initiated request, this property will be a zero-length string.
NetworkRequest - s - (read)
Contains any pending network-initiated request for a response. Client should call Respond() with the appropriate response to this request. When no USSD session is active, or when there is no pending network-initiated request, this property will be a zero-length string.

Errors:

org.freedesktop.ModemManager.Modem.SerialOpenFailed

Could not open serial device.

org.freedesktop.ModemManager.Modem.SerialSendFailed

Could not write to the serial device.

org.freedesktop.ModemManager.Modem.SerialResponseTimeout

A response was not received in time.

Errors:

org.freedesktop.ModemManager.Modem.General

A generic error. An example of a generic error is ModemManager not being able to parse the response from modem.

org.freedesktop.ModemManager.Modem.OperationNotSupported

Operation not implemented by modem.

org.freedesktop.ModemManager.Modem.Connected

Operation could not be performed while the modem is connected.

org.freedesktop.ModemManager.Modem.Disconnected

Operation could not be performed while the modem is disconnected.

org.freedesktop.ModemManager.Modem.OperationInProgress

Operation could not be performed because it is already in progress.

Errors:

org.freedesktop.ModemManager.Modem.NoCarrier

No carrier.

org.freedesktop.ModemManager.Modem.NoDialtone

No dialtone.

org.freedesktop.ModemManager.Modem.Busy

Busy.

org.freedesktop.ModemManager.Modem.NoAnswer

No answer.

Errors:

org.freedesktop.ModemManager.Modem.Gsm.PhoneFailure

A phone failure.

org.freedesktop.ModemManager.Modem.Gsm.NoConnection

No connection to phone.

org.freedesktop.ModemManager.Modem.Gsm.LinkReserved

Phone-adaptor link reserved.

org.freedesktop.ModemManager.Modem.Gsm.OperationNotAllowed

Operation not allowed.

org.freedesktop.ModemManager.Modem.Gsm.OperationNotSupported

Operation not supported.

org.freedesktop.ModemManager.Modem.Gsm.PhSimPinRequired

PH-SIM PIN required.

org.freedesktop.ModemManager.Modem.Gsm.PhFSimPinRequired

PH-FSIM PIN required.

org.freedesktop.ModemManager.Modem.Gsm.PhFSimPukRequired

PH-FSIM PUK required.

org.freedesktop.ModemManager.Modem.Gsm.SimNotInserted

SIM not inserted.

org.freedesktop.ModemManager.Modem.Gsm.SimPinRequired

SIM PIN required.

org.freedesktop.ModemManager.Modem.Gsm.SimPukRequired

SIM PUK required.

org.freedesktop.ModemManager.Modem.Gsm.SimFailure

SIM failure.

org.freedesktop.ModemManager.Modem.Gsm.SimBusy

SIM busy.

org.freedesktop.ModemManager.Modem.Gsm.SimWrong

SIM wrong.

org.freedesktop.ModemManager.Modem.Gsm.IncorrectPassword

Incorrect password.

org.freedesktop.ModemManager.Modem.Gsm.SimPin2Required

SIM PIN2 required.

org.freedesktop.ModemManager.Modem.Gsm.SimPuk2Required

SIM PUK2 required.

org.freedesktop.ModemManager.Modem.Gsm.MemoryFull

Memory full.

org.freedesktop.ModemManager.Modem.Gsm.InvalidIndex

Invalid index.

org.freedesktop.ModemManager.Modem.Gsm.NotFound

Not found.

org.freedesktop.ModemManager.Modem.Gsm.MemoryFailure

Memory failure.

org.freedesktop.ModemManager.Modem.Gsm.TextTooLong

Text string too long.

org.freedesktop.ModemManager.Modem.Gsm.InvalidChars

Invalid characters in text string.

org.freedesktop.ModemManager.Modem.Gsm.DialStringTooLong

Dial string too long.

org.freedesktop.ModemManager.Modem.Gsm.InvalidDialString

Invalid characters in dial string.

org.freedesktop.ModemManager.Modem.Gsm.NoNetwork

No network service.

org.freedesktop.ModemManager.Modem.Gsm.NetworkTimeout

Network timeout.

org.freedesktop.ModemManager.Modem.Gsm.NetworkNotAllowed

Network not allowed - emergency calls only.

org.freedesktop.ModemManager.Modem.Gsm.NetworkPinRequired

Network personalization PIN required.

org.freedesktop.ModemManager.Modem.Gsm.NetworkPukRequired

Network personalization PUK required.

org.freedesktop.ModemManager.Modem.Gsm.NetworkSubsetPinRequired

Network subset personalization PIN required.

org.freedesktop.ModemManager.Modem.Gsm.NetworkSubsetPukRequired

Network subset personalization PUK required.

org.freedesktop.ModemManager.Modem.Gsm.ServicePinRequired

Service provider personalization PIN required.

org.freedesktop.ModemManager.Modem.Gsm.ServicePukRequired

Service provider personalization PUK required.

org.freedesktop.ModemManager.Modem.Gsm.CorporatePinRequired

Corporate personalization PIN required.

org.freedesktop.ModemManager.Modem.Gsm.CorporatePukRequired

Corporate personalization PUK required.

org.freedesktop.ModemManager.Modem.Gsm.HiddenKeyRequired

Hidden key required. This key is required when accessing hidden phonebook entries.

org.freedesktop.ModemManager.Modem.Gsm.EapMethodNotSupported

EAP method not supported.

org.freedesktop.ModemManager.Modem.Gsm.IncorrectParams

Incorrect parameters.

org.freedesktop.ModemManager.Modem.Gsm.Unknown

An unknown error.

org.freedesktop.ModemManager.Modem.Gsm.GprsIllegalMs

Illegal MS.

org.freedesktop.ModemManager.Modem.Gsm.GprsIllegalMe

Illegal ME.

org.freedesktop.ModemManager.Modem.Gsm.GprsServiceNotAllowed

GPRS services not allowed.

org.freedesktop.ModemManager.Modem.Gsm.GprsPlmnNotAllowed

PLMN not allowed.

org.freedesktop.ModemManager.Modem.Gsm.GprsLocationNotAllowed

Location area not allowed.

org.freedesktop.ModemManager.Modem.Gsm.GprsRoamingNotAllowed

Roaming not allowed in this location area.

org.freedesktop.ModemManager.Modem.Gsm.GprsOptionNotSupported

Service option not supported.

org.freedesktop.ModemManager.Modem.Gsm.GprsNotSubscribed

Requested service option not subscribed.

org.freedesktop.ModemManager.Modem.Gsm.GprsOutOfOrder

Service option temporarily out of order.

org.freedesktop.ModemManager.Modem.Gsm.GprsPdpAuthFailure

PDP authentication failure.

org.freedesktop.ModemManager.Modem.Gsm.GprsUnspecified

Unspecified GPRS error

org.freedesktop.ModemManager.Modem.Gsm.GprsInvalidClass

Invalid mobile class.

Index

Index of interfaces

Index of types



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