Commit Graph
2143 Commits
Author SHA1 Message Date
Dan Williams 11a7e3dfdf core: add helper for parsing and validating the ICCID 2013-09-10 09:42:36 +02:00
Aleksander Morgado ac343d390b iface-modem-oma: fix OMA session state reporting
Reported by Arman Uguray <armansito@google.com>
2013-09-09 10:20:42 +02:00
Aleksander Morgado 03dc346add broadband-modem-qmi: implement OMA CancelSession() 2013-09-09 10:19:21 +02:00
Aleksander Morgado 76835446eb iface-modem-oma: ensure the session id is known when accepting/rejecting it 2013-09-09 10:19:20 +02:00
Aleksander Morgado 3ba2fee6fc broadband-modem-qmi: never add UNKNOWN OMA session types to the pending list 2013-09-09 10:19:20 +02:00
Aleksander Morgado 461d75dae9 broadband-modem-qmi: implement OMA AcceptNetworkInitiatedSession() 2013-09-09 10:19:20 +02:00
Aleksander Morgado 0c7def2f34 broadband-modem-qmi: implement OMA StartClientInitiatedSession() 2013-09-09 10:19:20 +02:00
Aleksander Morgado 72be4f1d57 broadband-modem-qmi: implement OMA Setup() 2013-09-09 10:19:20 +02:00
Aleksander Morgado 959c7b9cde broadband-modem-qmi: implement OMA feature loading 2013-09-09 10:19:20 +02:00
Aleksander Morgado e6a7c85661 broadband-modem-qmi: handle OMA indications 2013-09-09 10:19:20 +02:00
Aleksander Morgado df47f1ac8f broadband-modem-qmi: check support for OMA capabilities 2013-09-09 10:19:18 +02:00
Aleksander Morgado d37b21e116 iface-modem-oma: new object interface to handle the OMA DBus interface 2013-09-09 10:18:23 +02:00
Ben Chan 60e1ac6919 iface-modem: allow reset and factory reset operation in every state 2013-09-02 09:03:53 +02:00
Aleksander Morgado 2b28b7acb6 at-serial-port: avoid 'enable_disable', use just 'enable' in method name 2013-08-26 16:21:27 +02:00
Ben Chan 0f2a0aa0bc at-serial-port: allow enabling/disabling unsolicited message handlers
This patch adds an 'enable' flag in MMAtUnsolicitedMsgHandler and
mm_at_serial_port_enable_disable_unsolicited_msg_handler() to allow
enabling and disabling of unsolicited message handlers. The enable flag
is set to TRUE by mm_at_serial_port_add_unsolicited_msg_handler().
2013-08-26 15:59:29 +02:00
Aleksander Morgado 7e9ae21550 broadband-modem-qmi: avoid processing invalid TLVs in GetSignalStrength response
E.g. in the GetSignalStrength output we get EV-DO-only TLVs, even if EV-DO is
not the current access technology, what ends up generating the following:

$ sudo mmcli -m 0 --signal-get

/org/freedesktop/ModemManager1/Modem/0
  -------------------------
  Refresh rate: '5' seconds
  -------------------------
  EV-DO  | RSSI: '0.00' dBm
         | EcIo: '0.00' dBm
         | SINR: '9.00' dBm
         |   Io: '-106.00' dB
  -------------------------
  UMTS   | RSSI: '94.00' dBm
         | EcIo: '-6.00' dBm

Instead, we will now assume that the RSSI list always contains the valid access
technologies being reported, and use that list to decide whether we process some
of the per-technology TLVs. We now end up getting:

$ sudo mmcli -m 0 --signal-get

/org/freedesktop/ModemManager1/Modem/0
  -------------------------
  Refresh rate: '5' seconds
  -------------------------
  UMTS   | RSSI: '94.00' dBm
         | EcIo: '-8.00' dBm
