All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Golubtsov <s.e.golubtsov@gmail.com>
To: ofono@ofono.org
Subject: Re: Quectel EC200T USB: Problems with context activation
Date: Thu, 31 Dec 2020 13:35:53 +0100	[thread overview]
Message-ID: <CAFiQ675WayirV30rx+k=Gy-8nZ2KNMFgVCMN=f7wBBjokETNdg@mail.gmail.com> (raw)
In-Reply-To: <aae395ab-8349-bce2-90f1-90630f08b946@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5805 bytes --]

Hi Denis,

Thank you for your reply. I still cannot activate the context neither with
ofono nor with gsmdial but pppd does this fine. But, I have not tested pppd
with CHAP, I think it is impossible. I was getting the error below when I
tried:

root(a)131D2F4C5254324B:/mnt/data# pppd call quectel-ppp &
[1] 18583
root(a)131D2F4C5254324B:/mnt/data# pppd: The remote system (3gppp) is
required to authenticate itself
pppd: but I couldn't find any suitable secret (password) for it to use to
do so.
^C
[1]+  Done(1)                 pppd call quectel-ppp

> Looks fine...

I still cannot understand why ofono does not try to use PAP if the
authentication method is set to CHAP by default (because no method set
while context creation) and it is "obvious" that PAP should be used. pppd
does this BTW, that's why I assumed that it could be "obvious". I am not an
expert in this field. Maybe someone could shed a light on the fact that
pppd chooses a correct authentication method without a problem and ofono
does not?

Am I correct that my SW has to know which authentication must be used
before it attempts to activate context for the first time? This is a big
inconvenience. Actually the fact that the context must be activated
manually at the first time is the big inconvenience too for embedded
systems. But this is not the biggest issue for me right now of course.

> Never tried this myself, but I never really had a reason to.  Not sure if
there
> is an easy way of doing that given you're running over a MUX.  If you
come up
> with a nice way, please share.

Sorry, I have not got your point about MUX. I have successfully obtained
the dumps. I have 2 ttyUSB devices and gsmdial works fine with one tty as
well as with both. Could you elaborate a little bit more on the MUX issue?

Please find the dumps attached. I did not find any problems in them. DTE
sent a termination request but why? I tried to use the CHAP, PAP and NONE
auth metnods but NONE hands with gsm dial.
I am going to debug ofono as you suggested:

> Maybe put a few debug statements in ppp_auth.c, ppp_pap_start,
ppp_pap_timeout
> and ppp_pap_process_packet.  See if PAP even occurs.

Also I have made a small patch for gsmdial that helps to choose auth
method. Please find it attached.
I use cf9e6d048d65ff4a87f5707b0cc4fd3c036d62fb in my patch because the last
commit in master de0d5a19c16bbb3eaba473e0eaaade7f55c48bcb  does not build
for me because of  goto was left in a function without any label. Please
see the error below and in the file attached:
| ../git/ofono/drivers/gemaltomodem/gprs-context.c: In function
'gemalto_gprs_activate_primary':
| ../git/ofono/drivers/gemaltomodem/gprs-context.c:156:3: error: label
'error' used but not defined
|    goto error;
|    ^~~~

Maybe I should add some "properties" to context for this modem before
activation?  Also I am not happy with the idea that I probably need to set
an authentication method by hand. Could this really be necessary with ofono
in some situations? I added the pppd configuration files of the modem
vendor which work fine. Do I need to add something to the context in ofono
before activation?

I strongly believe that ofono as embedded system software has to be as
automated as possible. Do you agree?

Any suggestions will be appreciated. I really stuck with this. I do not
want to stop using ofono because of the new modem.

Yours sincerely,
Sergei Golubtsov.


On Wed, Dec 30, 2020 at 5:51 PM Denis Kenzior <denkenz@gmail.com> wrote:

