Commit Graph

6219 Commits

Author SHA1 Message Date
Aleksander Morgado
81795f3023 simtech: implement GPS support with AT+CGPS
The new logic is available in a new 'MMSharedSimtech' interface which
is implemented both by the generic AT-based MMBroadbandModemSimtech
modem, and by a new QMI-based new MMBroadbandModemQmiSimtech.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/112
2019-10-11 09:24:22 +00:00
Aleksander Morgado
583d53a7df simtech: port type hints for the SIM7000/SIM7600 family
E.g. the SIM7600E shows up as:

  P:  Vendor=1e0e ProdID=9001 Rev=03.18
  S:  Manufacturer=SimTech, Incorporated
  S:  Product=SimTech, Incorporated
  S:  SerialNumber=0123456789ABCDEF
  C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
  I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
  I:  If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
2019-10-11 09:24:22 +00:00
Aleksander Morgado
eeb1f73906 simtech: remove unused ID_MM_SIMTECH_TAGGED tag
The plugin already has a VID filter for 0x1e0e, this tag is useless.
2019-10-11 09:24:22 +00:00
Aleksander Morgado
55c3f7d3f6 systemd: always start MM after polkit service if enabling policy
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/113
2019-10-11 08:40:37 +00:00
Aleksander Morgado
803c770551 broadband-modem-qmi: fix when >1 PRI images for the same modem image 2019-10-11 08:16:04 +00:00
Aleksander Morgado
227c290778 mmcli,firmware: don't use tabs when printing human-friendly list 2019-10-11 08:16:04 +00:00
Aleksander Morgado
6977b41adb broadband-modem-qmi: prefer ASCII unique IDs
If the manufacturer uses QMI unique IDs in ASCII, use the same format
in our APIs, instead of blindly converting them to a 16-byte HEX
string.

This makes user operations much nicer, e.g. instead of:

    $ sudo mmcli -m 0 --firmware-list
      ----------------
      Firmware | list: 02.20.03.00_GENERIC
               |        current: yes
               |        gobi pri unique id: 3030322E3031375F3030300000000000
               |        gobi modem unique id: 3F5F3F00000000000000000000000000
               |       02.14.03.02_SPRINT
               |        current: no
               |        gobi pri unique id: 3030322E3031325F3030310000000000
               |        gobi modem unique id: 3F5F3F00000000000000000000000000
               |       02.20.03.22_VERIZON
               |        current: no
               |        gobi pri unique id: 3030322E3032365F3030300000000000
               |        gobi modem unique id: 3F5F3F00000000000000000000000000
               |       02.14.03.00_VODAFONE
               |        current: no
               |        gobi pri unique id: 3030302E3030385F3030300000000000
               |        gobi modem unique id: 3F5F3F00000000000000000000000000

We will have:

    $ sudo mmcli -m 1 --firmware-list
      ----------------
      Firmware | list: 02.20.03.00_GENERIC
               |        current: no
               |        gobi pri unique id: 002.017_000
               |        gobi modem unique id: ?_?
               |       02.14.03.02_SPRINT
               |        current: no
               |        gobi pri unique id: 002.012_001
               |        gobi modem unique id: ?_?
               |       02.20.03.22_VERIZON
               |        current: yes
               |        gobi pri unique id: 002.026_000
               |        gobi modem unique id: ?_?
               |       02.14.03.00_VODAFONE
               |        current: no
               |        gobi pri unique id: 000.008_000
               |        gobi modem unique id: ?_?
2019-10-11 08:16:04 +00:00
Aleksander Morgado
a55543d11e broadband-modem-qmi: fix listing images when 'Get Stored Image Info' is unsupported 2019-10-11 08:16:04 +00:00
Aleksander Morgado
1b29f7524c broadband-modem-qmi: move pri/modem pair list building to separate method 2019-10-11 08:16:04 +00:00
Aleksander Morgado
7986b2737d broadband-modem-qmi: move pri/modem list index lookup to separate method 2019-10-11 08:16:04 +00:00
Aleksander Morgado
5b8da2e1b9 broadband-modem-qmi: add note about index_of_running_image known issue
Since 02.20.xx.xx, the 'index_of_running_image' reported for MODEM
images is wrong.

