Re: SEGFAULT on sim_remove()

2018-03-29 Thread Gabriel Lucas
Hi Denis, This is fixed! On 29/03/2018 16:51, Denis Kenzior wrote: Hi Gabriel, If you have any idea of the reason, let me know. commit id 8b8a760644fd99f8df295fe4dbcd23d75da8b171 (now HEAD) should fix this. Thank you Regards, Gabriel ___

Re: SEGFAULT on sim_remove()

2018-03-29 Thread Gabriel Lucas
Hi Denis, I've been investigating for the reason of the SIGSEGV signal. Valgrind tells me that I'm reading an already-freed sector. I've added some debug information in: - src/sim.c:sim_remove: see below - src/simfs.c:sim_fs_context_free: freed sim_context - src/simfs.c:sim_fs_op_free:

Re: SEGFAULT on sim_remove()

2018-03-26 Thread Gabriel Lucas
Denis, On 26/03/2018 17:25, Denis Kenzior wrote: Hi Gabriel, gdb backtrace: Program received signal SIGSEGV, Segmentation fault. __ofono_sim_remove_session_watch (session=0x74656e, id=16) at src/sim.c:3616 3616        __ofono_watchlist_remove_item(session->watches, id); (gdb) bt #0 

SEGFAULT on sim_remove()

2018-03-26 Thread Gabriel Lucas
Hi everyone, I'm getting a SEGFAULT when powering off a gemalto ALS3 modem with SetProperty("Powered", Variant(false)). This method call is made right after the SimManager interface is on which could explain the error. Log from oFono: ofonod[6950]: src/sim.c:sim_remove() atom: 0x1604f0

Re: [PATCH 4/6] gemalto: handle sim is inserted or removed URCs

2018-03-20 Thread Gabriel Lucas
Hi Denis, On 19/03/2018 18:10, Denis Kenzior wrote: Hi Gabriel, Mariem, On 03/19/2018 11:26 AM, Gabriel Lucas wrote: From: Mariem Cherif <mariem.che...@ardia.com.tn> ---   plugins/gemalto.c | 78 ---   1 file changed, 74 insertions

[PATCH 4/6] gemalto: handle sim is inserted or removed URCs

2018-03-19 Thread Gabriel Lucas
From: Mariem Cherif --- plugins/gemalto.c | 78 --- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index 5573606..029e09d 100644 --- a/plugins/gemalto.c +++

Re: [PATCH 6/6] gemalto: fix sim reinsertion issue

2018-03-19 Thread Gabriel Lucas
Hi Denis, On 15/03/2018 18:29, Denis Kenzior wrote: Hi Gabriel, Why don't you just use at_util_sim_state_query_new here? Regards, -Denis This is now done directly in [PATCH 4/6] gemalto: handle sim is inserted or removed URCs. Best regards, Gabriel

[PATCH 4/6] gemalto: handle sim is inserted or removed URCs

2018-03-19 Thread Gabriel Lucas
From: Mariem Cherif --- plugins/gemalto.c | 70 +++ 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index 5573606..13270d6 100644 --- a/plugins/gemalto.c +++

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-19 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 107 -- 1 file changed, 95 insertions(+), 12 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index

