From: Guillaume Zajac <guillaume.zajac@linux.intel.com>
To: ofono@ofono.org
Subject: cdma-connman: how to save credentials
Date: Mon, 08 Aug 2011 10:19:12 +0200 [thread overview]
Message-ID: <4E3F9C00.30606@linux.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1642 bytes --]
Hi Denis and Marcel,
As suggested by Marcel over ConnMan mailing list, I would like to save
CDMA modem credentials like it is done for GSM modem contexts.
However, for GSM modem we use IMSI to save the contexts. So I could use
CDMA Modem Serial to save but if we put different SIM into the same
modem, we will load wrong credentials.
If this solution is good for you anyway, should I:
1) modifiy the query_serial_cb() like this:
static void query_serial_cb(const struct ofono_error *error,
const char *serial, void *user)
{
struct ofono_devinfo *info = user;
+ struct ofono_atom *cdma_atom;
+ struct ofono_cdma_connman *cm;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(info->atom);
if (error->type != OFONO_ERROR_TYPE_NO_ERROR)
return;
+ cdma_atom = __ofono_modem_find_atom(__ofono_atom_get_modem(info->atom),
+ OFONO_ATOM_TYPE_CDMA_CONNMAN);
+
+ if (cdma_atom != NULL) {
+ cm = __ofono_atom_get_data(cdma_atom);
+ ofono_cdma_connman_load_credentials(cm, serial); // similar
to gprs_load_settings()
+ }
+
info->serial = g_strdup(serial);
ofono_dbus_signal_property_changed(conn, path,
OFONO_MODEM_INTERFACE,
"Serial", DBUS_TYPE_STRING,
&info->serial);
}
or 2) Implement a devinfo API to return serial, like the IMSI is
returned by SIM atom?
Thus, I would have gprs-like implementation.
Thanks for your help.
Kind regards,
Guillaume
reply other threads:[~2011-08-08 8:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4E3F9C00.30606@linux.intel.com \
--to=guillaume.zajac@linux.intel.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.