https://forum.sierrawireless.com/t/mc74xx-wrong-running-image-in-qmi-get-stored-images/8998
2019-10-11 08:16:04 +00:00
Aleksander Morgado
66192288f9 broadband-modem-qmi: fix minor typo in comment 2019-10-11 08:16:04 +00:00
Aleksander Morgado
3f15293a0b daemon: register G_IO_ERROR_CANCELLED as "Cancelled" in DBus
We have deprecated the use of MM_CORE_ERROR_CANCELLED inside the
daemon in favor of using G_IO_ERROR_CANCELLED right away, and so, we
will now register G_IO_ERROR_CANCELLED as the error mapped to the
"Cancelled" error in the ModemManager error domain in DBus.

We therefore avoid sending unknown/unmapped errors via DBus, as in
this case:

    $ sudo ./test.sh
    error: couldn't connect the modem: 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code19: Operation was cancelled'
    successfully disconnected all bearers in the modem
    error: couldn't connect the modem: 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code19: Operation was cancelled'
    successfully disconnected all bearers in the modem
    successfully disconnected all bearers in the modem
    error: couldn't connect the modem: 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code19: Operation was cancelled'
    successfully disconnected all bearers in the modem
    error: couldn't connect the modem: 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code19: Operation was cancelled'
    successfully disconnected all bearers in the modem
    error: couldn't connect the modem: 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code19: Operation was cancelled'
    error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Cancelled: Connection attempt cancelled'
    successfully disconnected all bearers in the modem
    error: couldn't connect the modem: 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code19: Operation was cancelled'
    successfully disconnected all bearers in the modem
    successfully disconnected all bearers in the modem
    error: couldn't connect the modem: 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code19: Operation was cancelled'
    error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Cancelled: Connection attempt cancelled'
    successfully disconnected all bearers in the modem
    error: couldn't connect the modem: 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code19: Operation was cancelled'
    successfully disconnected all bearers in the modem
2019-10-11 07:27:59 +00:00
Aleksander Morgado
cf0d3f36fd iface-modem: avoid using MM_CORE_ERROR_CANCELLED 2019-10-11 07:27:59 +00:00
Aleksander Morgado
651bfd62b4 port-serial: avoid using MM_CORE_ERROR_CANCELLED 2019-10-11 07:27:59 +00:00
Aleksander Morgado
fa453a17a5 iface-modem-voice: avoid using MM_CORE_ERROR_CANCELLED 2019-10-11 07:27:59 +00:00
Aleksander Morgado
cff3be23c0 broadband-modem: avoid using MM_CORE_ERROR_CANCELLED 2019-10-11 07:27:59 +00:00
Aleksander Morgado
7974933de8 broadband-modem-mbim: avoid using MM_CORE_ERROR_CANCELLED 2019-10-11 07:27:59 +00:00
Aleksander Morgado
c0e1bde03e base-modem-at: avoid using MM_CORE_ERROR_CANCELLED 2019-10-11 07:27:59 +00:00
Aleksander Morgado
def5c76cf9 huawei,bearer: avoid using MM_CORE_ERROR_CANCELLED 2019-10-11 07:27:59 +00:00
Aleksander Morgado
6de9c8cb29 base-bearer: avoid using MM_CORE_ERROR_CANCELLED 2019-10-11 07:27:59 +00:00
Aleksander Morgado
15b8156061 iface-modem-simple: fix Simple.Disconnect() when bearer path given
The Simple.Disconnect() method handler was totally broken when a
specific bearer path was given, because the user-provided bearer path
was never being stored in the DisconnectionContext struct...

This is an extremely bad error, but it also gives us an indication
that no one is really using this method to disconnect one single
bearer, mainly because we also have the Bearer.Disconnect() method,
which makes more sense. mmcli didn't even allow passing a bearer path
to --simple-disconnect.
2019-10-09 12:23:33 +02:00
Aleksander Morgado
3a9c553184 libmm-glib,oma: avoid plural in type 2019-10-02 10:00:23 +02:00
Aleksander Morgado
19652e101c libmm-glib,call: fix typo in documentation 2019-10-02 09:58:07 +02:00
Piotr Drąg
a64223cac2 po: update Polish translation 2019-09-28 15:09:53 +02:00
Aleksander Morgado
0a85254d17 cli: fix typo when looking for a specific call fails
$ sudo mmcli --call 1 --hangup
error: couldn't find sms at '/org/freedesktop/ModemManager1/Call/1': 'no modems found'

