Commit Graph

102 Commits

Author SHA1 Message Date
Aleksander Morgado
f419f56628 build: drop autotools 2022-11-07 14:26:02 +00:00
Aleksander Morgado
d30ad946d0 build: ignore test-kernel-device-helpers 2022-01-07 12:38:52 +01:00
Yegor Yefremov
d5c2ea931e .gitignore: ignore ctags tags file 2021-09-20 07:22:05 +00:00
Aleksander Morgado
86421f06bd examples: new SMS sending example in C using the async API 2021-09-08 11:21:45 +02:00
Aleksander Morgado
ccc7989324 examples: new SMS sending example in C using the sync API 2021-09-08 11:21:45 +02:00
Aleksander Morgado
c28bfe3cac docs: explicitly ignore .actions files
These are generated by gtk-doc.
2021-03-24 12:08:11 +01:00
Frederic Martinsons
89cd1696c3 tools: add unit test for test-modemmanager-service.py
The tests spawn the service via GTestDBus framework and make
some test API call while checking libmm interface to verify
that informations are well propagated.

To be able to use the fresh built libmm typelib, I used a
wrapper script to set GI_TYPELIB_PATH (because DBus activation
process clean the environment so it is not possible to set
it directly in the file).

This requires also the install of libgirepository-dev and python3-gi
in the CI docker.

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-15 16:44:19 +00:00
Aleksander Morgado
50c69d5403 build: fix distcheck with new gtk-doc
The .actions file is generated by newer gtk-doc releases, we just
treat it as e.g. the .signals or .types files.

This is also already fixed in upstream gtk-doc:
  https://gitlab.gnome.org/GNOME/gtk-doc/-/merge_requests/61
2020-11-08 10:09:32 +01:00
Aleksander Morgado
4fdf28bb56 huawei: new ^GETPORTMODE response parser 2020-11-04 11:15:19 +00:00
Aleksander Morgado
d83c018f98 core,tests: new test to make sure all error codes are supported
Defining the new error codes in the headers is not enough, we also
need to add support in the error helpers in order to create proper
GErrors with the expected error codes.
2019-12-17 10:52:13 +01:00
Aleksander Morgado
756480de6a test: new 'mmsmsmonitor' tool to monitor SMS messages
The tool monitors SMS message additions and SMS state updates, e.g.:

  $ sudo ./test/mmsmsmonitor
  [/org/freedesktop/ModemManager1/SMS/0] sms found: received
  [/org/freedesktop/ModemManager1/SMS/1] sms found: received
  [/org/freedesktop/ModemManager1/SMS/2] sms found: received
  [/org/freedesktop/ModemManager1/SMS/3] sms found: received
  [/org/freedesktop/ModemManager1/SMS/4] sms found: received
  [/org/freedesktop/ModemManager1/SMS/5] sms found: received
  [/org/freedesktop/ModemManager1/SMS/6] sms found: received
  [/org/freedesktop/ModemManager1/SMS/7] new sms: receiving
  [/org/freedesktop/ModemManager1/SMS/7] sms updated: received
2019-07-17 10:19:39 +02:00
Aleksander Morgado
4a4779729a test: new 'mmsmspdu' tool to parse PDUs given in hex 2019-07-15 13:49:49 +02:00
Dan Williams
1c14ca7262 libwmc: remove it
The WMC protocol was only present on older Panasonic/Verizon devices
from the 2006 - 2011 timeframe. The last device to support WMC was
the UML290 which also supported QMI (which is much more functional).
ModemManager also never used WMC support and it was never significantly
reverse engineered.

