Commit Graph

8845 Commits

Author SHA1 Message Date
Martin Hundebøll 2f58421b64 quectel: support gpio to power on/off the modem
This adds support for configuring a gpio in udev to control the modem
power.

To enable gpio control, specify OFONO_QUECTEL_GPIO_CHIP and
OFONO_QUECTEL_GPIO_OFFSET in the udev environment, for example:

KERNEL=="ttymxc0", ENV{OFONO_DRIVER}="quectel", \
        ENV{OFONO_QUECTEL_GPIO_CHIP}="gpiochip2", \
        ENV{OFONO_QUECTEL_GPIO_OFFSET}="26"
2019-07-12 10:50:51 -05:00
Denis Kenzior 6a967b81c7 build: Add ell gpio sources 2019-07-12 10:50:51 -05:00
Martin Hundebøll 23a09f8559 quectel: add basic support for serial connected modems
Setup GSM 07.10 multiplexing using the kernel n_gsm line discpline
driver, and use the virtual tty devices as Aux and Modem channels.

The driver supports rts/cts on the underlying serial device. This is
enabled with OFONO_QUECTED_RTSCTS udev environment, e.g.:

KERNEL=="ttymxc0", ENV{OFONO_DRIVER}="quectel", \
        ENV{OFONO_QUECTEL_RTSCTS}="on"
2019-07-12 10:47:10 -05:00
Martin Hundebøll e41252d00b quectel: replace glib uses with ell 2019-07-12 10:17:12 -05:00
Martin Hundebøll 4fe04add08 quectel: unwrap call to at_util_open_device() 2019-07-12 10:16:45 -05:00
Martin Hundebøll a0a93da0f9 quectel: always print modem pointer in debug messages 2019-07-12 09:42:43 -05:00
Martin Hundebøll 46616a52d9 atmodem: sms: add quectel m95 quirks
CNMA isn't mentioned in the m95 documentation, but trial'n'error has
revealed some details:
 * the CSMS query returns the list (0,128) instead of a range
 * CNMA is enabled by setting 128 as CSMS service
 * once enabled, SMS deliveries are acked by sending AT+CNMA without a
   value setting

Add m95 quirks to the atmodem driver, so that CNMA is correctly
detected, configured, and used.
2019-07-12 09:41:08 -05:00
Martin Hundebøll 47021f9950 quectel: fix initial channel/device configuration
The three-commands-in-one-go results in error on some quectel devices
(e.g. m95). Add semicolons between the commands to fix it.
2019-07-05 17:28:04 -05:00
Martin Hundebøll db74f0998a quectel: improve coding style 2019-07-05 17:17:47 -05:00
Martin Hundebøll 181e8d3da7 atutil: guard call to g_hash_table_destroy()
Glib emits a warning when g_hash_table_destroy() is called on a NULL
pointer:

  GLib-CRITICAL **: 13:27:40.269: g_hash_table_destroy: assertion 'hash_table != NULL' failed

Add a check to avoid this warning.
2019-07-05 17:17:44 -05:00
Martin Hundebøll 7f065625ca gatresult: include glib header
The gatresult data types embeds GSList members, and the function
prototypes uses glib types.

Add include of glib.h to allow use of gatresult.h without also including
glib.h
2019-07-05 17:17:41 -05:00
Martin Hundebøll 35b61e3ec2 ubloxmodem: fix maybe-unitialized error
Fixes:

../git/drivers/ubloxmodem/gprs-context.c: In function ‘ublox_gprs_activate_primary’:
../git/drivers/ubloxmodem/gprs-context.c:339:2: error: ‘auth’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  snprintf(buf, sizeof(buf), "AT+UAUTHREQ=%u,%u,\"%s\",\"%s\"",
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    gcd->active_context, auth, username, password);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../git/drivers/ubloxmodem/gprs-context.c:324:11: note: ‘auth’ was declared here
  unsigned auth;
           ^~~~
2019-06-21 12:54:10 -05:00
Denis Kenzior 5ee73d9101 mbim: Fix warning
CC       drivers/mbimmodem/mbim-message.o
	 drivers/mbimmodem/mbim-message.c: In function ‘_iter_copy_string’:
	 drivers/mbimmodem/mbim-message.c:199:18: error: cast increases required
	 alignment of target type [-Werror=cast-align]
2019-06-21 12:47:18 -05:00
Antara Borwankar e794adb0f2 xmm7modem: disabling reporting of intermediate results for CGDATA
Setting <connect_flag> in AT+XDATACHANNEL set command to 0. This will
disable intermediate result reporting of "CONNECT" and "NO CARRIER"
on control channel.

This resolves the issue of getting failure response for offline-modem
since "NO CARRIER" is received as result of AT+CFUN operation instead
of "OK".
2019-06-20 11:21:25 -05:00
James Prestwood a6001c1153 isimodem: gprs-context: properly null terminate cd->password
It looks like a previous line was copied and cd->username was re-terminated
instead of password. This also fixes a compiler error when using GCC 9:

In function ‘strncpy’,
    inlined from ‘isi_gprs_activate_primary’ at drivers/isimodem/gprs-context.c:546:3:
/usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ output may be truncated copying 53 bytes from a string of length 255 [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-06-17 13:49:53 -05:00
Antara Borwankar 999cf73282 atmodem: fix to activate context with cid zero
xmm7xxx based devices (among others) return 0 as cid for default
pdp context. Fix the atmodem gprs driver logic to work with such
devices by initializing last_auto_context_id to -1 instead of 0
to indicate a deactivated context.
2019-06-14 11:42:28 -05:00
Antara Borwankar 686e3fba83 xmm7modem: adding netmon changes for reporting neighbouring cell
Added netmon changes for xmm7modem driver to fetch neighbouring
cell information.
2019-06-07 11:41:37 -05:00
Antara Borwankar 90c312484f netmon: adding get functionality for neighbouring cell information
Handled the get neighbouring cell information function which returns
an array of signal strength of all neighbouring cells.
2019-06-07 11:40:59 -05:00
Antara Borwankar dbcd081a63 netmon: adding get function for neighbouring cell information
Added declaration of functions and structures required for getting
neighbouring cell information.
2019-06-07 11:19:15 -05:00
Tom Nguyen df36faccd9 qmimodem: change msg class none to store/notify
Change message class none configuration from directly delivering a new
message in the event indication to storing it in the modem's NV then
sending an event indication identifying the new message. Also, add
checking for stored, unread messages at boot up.

This fixes a scenario where the modem powers on, automatically
connects to the network, receives a message, and sends an indication
before oFono has fully initialized. Now, the message is saved and
retrieved after initialization.

This also helps with suspend/resume on platforms where the modem,
supports waking the host CPU upon SMS reception. And, the platform
design limitation is that the modem's interfaces (eg, cdc-wdm, wwan,
etc) disconnect on suspend and reconnect on resume. This causes oFono
to re-initialize and miss the message indication because it was sent
before oFono is ready. Now, the wake up message is saved and retrieved
after initialization.
2019-06-05 14:54:59 -05:00
Denis Kenzior c1ccae7efc alcatel: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 98ec74cf10 hso: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior e0ac26458e huawei: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior eab7d90572 icera: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 2e544e6745 linktop: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 1ff6e83db0 mbm: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior aa228df5f6 nokia: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior a538238ee5 novatel: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior d493c7cc10 quectel: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 974e04c671 samsung: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 33af81eae5 sierra: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 3ab93f4a21 speedupcdma: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior ee92c647c5 speedup: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior bd858ba8b4 telit: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 44e6bccf10 ublox: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior f02a967e68 zte: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior fc4440a27c xmm7xxx: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior ad007eb9ab wavecom: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 630e48465c atutil: Introduce at_util_open_device 2019-05-31 11:58:36 -05:00
Denis Kenzior 06de60a8fd hfp_ag_bluez5: Remove unneeded forward declarations 2019-05-31 10:57:38 -05:00
Antara Borwankar babb0c1c6d netmon: adding method to fetch neighbouring cell mesurement
Added new method to fetch neighbouring cell information.
2019-05-30 11:06:54 -05:00
Denis Kenzior 0d40114a14 qmi: Fix style issues 2019-05-24 12:27:27 -05:00
Denis Kenzior 765c6655f2 treewide: Use L_TFR macro 2019-05-24 11:55:38 -05:00
Adrian Bunk 8bde9f095a build: Don't overwrite src_ofonod_DEPENDENCIES
src_ofonod_DEPENDENCIES did overwrite the dependencies
automatically generated from src_ofonod_LDADD with
incomplete dependencies.

This fixes the following build error:
...
  CCLD     src/ofonod
libtool:   error: cannot find the library 'gdbus/libgdbus-internal.la' or unhandled argument 'gdbus/libgdbus-internal.la'
make: *** [Makefile:3448: src/ofonod] Error 1
2019-05-22 08:43:57 -05:00
Denis Kenzior 48e31f9fc3 main: Quiet ld errors with external ell
When oFono is built with --enable-external-ell, the compiler for some
reason does not generate a debug section on some systems.  This is due
to the fact that l_debug is never called.  However, ell also does not
call l_debug, yet when built-in ell is used, the section is created by
the compiler.

For now work around this by adding a no-op l_debug() call in main.c.
The real fix is to migrate all of the oFono logging functionality to use
ell instead.
2019-05-16 15:10:53 -05:00
Denis Kenzior 5d3640397a core: Quiet warning about strncpy use 2019-05-16 15:10:40 -05:00
Denis Kenzior 4b8cc2fcac stemodem: Quiet warning about strncpy use 2019-05-16 15:10:09 -05:00
Antara Borwankar 90758c5ffc xmm7modem: enabling simtoolkit in modem driver
handled enabling of stk for xmm7modem vendor in atmodem
driver.
2019-05-16 10:44:44 -05:00
Antara Borwankar 41e1cfcd64 xmm7modem: handling of dual mode technology preference
Handled dual mode technology preference "umts,gsm" and
"lte,umts" for xmm7modem.
2019-05-16 10:40:45 -05:00
Antara Borwankar 0c2f2815ca radio-settings: handling of dual mode technology preference
Handled two new dual mode technology preferences
"umts,gsm" and "lte,umts".
2019-05-16 10:40:45 -05:00