2013-08-21 13:29:50 +02:00
Aleksander Morgado 27b739b838 broadband-modem-qmi: try with 'NAS Signal Strength' for extended signal info 2013-08-21 12:34:55 +02:00
Aleksander Morgado 71c60fc6eb iface-modem-signal: use the new 'MMSignal' in the interface implementation
Also modify the QMI-specific implementation to act as a state machine, as we'll
add more steps afterwards.
2013-08-21 12:34:54 +02:00
Aleksander Morgado 4a68e8d273 broadband-modem-qmi: extended signal support only in NAS >= 1.8 2013-08-21 12:34:54 +02:00
Aleksander Morgado 1340896b50 iface-modem-signal: explicitly check support for the Signal interface 2013-08-21 12:34:54 +02:00
Aleksander Morgado 0502646f9f api,introspection: use per-technology dictionaries in the 'Signal' interface 2013-08-21 12:34:51 +02:00
Aleksander Morgado e8ce650ed0 broadband-modem-qmi: implement extended signal quality reporting 2013-08-21 12:33:10 +02:00
Aleksander Morgado 5ef439e2d6 broadband-modem: handle the new 'Signal' interface 2013-08-21 12:33:10 +02:00
Aleksander Morgado d368d30c53 iface-modem-signal: new implementation for the 'Signal' interface 2013-08-21 12:33:10 +02:00
Aleksander Morgado ef5aae5125 iface-modem-messaging: never add UNKNOWN to the lists of supported storages 2013-08-19 09:44:20 +02:00
Ben Chan f515cd1d90 iface-modem: add mm_iface_modem_get_model helper to query model 2013-08-14 09:30:41 +02:00
Aleksander Morgado bb1d39cf7c broadband-modem-qmi: check MDN set after manual activation 2013-08-08 09:50:04 +02:00
Aleksander Morgado 512ef6970c broadband-modem-qmi: implement manual CDMA activation
We'll also now require libqmi 1.5 (git master), needed to handle the PRL TLV
in 'DMS Activate Manual'.

TODO: require 1.6 as soon as it is released.
2013-08-08 09:50:04 +02:00
Aleksander Morgado b769d48ed8 iface-modem-cdma: use the new 'MMCdmaManualActivationProperties' 2013-08-08 09:50:04 +02:00
Aleksander Morgado 5ba2c1d6cb introspection,api: document the expected parameters in Cdma.ActivateManual() 2013-08-08 09:50:04 +02:00
Ben Chan ffac6f17b5 modem-helpers: fix parsing of CREG/CGREG/CEREG responses
The format of CREG/CGREG/CEREG responses is not very precisely defined
in or strictly enforced by the 3GPP specifications. That leads to the
fact that some modems put leading zeros in integer type fields (e.g.
<n>, <stat>, <AcT>), and not all modems put double quotes around string
type fields (e.g. <lac>, <ci>) in those C*REG responses.

For example, 0001 can be a valid value for both <stat> and <lac>. The
original C*REG parsing code in ModemManager could potentially interpret
'+CREG: <stat>,<lac>,<ci>,<AcT>' as '+CREG: <n>,<stat>,<lac>,<ci>'. This
patch addresses this issue by refining the regular expressions returned
by mm_3gpp_creg_regex_get() with the following assumptions:

1. If a modem puts leading zeros in integer type fields, it puts double
   quotes around string type fields.
2. If a modem omits double quotes around string type fields, it does not
   put leading zeros in integer type fields.
2013-08-06 16:14:35 -05:00
Dan Williams 965ef76547 serial: add logging to serial port open failures 2013-07-23 10:03:27 -05:00
Aleksander Morgado d90a6309fb broadband-modem-qmi: plug memleak when listing SMS messages 2013-07-18 22:44:49 +02:00
Aleksander Morgado abce098cfe sms: initialize 'validity' property always to a default
When we're exposing not-yet-completed multipart messages, we need to provide a
correct value for the validity property, or gdbus may crash, see e.g.:

https://bugzilla.gnome.org/show_bug.cgi?id=704319
2013-07-17 09:03:16 +02:00
Ben Chan 5e82707b3f broadband-modem-qmi: fix incorrect conversions from double to gint32
This patch fixes the following incorrect conversions from double to gint32:

mm-broadband-modem-qmi.c:4785:27: error: implicit conversion from 'double' to 'gint32' (aka 'int')
changes value from 2.225073858507201E-308 to 0 [-Werror,-Wliteral-conversion]
    gint32 bs_longitude = MM_LOCATION_LONGITUDE_UNKNOWN;
           ~~~~~~~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

mm-broadband-modem-qmi.c:4786:26: error: implicit conversion from 'double' to 'gint32' (aka 'int')
changes value from 2.225073858507201E-308 to 0 [-Werror,-Wliteral-conversion]
    gint32 bs_latitude = MM_LOCATION_LATITUDE_UNKNOWN;
           ~~~~~~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2013-07-11 08:33:37 +02:00
Ben Chan d366b28650 modem-helpers-qmi: fix enumeration type mismatches
This patch fixes the following enumeration type mismatches:

mm-modem-helpers-qmi.c:980:12: error: implicit conversion from
enumeration type 'QmiNasRatModePreference' to different
enumeration type 'QmiNasRadioTechnologyPreference' [-Werror,-Wenum-conversion]
    return qmi;
    ~~~~~~ ^~~

