Re: Fwd: [PATCH 1/1] quectel: fixing EC200T modem initialization

2022-09-02 Thread Denis Kenzior

Hi Sergei,

On 9/2/22 02:14, Sergei Golubtsov wrote:

EC200T doesn't indicate that the Phonebook initialization
is completed (==4) if AT+CFUN=4
---
  plugins/quectel.c | 7 ++-
  1 file changed, 6 insertions(+), 1 deletion(-)



I don't think this is going to work:

denkenz@localhost ~/ofono-master $ git am ~/merge/Fwd\:\ \[PATCH\ 1_1\]\ 
quectel\:\ fixing\ EC200T\ modem\ initialization\ -\ Sergei\ Golubtsov\ 
\\ -\ 2022-09-02\ 0214.eml

warning: quoted CRLF detected
Applying: Fwd: [PATCH 1/1] quectel: fixing EC200T modem initialization
error: corrupt patch at line 10
Patch failed at 0001 Fwd: [PATCH 1/1] quectel: fixing EC200T modem 
initialization
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Just use git-send email and resend.

Regards,
-Denis
___
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org


Fwd: [PATCH 1/1] quectel: fixing EC200T modem initialization

2022-09-02 Thread Sergei Golubtsov
EC200T doesn't indicate that the Phonebook initialization
is completed (==4) if AT+CFUN=4
---
 plugins/quectel.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/plugins/quectel.c b/plugins/quectel.c
index 79a137d8..f933723d 100644
--- a/plugins/quectel.c
+++ b/plugins/quectel.c
@@ -605,9 +605,12 @@ static void qinistat_cb(gboolean ok, GAtResult
*result, gpointer user_data)
case QUECTEL_EC200:
/*
 * EC200T doesn't indicate that the Phonebook initialization
-* is completed (==4) when AT+CFUN=4, that's why 1 + 2 = 3
+* of some SIM cards is completed (==4) when AT+CFUN=4,
+* that's why 1 + 2 = 3
 */
ready = 3;
+   if ((status & ready) == ready)
+   ready = status;
break;
case QUECTEL_M95:
case QUECTEL_MC60:
@@ -828,6 +831,8 @@ static void setup_aux(struct ofono_modem *modem)
} else if (data->model == QUECTEL_EC200) {
g_at_chat_send(data->aux, "ATE0;  +CMEE=1", none_prefix,
NULL, NULL, NULL);
+   g_at_chat_send(data->aux, "AT+QCFG=\"servicedomain\",2",
none_prefix,
+   NULL, NULL, NULL);
} else
g_at_chat_send(data->aux, "ATE0;  +CMEE=1; +QIURC=0",
none_prefix, NULL, NULL, NULL);
-- 
2.30.2
___
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org


Fwd: [PATCH 0/1] Fixing Quectel EC200T initialization

2022-09-02 Thread Sergei Golubtsov
Quectel EC200T sometimes stuck during the initialization
for some operators

Sergei Golubtsov (1):
  quectel: fixing EC200T modem initialization

 plugins/quectel.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.30.2
___
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org


Fwd: [PATCH 4/4] file provision plugin: use CHAP auth by default

2022-09-02 Thread Sergei Golubtsov
3GPP mandated CHAP to be used as the default
---
 plugins/file-provision.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/file-provision.c b/plugins/file-provision.c