> Hi Sergei,
>
> On 12/30/20 4:00 AM, Sergei Golubtsov wrote:
> > Hello Denis,
> >
> >  > Are the username and password set properly on the context?
> >
> > Yes, they are.
> > root(a)131D2F4C5254324B:~# /usr/lib/ofono/test/list-contexts
> > [ /quectel_0 ]
> >      [ /quectel_0/context1 ]
> >          Name = Россия
> >          Active = 0
> >          Type = internet
> >          Protocol = ip
> >          AccessPointName = internet
> >          Username = gdata
> >          Password = gdata
> >          AuthenticationMethod = pap
> >          Settings = { }
> >          IPv6.Settings = { }
> >
> >      [ /quectel_0/context2 ]
> >          Name = МегаФон MMS
> >          Active = 0
> >          Type = mms
> >          Protocol = ip
> >          AccessPointName = mms
> >          Username = mms
> >          Password = mms
> >          AuthenticationMethod = pap
> >          MessageProxy = 10.10.10.10:8080 <http://10.10.10.10:8080>
> >          MessageCenter = http://mmsc:8002
> >          Settings = { }
> >          IPv6.Settings = { }
> >
>
> Looks fine...
>
> >  > And you may want to share the log of oFono activating the context
> configured
> > for PAP.
> >
> > I have added the PAP context activation log file from ofono to
> this email as
> > well as I did in the previous email. Please find it attached. It also
> fails at
>
> It wasn't clear whether the previous log was pap or chap.  With chap the
> PPP
> implementation would stop and wait for the chap challenge.  So if that
> never
> comes, that would explain why you get stuck just after entering phase '2'
> ->
> PHASE_AUTHENTICATION
>
> > the same phase: "gatppp.c:ppp_enter_phase() 2"
> > Probably I need to try to dump the ppp connection and analyze it with
> WireShark.
> > Any ideas will be appreciated.
>
> Never tried this myself, but I never really had a reason to.  Not sure if
> there
> is an easy way of doing that given you're running over a MUX.  If you come
> up
> with a nice way, please share.
>
> Maybe put a few debug statements in ppp_auth.c, ppp_pap_start,
> ppp_pap_timeout
> and ppp_pap_process_packet.  See if PAP even occurs.
>
> Regards,
> -Denis
>

