Commit Graph
33 Commits
Author SHA1 Message Date
Aleksander Morgado 2eb55d3224 plugins: use G_N_ELEMENTS when iterating ports array 2017-05-30 17:28:23 +02:00
Aleksander Morgado fcd4a8c5dc altair,hso,samsung: setup send-delay=0 for probing
The Altair, Option HSO and Samsung plugins all use the send-delay=0
setting once the modem object has been created. For consistency, use
the same setting during port probing.
2017-05-30 17:18:32 +02:00
Aleksander Morgado 1f813c4e96 core: allow identifying devices by a user-provided 'uid'
All ports of the same modem reported by the kernel will all be associated with
a common 'uid' (unique id), which uniquely identifies the physical device. This
logic was already in place, what we do now is avoid calling it  the 'sysfs
path' of the physical device, because we may not want to use that to identify
a device.

This logic now also enables the possibility of "naming" the modems in a unique
way by setting the "ID_MM_PHYSDEV_UID" property in the "usb_device" that owns
all the ports.

E.g. a custom device has 4 modems in 4 different USB ports. The device path of
each USB device will always be the same, so the naming rules could go like this:

    $ vim /usr/lib/udev/rules.d/78-mm-naming.rules

    ACTION!="add|change|move", GOTO="mm_naming_rules_end"
    DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.1", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-1"
    DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.2", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-2"
    DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.3", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-3"
    DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.4", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-4"
    LABEL="mm_naming_rules_end"

Each of the modems found will have a unique UID retrieved from the previous list
of rules. Then, "mmcli" has also been updated to allow using the UID instead of
the modem DBus path or index, e.g.:

    $ sudo mmcli -m USB-MODEM-1
    /org/freedesktop/ModemManager1/Modem/0 (device id '988d83252c0598f670c2d69d5f41e077204a92fd')
      -------------------------
      Hardware |   manufacturer: 'ZTE CORPORATION'
               |          model: 'MF637'
               |       revision: 'BD_W7P673A3F3V1.0.0B04'
               |      supported: 'gsm-umts'
               |        current: 'gsm-umts'
               |   equipment id: '356516027657837'
      -------------------------
      System   |         device: 'USB-MODEM-1'
               |        drivers: 'option'
               |         plugin: 'ZTE'
               |   primary port: 'ttyUSB5'
               |          ports: 'ttyUSB5 (at)'
    ...

    $ sudo mmcli -m USB-MODEM-1 --enable
    ...
2016-09-29 15:41:21 +02:00
Ting-Yuan Huang 969189d42c plugin-manager: protect mm_plugin_{major,minor}_version
This patch makes declarations bind to definitions within the same module
to prevent the potential ambiguity if referenced directly.

AddressSanitizer think they violated one definition rule, although
those symbols are accessed by address through their modules and do
not depend on the order of the libararies loaded.
2016-05-28 13:59:54 +02:00
Aleksander Morgado 6f235b9948 ports: rename 'MMAtSerialPort' to 'MMPortSerialAt' 2014-02-13 13:40:01 +01:00
Aleksander Morgado 9cde02111b ports: rename 'MMSerialPort' to 'MMPortSerial' 2014-02-13 13:39:51 +01:00
Aleksander Morgado 85d5d96824 port: remove 'carrier-detect' property
It is no longer used since commit 736aa0d2d.
2013-11-15 17:25:33 +01:00
Aleksander Morgado 7da2a65b43 plugins: fix generic GObject related macros 2012-12-27 08:48:11 +01:00
Aleksander Morgado 0436b3e457 api,introspection: report list of drivers, not just one
Different ports of the same modem may get handled by different drivers. We
therefore need to provide a list of drivers (new `Modem.Drivers' property with
signature 'as') instead of just one (removed `Modem.Driver' property with
signature 's').

$ sudo mmcli -m 0 | grep drivers
           |        drivers: 'qcserial, qmi_wwan'
