Commit Graph
82 Commits
Author SHA1 Message Date
Daniele Palmas a838d3b98f libqcdm,tests: fix qcdm_send method for wwan
The qcdm wwan device does not cope well with writing single bytes,
while it does not have any issue if longer chunks are written.

Fix qcdm_send accordingly, since it should not hurt the previously
supported devices.

Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2026-08-29 23:29:38 -05:00
Aleksander Morgado f419f56628 build: drop autotools 2022-11-07 14:26:02 +00:00
Iñigo Martínez 93a1d7a60d build,meson: Improve libqcdm build
`libqcdm`'s meson build files have been improved slightly by
removing unnecessary variables shortening their contents.
2021-09-10 08:39:37 +00:00
Iñigo Martínez 77d1c24361 build: Port to meson
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
2021-09-07 10:55:43 +00:00
Aleksander Morgado a1f2429790 libqcdm,reset: fix warnings with -Wdiscarded-qualifiers
reset.c: In function ‘main’:
  reset.c:238:17: warning: passing argument 1 of ‘putenv’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    238 |         putenv ("QCDM_DEBUG=1");
        |                 ^~~~~~~~~~~~~~
  In file included from reset.c:22:
  /usr/include/stdlib.h:647:26: note: expected ‘char *’ but argument is of type ‘const char *’
    647 | extern int putenv (char *__string) __THROW __nonnull ((1));
        |                    ~~~~~~^~~~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado 305d927ee0 libqcdm,reset: fix warnings with -Wsign-compare
reset.c: In function ‘print_buf’:
  reset.c:47:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
     47 |     for (i = 0; i < len; i++) {
        |                   ^
  reset.c: In function ‘qcdm_wait_reply’:
  reset.c:168:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
    168 |     } while (total < sizeof (readbuf));
        |                    ^
2020-01-30 11:59:14 +01:00
Aleksander Morgado 47a380a2ae libqcdm,ipv6pref: fix warnings with -Wdiscarded-qualifiers
ipv6pref.c: In function ‘main’:
  ipv6pref.c:288:11: warning: passing argument 1 of ‘putenv’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    288 |   putenv ("QCDM_DEBUG=1");
        |           ^~~~~~~~~~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado 07fe3bed65 libqcdm,ipv6pref: fix warnings with -Wsign-compare
ipv6pref.c: In function ‘print_buf’:
  ipv6pref.c:46:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
     46 |  for (i = 0; i < len; i++) {
        |                ^
  ipv6pref.c: In function ‘qcdm_wait_reply’:
  ipv6pref.c:167:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
    167 |  } while (total < sizeof (readbuf));
        |                 ^
2020-01-30 11:59:14 +01:00
Aleksander Morgado c135c66684 libqcdm,modepref: fix warnings with -Wdiscarded-qualifiers
modepref.c: In function ‘main’:
  modepref.c:539:11: warning: passing argument 1 of ‘putenv’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    539 |   putenv ("QCDM_DEBUG=1");
        |           ^~~~~~~~~~~~~~
  In file included from modepref.c:21:
  /usr/include/stdlib.h:647:26: note: expected ‘char *’ but argument is of type ‘const char *’
    647 | extern int putenv (char *__string) __THROW __nonnull ((1));
        |                    ~~~~~~^~~~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado 17a00ce1fc libqcdm,modepref: fix warnings with -Wsign-compare
modepref.c: In function ‘print_buf’:
  modepref.c:46:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
     46 |  for (i = 0; i < len; i++) {
        |                ^
  modepref.c: In function ‘qcdm_wait_reply’:
  modepref.c:167:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
    167 |  } while (total < sizeof (readbuf));
        |                 ^
2020-01-30 11:59:14 +01:00
Aleksander Morgado 4fa669b894 test-qcdm-com: fix warnings with -Wdouble-promotion
test-qcdm-com.c: In function ‘test_com_pilot_sets’:
  test-qcdm-com.c:1085:59: warning: implicit conversion from ‘float’ to ‘double’ when passing argument to function [-Wdouble-promotion]
   1085 |         g_message ("      EC/IO     %d  (%.1f dB)", ecio, db);
        |                                                           ^~
  /usr/include/glib-2.0/glib/gmessages.h:333:32: note: in definition of macro ‘g_message’
    333 |                                __VA_ARGS__)
        |                                ^~~~~~~~~~~
2020-01-30 11:59:14 +01:00
Aleksander Morgado 45c0015c08 test-qcdm-com: fix warnings with -Wsign-compare
test-qcdm-com.c: In function ‘print_buf’:
  test-qcdm-com.c:273:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘gsize’ {aka ‘long unsigned int’} [-Wsign-compare]
    273 |     for (i = 0; i < len; i++) {
        |                   ^
  test-qcdm-com.c: In function ‘wait_reply’:
  test-qcdm-com.c:367:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
    367 |     } while (total < sizeof (readbuf));
        |                    ^
2020-01-30 11:59:14 +01:00
Aleksander Morgado 1c078531a0 build: use AX_IS_RELEASE() and AX_COMPILER_FLAGS()
The autoconf macros AX_COMPILER_FLAGS_{CFLAGS|GIR|LDFLAGS} test
for compiler and linker support of various flags, and add the flags to
the generated output.

If the command-line option '--enable-compile-warnings' is specified to
'configure', a number of additional warning options is also added to the
output. This is the default.

