[PATCH 09/10] quectel: add basic support for serial connected modems

2019-07-03 Thread Martin Hundebøll
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",

[PATCH 08/10] quectel: split up initial channel/device configuration

2019-07-03 Thread Martin Hundebøll
The three-commands-in-one-go results in error on some quectel devices (e.g. m95), so do the commands in three separate calls to g_at_chat_send() instead. --- plugins/quectel.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/quectel.c b/plugins/quectel.c index

[PATCH 07/10] quectel: replace glib uses with ell

2019-07-03 Thread Martin Hundebøll
--- plugins/quectel.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/quectel.c b/plugins/quectel.c index 83197991..3c6b9d9f 100644 --- a/plugins/quectel.c +++ b/plugins/quectel.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include

[PATCH 10/10] quectel: support gpio to power on/off the modem

2019-07-03 Thread Martin Hundebøll
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", \

[PATCH 03/10] quectel: improve coding style

2019-07-03 Thread Martin Hundebøll
--- plugins/quectel.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/plugins/quectel.c b/plugins/quectel.c index 6ab97027..f99b1ff8 100644 --- a/plugins/quectel.c +++ b/plugins/quectel.c @@ -91,8 +91,8 @@ static void quectel_remove(struct

[PATCH 06/10] quectel: unwrap call to at_util_open_device()

2019-07-03 Thread Martin Hundebøll
--- plugins/quectel.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/quectel.c b/plugins/quectel.c index 3b57e06d..83197991 100644 --- a/plugins/quectel.c +++ b/plugins/quectel.c @@ -92,12 +92,6 @@ static void quectel_remove(struct ofono_modem *modem)

[PATCH 00/10] quectel serial support

2019-07-03 Thread Martin Hundebøll
This is a complete rework of the quectel m95 plugin posted[1] almost a year ago. Instead of doing a new plugin, it now hooks in serial support into the existing quectel driver, and it uses the kernel line discipline for the gsm 07.10 multiplexing. It also adds gpio power control using the gpio

[PATCH 01/10] gatresult: include glib header

2019-07-03 Thread Martin Hundebøll
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 --- gatchat/gatresult.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gatchat/gatresult.h b/gatchat/gatresult.h

[PATCH 05/10] quectel: always print modem pointer in debug messages

2019-07-03 Thread Martin Hundebøll
--- plugins/quectel.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/quectel.c b/plugins/quectel.c index 50657265..3b57e06d 100644 --- a/plugins/quectel.c +++ b/plugins/quectel.c @@ -128,7 +128,7 @@ static void cpin_notify(GAtResult *result, void

[PATCH 04/10] quectel: use plain c-types over glib/ofono typedefs

2019-07-03 Thread Martin Hundebøll
--- plugins/quectel.c | 37 +++-- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/plugins/quectel.c b/plugins/quectel.c index f99b1ff8..50657265 100644 --- a/plugins/quectel.c +++ b/plugins/quectel.c @@ -25,6 +25,7 @@ #include #include

[PATCH 02/10] atutil: guard call to g_hash_table_destroy()

2019-07-03 Thread Martin Hundebøll
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. --- drivers/atmodem/atutil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)