index 37fac0e3..a3829a34 100644
--- a/plugins/file-provision.c
+++ b/plugins/file-provision.c
@@ -94,7 +94,7 @@ static int config_file_provision_get_settings(const char
*mcc,
(*settings)[0].password = value;

/* select default authentication method */
-   (*settings)[0].auth_method = OFONO_GPRS_AUTH_METHOD_NONE;
+   (*settings)[0].auth_method = OFONO_GPRS_AUTH_METHOD_CHAP;

value = g_key_file_get_string(key_file, setting_group,
"internet.AuthenticationMethod",
NULL);
-- 
2.30.2
___
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org


Fwd: [PATCH 3/4] lte: switch auth to NONE if other options cannot be used

2022-09-02 Thread Sergei Golubtsov
If the user name or user name together with the password for an AP
are not provided the NONE auth method should be used
---
 drivers/atmodem/lte.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/atmodem/lte.c b/drivers/atmodem/lte.c
index 4157b02f..fc4deae4 100644
--- a/drivers/atmodem/lte.c
+++ b/drivers/atmodem/lte.c
@@ -82,7 +82,8 @@ static void at_lte_set_default_attach_info_cb(gboolean
ok, GAtResult *result,
auth_method = ldd->pending_info.auth_method;

/* change the authentication method if the  parameters are invalid
*/
-   if (!*ldd->pending_info.username || !*ldd->pending_info.password)
+   if (!*ldd->pending_info.username ||
+   (!*ldd->pending_info.username &&
!*ldd->pending_info.password))
auth_method = OFONO_GPRS_AUTH_METHOD_NONE;

len = snprintf(buf, buflen, "AT+CGAUTH=0,%d",
-- 
2.30.2
___
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org


Fwd: [PATCH 2/4] mbpi: switch to auth NONE if other options cannot be used

2022-09-02 Thread Sergei Golubtsov
If a user name or user name together with a password for an AP
are not provided the NONE auth method should be used
---
 plugins/mbpi.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/plugins/mbpi.c b/plugins/mbpi.c
index ae92c762..7af64d1d 100644
--- a/plugins/mbpi.c
+++ b/plugins/mbpi.c
@@ -395,6 +395,10 @@ static void gsm_end(GMarkupParseContext *context,
const gchar *element_name,
if (ap == NULL)
return;

+   /* select authentication method NONE if others cannot be used */
+   if (!ap->username || (!ap->username && !ap->password))
+   ap->auth_method = OFONO_GPRS_AUTH_METHOD_NONE;
+
if (gsm->allow_duplicates == FALSE) {
GSList *l;

-- 
2.30.2
___
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org


Fwd: [PATCH 1/4] Revert "mbpi: support for auth NONE"

2022-09-02 Thread Sergei Golubtsov
This reverts commit a5bdf48ca7be70a9b33a47dae0ea03bf842efdd2.
---
 plugins/mbpi.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/plugins/mbpi.c b/plugins/mbpi.c
index 433f1b55..ae92c762 100644
--- a/plugins/mbpi.c
+++ b/plugins/mbpi.c
@@ -325,8 +325,6 @@ static void apn_handler(GMarkupParseContext *context,
struct gsm_data *gsm,
ap->apn = g_strdup(apn);
ap->type = OFONO_GPRS_CONTEXT_TYPE_INTERNET;
ap->proto = OFONO_GPRS_PROTO_IP;
-
-   /* pre-select default authentication method */
ap->auth_method = OFONO_GPRS_AUTH_METHOD_CHAP;

g_markup_parse_context_push(context, _parser, ap);
@@ -397,10 +395,6 @@ static void gsm_end(GMarkupParseContext *context,
const gchar *element_name,
if (ap == NULL)
return;

-   /* select authentication method NONE if fit */
-   if (!ap->username || !ap->password)
-   ap->auth_method = OFONO_GPRS_AUTH_METHOD_NONE;
-
if (gsm->allow_duplicates == FALSE) {
GSList *l;

-- 
2.30.2
___
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org


Fwd: [PATCH 0/4] Reverting to use CHAP by default

2022-09-02 Thread Sergei Golubtsov
CHAP is mandated by 3GPP as the default authentication
method. The NONE authentication method should be used only
if CHAP is not suitable, e.g. both username and password
are empty.

Sergei Golubtsov (4):
  Revert "mbpi: support for auth NONE"
  mbpi: switch to auth NONE if other options cannot be used
  lte: switch auth to NONE if other options cannot be used
  file provision plugin: use CHAP auth by default

 drivers/atmodem/lte.c| 3 ++-
 plugins/file-provision.c | 2 +-
 plugins/mbpi.c   | 6 ++
 3 files changed, 5 insertions(+), 6 deletions(-)

-- 
2.30.2
___
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org