So remove WMC code from git; it'll still be in the history if anyone
cares in the future.
2019-04-02 11:20:11 -05:00
Aleksander Morgado
147facd2ec plugins,test: setup new simple keyfile tester 2019-04-02 12:14:03 +02:00
Ben Chan
864679543b build: ignore generated ChangeLog 2018-10-27 10:09:51 +02:00
Aleksander Morgado
fc3ca42734 build: ignore test-pco built file 2018-08-20 16:53:56 +02:00
Aleksander Morgado
ab0133445c build: ignore all tester programs for plugin-specific modem helpers 2018-08-04 17:39:41 +02:00
Aleksander Morgado
bcb0175f62 docs: always rebuild libmm-glib types
So that we don't forget to add new types here manually...
(e.g. MMBearerStats)
2018-03-13 13:29:54 +01:00
Aleksander Morgado
87341acaa8 build: import gtk-doc support
Remove the need to run `gtkdocize' when building from git; this should
be an operation done by the maintainer when modernizing the gtk-doc
setup (think of e.g. gettextize), no need to do it unconditionally.

This makes it easier for platforms without gtk-doc to build from git.

When trying to build with documentation enabled and gtk-doc isn't
found, we get some nice warnings and errors in the configure report:

    checking for gtk-doc... no
    configure: WARNING:
      You will not be able to create source packages with 'make dist'
      because gtk-doc >= 1.0 is not found.
    checking for gtkdoc-check... no
    checking for gtkdoc-check... no
    checking for gtkdoc-rebase... no
    checking for gtkdoc-mkpdf... no
    checking whether to build gtk-doc documentation... yes
    configure: error:
      You must have gtk-doc >= 1.0 installed to build documentation for
      ModemManager. Please install gtk-doc or disable building the
      documentation by adding '--disable-gtk-doc' to './configure'.

Files generated with gtkdocize (gtk-doc) 1.25.1.
2017-09-07 13:45:57 +02:00
Aleksander Morgado
984625165e i18n: deprecate intltool and use only gettext 0.19.8
Instead of mixing both intltool and gettext, which not always work
correctly together, this patch obsoletes intltool and uses only
gettext, which includes support for translating XML files with ITS
rules.

See migration steps for GNOME projects here:
  https://wiki.gnome.org/MigratingFromIntltoolToGettext

The gettext ITS rules for polkit policy files are imported from the
upstream polkit repository. We don't use the polkit-installed rule
files yet because there is no tagged release that contains those files
yet, so we cannot build-depend on any specific polkit version.
  https://bugs.freedesktop.org/show_bug.cgi?id=96940
2017-09-07 13:04:34 +02:00
Carlo Lobrano
4cd5044bfd telit: manage QSS transitions
Currently, Telit's SIM swap implementation is stateless and
based on #QSS unsolicited messages 0/1 (SIM_REMOVED/SIM_INSERTED).

However, the user might have configured the modem in order to provide a
more detailed information, with #QSS values 2/3 (SIM UNLOCKED/SIM READY).

In this case and with current implementation, even receiving "#QSS: 3" will
trigger the "SIM swap" logic. The same issue might occur in other use cases
too, i.e. with SIM locked or when the message is received from both USB
ports.

This patch makes SIM swap implementation stateful, and it considers as an
actual SIM swap, only transitions from #QSS: 0 to #QSS: 1/2/3 and vice
versa.
2017-06-05 14:04:42 +02:00
Aleksander Morgado
6312753a6b broadband-bearer: once connected, set flow control settings
During modem initialization we detected the flow control settings
supported by the modem, and selected the best one to use from them,
notifying it to the device via AT+IFC. The device was therefore
instructed to use that flow control setting for data transmission in
the TTY (i.e. not during AT control commands).

The missing thing was to also configure ourselves our end of the
serial port with the same flow control settings when getting into data
mode. By doing it ourselves, we avoid requiring any explicit setting
in pppd for flow control; pppd can assume the flow control settings
are already the expected ones.

Worth noting that all this setup is completely ignored for TTYs
exposed directly via USB.

https://bugs.freedesktop.org/show_bug.cgi?id=100394
2017-04-18 18:08:57 +02:00
Aleksander Morgado
d7fdda2247 linktop: new Linktop specific +CFUN? response parser
We handle all known CFUN? response values in the new parser, and report an error
if an unknown value is found.
2016-10-12 11:29:52 +02:00
Aleksander Morgado
eade066d8a ublox: generate enum types for usb profile and networking mode 2016-10-12 11:29:51 +02:00
Aleksander Morgado
241b63304b ublox: new 'AT+UUSBCONF?' response parser 2016-10-12 11:29:51 +02:00
Aleksander Morgado
58c955f5f2 core: allow building and running without udev
Instead of relying on the udev daemon and GUDev to manage the devices reported
by the kernel, we can now run ModemManager relying solely on the kernel events
reported via the new ReportKernelEvent() API. Therefore, the '--no-auto-scan'
option is implicit for the ModemManager daemon when udev is disabled in the
build.

Additionally, a new custom implementation of the kernel device object is
provided, which uses sysfs to load the properties and attributes required in
each kernel device, instead of using a GUdevDevice.

The udev rule files are kept in place, and a simple custom parser is provided
which preloads all rules in memory once and then applies them to the different
kernel objects reported via ReportKernelEvent(), e.g. to set port type hints.
A simple unit test setup is prepared to validate the udev rules during the
`check' Makefile target.
2016-09-29 15:43:05 +02:00
Aleksander Morgado
8ac075d768 build: ignore thuraya helpers test 2016-03-13 18:01:16 +01:00
Aleksander Morgado
e00fd54a20 build: bump required gettext version to 0.19.3
Otherwise:
    configure.ac:86: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
    configure.ac:86: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
    configure.ac:86: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
