* Re: [PATCH_v0 1/5] doc: Add bearer property
2011-12-02 14:00 ` [PATCH_v0 1/5] doc: Add bearer property Guillaume Zajac
@ 2011-11-30 9:30 ` Denis Kenzior
2011-12-05 10:40 ` Guillaume Zajac
0 siblings, 1 reply; 9+ messages in thread
From: Denis Kenzior @ 2011-11-30 9:30 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]
Hi Guillaume,
On 12/02/2011 08:00 AM, Guillaume Zajac wrote:
> ---
> doc/cdma-connman-api.txt | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/doc/cdma-connman-api.txt b/doc/cdma-connman-api.txt
> index 48699a3..bf1ec1e 100644
> --- a/doc/cdma-connman-api.txt
> +++ b/doc/cdma-connman-api.txt
> @@ -35,6 +35,14 @@ Properties boolean Powered [readwrite]
> Contains whether the connection is dormant. Will
> always be false if the connection is not powered.
>
> + string Bearer [readonly, optional]
> +
> + Contains the data bearer technology as reported by the
> + service registration (if known).
> +
> + Possible values are:
> + "none", "1x", "evdo", "svdo"
> +
The 1X and EVDO registration status is already handled by the
NetworkRegistration interface (namely Strength for 1X and DataStrength
for EV-DO).
Whether we need an SVDO indicator is another question entirely, but it
definitely does not belong in ConnectionManager. All SVDO indicates is
whether data + voice are possible simultaneously.
> string Username [readwrite]
>
> Holds the username to be used for authentication
Regards,
-Denis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH_v0 1/5] doc: Add bearer property
2011-12-05 10:40 ` Guillaume Zajac
@ 2011-12-02 12:10 ` Denis Kenzior
0 siblings, 0 replies; 9+ messages in thread
From: Denis Kenzior @ 2011-12-02 12:10 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]
Hi Guillaume,
>> The 1X and EVDO registration status is already handled by the
>> NetworkRegistration interface (namely Strength for 1X and DataStrength
>> for EV-DO).
>
> As we propose this "bearer" property for GSM into connman-api.txt, why
> don't we for CDMA?
> It would be easier to have same property in GSM and CDMA to recover the
> info at network panel level for instance to display technology used.
Because Bearer property for ConnectionManager for GSM is different. It
is a dynamic property that changes based on network resource allocation.
The NetworkRegistration Technology property is simply an indication of
what technology the network cell supports. Hence the rather different
set of values between the two.
>
> We have the same kind of information into network.c namely "technology",
> should we add this property also into cdma-netreg.c?
> I saw it in a TODO into network-api.txt:
> [...]
> string Technology [readonly, optional]
>
> Contains the technology of the current network.
>
> The possible values are: "gsm", "edge", "umts", "hspa",
> "lte"
>
> TODO: Values for CDMA and EVDO based networks.
> [...]
> We have to add the values into common.h, right?
Nope, that TODO is just stale and has been removed.
>
>> Whether we need an SVDO indicator is another question entirely, but it
>> definitely does not belong in ConnectionManager. All SVDO indicates is
>> whether data + voice are possible simultaneously.
>>
>
> Can't we specify at least the technology?
Perhaps, but right now this seems like a convenience feature and very
low on the priority list. I'd rather we implement the current API
proposal first in its entirety before rushing off to define new APIs.
Regards,
-Denis
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH_v0 0/5] Add bearer recovery implementation for CDMA modems
@ 2011-12-02 14:00 Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 1/5] doc: Add bearer property Guillaume Zajac
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Guillaume Zajac @ 2011-12-02 14:00 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 862 bytes --]
Hi,
Those patches implement bearer recovery based on huaweicdma specifications.
It will be followed by the Radio Access Technology setting for CDMA modem.
Kind regards,
Guillaume
Guillaume Zajac (5):
doc: Add bearer property
cdma-connman: Add bearer notification public function declaration
cdma-connman: Add bearer property implementation
cdmamodem: Add bearer recovery into connman driver
huaweicdma: Specify vendor ID while creating cdma-connman atom
doc/cdma-connman-api.txt | 8 +++++++
drivers/cdmamodem/connman.c | 45 +++++++++++++++++++++++++++++++++++++++
include/cdma-connman.h | 3 ++
plugins/huaweicdma.c | 5 +++-
src/cdma-connman.c | 49 +++++++++++++++++++++++++++++++++++++++++++
src/common.h | 1 +
6 files changed, 110 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH_v0 1/5] doc: Add bearer property
2011-12-02 14:00 [PATCH_v0 0/5] Add bearer recovery implementation for CDMA modems Guillaume Zajac
@ 2011-12-02 14:00 ` Guillaume Zajac
2011-11-30 9:30 ` Denis Kenzior
2011-12-02 14:00 ` [PATCH_v0 2/5] cdma-connman: Add bearer notification public function declaration Guillaume Zajac
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Guillaume Zajac @ 2011-12-02 14:00 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 743 bytes --]
---
doc/cdma-connman-api.txt | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/doc/cdma-connman-api.txt b/doc/cdma-connman-api.txt
index 48699a3..bf1ec1e 100644
--- a/doc/cdma-connman-api.txt
+++ b/doc/cdma-connman-api.txt
@@ -35,6 +35,14 @@ Properties boolean Powered [readwrite]
Contains whether the connection is dormant. Will
always be false if the connection is not powered.
+ string Bearer [readonly, optional]
+
+ Contains the data bearer technology as reported by the
+ service registration (if known).
+
+ Possible values are:
+ "none", "1x", "evdo", "svdo"
+
string Username [readwrite]
Holds the username to be used for authentication
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH_v0 2/5] cdma-connman: Add bearer notification public function declaration
2011-12-02 14:00 [PATCH_v0 0/5] Add bearer recovery implementation for CDMA modems Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 1/5] doc: Add bearer property Guillaume Zajac
@ 2011-12-02 14:00 ` Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 3/5] cdma-connman: Add bearer property implementation Guillaume Zajac
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Guillaume Zajac @ 2011-12-02 14:00 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 575 bytes --]
---
include/cdma-connman.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/cdma-connman.h b/include/cdma-connman.h
index 7a115bf..ae84d40 100644
--- a/include/cdma-connman.h
+++ b/include/cdma-connman.h
@@ -59,6 +59,9 @@ struct ofono_cdma_connman_driver {
void *data);
};
+void ofono_cdma_connman_bearer_notify(struct ofono_cdma_connman *cm,
+ int bearer);
+
int ofono_cdma_connman_driver_register(
const struct ofono_cdma_connman_driver *d);
void ofono_cdma_connman_driver_unregister(
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH_v0 3/5] cdma-connman: Add bearer property implementation
2011-12-02 14:00 [PATCH_v0 0/5] Add bearer recovery implementation for CDMA modems Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 1/5] doc: Add bearer property Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 2/5] cdma-connman: Add bearer notification public function declaration Guillaume Zajac
@ 2011-12-02 14:00 ` Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 4/5] cdmamodem: Add bearer recovery into connman driver Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 5/5] huaweicdma: Specify vendor ID while creating cdma-connman atom Guillaume Zajac
4 siblings, 0 replies; 9+ messages in thread
From: Guillaume Zajac @ 2011-12-02 14:00 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2984 bytes --]
---
src/cdma-connman.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
src/common.h | 1 +
2 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/src/cdma-connman.c b/src/cdma-connman.c
index 87cefd6..ff835ed 100644
--- a/src/cdma-connman.c
+++ b/src/cdma-connman.c
@@ -40,6 +40,13 @@
static GSList *g_drivers;
+enum packet_bearer {
+ PACKET_BEARER_NONE = 0,
+ PACKET_BEARER_CDMA_1X = 1,
+ PACKET_BEARER_CDMA_EVDO = 2,
+ PACKET_BEARER_CDMA_SVDO = 3,
+};
+
struct cdma_connman_settings {
char *interface;
gboolean static_ip;
@@ -52,6 +59,7 @@ struct cdma_connman_settings {
struct ofono_cdma_connman {
ofono_bool_t powered;
ofono_bool_t dormant;
+ int bearer;
struct cdma_connman_settings *settings;
DBusMessage *pending;
const struct ofono_cdma_connman_driver *driver;
@@ -61,6 +69,21 @@ struct ofono_cdma_connman {
char password[OFONO_CDMA_CONNMAN_MAX_PASSWORD_LENGTH + 1];
};
+const char *cdma_packet_bearer_to_string(int bearer)
+{
+ switch (bearer) {
+ case PACKET_BEARER_NONE:
+ return "none";
+ case PACKET_BEARER_CDMA_1X:
+ return "1x";
+ case PACKET_BEARER_CDMA_EVDO:
+ return "evdo";
+ case PACKET_BEARER_CDMA_SVDO:
+ return "svdo";
+ }
+ return "";
+}
+
static void cdma_connman_settings_free(struct cdma_connman_settings *settings)
{
DBG("");
@@ -390,6 +413,13 @@ static DBusMessage *cdma_connman_get_properties(DBusConnection *conn,
value = cm->dormant;
ofono_dbus_dict_append(&dict, "Dormant", DBUS_TYPE_BOOLEAN, &value);
+ if (cm->bearer != -1) {
+ const char *bearer = cdma_packet_bearer_to_string(cm->bearer);
+
+ ofono_dbus_dict_append(&dict, "Bearer",
+ DBUS_TYPE_STRING, &bearer);
+ }
+
if (cm->settings)
cdma_connman_settings_append_properties(cm, &dict);
@@ -532,6 +562,25 @@ static GDBusSignalTable cdma_connman_signals[] = {
{ }
};
+void ofono_cdma_connman_bearer_notify(struct ofono_cdma_connman *cm,
+ int bearer)
+{
+ DBusConnection *conn = ofono_dbus_get_connection();
+ const char *path;
+ const char *value;
+
+ if (cm->bearer == bearer)
+ return;
+
+ cm->bearer = bearer;
+ path = __ofono_atom_get_path(cm->atom);
+ value = cdma_packet_bearer_to_string(bearer);
+ ofono_dbus_signal_property_changed(conn, path,
+ OFONO_CDMA_CONNECTION_MANAGER_INTERFACE,
+ "Bearer", DBUS_TYPE_STRING, &value);
+}
+
+
int ofono_cdma_connman_driver_register(
const struct ofono_cdma_connman_driver *d)
{
diff --git a/src/common.h b/src/common.h
index eb006a7..7cdf7ec 100644
--- a/src/common.h
+++ b/src/common.h
@@ -158,5 +158,6 @@ const char *bearer_class_to_string(enum bearer_class cls);
const char *registration_status_to_string(int status);
const char *registration_tech_to_string(int tech);
const char *packet_bearer_to_string(int bearer);
+const char *cdma_packet_bearer_to_string(int bearer);
gboolean is_valid_apn(const char *apn);
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH_v0 4/5] cdmamodem: Add bearer recovery into connman driver
2011-12-02 14:00 [PATCH_v0 0/5] Add bearer recovery implementation for CDMA modems Guillaume Zajac
` (2 preceding siblings ...)
2011-12-02 14:00 ` [PATCH_v0 3/5] cdma-connman: Add bearer property implementation Guillaume Zajac
@ 2011-12-02 14:00 ` Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 5/5] huaweicdma: Specify vendor ID while creating cdma-connman atom Guillaume Zajac
4 siblings, 0 replies; 9+ messages in thread
From: Guillaume Zajac @ 2011-12-02 14:00 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2250 bytes --]
---
drivers/cdmamodem/connman.c | 45 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/drivers/cdmamodem/connman.c b/drivers/cdmamodem/connman.c
index ec17e96..b5f3d29 100644
--- a/drivers/cdmamodem/connman.c
+++ b/drivers/cdmamodem/connman.c
@@ -41,6 +41,7 @@
#include "gatppp.h"
#include "cdmamodem.h"
+#include "drivers/atmodem/vendor.h"
#define TUN_SYSFS_DIR "/sys/devices/virtual/misc/tun"
@@ -66,6 +67,7 @@ struct connman_data {
ofono_cdma_connman_up_cb_t up_cb; /* Up callback */
};
void *cb_data; /* Callback data */
+ unsigned int vendor;
};
static void ppp_debug(const char *str, void *data)
@@ -220,9 +222,42 @@ static void cdma_connman_deactivate(struct ofono_cdma_connman *cm,
g_at_ppp_shutdown(cd->ppp);
}
+static void huawei_mode_notify(GAtResult *result, gpointer user_data)
+{
+ struct ofono_cdma_connman *cm = user_data;
+ GAtResultIter iter;
+ int mode;
+ gint bearer;
+
+ g_at_result_iter_init(&iter, result);
+
+ if (!g_at_result_iter_next(&iter, "^MODE:"))
+ return;
+
+ if (!g_at_result_iter_next_number(&iter, &mode))
+ return;
+
+ switch (mode) {
+ case 2:
+ bearer = 1; /* CDMA 1x mode */
+ break;
+ case 4:
+ bearer = 2; /* CDMA EV-DO */
+ break;
+ case 8:
+ bearer = 3; /* CDMA SVDO */
+ default:
+ bearer = 0;
+ break;
+ }
+
+ ofono_cdma_connman_bearer_notify(cm, bearer);
+}
+
static void at_c0_cb(gboolean ok, GAtResult *result, gpointer user_data)
{
struct ofono_cdma_connman *cm = user_data;
+ struct connman_data *cd = ofono_cdma_connman_get_data(cm);
DBG("ok %d", ok);
@@ -232,6 +267,15 @@ static void at_c0_cb(gboolean ok, GAtResult *result, gpointer user_data)
return;
}
+ switch (cd->vendor) {
+ case OFONO_VENDOR_HUAWEI:
+ g_at_chat_register(cd->chat, "^MODE:", huawei_mode_notify,
+ FALSE, cm, NULL);
+ break;
+ default:
+ break;
+ }
+
ofono_cdma_connman_register(cm);
}
@@ -254,6 +298,7 @@ static int cdma_connman_probe(struct ofono_cdma_connman *cm,
return -ENOMEM;
cd->chat = g_at_chat_clone(chat);
+ cd->vendor = vendor;
ofono_cdma_connman_set_data(cm, cd);
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH_v0 5/5] huaweicdma: Specify vendor ID while creating cdma-connman atom
2011-12-02 14:00 [PATCH_v0 0/5] Add bearer recovery implementation for CDMA modems Guillaume Zajac
` (3 preceding siblings ...)
2011-12-02 14:00 ` [PATCH_v0 4/5] cdmamodem: Add bearer recovery into connman driver Guillaume Zajac
@ 2011-12-02 14:00 ` Guillaume Zajac
4 siblings, 0 replies; 9+ messages in thread
From: Guillaume Zajac @ 2011-12-02 14:00 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
---
plugins/huaweicdma.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/plugins/huaweicdma.c b/plugins/huaweicdma.c
index 4c83114..b54262c 100644
--- a/plugins/huaweicdma.c
+++ b/plugins/huaweicdma.c
@@ -38,6 +38,8 @@
#include <ofono/cdma-connman.h>
#include <ofono/log.h>
+#include "drivers/atmodem/vendor.h"
+
struct huaweicdma_data {
GAtChat *modem;
GAtChat *pcui;
@@ -213,7 +215,8 @@ static void huaweicdma_post_online(struct ofono_modem *modem)
ofono_cdma_netreg_create(modem, 0, "huaweicdmamodem", data->modem);
- ofono_cdma_connman_create(modem, 0, "cdmamodem", data->modem);
+ ofono_cdma_connman_create(modem, OFONO_VENDOR_HUAWEI, "cdmamodem",
+ data->modem);
}
static struct ofono_modem_driver huaweicdma_driver = {
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH_v0 1/5] doc: Add bearer property
2011-11-30 9:30 ` Denis Kenzior
@ 2011-12-05 10:40 ` Guillaume Zajac
2011-12-02 12:10 ` Denis Kenzior
0 siblings, 1 reply; 9+ messages in thread
From: Guillaume Zajac @ 2011-12-05 10:40 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2013 bytes --]
Hi Denis,
On 30/11/2011 10:30, Denis Kenzior wrote:
> Hi Guillaume,
>
> On 12/02/2011 08:00 AM, Guillaume Zajac wrote:
>> ---
>> doc/cdma-connman-api.txt | 8 ++++++++
>> 1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/doc/cdma-connman-api.txt b/doc/cdma-connman-api.txt
>> index 48699a3..bf1ec1e 100644
>> --- a/doc/cdma-connman-api.txt
>> +++ b/doc/cdma-connman-api.txt
>> @@ -35,6 +35,14 @@ Properties boolean Powered [readwrite]
>> Contains whether the connection is dormant. Will
>> always be false if the connection is not powered.
>>
>> + string Bearer [readonly, optional]
>> +
>> + Contains the data bearer technology as reported by the
>> + service registration (if known).
>> +
>> + Possible values are:
>> + "none", "1x", "evdo", "svdo"
>> +
> The 1X and EVDO registration status is already handled by the
> NetworkRegistration interface (namely Strength for 1X and DataStrength
> for EV-DO).
As we propose this "bearer" property for GSM into connman-api.txt, why
don't we for CDMA?
It would be easier to have same property in GSM and CDMA to recover the
info at network panel level for instance to display technology used.
We have the same kind of information into network.c namely "technology",
should we add this property also into cdma-netreg.c?
I saw it in a TODO into network-api.txt:
[...]
string Technology [readonly, optional]
Contains the technology of the current network.
The possible values are: "gsm", "edge", "umts", "hspa",
"lte"
TODO: Values for CDMA and EVDO based networks.
[...]
We have to add the values into common.h, right?
> Whether we need an SVDO indicator is another question entirely, but it
> definitely does not belong in ConnectionManager. All SVDO indicates is
> whether data + voice are possible simultaneously.
>
Can't we specify at least the technology?
Kind regards,
Guillaume
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-12-05 10:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 14:00 [PATCH_v0 0/5] Add bearer recovery implementation for CDMA modems Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 1/5] doc: Add bearer property Guillaume Zajac
2011-11-30 9:30 ` Denis Kenzior
2011-12-05 10:40 ` Guillaume Zajac
2011-12-02 12:10 ` Denis Kenzior
2011-12-02 14:00 ` [PATCH_v0 2/5] cdma-connman: Add bearer notification public function declaration Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 3/5] cdma-connman: Add bearer property implementation Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 4/5] cdmamodem: Add bearer recovery into connman driver Guillaume Zajac
2011-12-02 14:00 ` [PATCH_v0 5/5] huaweicdma: Specify vendor ID while creating cdma-connman atom 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.