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"
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"
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.
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.
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
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;
^~~~
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]
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".
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));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
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.
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
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.