2016-03-13 17:39:20 +01:00
Aleksander Morgado
7652486433 build: ignore telit unit test 2016-02-20 16:26:19 +01:00
Aleksander Morgado
553666d63a build: use absolute paths when ignoring specific files in subdirs
If paths are not prefixed with '/' they are taken as filename-ignores that apply
to the whole tree.
2015-02-16 16:48:57 +01:00
Aleksander Morgado
8b985af3b6 build: remove obsolete ignored files 2015-02-11 19:58:13 +01:00
Aleksander Morgado
f4ec32e633 test: new 'mmtty' utility
The new tester allows to play with the AT-capable TTY using the same code as
ModemManager itself.

    $ sudo ./test/mmtty -d /dev/ttyHS0 --verbose
    opening serial port '/dev/ttyHS0'...
    (ttyHS0) opening serial port...
    (ttyHS0): port attributes not fully set
    (ttyHS0) device open count is 1 (open)
    flashing serial port '/dev/ttyHS0'...
    ready
    > AT+GCAP
    (ttyHS0): --> 'AT+GCAP<LF><CR>'
    (ttyHS0): <-- '<CR><LF>+GCAP: +CGSM,+DS,+ES<CR><LF><CR><LF>OK<CR><LF>'
    +GCAP: +CGSM,+DS,+ES
    > AT+GMI
    (ttyHS0): --> 'AT+GMI<LF><CR>'
    (ttyHS0): <-- '<CR><LF>Option N.V.<CR><LF><CR><LF>OK<CR><LF>'
    Option N.V.
    > ^C

    cancelling the main loop...

    (ttyHS0) device open count is 0 (close)
    (ttyHS0) closing serial port...
    (ttyHS0) serial port closed
    (ttyHS0) forced to close port
2015-02-11 19:58:12 +01:00
Jakub Sitnicki
7552030ef9 build: add code coverage support
Build all targets, except for CLI tools (mmcli, uml290), with special
flags needed for collecting code coverage information when the build has
been configured with --enable-code-coverage.