Re: [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-19 Thread Gabriel Lucas
Hi Denis, On 16/03/2018 17:08, Denis Kenzior wrote: + +static void gemalto_modem_ready(GAtResult *result, gpointer user_data) +{ +    struct ofono_modem *modem = user_data; +    struct gemalto_data *data = ofono_modem_get_data(modem); +    const char *app = ofono_modem_get_string(modem,

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 107 -- 1 file changed, 95 insertions(+), 12 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 106 +++--- 1 file changed, 94 insertions(+), 12 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 106 +++--- 1 file changed, 94 insertions(+), 12 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index

Re: [PATCH 3/6] gemalto: acquire the network technology

2018-03-16 Thread Gabriel LUCAS
Thanks Denis. My apologies for the unused variable. On 2018-03-16 15:27, Denis Kenzior wrote: Hi Gabriel, Mariem, On 03/16/2018 07:59 AM, Gabriel Lucas wrote: From: Mariem Cherif <mariem.che...@ardia.com.tn> --- drivers/atmodem/network-registration.

Re: [PATCH 6/6] gemalto: fix sim reinsertion issue

2018-03-16 Thread Gabriel Lucas
Hi Denis, On 15/03/2018 18:29, Denis Kenzior wrote: Hi Gabriel, Why don't you just use at_util_sim_state_query_new here? Well, because I didn't know it existed :). Thanks, I going to use it. Best regards, Gabriel ___ ofono mailing list

Re: [PATCH 4/6] gemalto: handle sim is inserted or removed URCs

2018-03-16 Thread Gabriel Lucas
Hi Denis, On 15/03/2018 18:26, Denis Kenzior wrote: Hi Gabriel, On 03/15/2018 07:49 AM, Gabriel Lucas wrote: From: Mariem Cherif <mariem.che...@ardia.com.tn> +    g_at_result_iter_init(, result); + +    if (!g_at_result_iter_next(, "+CIEV:")) +    return; + So

[PATCH 3/6] gemalto: acquire the network technology

2018-03-16 Thread Gabriel Lucas
From: Mariem Cherif --- drivers/atmodem/network-registration.c | 45 ++ 1 file changed, 45 insertions(+) diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index a5e2af3..80f6291 100644 ---

Re: [PATCH 3/6] gemalto: acquire the network technology

2018-03-16 Thread Gabriel Lucas
Hi Denis, Really sorry, this patch is from Mariem and I haven't reviewed it. the cinterion_parse_tech function really needs to be rework. I'll resend you a cleaner version today. On 15/03/2018 18:19, Denis Kenzior wrote: Hi Gabriel, On 03/15/2018 07:49 AM, Gabriel Lucas wrote: From: Mariem

Re: [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Gabriel Lucas
Hi Denis, On 15/03/2018 18:11, Denis Kenzior wrote: No // please, use /* */.  This is C code ;) Fixed. I've just learned it was not ANSI C :). You leak options here in case channel == NULL.  The typical pattern is to call g_hash_table_destroy(options) right after g_at_tty_open.  See other

[PATCH 5/6] sim: give access to the driver

2018-03-15 Thread Gabriel Lucas
--- include/sim.h | 2 ++ src/sim.c | 5 + 2 files changed, 7 insertions(+) diff --git a/include/sim.h b/include/sim.h index fad4c0d..cf679db 100644 --- a/include/sim.h +++ b/include/sim.h @@ -217,6 +217,8 @@ struct ofono_sim *ofono_sim_create(struct ofono_modem *modem, void

[PATCH 3/6] gemalto: acquire the network technology

2018-03-15 Thread Gabriel Lucas
From: Mariem Cherif --- drivers/atmodem/network-registration.c | 45 ++ 1 file changed, 45 insertions(+) diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index a5e2af3..aec9c2d 100644 ---

[PATCH 0/6] gemalto's ALS3 and PHS8P support

2018-03-15 Thread Gabriel Lucas
is supported - We ensure that the modem is ready to work before initializing it Some of the enhancements are brought by workarounds because of AT command interface limitations Gabriel Lucas (4): gemalto: add detection of ALS3 modem gemalto: support ALS3 in gemalto's plugin sim: give access

[PATCH 1/6] gemalto: add detection of ALS3 modem

2018-03-15 Thread Gabriel Lucas
The product ID is added to the list of modems to be detected by Ofono. The gemalto plugin is used to handle the ALS3 modem. --- plugins/udevng.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/plugins/udevng.c b/plugins/udevng.c index 3c7d99e..d398c6e 100644 ---

LTE atom support for gemalto modem

2018-03-12 Thread Gabriel Lucas
as a parameter might cause heavy modifications so I wanted to have your opinion on how to handle this case the simpliest way. Best Regards, Gabriel Lucas ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono

[PATCH 4/6] gemalto: handle sim is inserted or removed URCs

2018-03-12 Thread Gabriel Lucas
From: Mariem Cherif --- plugins/gemalto.c | 37 + 1 file changed, 37 insertions(+) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index 16ca463..c7fb783 100644 --- a/plugins/gemalto.c +++ b/plugins/gemalto.c @@ -497,6 +497,36

[PATCH 3/6] gemalto: acquire the network technology

2018-03-12 Thread Gabriel Lucas
From: Mariem Cherif --- drivers/atmodem/network-registration.c | 45 ++ 1 file changed, 45 insertions(+) diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index a5e2af3..aec9c2d 100644 ---

[PATCH 4/6] gemalto: handle sim is inserted or removed URCs

2018-03-12 Thread Gabriel Lucas
From: Mariem Cherif --- plugins/gemalto.c | 37 + 1 file changed, 37 insertions(+) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index 16ca463..c7fb783 100644 --- a/plugins/gemalto.c +++ b/plugins/gemalto.c @@ -497,6 +497,36

[PATCH 3/6] gemalto: acquire the network technology

2018-03-12 Thread Gabriel Lucas
From: Mariem Cherif --- drivers/atmodem/network-registration.c | 45 ++ 1 file changed, 45 insertions(+) diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index a5e2af3..aec9c2d 100644 ---

[PATCH 5/6] sim: give access to the driver

2018-03-12 Thread Gabriel Lucas
--- include/sim.h | 2 ++ src/sim.c | 5 + 2 files changed, 7 insertions(+) diff --git a/include/sim.h b/include/sim.h index fad4c0d..cf679db 100644 --- a/include/sim.h +++ b/include/sim.h @@ -217,6 +217,8 @@ struct ofono_sim *ofono_sim_create(struct ofono_modem *modem, void

[PATCH 0/6] gemalto's ALS3 and PHS8P support

2018-03-12 Thread Gabriel Lucas
is supported - We ensure that the modem is ready to work before initializing it Some of the enhancements are brought by workarounds because of AT command interface limitations Gabriel Lucas (4): gemalto: add detection of ALS3 modem gemalto: support ALS3 in gemalto's plugin sim: give access

[PATCH 6/6] gemalto: fix sim reinsertion issue

2018-03-12 Thread Gabriel Lucas
When the SIM card is reinserted in the holder, the IRC +CIEV: simstatus,1 is emitted. The problem is that the SIM isn't ready when it is received. Hence, Ofono fails on CPIN? command and the modem cannot be used. This patch make ofono retry the CPIN? command until it succeeds. ---

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-12 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 105 ++ 1 file changed, 99 insertions(+), 6 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index

[PATCH 3/6] gemalto: acquire the network technology

2018-03-12 Thread Gabriel Lucas
From: Mariem Cherif --- drivers/atmodem/network-registration.c | 45 ++ 1 file changed, 45 insertions(+) diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index a5e2af3..aec9c2d 100644 ---

[PATCH 4/6] gemalto: handle sim is inserted or removed URCs

2018-03-12 Thread Gabriel Lucas
From: Mariem Cherif --- plugins/gemalto.c | 37 + 1 file changed, 37 insertions(+) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index 16ca463..c7fb783 100644 --- a/plugins/gemalto.c +++ b/plugins/gemalto.c @@ -497,6 +497,36

[PATCH 1/6] gemalto: add detection of ALS3 modem

2018-03-12 Thread Gabriel Lucas
The product ID is added to the list of modems to be detected by Ofono. The gemalto plugin is used to handle the ALS3 modem. --- plugins/udevng.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/plugins/udevng.c b/plugins/udevng.c index 3c7d99e..d398c6e 100644 ---

Re: [PATCH] gemalto: add PIN retries support

2017-11-06 Thread Gabriel LUCAS
Hi Denis, This patch doesn't apply. It looks like whitespace is corrupted, tabs switched to spaces, etc. Are you using Microsoft products by any chance? My bad, I wasn't able to configure git send-email correctly so I've tried with another email client. Bad idea apparently. This part

[PATCH v2 2/2] gemalto: add PIN retries support in plugin

2017-11-06 Thread Gabriel Lucas
In SimManager, the Retries property isn't used for gemalto modems. The at command AT^SPIC is used to get the remaining retries left for the current required password type. This commit enable the use of the driver in the gemalto plugin --- plugins/gemalto.c | 3 ++- 1 file changed, 2

[PATCH v2 1/2] gemalto: add PIN retries support in driver

2017-11-06 Thread Gabriel Lucas
In SimManager, the Retries property isn't used for gemalto modems. The at command AT^SPIC is used to get the remaining retries left for the current required password type. This commit adds the implementation in the SIM driver of the retries queries. --- drivers/atmodem/sim.c | 45

[PATCH] gemalto: add PIN retries support

2017-11-03 Thread Gabriel LUCAS
From 4157f3e7aa0eb16eec0b1ccf87946ecf53539090 Mon Sep 17 00:00:00 2001 From: Gabriel Lucas <gabriel.lu...@smile.fr> Date: Tue, 24 Oct 2017 11:15:58 +0200 Subject: [PATCH] gemalto: add PIN retries support Signed-off-by: Gabriel Lucas <gabriel.lu...@smile.fr> In SimManager, the Retr