From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: RE: [PATCH 1/2] Fix: Username and Password must be set after context is created.
Date: Mon, 01 Feb 2010 11:10:45 -0800 [thread overview]
Message-ID: <1265051445.31341.54.camel@localhost.localdomain> (raw)
In-Reply-To: <61D8D34BB13CFE408D154529C120E079032A1ED6@eseldmw101.eemea.ericsson.se>
[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]
Hi Sjur,
> >> len = sprintf(buf, "AT+CGDCONT=%u,\"IP\"", ctx->cid);
> >>
> >> if (ctx->apn)
> >> snprintf(buf + len, sizeof(buf) - len - 3, ",\"%s\"",
> >> ctx->apn);
> >>
> >> + /* Set username and password. Must be done after context creation */
> >> + len = strlen(buf);
> >> + sprintf(buf+len, ";*EIAAUW=%d,1,\"%s\",\"%s\"", ctx->cid,
> >> + ctx->username, ctx->password);
> >> +
> >> if (g_at_chat_send(gcd->chat, buf, none_prefix,
> >> ste_cgdcont_cb, cbd, g_free) > 0)
> >> return;
> >
> > this looks pretty much complicated and I prefer we don't use this
> > crazy concat of AT commands. Also it violates the coding style.
> >
> > There is no problem to just use g_at_chat_send twice since it will
> > queue the commands for you properly. However if this really depends
> > on CGDCONT succeeding, then we better do it in the callback.
>
> We originally did send EIAAUW in the callback, but Denis changed this
> because MBM did it EIAAUW before CGDCONT.
I know that Denis changed it and it makes sense to keep this in sync. We
just don't know about these details. And we have to put comments in the
source code to remind us.
And to be honest, I am not sure if anybody really tested it. I only know
of one public network that requires username/password for their APN. I
need to get a SIM card from them once I am back in Germany.
> > And we might wanna check if MBM cards behave similar and ensure that
> > STE and MBM cards use a similar code flow.
>
> When testing this EIAAUW fails if there are no prior PDP context on the modem.
> Most likely this is the case with the MBM module as well, but I have not tested this.
Then we have to do that in the callback in an extra step. I don't really
like it, but seems the way to go. Please send a patch that also changes
this for MBM devices. We really wanna keep these in sync.
Regards
Marcel
next prev parent reply other threads:[~2010-02-01 19:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 15:50 [PATCH 1/2] Fix: Username and Password must be set after context is created sjur.brandeland
2010-02-01 15:50 ` [PATCH 2/2] Fix: Check if interface exists before creating it sjur.brandeland
2010-02-01 16:03 ` Marcel Holtmann
2010-02-01 20:40 ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-02-01 21:40 ` Marcel Holtmann
2010-02-01 16:09 ` [PATCH 1/2] Fix: Username and Password must be set after context is created Marcel Holtmann
2010-02-01 17:23 ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-02-01 19:10 ` Marcel Holtmann [this message]
2010-02-01 19:20 ` Denis Kenzior
2010-02-01 21:41 ` Marcel Holtmann
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=1265051445.31341.54.camel@localhost.localdomain \
--to=marcel@holtmann.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox