* cdma-connman: how to save credentials
@ 2011-08-08 8:19 Guillaume Zajac
0 siblings, 0 replies; only message in thread
From: Guillaume Zajac @ 2011-08-08 8:19 UTC (permalink / raw)
To: ofono
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-08 8:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-08 8:19 cdma-connman: how to save credentials Guillaume Zajac
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.