2
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
5
<part id="ref-migrating" xmlns:xi="http://www.w3.org/2003/XInclude">
6
<title>Migrating from ModemManager 0.6 to ModemManager 1.0</title>
9
ModemManager 1.0 is a new major version of ModemManager that breaks both
10
API and ABI compared to previous versions. These changes allow better
11
managing new types of devices (e.g. those with multiple capabilities),
12
or those not based in AT commands for operation (e.g. QMI or MBIM modems).
15
This section provides an introduction to the changes done in the DBus interface
16
with respect to the main operations performed with modems through ModemManager.
22
<title>Listing available modems</title>
24
The D-Bus name <literal>org.freedesktop.ModemManager1</literal>
25
on the system bus is the new name used by the ModemManager 1.0 daemon, and it
26
implements several standard DBus interfaces, including the new
27
<ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">
28
<literal>org.freedesktop.DBus.ObjectManager</literal>
30
interface, which allows to list available modem objects and get notifications
31
where new ones are added or when existing ones are removed. There are therefore
32
neither a custom method to enumerate devices as in the old 0.6 interface, nor
33
custom signals to notify about added or removed modems.
36
Modems which are found but are not usable will be flagged with a
37
<link linkend="MM-MODEM-STATE-FAILED:CAPS"><constant>MM_MODEM_STATE_FAILED</constant></link>
39
<link linkend="gdbus-property-org-freedesktop-ModemManager1-Modem.State">
40
<literal>State</literal>
42
property, and a more detailed reason about the failure will be given in the
43
<link linkend="gdbus-property-org-freedesktop-ModemManager1-Modem.StateFailedReason">
44
<literal>StateFailedReason</literal>
46
property. The most common case of failure is to have the SIM missing in a modem which
47
requires one for operation.
52
<title>PIN unlocking</title>
54
The process of PIN unlocking the modem is now performed with the
55
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Sim.SendPin">
56
<literal>SendPin()</literal>
59
<link linkend="gdbus-org.freedesktop.ModemManager1.Sim">
60
<literal>org.freedesktop.ModemManager1.Sim</literal>
65
The path of the SIM object is specified in the
66
<link linkend="gdbus-property-org-freedesktop-ModemManager1-Modem.Sim">
67
<literal>Sim</literal>
70
<link linkend="gdbus-org.freedesktop.ModemManager1.Modem">
71
<literal>org.freedesktop.ModemManager1.Modem</literal>
73
interface. If the modem doesn't have a SIM, no object path will be given.
78
<title>Connection and disconnection</title>
80
The process of requesting to connect or disconnect the modem is now split into
81
two operations: creating a bearer with
82
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem.CreateBearer">
83
<literal>CreateBearer()</literal>
86
<link linkend="gdbus-org.freedesktop.ModemManager1.Modem">
87
<literal>org.freedesktop.ModemManager1.Modem</literal>
89
interface and getting the bearer connected with
90
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Bearer.Connect">
91
<literal>Connect()</literal>
94
<link linkend="gdbus-org.freedesktop.ModemManager1.Bearer">
95
<literal>org.freedesktop.ModemManager1.Bearer</literal>
97
interface. These two steps are equivalent to the old <literal>Connect()</literal>
98
method in the previous <literal>org.freedesktop.ModemManager.Modem</literal>
102
The old <literal>Disconnect()</literal>
103
method in the previous <literal>org.freedesktop.ModemManager.Modem</literal>
104
interface is therefore also applied in a per-bearer basis through the new
105
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Bearer.Disconnect">
106
<literal>Disconnect()</literal>
109
<link linkend="gdbus-org.freedesktop.ModemManager1.Bearer">
110
<literal>org.freedesktop.ModemManager1.Bearer</literal>
115
This logic of splitting the connection logic allows ModemManager to create
116
multiple bearers that may be connected to e.g. different access points (if
117
the modem allows it).
122
<title>Simple connection</title>
124
In order to simplify the whole sequence to get the modem connected, ModemManager
125
still exposes a Simple interface, renamed as:
126
<link linkend="gdbus-org.freedesktop.ModemManager1.Modem.Simple">
127
<literal>org.freedesktop.ModemManager1.Modem.Simple</literal>
132
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Simple.Connect">
133
<literal>Connect()</literal>
135
method will create a single bearer with the parameters specified in the call an get
136
it connected, while the
137
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Simple.Disconnect">
138
<literal>Disconnect()</literal>
140
method will disconnect all available bearers.
143
One of the main differences with respect to the 0.6 interface, is that
144
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Simple.Connect">
145
<literal>Connect()</literal>
147
doesn't support to change allowed modes or bands. Instead, these operations should
148
be done through the methods in the
149
<link linkend="gdbus-org.freedesktop.ModemManager1.Modem">
150
<literal>org.freedesktop.ModemManager1.Modem</literal>