Files
ModemManager/introspection/org.freedesktop.ModemManager1.xml
T
Aleksander Morgado c4a584416a core: allow disabling auto-scan and notifying ports one by one via API
This commit enables a new core ModemManager daemon option, so that automatic
detection of available modems is totally disabled: '--no-auto-scan'. Note that
this option also replaces the previously used '--test-no-auto-scan' option,
which was only used during tests.

Along with the new ModemManager option, a new ReportKernelEvent() method in
the API is defined, which allows notifying the daemon of which interfaces it
should be accessing, as well as the main details of each interface. The only
mandatory parameters in the new method are 'action' (add/remove), 'name' (the
name of the interface) and 'subsystem' (the subsystem of the interface).

The mmcli tool has support for using the new api method via several new options:

 * The '--report-kernel-event' option allows specifying device ports one by
   one, and is a direct mapping of the ReportKernelEvent() method:
     $ sudo mmcli --report-kernel-event="action=add,name=wwan0,subsystem=net"
     $ sudo mmcli --report-kernel-event="action=add,name=cdc-wdm0,subsystem=usbmisc"

 * The '--report-kernel-event-auto-scan' option uses udev monitoring to notify
   events automatically to the daemon. This allows to operate in a way
   equivalent to the default daemon operation (with implicit auto-scan).

Worth noting that the ReportKernelEvent() method is only usable when
'--no-auto-scan' is explicitly used in the daemon. An error will be reported if
the method is tried while standard udev monitoring is enabled (implicit if
auto scan isn't explicitly disabled in the daemon).

If mmcli is going to be used only to report 'real time' events, an optional
'--initial-kernel-events=[PATH]' may be given in the ModemManager call to
automatically process a set of port kernel events one by one on boot. The file
may e.g. contain:
  action=add,name=wwan0,subsystem=net
  action=add,name=cdc-wdm0,subsystem=usbmisc
2016-09-29 15:43:05 +02:00

116 lines
3.5 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<!--
ModemManager 1.0 Interface Specification
Copyright (C) 2008 Novell, Inc.
Copyright (C) 2008-2013 Red Hat, Inc.
Copyright (C) 2011-2013 Google, Inc.
Copyright (C) 2011-2013 Lanedo GmbH
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.ModemManager1:
@short_description: The ModemManager Manager interface.
The Manager interface allows controlling and querying the status of the
ModemManager daemon.
-->
<interface name="org.freedesktop.ModemManager1">
<!--
ScanDevices:
Start a new scan for connected modem devices.
-->
<method name="ScanDevices" />
<!--
SetLogging:
@level: One of <literal>"ERR"</literal>, <literal>"WARN"</literal>, <literal>"INFO"</literal>, <literal>"DEBUG"</literal>.
Set logging verbosity.
-->
<method name="SetLogging">
<arg name="level" type="s" direction="in" />
</method>
<!--
ReportKernelEvent:
@properties: event properties.
Reports a kernel event to ModemManager.
This method is only available if udev is not being used to report kernel
events.
The @properties dictionary is composed of key/value string pairs. The
possible keys are:
<variablelist>
<varlistentry><term><literal>action</literal></term>
<listitem>
<para>
The type of action, given as a string value (signature
<literal>"s"</literal>).
This parameter is MANDATORY.
</para>
<variablelist>
<varlistentry><term><literal>add</literal></term>
<listitem>
A new kernel device has been added.
</listitem>
</varlistentry>
<varlistentry><term><literal>remove</literal></term>
<listitem>
An existing kernel device has been removed.
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry><term><literal>name</literal></term>
<listitem>
<para>
The device name, given as a string value (signature
<literal>"s"</literal>).
This parameter is MANDATORY.
</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>subsystem</literal></term>
<listitem>
<para>
The device subsystem, given as a string value (signature
<literal>"s"</literal>).
This parameter is MANDATORY.
</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>uid</literal></term>
<listitem>
<para>
The unique ID of the physical device, given as a string value
(signature <literal>"s"</literal>).
This parameter is OPTIONAL, if not given the sysfs path of the
physical device will be used. This parameter must be the same
for all devices exposed by the same physical device.
</para>
</listitem>
</varlistentry>
</variablelist>
-->
<method name="ReportKernelEvent">
<arg name="properties" type="a{sv}" direction="in" />
</method>
</interface>
</node>