Three new targets are available in the top build directory:

 - `check-code-coverage' runs the test suite and generates a code
   coverage report,

 - `code-coverage-capture' generates a code coverage report from already
   collected data, which can come in handy when one wants to see code
   paths touched by a particular test,

 - `code-coverage-clean' removes the collected coverage data and the
   generated reports.
2015-01-11 19:32:43 +01:00
Aleksander Morgado
f6b0fd3f7b libqcdm: new 'reset' tester
Just like 'modepref', but not doing any mode changes, just OFFLINE+RESET.
2014-07-03 16:21:31 +02:00
Aleksander Morgado
293b032149 build: ignore test files 2014-06-22 18:24:38 +02:00
Aleksander Morgado
82067915d1 cinterion: use AT^SCFG=? to parse supported bands in 3G devices 2014-02-28 16:35:18 +01:00
Aleksander Morgado
bff2a8d2f2 tests: added support for DBus service tests
We can now run 'simulated' modems against a ModemManager running in its own
session bus.
2014-02-13 13:41:58 +01:00
Aleksander Morgado
46ff06ff80 service,tests: new DBus service file for tests 2014-02-13 13:41:17 +01:00
Aleksander Morgado
4827e79848 libmm-glib,tests: use gdbus-codegen to generate code for the new Test interface 2014-02-13 13:41:14 +01:00
Aleksander Morgado
0c86840dde ports: rename 'libserial' to 'libport' 2014-02-13 13:40:11 +01:00
Bjørn Mork
f721c650d2 qcdm: add utility to display and set the "IPv6 enabled" variable
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-12-05 13:16:48 -06:00
Aleksander Morgado
9c2be510f6 build: ignore built translation files 2013-10-28 17:57:43 +01:00
Aleksander Morgado
e493292b7a tests: new CDMA SMS part tester 2013-10-25 19:47:19 +02:00
Aleksander Morgado
c440f121cc tests: rename 3GPP SMS part tester 2013-10-25 19:47:19 +02:00
Aleksander Morgado
e529cd3212 build: ignore plugin testers 2013-10-10 08:34:52 +02:00
Christian Persch
6eec45cb73 gitignore: Updated to ignore GIR and VAPI bindings generated files
Bug #705641.
2013-08-14 13:30:35 +02:00
Aleksander Morgado
8d0ec0fc24 huawei: new helper to parse ^NDISSTATQRY responses 2013-07-11 09:39:21 +02:00
Aleksander Morgado
ce6777c53b Revert "systemd: simplify unit file"
This reverts commit 91898aa8b0.

See additional comments in the following bug:

  https://bugzilla.gnome.org/show_bug.cgi?id=701229

Basically, 'mask' and 'unmask' operations are not the ones we should be using
or suggesting; and the Alias= for the DBus file is the correct way to go.
2013-06-23 11:47:41 +02:00
Aleksander Morgado
a43cecb456 api,header: setup and export MM version symbols in the API 2013-06-13 10:04:49 +02:00
Aleksander Morgado
0c7265de29 build: new strict & permissive polkit policies in '--with-polkit'
The '--with-polkit' configure switch now supports more options than just yes
or no:

 * strict: Active user needs to explicitly authenticate when peforming an
   operation defined in the Device.Control, Messaging, Location or Contacts
   interfaces. Polkit policy is set to 'auth_self_keep'.

 * permissive: Active user doesn't need to explicitly authenticate when
   peforming an operation defined in the Device.Control, Messaging, Location or
   Contacts interfaces. Polkit policy is set to 'yes'.

 * none: don't use polkit.

If '--with-polkit' is not given, usage will be automatically decided based on
the presence of the Polkit headers in the system (if headers found, strict
policy will be applied, otherwise none).

Also:
 * '--with-polkit' is equivalent to '--with-polkit=strict'
 * '--with-polkit=yes' is equivalent to '--with-polkit=strict'
 * '--with-polkit=no' is equivalent to '--with-polkit=none'
 * '--without-polkit' is equivalent to '--with-polkit=none'

By default, ModemManager will always apply the strict policy, in order to
protect the user from unwanted operations in the modem (e.g. getting the PIN
locked forever after wrong PIN/PUK unlock attempts).

https://bugzilla.gnome.org/show_bug.cgi?id=701740
2013-06-13 09:21:52 +02:00