[PATCH v2 0/6] Add a driver for u-blox modems
by Philip Paeps
Changes since v1:
o Fix coding style nits and useless casts
o Use prefixes
o Make enable go to CFUN=4 (powered but radio off)
Philip Paeps (6):
atmodem: add vendor u-blox
udevng: add detection logic for u-blox modems
plugins: new driver for u-blox SARA-U270 modems
sim: query u-blox PIN retries with AT+UPINCNT
gprs: add support for u-blox +UREG URCs
atmodem: set the auth method for u-blox modems
Makefile.am | 3 +
drivers/atmodem/gprs-context.c | 31 ++++-
drivers/atmodem/gprs.c | 44 ++++++
drivers/atmodem/sim.c | 45 +++++++
drivers/atmodem/vendor.h | 3 +-
plugins/ublox.c | 291 ++++++++++++++++++++++++++++++++++++++++
plugins/udevng.c | 42 ++++++
7 files changed, 455 insertions(+), 4 deletions(-)
create mode 100644 plugins/ublox.c
--
1.7.10.4
6 years, 8 months
[PATCH v2 0/4] Add a driver for Quectel UC15 modems
by Philip Paeps
Changes since v1:
o Ammended udevng probing to also catch the modem when no
labels have been configured in udev rules.
o Reworked the enable/retry mechanism to be a little bit less
hackish. Commented the rationale in quectel_enable().
o Use prefixes to help the AT parser match queries to replies.
o Fixed style issues and unnecessary casts.
o Make enable() end up in CFUN=4 (powered but radio off).
Philip Paeps (4):
atmodem: add vendor Quectel
udevng: add detection logic for Quectel modems
plugins: add a new driver for Quectel UC15 modems
sim: query Quectel UC15 PIN retries with AT+QPINC?
Makefile.am | 3 +
drivers/atmodem/sim.c | 49 ++++++
drivers/atmodem/vendor.h | 3 +-
plugins/quectel.c | 371 ++++++++++++++++++++++++++++++++++++++++++++++
plugins/udevng.c | 42 ++++++
5 files changed, 467 insertions(+), 1 deletion(-)
create mode 100644 plugins/quectel.c
--
1.7.10.4
6 years, 8 months
[PATCH] hfpmodem: Fix crash with more than two calls
by Sergio Checa Blanco
From: Sergio Checa Blanco <sergio.checa(a)bmw-carit.de>
A periodic CLCC polling is started when there is an ongoing multiparty
call and a new call appears in the system. A simple way to reproduce
the crashing scenario is:
1. Place a call.
2. Place a second call.
3. Create a multiparty call with both calls.
4. Place a third call (incoming or outgoing does not matter).
5. Disconnect HFP from the modem.
Within the function ciev_callheld_notify, the AT+CLCC command is also
invoked, thus a new cyclic CLCC polling is started, and it overwrites
the timer resource identifier stored in voicecall_data.clcc_source.
This means that there are several timers doing the CLCC polling, but
only one of those is under control, i.e. it can be removed through its
source identifier, hence a timer source leak.
This has a fatal consequence when the HFP modem is disconnected. The
function hfp_voicecall_remove stops the timer that is under control
before freeing the voicecall_data struct. However there are other timers
that are still active and will execute its handler poll_clcc afterwards.
Inside poll_clcc the driver_data is accessed, which is already NULL.
A solution for this is to avoid starting a CLCC polling if there is
already one active, i.e. clcc_source is not 0. By doing this the
uncontrolled timers will not cycle forever.
---
drivers/hfpmodem/voicecall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index f16282c..07e7824 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -295,7 +295,7 @@ static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer user_data)
* we won't get indicator update if any of them is released by CHLD=1x.
* So we have to poll it.
*/
- if (num_active > 1 || num_held > 1)
+ if ((num_active > 1 || num_held > 1) && !vd->clcc_source)
vd->clcc_source = g_timeout_add(POLL_CLCC_INTERVAL, poll_clcc,
vc);
}
--
2.0.0
6 years, 8 months
[PATCH 0/6] Add a driver for u-blox modems
by Philip Paeps
This set of patches adds basic support for u-blox modems. It has only
been tested with a u-blox SARA U270 modem but judging from the datasheet
it should be fairly trivial to adapt to other variants of the SARA, LISA
and LEON chips.
Philip Paeps (6):
atmodem: add vendor u-blox
udevng: add detection logic for u-blox modems
plugins: new driver for u-blox SARA-U270 modems
sim: query u-blox PIN retries with AT+UPINCNT
gprs: add support for u-blox +UREG URCs
atmodem: set the auth method for u-blox modems
Makefile.am | 3 +
drivers/atmodem/gprs-context.c | 29 +++-
drivers/atmodem/gprs.c | 44 ++++++
drivers/atmodem/sim.c | 45 +++++++
drivers/atmodem/vendor.h | 3 +-
plugins/ublox.c | 289 ++++++++++++++++++++++++++++++++++++++++
plugins/udevng.c | 42 ++++++
7 files changed, 452 insertions(+), 3 deletions(-)
create mode 100644 plugins/ublox.c
--
1.7.10.4
6 years, 8 months
[PATCH 0/4] Add a driver for Quectel UC15 modules
by Philip Paeps
Not very exciting as drivers go. :)
Philip Paeps (4):
atmodem: add vendor Quectel
udevng: add setup logic for Quectel UC15 modules
plugins: add a new driver for Quectel UC15 modules
sim: query Quectel UC15 PIN retries with AT+QPINQ
Makefile.am | 3 +
drivers/atmodem/sim.c | 49 +++++++
drivers/atmodem/vendor.h | 3 +-
plugins/quectel.c | 335 ++++++++++++++++++++++++++++++++++++++++++++++
plugins/udevng.c | 37 +++++
5 files changed, 426 insertions(+), 1 deletion(-)
create mode 100644 plugins/quectel.c
--
1.7.10.4
6 years, 8 months
[PATCH 0/3] Provision the PPP authentication method from mbpi
by Philip Paeps
My patch to the mobile-broadband-provider-info database DTD to add an
attribute indicating the authentication method to use was accepted by
the maintainers[1] and merged in their tree[2].
This set of patches adds support for the new attribute in the mbpi
plugin so new GPRS contexts can be correctly provisioned. If the
authentication method is unspecified in the mbpi database we default
to CHAP (i.e.: previous behaviour).
[1] https://bugzilla.gnome.org/show_bug.cgi?id=731907
[2] https://git.gnome.org/browse/mobile-broadband-provider-info/commit/?id=75...
Philip Paeps (3):
include: add auth method to the provisioning API
mbpi: add support for provisioning the auth method
gprs: provision the authentication method
include/gprs-provision.h | 1 +
plugins/mbpi.c | 35 +++++++++++++++++++++++++++++++++++
src/gprs.c | 2 ++
3 files changed, 38 insertions(+)
--
1.7.10.4
6 years, 8 months
[PATCH v2 0/5] Add support for PAP authentication
by Philip Paeps
Changes since v1:
o Split patchset into a commit per directory
o Remove Signed-off-by: tags
o Fix coding style nits
o Use a counter instead of a random value for the
Authenticate-Request identifer
o Omit the provisioning code pending a discussion with
the mobile-broadband-provider-info maintainers
Philip Paeps (5):
gatchat: implement PAP authentication
include: add auth method to the gprs context API
atmodem: set the PPP authentication method to use
gprs: make PPP authentication method configurable
doc: describe the AuthenticationMethod property
doc/connman-api.txt | 4 ++
drivers/atmodem/gprs-context.c | 14 ++++
gatchat/gatppp.c | 50 ++++++++++++++-
gatchat/gatppp.h | 8 +++
gatchat/ppp.h | 9 +++
gatchat/ppp_auth.c | 139 ++++++++++++++++++++++++++++++++++++++++
gatchat/ppp_lcp.c | 62 ++++++++++++------
include/gprs-context.h | 6 ++
src/gprs.c | 84 ++++++++++++++++++++++++
9 files changed, 355 insertions(+), 21 deletions(-)
--
1.7.10.4
6 years, 8 months
[PATCH] hfpmodem: Split AT+VTS command into multiple +VTS
by Sergio Checa Blanco
From: Sergio Checa Blanco <sergio.checa(a)bmw-carit.de>
According to the standard "3GPP 27.007 v6.8.0" Appendix C.2.11,
when sending multiple DTMF characters, these must go in individual
+VTS commands for each tone. This adopts the AT modem approach.
Before: AT+VTS=1234\r
After: AT+VTS=1;+VTS=2;+VTS=3;+VTS=4\r
---
drivers/hfpmodem/voicecall.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index e958fe0..f16282c 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -654,8 +654,10 @@ static void hfp_send_dtmf(struct ofono_voicecall *vc, const char *dtmf,
{
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
struct change_state_req *req = g_try_new0(struct change_state_req, 1);
+ int len = strlen(dtmf);
char *buf;
int s;
+ int i;
if (req == NULL)
goto error;
@@ -665,12 +667,15 @@ static void hfp_send_dtmf(struct ofono_voicecall *vc, const char *dtmf,
req->data = data;
req->affected_types = 0;
- /* strlen("AT+VTS=) = 7 + NULL */
- buf = g_try_new(char, strlen(dtmf) + 8);
+ /* strlen("AT") + (n-1) * strlen("+VTS=T;") + strlen(+VTS=T) + null */
+ buf = g_try_new(char, len * 7 + 2);
if (buf == NULL)
goto error;
- sprintf(buf, "AT+VTS=%s", dtmf);
+ s = sprintf(buf, "AT+VTS=%c", dtmf[0]);
+
+ for (i = 1; i < len; i++)
+ s += sprintf(buf + s, ";+VTS=%c", dtmf[i]);
s = g_at_chat_send(vd->chat, buf, none_prefix,
generic_cb, req, g_free);
--
2.0.0
6 years, 8 months
[PATCH] Add support for PAP authentication
by Philip Paeps
Some operators require PAP authentication instead of the more prevalent CHAP.
This is particularly true in the case of private APNs for machine to machine
communication.
These patches add support for PAP in the PPP library and glue for configuring
and provisioning contexts to use it. The default is still to use CHAP, so
current behaviour shouldn't change unexpectedly.
Philip Paeps (3):
gatchat: implement PAP authentication
gprs: make PPP authentication method configurable
mbpi: add authentication methods to provisioning
doc/connman-api.txt | 4 ++++
drivers/atmodem/gprs-context.c | 14 ++++++++++++++
gatchat/gatppp.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++--
gatchat/gatppp.h | 8 ++++++++
gatchat/ppp.h | 9 +++++++++
gatchat/ppp_auth.c | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
gatchat/ppp_lcp.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++-------------------
include/gprs-context.h | 6 ++++++
include/gprs-provision.h | 1 +
plugins/mbpi.c | 32 ++++++++++++++++++++++++++++++++
plugins/provision.c | 1 +
src/gprs.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12 files changed, 394 insertions(+), 21 deletions(-)
6 years, 8 months
Contribution: Telit HE910 modem with single serial + CMUX configuration
by Frederik Lotter
Hi Guys,
I have done some work to add support for a Telit HE910, but configured to
use a single serial connection which will then enable additional ports
using CMUX. I made the changes against v1.14 and rebased the commit against
master.
If this could be of use to the project please feel free to add it. I have
successfully used the driver to establish an internet connection with
Connman. Note however that SIM detection does not properly work as I need
to remove and re-insert the SIM (but I experienced this even with the
original HE910 driver).
Unfortunately we are moving to a new modem from uBLOX so I need to redo the
work and I cannot spend more time on this right now. I hope to contribute
the uBLOX code later on.
Kind Regards,
Frederik Lotter
MiX Telematics South Africa
6 years, 8 months