2012-08-24 13:34:51 +02:00
Aleksander Morgado 5b96aa9db4 samsung: use generic power down of the Icera modem 2012-08-06 20:07:27 +02:00
Aleksander Morgado 7ad73e4fa3 samsung: make the modem object inherit from the `MMBroadbandModemIcera' 2012-08-06 20:07:27 +02:00
Dan Williams ea024f2e52 samsung: use generic Icera band handling functions 2012-08-06 20:07:27 +02:00
Dan Williams b1c2e0ba5f samsung: use generic Icera unlock retries checking functions 2012-08-06 20:07:27 +02:00
Aleksander Morgado 36924d8f82 samsung: add Samsung Electronics, Inc. as copyright owners
They actually wrote the original Samsung plugin in ModemManager 0.5.
2012-08-06 20:07:27 +02:00
Aleksander Morgado 2bf2b8e848 samsung: new `MMBroadbandBearerSamsung'
Based on the Icera bearer, but using DHCP in the net port.
2012-08-06 20:07:27 +02:00
Ben Chan e18778d815 samsung: fix crash due to uninitialized GError variables
BUG=chromium-os:32475
TEST=emerge modemmanager-next

Change-Id: I8dad924dae9a249c3b9235786226b7dd40bd8819
2012-08-06 20:07:26 +02:00
Aleksander Morgado d820ca8f27 samsung: use CFUN=4 for power down 2012-08-06 20:07:26 +02:00
Aleksander Morgado ef217c23b0 samsung: custom configuration for AT serial ports 2012-08-06 20:07:26 +02:00
Aleksander Morgado 5fcc8d1629 samsung: use Icera-based time loading 2012-08-06 20:07:26 +02:00
Aleksander Morgado e70fea145e samsung: user Icera-based timezone loading 2012-08-06 20:07:26 +02:00
Aleksander Morgado 268db7fe0b samsung: minor coding style fixes 2012-08-06 20:07:26 +02:00
Aleksander Morgado d8ae69e7d1 samsung: use the generic Icera bearer 2012-08-06 20:07:26 +02:00
Aleksander Morgado 8d651dd68e samsung: use Icera-based unsolicited messages setup and access tech loading 2012-08-06 20:07:25 +02:00
Aleksander Morgado 01e85aa1ef samsung: don't hardcode supported modes
Don't try to implement supported modes loading if we're just hardcoding the
values; the proper way would be to run the %IPSYS=? test command and parse
the results.
2012-08-06 20:07:25 +02:00
Aleksander Morgado 4f0157cec4 samsung: use Icera-based allowed mode setting 2012-08-06 20:07:25 +02:00
Aleksander Morgado f127afd402 samsung: use Icera-based initial allowed mode loading 2012-08-06 20:07:25 +02:00
Aleksander Morgado ae22a99dab samsung: implement the `MMIfaceIcera' interface 2012-08-06 20:07:25 +02:00
Aleksander Morgado 9a068b4294 samsung: port Bearer to use the 'config' property in the MMBearer class
This saves us from requiring to implement user & password in all modems.
2012-08-06 20:07:24 +02:00
Aleksander Morgado fc9a7dbbd9 samsung: port plugin to the refactored probing logic 2012-08-06 20:07:24 +02:00
Aleksander Morgado 03a0fee4ff samsung: minor coding style fixes 2012-08-06 20:07:24 +02:00
Aleksander Morgado 6f814bb15a samsung: plug memleak
get_port() actually increases the refcount of the returned port, use peek_port()
instead.
2012-08-06 20:07:24 +02:00
Aleksander Morgado a80e620342 samsung: fix typo, s/recieved/received 2012-08-06 20:07:24 +02:00
Nathan Williams f15527eecd samsung: plugin for Samsung Y3300/Y3400 UMTS modems based on the Icera/Nvidia chipset 2012-08-06 20:07:24 +02:00