(cherry picked from commit e71a4282db94f8f18b5884fe7966b95febc18a6d)
2019-09-25 14:42:31 +02:00
Aleksander Morgado
4352c273ba po: updated after new Time policy setup 2019-09-25 13:08:32 +02:00
Aleksander Morgado
8a652179de policy: USSD policy requires user authentication in strict mode 2019-09-25 13:08:32 +02:00
Aleksander Morgado
958c243489 polkit,conf: trivial comment update regarding Signal.Setup() 2019-09-25 13:08:32 +02:00
Aleksander Morgado
1cd24a3106 iface-modem-firmware: use the explicit Firmware policy
The Firmware policy is always 'auth_admin'.
2019-09-25 13:08:32 +02:00
Aleksander Morgado
110f6fd021 polkit,conf: add missing firmware management methods 2019-09-25 13:08:32 +02:00
Aleksander Morgado
2e5af74db8 polkit,conf: add missing OMA methods 2019-09-25 13:08:32 +02:00
Aleksander Morgado
7a7b3aa5cb polkit,time: protect GetNetworkTime() with a new 'Time' policy rule 2019-09-25 13:08:32 +02:00
Aleksander Morgado
be2500b02a polkit,conf: add missing supplementary voice service methods 2019-09-25 12:24:35 +02:00
Aleksander Morgado
01acd9a0d9 polkit,conf: add missing InjectAssistanceData 2019-09-25 12:24:13 +02:00
Aleksander Morgado
9e24d1c12f polkit,conf: add missing SetInitialEpsBearerSettings 2019-09-25 12:23:59 +02:00
Aleksander Morgado
614c7fbc7e polkit,conf: add missing SetEpsUeModeOperation 2019-09-25 12:23:44 +02:00
Aleksander Morgado
f2182a73bf polkit,conf: add missing SetCurrentCapabilities 2019-09-25 12:21:48 +02:00
Aleksander Morgado
3696a009c5 polkit,conf: add missing SetPowerState 2019-09-25 12:21:32 +02:00
Aleksander Morgado
d3e75eec97 policy,conf: use SetCurrentBands instead of SetBands 2019-09-25 12:21:12 +02:00
Mohammed Sadiq
e21e7ddfae policy: Use SetCurrentModes instead of SetAllowedModes
There is no DBus API for SetAllowedModes, but only for SetCurrentModes.
2019-09-24 19:10:31 +05:30
Aleksander Morgado
79a3965684 broadband-modem: shutdown firmware interface on dispose() 2019-09-23 18:15:29 +02:00
Aleksander Morgado
dcf50efdd5 ublox: fix calling setup_unsolicited_events_finish() 2019-09-23 18:14:23 +02:00
Aleksander Morgado
a1148f878b cinterion: fix calling setup_unsolicited_events_finish() 2019-09-23 18:14:20 +02:00
Aleksander Morgado
c8af22ab7a cli,messaging: trivial fix in comment 2019-09-23 10:41:36 +02:00
Aleksander Morgado
6c9027b223 docs,libmm-glib: add missing references to call waiting query/setup 2019-09-22 09:41:47 +02:00
amol.lad
16145c29de sms-part-3gpp: SMS timestamp in ISO8601 format 2019-09-22 09:15:51 +02:00
Eric Caruso
59e82b3f32 mm-plugin: fix inverted condition in port grabbing
If QMI support was not compiled in, then every net port that wasn't
a QMI port would be force-ignored unless it had the qmi_wwan driver.
Instead, we want to ignore ports with only the qmi_wwan driver.
2019-09-17 15:08:03 -07:00
Aleksander Morgado
a9797f44ae base-bearer: debug log only when ignoring disconnection from CGACT?
There are modems out there (e.g. SIM7600E) where we connect a given
CID >1 but once connected, only CID=1 is reported as connected, and
not the one we explicitly attempted to connect. In this situation the
modem is connected successfully, and we're properly ignoring the
disconnection report detected from CGACT? responses, but we're
probably better logging this situation only in debug level, not as
info, because this check is done periodically every 5s...

    <debug> [1568649020.333263] (ttyUSB5): --> 'AT+CGDCONT=7,"IP","inet.es"<CR>'
    <debug> [1568649020.383517] (ttyUSB5): <-- '<CR><LF>OK<CR><LF>'
    <debug> [1568649020.383617] (ttyUSB5) device open count is 3 (open)
    <debug> [1568649020.383655] Connection through a plain serial AT port (ttyUSB5)
    <debug> [1568649020.383683] (ttyUSB5) device open count is 4 (open)
    <debug> [1568649020.383802] (ttyUSB5) device open count is 3 (close)
    <debug> [1568649020.383873] (ttyUSB5): --> 'ATD*99***7#<CR>'
    <debug> [1568649020.405767] (ttyUSB5): <-- '<CR><LF>CONNECT 115200<CR><LF>'
    <debug> [1568649020.405853] [ttyUSB5] Setting flow control: rts-cts
    <debug> [1568649020.405878] (ttyUSB5): enabling RTS/CTS flow control
    <debug> [1568649020.405897] (ttyUSB5): port attributes not fully set
    <debug> [1568649020.405910] (ttyUSB5): flow control settings updated to rts-cts
    <debug> [1568649020.405940] (ttyUSB5): port now connected
    <debug> [1568649020.405983] Connected bearer '/org/freedesktop/ModemManager1/Bearer/0'
    <debug> [1568649020.406081] PPP is required for connection, will ignore disconnection reports
    <info>  [1568649020.406155] Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
    <info>  [1568649020.406361] Simple connect state (8/8): All done
    <debug> [1568649020.406461] (ttyUSB5) device open count is 2 (close)
    <debug> [1568649020.448483] (net/ppp0): adding device at sysfs path: /sys/devices/virtual/net/ppp0
    <debug> [1568649020.448738] (net/ppp0) could not get vendor/product id
    <debug> [1568649020.448776] [filter] (net/ppp0) port filtered: virtual device
    <debug> [1568649050.395662] (ttyUSB6) device open count is 2 (open)
    <debug> [1568649050.395871] (ttyUSB6): --> 'AT+CGACT?<CR>'
    <debug> [1568649050.408638] (ttyUSB6): <-- '<CR><LF>+CGACT: 1,1<CR><LF>+CGACT: 2,0<CR><LF>+CGACT: 3,0<CR><LF>+CGACT: 4,0<CR><LF>+CGACT: 5,0<CR><LF>+CGACT: 6,0<CR><LF>+CGACT: 7,0<CR><LF><CR><LF>OK<CR><LF>'
    <debug> [1568649050.408803] connection status loaded: disconnected
---> <info>  [1568649050.408825] ignoring disconnection report for bearer '/org/freedesktop/ModemManager1/Bearer/0'
    <debug> [1568649050.408848] (ttyUSB6) device open count is 1 (close)
    <debug> [1568649055.398994] (ttyUSB6) device open count is 2 (open)
    <debug> [1568649055.399084] (ttyUSB6): --> 'AT+CGACT?<CR>'
    <debug> [1568649055.411489] (ttyUSB6): <-- '<CR><LF>+CGACT: 1,1<CR><LF>+CGACT: 2,0<CR><LF>+CGACT: 3,0<CR><LF>+CGACT: 4,0<CR><LF>+CGACT: 5,0<CR><LF>+CGACT: 6,0<CR><LF>+CGACT: 7,0<CR><LF><CR><LF>OK<CR><LF>'
    <debug> [1568649055.411652] connection status loaded: disconnected
---> <info>  [1568649055.411674] ignoring disconnection report for bearer '/org/freedesktop/ModemManager1/Bearer/0'
2019-09-17 12:42:07 +02:00
Aleksander Morgado
be4fa661c1 plugins,telit: refactor #BND command support
And added support for several new things, including:
 * Setting "any" band now attempts to set all supported bands.
 * Added new 2G band value '5' (egsm+dcs+pcs+g850).
 * Setup support for two different 3G band combinations, a default one
   plus an alternate one applicable to the LM940/960 models only. The
   alternate combination is selected via udev tags.

During the refactor, the following Telit-specific helpers were also
removed and exchanged with more generic counterparts.
 * mm_telit_bands_contains() -> mm_common_bands_garray_lookup()
 * mm_telit_get_band_flags_from_string() -> mm_parse_uint_list()
2019-09-17 10:52:42 +02:00