[-- Attachment #2: attachment.htm --]
[-- Type: text/html, Size: 8901 bytes --]

[-- Attachment #3: de0d5a19c16bbb3eaba473e0eaaade7f55c48bcbbuilderrors.txt --]
[-- Type: text/plain, Size: 4403 bytes --]

| arm-poky-linux-gnueabi-gcc  -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a5 -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../git/ofono  -I./include -I./src -I../git/ofono/src -I../git/ofono/gdbus -I../git/ofono/gisi -I../git/ofono/gatchat -I../git/ofono/btio -I../git/ofono/gril  -I/home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/recipe-sysroot/usr/include/dbus-1.0 -I/home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/recipe-sysroot/usr/lib/dbus-1.0/include -I/home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/recipe-sysroot/usr/include/glib-2.0 -I/home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/recipe-sysroot/usr/lib/glib-2.0/include    -DOFONO_PLUGIN_BUILTIN -DPLUGINDIR=\""/usr/lib/ofono/plugins"\" -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0=/usr/src/debug/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0                      -fdebug-prefix-map=/home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0=/usr/src/debug/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0                      -fdebug-prefix-map=/home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/recipe-sysroot=                      -fdebug-prefix-map=/home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/recipe-sysroot-native=  -c -o drivers/cdmamodem/connman.o ../git/ofono/drivers/cdmamodem/connman.c
| ../git/ofono/drivers/gemaltomodem/gprs-context.c: In function 'gemalto_gprs_activate_primary':
| ../git/ofono/drivers/gemaltomodem/gprs-context.c:156:3: error: label 'error' used but not defined
|    goto error;
|    ^~~~
| ../git/ofono/drivers/ubloxmodem/gprs-context.c: In function 'ublox_gprs_activate_primary':
| ../git/ofono/drivers/ubloxmodem/gprs-context.c:342:57: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 40 and 112 [-Wformat-truncation=]
|   snprintf(buf, sizeof(buf), "AT+UAUTHREQ=%u,%u,\"%s\",\"%s\"",
|                                                          ^~
| In file included from /home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/recipe-sysroot/usr/include/stdio.h:867,
|                  from ../git/ofono/drivers/ubloxmodem/gprs-context.c:28:
| /home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/recipe-sysroot/usr/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output between 22 and 349 bytes into a destination of size 132
|    return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
|           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|         __bos (__s), __fmt, __va_arg_pack ());
|         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Makefile:4083: recipe for target 'drivers/gemaltomodem/gprs-context.o' failed
| make[1]: *** [drivers/gemaltomodem/gprs-context.o] Error 1
| make[1]: *** Waiting for unfinished jobs....
| Makefile:2376: recipe for target 'all' failed
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/sergei/git/aqc_embedded/yocto-atocha/build/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-gnueabi/ofono/1.31+gitAUTOINC+de0d5a19c1_5ac42d559f-r0/temp/log.do_compile.26060)

[-- Attachment #4: Add-capability-to-choose-auth-method-in-gsmdial.patch --]
[-- Type: application/octet-stream, Size: 1526 bytes --]

diff --git a/gatchat/gsmdial.c b/gatchat/gsmdial.c
index 60e4f245..0407f97c 100644
--- a/gatchat/gsmdial.c
+++ b/gatchat/gsmdial.c
@@ -53,6 +53,7 @@ static gint option_cid = 0;
 static gchar *option_apn = NULL;
 static gint option_offmode = 0;
 static gboolean option_legacy = FALSE;
+static gchar *option_auth_method;
 static gchar *option_username = NULL;
 static gchar *option_password = NULL;
 static gchar *option_pppdump = NULL;
@@ -369,6 +370,14 @@ static void connect_cb(gboolean ok, GAtResult *result, gpointer user_data)
 	}
 	g_at_ppp_set_debug(ppp, gsmdial_debug, "PPP");
 
+	GAtPPPAuthMethod auth_method = G_AT_PPP_AUTH_METHOD_CHAP;
+	if (strcmp(option_auth_method, "PAP") == 0) {
+		auth_method = G_AT_PPP_AUTH_METHOD_PAP;
+	} else if (strcmp(option_auth_method, "NONE") == 0) {
+		auth_method = G_AT_PPP_AUTH_METHOD_NONE;
+	}
+	g_at_ppp_set_auth_method(ppp, auth_method);
+
 	g_at_ppp_set_credentials(ppp, option_username, option_password);
 
 	g_at_ppp_set_acfc_enabled(ppp, option_acfc);
@@ -677,6 +686,10 @@ static GOptionEntry options[] = {
 				"Use ATD*99***<cid>#" },
 	{ "bluetooth", 'b', 0, G_OPTION_ARG_NONE, &option_bluetooth,
 				"Use only ATD*99" },
+	{ "auth", 'A', 0, G_OPTION_ARG_STRING, &option_auth_method,
+				"Specify the authentication method for the PPP"
+				" connection: CHAP, PAP or NONE. CHAP is used"
+				" by default." },
 	{ "username", 'u', 0, G_OPTION_ARG_STRING, &option_username,
 				"Specify PPP username" },
 	{ "password", 'w', 0, G_OPTION_ARG_STRING, &option_password,

[-- Attachment #5: ppp_dump_pap_passwd.txt --]
[-- Type: text/plain, Size: 378 bytes --]

\a_휠\x01\0\x11~ÿ}#À!}!}!} }$ѵ~\a_휠\x02\0F~ÿ}#À!}!}!} }8}"}&} } } } }#}$À#}%}&}%Ÿ>y}'}"}(}"|<~~ÿ}#À!}"}!} }$}<~\a_휠\x01\0Jÿ}#À!}"}!} }8}"}&} } } } }#}$À#}%}&}%Ÿ>y}'}"}(}"°Ñ~ÿ\x03À#\x01\x01\0\x10\x05gdata\x05gdata‹\0~\a_휣\x02\0\f~À#\x02\x01\0\x06\0\0F3~\a_휫\x01\0\x17ÿ\x03À#\x01\x02\0\x10\x05gdata\x05gdataõØ~\a_휫\x02\0\f~À#\x02\x02\0\x06\0\0Š.~\a_휵\x01\0\x17ÿ\x03À#\x01\x03\0\x10\x05gdata\x05gdataߐ~\a_휵\x02\0\f~À#\x02\x03\0\x06\0\0Î%~\a_휿\x01\0\x10ÿ}#À!}%}!} }$=Ç~\a_휿\x02\0\x11~ÿ}#À!}&}!} }$ðâ~\a_휿\x02\0\x0e
NO CARRIER

[-- Attachment #6: ppp_dump_pap.txt --]
[-- Type: text/plain, Size: 327 bytes --]

\a_ìÎÁ\x01\0\x11~ÿ}#À!}!}!} }$ѵ~\a_ìÎÁ\x02\0F~ÿ}#À!}!}!} }8}"}&} } } } }#}$À#}%}&}/kŒ}'}"}(}"*í~~ÿ}#À!}"}!} }$}<~\a_ìÎÁ\x01\0Aÿ}#À!}"}!} }8}"}&} } } } }#}$À#}%}&}/kŒ}'}"}(}"æ} ~ÿ\x03À#\x01\x01\0\x06\0\0)~\a_ìÎÃ\x02\0\f~À#\x02\x01\0\x06\0\0F3~\a_ìÎË\x01\0\rÿ\x03À#\x01\x02\0\x06\0\0M4~\a_ìÎË\x02\0\f~À#\x02\x02\0\x06\0\0Š.~\a_ìÎÕ\x01\0\rÿ\x03À#\x01\x03\0\x06\0\0	?~\a_ìÎÕ\x02\0\f~À#\x02\x03\0\x06\0\0Î%~\a_ìÎß\x01\0\x10ÿ}#À!}%}!} }$=Ç~\a_ìÎß\x02\0\x11~ÿ}#À!}&}!} }$ðâ~

[-- Attachment #7: ppp_dump_single_port.txt --]
[-- Type: text/plain, Size: 610 bytes --]

\a_ìÍÒ\x01\0\x11~ÿ}#À!}!}!} }$ѵ~\a_ìÍÒ\x02\0H~ÿ}#À!}!}!} }8}"}&} } } } }#}$À#}%}&jQ}8V}'}"}(}"}"}.~~ÿ}#À!}"}!} }$}<~\a_ìÍÒ\x01\0\x19ÿ}#À!}#}!} })}#}%Â#}%¥}(~\a_ìÍÒ\x02\06~ÿ}#À!}!}"} }9}"}&} } } } }#}%Â#}%}%}&xù–Í}'}"}(}"}$£~\a_ìÍÒ\x01\04ÿ}#À!}"}"} }9}"}&} } } } }#}%Â#}%}%}&xù–Í}'}"}(}"‰¯~\a_ìÍÒ\x02\0^[~Â#\x01\x03\0\x15\x05FIXEDQUECTEL_PPP.™~\a_ìÍØ\x02\0^[~Â#\x01\x04\0\x15\x05FIXEDQUECTEL_PPP®•~\a_ìÍÞ\x02\0^[~Â#\x01\x05\0\x15\x05FIXEDQUECTEL_PPPøJ~\a_ìÍä\x02\0^[~Â#\x01\x06\0\x15\x05FIXEDQUECTEL_PPP\x13#~\a_ìÍê\x02\0^[~Â#\x01\a\0\x15\x05FIXEDQUECTEL_PPPEü~\a_ìÍð\x02\0^[~Â#\x01\b\0\x15\x05FIXEDQUECTEL_PPP\x13:~\a_ìÍö\x02\0^[~Â#\x01	\0\x15\x05FIXEDQUECTEL_PPPEå~\a_ìÍü\x02\0^[~Â#\x01
\0\x15\x05FIXEDQUECTEL_PPP®Œ~\a_ìÎ\x02\x02\0^[~Â#\x01\v\0\x15\x05FIXEDQUECTEL_PPPøS~\a_ìÎ\b\x02\0^[~Â#\x01\f\0\x15\x05FIXEDQUECTEL_PPPx_~

[-- Attachment #8: gsmdiallogs.txt --]
[-- Type: text/plain, Size: 10783 bytes --]

root@131D2F4C5254324B:/mnt/data# ./gsmdial -n /dev/ttyUSB4 -c 1 -a internet -D ppp_dump_single_port.txt
Control: /dev/ttyUSB4
APN: internet
CID: 1
: > ATE0Q0V1\r
: < ATE0Q0V1\r\r\nOK\r\n\r\nOK\r\n
: > AT+CFUN?\r
: < \r\n+CFUN: 1\r\n\r\nOK\r\n
Current modem mode is 1
: > AT+CPIN?\r
: < \r\n+CPIN: READY\r\n
: < \r\nOK\r\n
: > AT+CREG=2\r
: < \r\nOK\r\n
: > AT+CGREG=2\r
: < \r\nOK\r\n
: > AT+COPS=0\r
: < \r\nOK\r\n
Waiting for network registration...
: > AT+CREG?\r
: < \r\n+CREG: 2,1,"26BE","12FB40C",7\r\n\r\nOK\r\n
Registered to network, roaming=false
Activating GPRS network...
: > AT+CGATT=1\r
: < \r\nOK\r\n
: > AT+CGREG?\r
: < \r\n+CGREG: 2,1,"26BE","12FB40C",7\r\n\r\nOK\r\n
Registered to GPRS network, roaming=false
: > AT+CGDCONT=1,"IP","internet"\r
: < \r\nOK\r\n
: > AT+CGDATA="PPP",1\r
: < \r\nCONNECT\r\n
PPP: lcp: pppcp_generate_event: current state 0:INITIAL
PPP: event: 0 (Up), action: 2, new_state: 2 (CLOSED)
PPP: lcp: pppcp_generate_event: current state 2:CLOSED
PPP: event: 2 (Open), action: 1026, new_state: 6 (REQSENT)
PPP: lcp: pppcp_initialize_restart_count: current state 2:CLOSED
PPP: lcp: pppcp_send_configure_request: current state 2:CLOSED
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 1
PPP: lcp: pppcp_process_configure_request: current state 6:REQSENT
PPP: lcp: pppcp_generate_event: current state 6:REQSENT
PPP: event: 7 (RCR-), action: 4006, new_state: 6 (REQSENT)
PPP: lcp: pppcp_send_configure_nak: current state 6:REQSENT
PPP: lcp: pppcp_process_configure_ack: current state 6:REQSENT
PPP: lcp: pppcp_generate_event: current state 6:REQSENT
PPP: event: 8 (RCA), action: 27, new_state: 7 (ACKRCVD)
PPP: lcp: pppcp_initialize_restart_count: current state 6:REQSENT
PPP: lcp: pppcp_process_configure_request: current state 7:ACKRCVD
PPP: lcp: pppcp_generate_event: current state 7:ACKRCVD
PPP: event: 6 (RCR+), action: 2109, new_state: 9 (OPENED)
PPP: lcp: pppcp_send_configure_ack: current state 7:ACKRCVD
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 2
PPP: lcp: pppcp_generate_event: current state 9:OPENED
PPP: event: 1 (Down), action: 201, new_state: 1 (STARTING)
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 5
PPP: lcp: pppcp_generate_event: current state 1:STARTING
PPP: event: 3 (Close), action: 800, new_state: 0 (INITIAL)
PPP: lcp: pppcp_this_layer_finished: current state 0:INITIAL
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 0
PPP: ../git/ofono/gatchat/gatppp.c:ppp_dead()
PPP Link down: 5


root@131D2F4C5254324B:/mnt/data# ./gsmdial -n /dev/ttyUSB3 -m /dev/ttyUSB4 -c 1 -a internet -A PAP -D ppp_dump_pap.txt
Control: /dev/ttyUSB3
Modem: /dev/ttyUSB4
APN: internet
CID: 1
Control: > ATE0Q0V1\r
Control: < ATE0Q0V1\r\r\nOK\r\n\r\nOK\r\n
Control: > AT+CFUN?\r
Control: < \r\n+CFUN: 1\r\n\r\nOK\r\n
Current modem mode is 1
Control: > AT+CPIN?\r
Control: < \r\n+CPIN: READY\r\n\r\nOK\r\n
Control: > AT+CREG=2\r
Control: < \r\nOK\r\n
Control: > AT+CGREG=2\r
Control: < \r\nOK\r\n
Control: > AT+COPS=0\r
Control: < \r\nOK\r\n
Waiting for network registration...
Control: > AT+CREG?\r
Control: < \r\n+CREG: 2,1,"26BE","12FB40C",7\r\n\r\nOK\r\n
Registered to network, roaming=false
Activating GPRS network...
Control: > AT+CGATT=1\r
Control: < \r\nOK\r\n
Control: > AT+CGREG?\r
Control: < \r\n+CGREG: 2,1,"26BE","12FB40C",7\r\n\r\nOK\r\n
Registered to GPRS network, roaming=false
Control: > AT+CGDCONT=1,"IP","internet"\r
Control: < \r\nOK\r\n
Modem: > AT+CGDATA="PPP",1\r
Modem: < \r\nCONNECT\r\n
PPP: lcp: pppcp_generate_event: current state 0:INITIAL
PPP: event: 0 (Up), action: 2, new_state: 2 (CLOSED)
PPP: lcp: pppcp_generate_event: current state 2:CLOSED
PPP: event: 2 (Open), action: 1026, new_state: 6 (REQSENT)
PPP: lcp: pppcp_initialize_restart_count: current state 2:CLOSED
PPP: lcp: pppcp_send_configure_request: current state 2:CLOSED
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 1
PPP: lcp: pppcp_process_configure_request: current state 6:REQSENT
PPP: lcp: pppcp_generate_event: current state 6:REQSENT
PPP: event: 6 (RCR+), action: 2008, new_state: 8 (ACKSENT)
PPP: lcp: pppcp_send_configure_ack: current state 6:REQSENT
PPP: lcp: pppcp_process_configure_ack: current state 8:ACKSENT
PPP: lcp: pppcp_generate_event: current state 8:ACKSENT
PPP: event: 8 (RCA), action: 129, new_state: 9 (OPENED)
PPP: lcp: pppcp_initialize_restart_count: current state 8:ACKSENT
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 2
PPP: lcp: pppcp_generate_event: current state 9:OPENED
PPP: event: 3 (Close), action: 8224, new_state: 4 (CLOSING)
PPP: lcp: pppcp_initialize_restart_count: current state 9:OPENED
PPP: lcp: pppcp_send_terminate_request: current state 9:OPENED
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 5
PPP: lcp: pppcp_process_terminate_ack: current state 4:CLOSING
PPP: lcp: pppcp_generate_event: current state 4:CLOSING
PPP: event: 11 (RTA), action: 802, new_state: 2 (CLOSED)
PPP: lcp: pppcp_this_layer_finished: current state 2:CLOSED
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 0
PPP: ../git/ofono/gatchat/gatppp.c:ppp_dead()
PPP Link down: 1
Modem: < \r\nNO CARRIER\r\n
Control: > AT+CFUN=0\r
Control: < \r\nOK\r\n


root@131D2F4C5254324B:/mnt/data# ./gsmdial -n /dev/ttyUSB3 -m /dev/ttyUSB4 -c 1 -a internet -A PAP -u gdata -w gdata -D ppp_dump_pap_passwd.txt
Control: /dev/ttyUSB3
Modem: /dev/ttyUSB4
APN: internet
CID: 1
Control: > ATE0Q0V1\r
Control: < \r\nOK\r\n\r\nOK\r\n
Control: > AT+CFUN?\r
Control: < \r\n+CFUN: 1\r\n\r\nOK\r\n
Current modem mode is 1
Control: > AT+CPIN?\r
Control: < \r\n+CPIN: READY\r\n\r\nOK\r\n
Control: > AT+CREG=2\r
Control: < \r\nOK\r\n
Control: > AT+CGREG=2\r
Control: < \r\nOK\r\n
Control: > AT+COPS=0\r
Control: < \r\nOK\r\n
Waiting for network registration...
Control: > AT+CREG?\r
Control: < \r\n+CREG: 2,1,"26BE","12FB40C",7\r\n\r\nOK\r\n
Registered to network, roaming=false
Activating GPRS network...
Control: > AT+CGATT=1\r
Control: < \r\nOK\r\n
Control: > AT+CGREG?\r
Control: < \r\n+CGREG: 2,1,"26BE","12FB40C",7\r\n\r\nOK\r\n
Registered to GPRS network, roaming=false
Control: > AT+CGDCONT=1,"IP","internet"\r
Control: < \r\nOK\r\n
Modem: > AT+CGDATA="PPP",1\r
Modem: < \r\nCONNECT\r\n
PPP: lcp: pppcp_generate_event: current state 0:INITIAL
PPP: event: 0 (Up), action: 2, new_state: 2 (CLOSED)
PPP: lcp: pppcp_generate_event: current state 2:CLOSED
PPP: event: 2 (Open), action: 1026, new_state: 6 (REQSENT)
PPP: lcp: pppcp_initialize_restart_count: current state 2:CLOSED
PPP: lcp: pppcp_send_configure_request: current state 2:CLOSED
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 1
PPP: lcp: pppcp_process_configure_request: current state 6:REQSENT
PPP: lcp: pppcp_generate_event: current state 6:REQSENT
PPP: event: 6 (RCR+), action: 2008, new_state: 8 (ACKSENT)
PPP: lcp: pppcp_send_configure_ack: current state 6:REQSENT
PPP: lcp: pppcp_process_configure_ack: current state 8:ACKSENT
PPP: lcp: pppcp_generate_event: current state 8:ACKSENT
PPP: event: 8 (RCA), action: 129, new_state: 9 (OPENED)
PPP: lcp: pppcp_initialize_restart_count: current state 8:ACKSENT
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 2
PPP: lcp: pppcp_generate_event: current state 9:OPENED
PPP: event: 3 (Close), action: 8224, new_state: 4 (CLOSING)
PPP: lcp: pppcp_initialize_restart_count: current state 9:OPENED
PPP: lcp: pppcp_send_terminate_request: current state 9:OPENED
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 5
PPP: lcp: pppcp_process_terminate_ack: current state 4:CLOSING
PPP: lcp: pppcp_generate_event: current state 4:CLOSING
PPP: event: 11 (RTA), action: 802, new_state: 2 (CLOSED)
PPP: lcp: pppcp_this_layer_finished: current state 2:CLOSED
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 0
PPP: ../git/ofono/gatchat/gatppp.c:ppp_dead()
PPP Link down: 1
Control: > AT+CFUN=0\r
Control: < \r\nOK\r\n


root@131D2F4C5254324B:/mnt/data# ./gsmdial -n /dev/ttyUSB3 -m /dev/ttyUSB4 -c 1 -a internet -A NONE -u gdata -w gdata -D ppp_dump_none.txt
Control: /dev/ttyUSB3
Modem: /dev/ttyUSB4
APN: internet
CID: 1
Control: > ATE0Q0V1\r
Control: < ATE0Q0V1\r\r\nOK\r\n\r\nOK\r\n
Control: > AT+CFUN?\r
Control: < \r\n+CFUN: 1\r\n\r\nOK\r\n
Current modem mode is 1
Control: > AT+CPIN?\r
Control: < \r\n+CPIN: READY\r\n\r\nOK\r\n
Control: > AT+CREG=2\r
Control: < \r\nOK\r\n
Control: > AT+CGREG=2\r
Control: < \r\nOK\r\n
Control: > AT+COPS=0\r
Control: < \r\nOK\r\n
Waiting for network registration...
Control: > AT+CREG?\r
Control: < \r\n+CREG: 2,1,"26BE","12FB40C",7\r\n\r\nOK\r\n
Registered to network, roaming=false
Activating GPRS network...
Control: > AT+CGATT=1\r
Control: < \r\nOK\r\n
Control: > AT+CGREG?\r
Control: < \r\n+CGREG: 2,1,"26BE","12FB40C",7\r\n\r\nOK\r\n
Registered to GPRS network, roaming=false
Control: > AT+CGDCONT=1,"IP","internet"\r
Control: < \r\nOK\r\n
Modem: > AT+CGDATA="PPP",1\r
Modem: < \r\nCONNECT\r\n
PPP: lcp: pppcp_generate_event: current state 0:INITIAL
PPP: event: 0 (Up), action: 2, new_state: 2 (CLOSED)
PPP: lcp: pppcp_generate_event: current state 2:CLOSED
PPP: event: 2 (Open), action: 1026, new_state: 6 (REQSENT)
PPP: lcp: pppcp_initialize_restart_count: current state 2:CLOSED
PPP: lcp: pppcp_send_configure_request: current state 2:CLOSED
PPP: ../git/ofono/gatchat/gatppp.c:ppp_enter_phase() 1
PPP: lcp: pppcp_process_configure_request: current state 6:REQSENT
PPP: lcp: pppcp_generate_event: current state 6:REQSENT
PPP: event: 7 (RCR-), action: 4006, new_state: 6 (REQSENT)
PPP: lcp: pppcp_send_configure_nak: current state 6:REQSENT
PPP: lcp: pppcp_process_configure_ack: current state 6:REQSENT
PPP: lcp: pppcp_generate_event: current state 6:REQSENT
PPP: event: 8 (RCA), action: 27, new_state: 7 (ACKRCVD)
PPP: lcp: pppcp_initialize_restart_count: current state 6:REQSENT
PPP: lcp: pppcp_process_configure_request: current state 7:ACKRCVD
PPP: lcp: pppcp_generate_event: current state 7:ACKRCVD
PPP: event: 7 (RCR-), action: 4007, new_state: 7 (ACKRCVD)
PPP: lcp: pppcp_send_configure_nak: current state 7:ACKRCVD
PPP: lcp: pppcp_process_configure_request: current state 7:ACKRCVD
PPP: lcp: pppcp_generate_event: current state 7:ACKRCVD
PPP: event: 7 (RCR-), action: 4007, new_state: 7 (ACKRCVD)
PPP: lcp: pppcp_send_configure_nak: current state 7:ACKRCVD
PPP: lcp: pppcp_process_configure_request: current state 7:ACKRCVD
PPP: lcp: pppcp_generate_event: current state 7:ACKRCVD
PPP: event: 7 (RCR-), action: 4007, new_state: 7 (ACKRCVD)
PPP: lcp: pppcp_send_configure_nak: current state 7:ACKRCVD
PPP: lcp: pppcp_process_configure_request: current state 7:ACKRCVD
PPP: lcp: pppcp_generate_event: current state 7:ACKRCVD
PPP: event: 7 (RCR-), action: 4007, new_state: 7 (ACKRCVD)
PPP: lcp: pppcp_send_configure_nak: current state 7:ACKRCVD
PPP: lcp: pppcp_process_configure_request: current state 7:ACKRCVD
### INFINITE CYCLE with the same output

[-- Attachment #9: quectel-ppp.obj --]
[-- Type: application/octet-stream, Size: 1051 bytes --]

# /etc/ppp/peers/quectel-pppd
# Usage:root>pppd call quectel-pppd
#Modem path, like /dev/ttyUSB3,/dev/ttyACM0, depend on your module, default path is /dev/ttyUSB3
/dev/ttyUSB3 115200
#Insert the username and password for authentication, default user and password are test
user "test" password "test"
# The chat script, customize your APN in this file
connect 'chat -s -v -f /etc/ppp/peers/quectel-chat-connect'
# The close script
disconnect 'chat -s -v -f /etc/ppp/peers/quectel-chat-disconnect'
# Hide password in debug messages
hide-password
# The phone is not required to authenticate
noauth
# Debug info from pppd
debug
# If you want to use the HSDPA link as your gateway
defaultroute
# pppd must not propose any IP address to the peer
noipdefault
# No ppp compression
novj
novjccomp
noccp
ipcp-accept-local
ipcp-accept-remote
local
# For sanity, keep a lock on the serial line
lock
modem
dump
nodetach
# Hardware flow control
nocrtscts
remotename 3gppp
ipparam 3gppp
ipcp-max-failure 30
# Ask the peer for up to 2 DNS server addresses
usepeerdns

[-- Attachment #10: quectel-chat-connect.obj --]
[-- Type: application/octet-stream, Size: 317 bytes --]

# /etc/ppp/peers/quectel-chat-connect
ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
TIMEOUT 30
"" AT
OK ATE0
OK ATI;+CSUB;+CSQ;+CPIN?;+COPS?;+CGREG?;&D2
# Insert the APN provided by your network operator, default apn is 3gnet
OK AT+CGDCONT=1,"IP","3gnet",,0,0
OK ATD*99#
CONNECT

  reply	other threads:[~2020-12-31 12:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 10:00 Quectel EC200T USB: Problems with context activation Sergei Golubtsov
2020-12-30 16:42 ` Denis Kenzior
2020-12-31 12:35   ` Sergei Golubtsov [this message]
2020-12-31 16:20     ` Denis Kenzior
2021-01-01 14:10       ` Sergei Golubtsov
2021-01-01 16:27         ` Sergei Golubtsov
2021-01-02  9:52           ` Sergei Golubtsov
2021-01-04 17:43             ` Denis Kenzior
2021-01-05 21:34               ` Sergei Golubtsov
2021-01-06 19:52                 ` Denis Kenzior
     [not found] <CAFiQ675+H9QndW030-WkV2oivkVVChzcOTnKbaj+4VzW4k9P6w@mail.gmail.com>
2021-05-19 14:16 ` Denis Kenzior
2021-05-19 23:35   ` Sergei Golubtsov
2021-05-20 17:57     ` Denis Kenzior
     [not found] <CAFiQ676fUqkEz9KbKUOY27o=DXTDtWRawVioPj+otEvJNryr8A@mail.gmail.com>
2020-12-29 14:09 ` Sergei Golubtsov
2020-12-29 15:55   ` Sergei Golubtsov
2020-12-29 17:56     ` Sergei Golubtsov
2020-12-29 21:49       ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiQ675WayirV30rx+k=Gy-8nZ2KNMFgVCMN=f7wBBjokETNdg@mail.gmail.com' \
    --to=s.e.golubtsov@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.