mm-modem-helpers-qmi.c:1082:12: error: implicit conversion from
enumeration type 'MMModemMode' to different
enumeration type 'QmiNasGsmWcdmaAcquisitionOrderPreference' [-Werror,-Wenum-conversion]
    return MM_MODEM_MODE_NONE;
    ~~~~~~ ^~~~~~~~~~~~~~~~~~

mm-modem-helpers-qmi.c:1096:16: error: implicit conversion from
enumeration type 'QmiNasRegistrationState' to different
enumeration type 'MMModem3gppRegistrationState' [-Werror,-Wenum-conversion]
    return QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED;
    ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2013-07-11 07:53:33 +02:00
Ben Chan dd2b467262 serial-port: warn if ioctl(TIOCSSERIAL) fails to set closing_wait
Prints out a warning if ioctl(TIOCSSERIAL) fails to set closing_wait to
none. This helps debug issues when a serial driver does not support or
properly handle closing_wait, which may cause closing of the serial port
to block.
2013-07-08 08:46:21 +02:00
Aleksander Morgado a9ebec949e plugin-manager: handle modems where only some ports report being Icera
Icera-based Nokia modems may reply correctly to the Icera probing only in some
AT ports, not in all. In order to handle this situation we override the final
plugin selected to be the Icera-based one if we find that the mismatched plugins
have the 'icera-allowed' and 'icera-forbidden' filters.

https://bugzilla.gnome.org/show_bug.cgi?id=703022
2013-06-26 11:07:40 +02:00
Aleksander Morgado ddb9691922 iface-modem: plug memleak 2013-06-25 11:48:50 +02:00
Aleksander Morgado b4f6a4ac0b serial-parsers: plug memleak 2013-06-25 11:48:43 +02:00
Aleksander Morgado 3206e95663 api,introspection: new 'Ports' property in the Modem interface
We will expose a new 'Ports' property listing all ports currently known by a
given modem. Ports which are not used but are detected as being part of the
modem will be listed with an 'unknown' port type.

This change uses the new 'MMModemPortType' enum and the new 'MMModemPortInfo'
helper struct to handle these values in libmm-glib. The already available
'MMPortType' enum hasn't been re-used for the interface because it contains
values that we don't need (e.g. IGNORED).

The port list is now also included in the modem information command of mmcli:

$ sudo mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id '97b7b99e3e2bea103880545b619fb05a3cc81b26')
  -------------------------
  System   |         device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4'
           |        drivers: 'qcserial, qmi_wwan'
           |         plugin: 'Gobi'
           |   primary port: 'cdc-wdm0'
           |          ports: 'ttyUSB0 (qcdm), ttyUSB1 (at), cdc-wdm0 (qmi), wwp0s29u1u4 (net)'

https://bugzilla.gnome.org/show_bug.cgi?id=702678
2013-06-24 19:44:57 +02:00
Aleksander Morgado e227d4af39 iface-modem: don't rely on the cached current power state value
The real power state value of the modem may be changed by other means, e.g.
rfkill. So when changing power state of the modem in MM, we better recheck
which the current power status is.

A better full approach would be to follow rfkill changes, but this fix should
help until that is done.

https://bugzilla.gnome.org/show_bug.cgi?id=702838
2013-06-24 19:40:58 +02:00
Aleksander Morgado 08ef3c81da broadband-modem-mbim: fix notification signal handling 2013-06-24 19:37:39 +02:00
Aleksander Morgado 19bd63ecfd broadband-modem-mbim: log about all received notifications 2013-06-24 19:37:38 +02:00
Aleksander Morgado 697b6fdadb broadband-modem-mbim: add support for flash/alert SMS messages
My Huawei MBIM modem notifies of standard new messages using MBIM_CID_MESSAGE_STORE_STATUS
notifications, which is kind of wrong, as they should really be notified using
MBIM_SMS_READ notifications; but anyway, try to handle those.
2013-06-24 19:37:38 +02:00
Aleksander Morgado ee62806a1a broadband-modem-mbim: setup enabling and disabling of unsolicited messages 2013-06-24 19:37:38 +02:00
Aleksander Morgado 817fc43bb0 broadband-modem-mbim: rename 'notification_flags' to 'setup_flags'
We'll add 'enable_flags' later on.
2013-06-24 19:37:38 +02:00
Aleksander Morgado ac7c87c0d2 broadband-modem-mbim: rename 3GPP specific methods 2013-06-24 19:37:38 +02:00
Aleksander Morgado 67207f279b sms: don't warn about unsupported validities 2013-06-24 19:37:38 +02:00
Aleksander Morgado 347ea7cd4e broadband-modem-mbim: implement setup/cleanup messaging events 2013-06-24 19:37:38 +02:00