This update requires the presence of the GNU autoconf-archive in the
system.
2020-01-30 11:59:14 +01:00
Dan Williams cec01fdaf6 libqcdm: fix WCDMA L1 Manager states
The enum was wrong.  There isn't actually an L1M_INIT state; the
enum should start with L1M_IDLE.  There should also be a
L1M_PCH_SLEEP state between DEACTIVATE and DEEP_SLEEP.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100000
2017-02-28 13:44:46 -06:00
Aleksander Morgado 905c8a48e9 libqcdm,libwmc: use C99 sized types from stdint.h 2016-11-23 19:27:09 +01:00
Dan Williams 99ae677789 libqcdm: fix mixed whitespace in test-qcdm.c 2016-01-13 15:31:59 -06: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 a691eec6ca build: avoid using 'INCLUDES' in Makefile.am
Avoids warnings during build; e.g.:
    warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2014-06-22 18:24:21 +02:00
Ben Chan 54b75e3bcd qcdm: fix memory leaks in tests 2014-05-29 10:05:45 +02: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
Bjørn Mork fa0fa1c647 qcdm: add IPv6 nvram setting to test suite
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-12-05 13:16:12 -06:00
Aleksander Morgado 2a922f836d build: remove unneeded GLIB_CHECK_VERSION checks, 2.32 already required 2013-06-18 16:55:29 +02:00
Aleksander Morgado 2ad39277d2 build: setup gtester based tests 2013-06-18 16:50:47 +02:00
Dan Williams 671d34cf92 qcdm: add auto-LTE modes for GSM and CDMA
as in, CDMA+EVDO+LTE and GSM+UMTS+LTE which were missing before.
2013-03-13 10:31:06 -05:00
Dan Williams dd4be407b2 qcdm: modepref: reset device after setting mode preference
Otherwise it doesn't actually take until you unplug/replug.
2013-03-12 16:50:49 -05:00
Dan Williams e390d21075 qcdm: add modepref utility
Sets and gets the NV "mode pref" item for allowed access
technologies.
2013-03-12 13:01:31 -05:00
Dan Williams 74e94e624d qcdm: add Novatel ERI subsystem support
Returns various ERI information like Indicator ID/Index, Icon
ID/Index, Icon Mode, and banner.
2013-02-06 11:57:00 -06:00
Dan Williams 7489951f88 qcdm: various LTE-related NV mode pref and sysmode updates 2013-01-14 13:50:27 -06:00
Dan Williams 3e39144100 qcdm: handle more test failures for NW subsystem
Bandrich C120 returns BAD_LENGTH rather than BAD_COMMAND, perhaps
because it re-uses the same subsystem number for something else.
2012-11-27 09:56:25 -06:00
Dan Williams b74741e642 qcdm: get/set functions for hybrid preference 2012-11-14 11:11:03 -06:00
Dan Williams 1e286f80ea qcdm: interpret MCC value from StatusSnapshot command 2012-08-08 16:23:02 -05:00
Dan Williams 5337b2277a qcdm: fix 1x/HDR mode pref and add GSM/UMTS mode prefs 2012-06-04 13:53:34 -05:00
Dan Williams 9fb8158279 qcdm: namespace stuff properly 2012-05-30 11:48:42 -05:00
Dan Williams 4fd6264848 build: more libwmc and libqcdm standalone fixes
Make it pass distcheck.
2012-01-27 15:14:30 -06:00
Dan Williams 38498e3c5d qcdm: fix some build errors when building standalone 2012-01-24 11:32:20 -06:00
Dan Williams 0737a24f43 qcdm: clarify IMxI conversions a bit; fix up WCDMA L1 states 2012-01-21 11:23:17 -06:00
Dan Williams 04e87e70ff qcdm: some devices do implement SW_VERSION
Like the MF627 for some reason.  Also, the format appears to be
more like the DM_CMD_VERSION_INFO response where at least the
comp_date and comp_time fields are the same size as
VERSION_INFO, just with some padding between.
2012-01-18 17:10:23 -06:00
Dan Williams e08e46fb1a qcdm: let WCDMA/GSM devices pass CDMA-only tests
Obviously they don't implement the CDMA-only commands.
2012-01-18 13:25:00 -06:00
Dan Williams 178f30bdd3 qcdm: fill in some GSM and WCDMA stuff 2012-01-17 18:49:18 -06:00
Dan Williams a6548ebe40 qcdm: start filling out log messages and items
Log messages are enabled by LOG_CONFIG and are then reported
as unsolicited responses with code DM_CMD_LOG.  Each log type
appears to have its own message format which are now being
added to log-items.h.
2012-01-12 13:00:52 -06:00
Dan Williams bf31764bab qcdm: enhance LOG_CONFIG testcase 2012-01-11 16:10:37 -06:00
Dan Williams f3208bf3a6 qcdm: add support for Log Config command
This appears to be a newer version of EXT_LOGMASK that also
works with GSM/UMTS and other subsystems.
2012-01-11 14:25:23 -06:00
Dan Williams d085e6c467 qcdm: fix up testcases for more expected error codes
I'm bored and playing around with a Novatel E725...
2012-01-10 18:15:11 -06:00
Dan Williams 11fbcc9010 qcdm: fill out some operating modes 2012-01-05 12:31:13 -06:00
Dan Williams 62d26479ff qcdm: better handle NV item read/write status codes 2012-01-05 12:29:03 -06:00
Dan Williams 6e961ddd83 qcdm: fix up live testcase for recent changes
And interpret all the recent mode preferences.
2012-01-05 11:05:32 -06:00
Dan Williams 7b14063f46 qcdm: remove usage of glib
People have asked for this at various times.
2012-01-03 00:21:05 -06:00
Dan Williams f69d888bae qcdm: add call manager subsystem mode define for LTE
Seen on the Pantech UML290 and another Qualcomm-based LTE device.
2011-01-21 00:31:11 -06:00
Dan Williams 7a2031613a qcdm: add HDR revision preference
Not sure if that's exactly what the NV item is, but the UML290 uses
it for Rev0, RevA, and eHRPD preference.
2011-01-06 22:01:45 -06:00