All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH_v0 1/6] doc: Add DormantInterval property
  2011-12-07 16:05 ` [PATCH_v0 1/6] doc: Add DormantInterval property Guillaume Zajac
@ 2011-12-07 12:34   ` Denis Kenzior
  2011-12-08  9:25     ` Guillaume Zajac
  0 siblings, 1 reply; 10+ messages in thread
From: Denis Kenzior @ 2011-12-07 12:34 UTC (permalink / raw)
  To: ofono

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

Hi Guillaume,

On 12/07/2011 10:05 AM, Guillaume Zajac wrote:
> ---
>  doc/cdma-connman-api.txt |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/doc/cdma-connman-api.txt b/doc/cdma-connman-api.txt
> index 48699a3..a6d1e56 100644
> --- a/doc/cdma-connman-api.txt
> +++ b/doc/cdma-connman-api.txt
> @@ -35,6 +35,11 @@ Properties	boolean Powered [readwrite]
>  			Contains whether the connection is dormant.  Will
>  			always be false if the connection is not powered.
>  
> +		int DormantInterval [readwrite]
> +
> +			Contains the interval in seconds to enter in dormant
> +			Mode.
> +

Why would the user want to mess with this setting? What would be the
right interval?  Remember, oFono only exports settings that are useful
to show to the user, and that the user can understand what to do with.
This this one certainly doesn't fit the above description.

Besides, we should simply disable dormancy mode in the first place.  The
base station can more intelligently manage that anyway.

>  		string Username [readwrite]
>  
>  			Holds the username to be used for authentication

Regards,
-Denis

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH_v0 0/6] Manage Dormant property for CDMA modems
@ 2011-12-07 16:05 Guillaume Zajac
  2011-12-07 16:05 ` [PATCH_v0 1/6] doc: Add DormantInterval property Guillaume Zajac
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Guillaume Zajac @ 2011-12-07 16:05 UTC (permalink / raw)
  To: ofono

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

Hi,

This set of patches allows to configure the way CDMA modem will go into
dormant state. It can be configured in setting dormant interval, with a
new driver entry.
A callback is now registered to Dormant notification for Huawei CDMA
modems, to update Dormant value into Connection Manager.

Kind regards,
Guillaume

Guillaume Zajac (6):
  doc: Add DormantInterval property
  cdma-connman: Add dormant option configuration and notification
  cdma-connman: Add DormantInterval porperty and dormant notification
  huaweicdma: Specify vendor in creating cdma-connman atom
  cdmamodem: Add dormant notification and dormant interval setting
  test: Add script to set dormant interval

 Makefile.am                    |    1 +
 doc/cdma-connman-api.txt       |    5 ++
 drivers/cdmamodem/connman.c    |   83 ++++++++++++++++++++++++++++++++++++++++
 include/cdma-connman.h         |    7 +++
 plugins/huaweicdma.c           |    7 +++-
 src/cdma-connman.c             |   79 +++++++++++++++++++++++++++++++++++++-
 test/cdma-set-dormant-interval |   24 +++++++++++
 7 files changed, 203 insertions(+), 3 deletions(-)
 create mode 100755 test/cdma-set-dormant-interval


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH_v0 1/6] doc: Add DormantInterval property
  2011-12-07 16:05 [PATCH_v0 0/6] Manage Dormant property for CDMA modems Guillaume Zajac
@ 2011-12-07 16:05 ` Guillaume Zajac
  2011-12-07 12:34   ` Denis Kenzior
  2011-12-07 16:05 ` [PATCH_v0 2/6] cdma-connman: Add dormant option configuration and notification Guillaume Zajac
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Guillaume Zajac @ 2011-12-07 16:05 UTC (permalink / raw)
  To: ofono

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

---
 doc/cdma-connman-api.txt |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/doc/cdma-connman-api.txt b/doc/cdma-connman-api.txt
index 48699a3..a6d1e56 100644
--- a/doc/cdma-connman-api.txt
+++ b/doc/cdma-connman-api.txt
@@ -35,6 +35,11 @@ Properties	boolean Powered [readwrite]
 			Contains whether the connection is dormant.  Will
 			always be false if the connection is not powered.
 
+		int DormantInterval [readwrite]
+
+			Contains the interval in seconds to enter in dormant
+			Mode.
+
 		string Username [readwrite]
 
 			Holds the username to be used for authentication
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH_v0 2/6] cdma-connman: Add dormant option configuration and notification
  2011-12-07 16:05 [PATCH_v0 0/6] Manage Dormant property for CDMA modems Guillaume Zajac
  2011-12-07 16:05 ` [PATCH_v0 1/6] doc: Add DormantInterval property Guillaume Zajac
@ 2011-12-07 16:05 ` Guillaume Zajac
  2011-12-07 16:05 ` [PATCH_v0 3/6] cdma-connman: Add DormantInterval porperty and dormant notification Guillaume Zajac
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Guillaume Zajac @ 2011-12-07 16:05 UTC (permalink / raw)
  To: ofono

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

---
 include/cdma-connman.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/cdma-connman.h b/include/cdma-connman.h
index 7a115bf..665afec 100644
--- a/include/cdma-connman.h
+++ b/include/cdma-connman.h
@@ -57,6 +57,10 @@ struct ofono_cdma_connman_driver {
 	void (*deactivate)(struct ofono_cdma_connman *cm,
 						ofono_cdma_connman_cb_t cb,
 						void *data);
+	void (*set_dormant_interval)(struct ofono_cdma_connman *cm,
+						int dormant_interval,
+						ofono_cdma_connman_cb_t cb,
+						void *data);
 };
 
 int ofono_cdma_connman_driver_register(
@@ -66,6 +70,9 @@ void ofono_cdma_connman_driver_unregister(
 
 void ofono_cdma_connman_deactivated(struct ofono_cdma_connman *cm);
 
+void ofono_cdma_connman_dormant_state_notify(struct ofono_cdma_connman *cm,
+						ofono_bool_t dormant);
+
 struct ofono_cdma_connman *ofono_cdma_connman_create(
 						struct ofono_modem *modem,
 						unsigned int vendor,
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH_v0 3/6] cdma-connman: Add DormantInterval porperty and dormant notification
  2011-12-07 16:05 [PATCH_v0 0/6] Manage Dormant property for CDMA modems Guillaume Zajac
  2011-12-07 16:05 ` [PATCH_v0 1/6] doc: Add DormantInterval property Guillaume Zajac
  2011-12-07 16:05 ` [PATCH_v0 2/6] cdma-connman: Add dormant option configuration and notification Guillaume Zajac
@ 2011-12-07 16:05 ` Guillaume Zajac
  2011-12-07 16:05 ` [PATCH_v0 4/6] huaweicdma: Specify vendor in creating cdma-connman atom Guillaume Zajac
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Guillaume Zajac @ 2011-12-07 16:05 UTC (permalink / raw)
  To: ofono

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

---
 src/cdma-connman.c |   79 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 77 insertions(+), 2 deletions(-)

diff --git a/src/cdma-connman.c b/src/cdma-connman.c
index 87cefd6..38ee165 100644
--- a/src/cdma-connman.c
+++ b/src/cdma-connman.c
@@ -38,6 +38,8 @@
 #include "ofono.h"
 #include "common.h"
 
+#define MAX_DORMANT_INTERVAL 300
+
 static GSList *g_drivers;
 
 struct cdma_connman_settings {
@@ -52,6 +54,7 @@ struct cdma_connman_settings {
 struct ofono_cdma_connman {
 	ofono_bool_t powered;
 	ofono_bool_t dormant;
+	int dormant_interval;
 	struct cdma_connman_settings *settings;
 	DBusMessage *pending;
 	const struct ofono_cdma_connman_driver *driver;
@@ -319,6 +322,33 @@ static void deactivate_callback(const struct ofono_error *error, void *data)
 				"Powered", DBUS_TYPE_BOOLEAN, &value);
 }
 
+static void set_dormant_interval_callback(const struct ofono_error *error, void *data)
+{
+	DBusConnection *conn = ofono_dbus_get_connection();
+	struct ofono_cdma_connman *cm = data;
+	int value;
+	const char *path;
+
+	DBG("");
+
+	if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
+		DBG("Setting dormant interval failed with error: %s",
+				telephony_error_to_str(error));
+		__ofono_dbus_pending_reply(&cm->pending,
+					__ofono_error_failed(cm->pending));
+		cm->dormant_interval = -1;
+	}
+
+	__ofono_dbus_pending_reply(&cm->pending,
+				dbus_message_new_method_return(cm->pending));
+
+	path = __ofono_atom_get_path(cm->atom);
+	value = cm->dormant_interval;
+	ofono_dbus_signal_property_changed(conn, path,
+				OFONO_CDMA_CONNECTION_MANAGER_INTERFACE,
+				"DormantInterval", DBUS_TYPE_INT32, &value);
+}
+
 static void cdma_connman_settings_append_properties(
 						struct ofono_cdma_connman *cm,
 						DBusMessageIter *dict)
@@ -371,6 +401,7 @@ static DBusMessage *cdma_connman_get_properties(DBusConnection *conn,
 	DBusMessageIter iter;
 	DBusMessageIter dict;
 	dbus_bool_t value;
+	int dorm_int;
 
 	DBG("");
 
@@ -390,6 +421,12 @@ static DBusMessage *cdma_connman_get_properties(DBusConnection *conn,
 	value = cm->dormant;
 	ofono_dbus_dict_append(&dict, "Dormant", DBUS_TYPE_BOOLEAN, &value);
 
+	if (cm->dormant_interval >= 0) {
+		dorm_int = cm->dormant_interval;
+		ofono_dbus_dict_append(&dict, "Dormant", DBUS_TYPE_BOOLEAN,
+					&dorm_int);
+	}
+
 	if (cm->settings)
 		cdma_connman_settings_append_properties(cm, &dict);
 
@@ -455,6 +492,7 @@ static DBusMessage *cdma_connman_set_property(DBusConnection *conn,
 	const char *property;
 	dbus_bool_t value;
 	const char *str;
+	int dormant;
 
 	DBG("");
 
@@ -512,9 +550,27 @@ static DBusMessage *cdma_connman_set_property(DBusConnection *conn,
 
 		dbus_message_iter_get_basic(&var, &str);
 		return cdma_connman_set_password(cm, conn, msg, str);
-	}
+	} else if (!strcmp(property, "DormantInterval")) {
+		if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_INT32)
+			return __ofono_error_invalid_args(msg);
+
+		dbus_message_iter_get_basic(&var, &dormant);
+
+		if (dormant < 0 || dormant > MAX_DORMANT_INTERVAL)
+			return __ofono_error_invalid_args(msg);
 
-	/* TODO: Dormant property. Not yet supported. */
+		if (cm->driver == NULL || cm->driver->set_dormant_interval
+				== NULL)
+			return __ofono_error_not_implemented(msg);
+
+		cm->dormant_interval = dormant;
+		cm->pending = dbus_message_ref(msg);
+
+		cm->driver->set_dormant_interval(cm, dormant,
+					 set_dormant_interval_callback, cm);
+
+		return NULL;
+	}
 
 	return __ofono_error_invalid_args(msg);
 }
@@ -572,6 +628,23 @@ void ofono_cdma_connman_deactivated(struct ofono_cdma_connman *cm)
 				"Powered", DBUS_TYPE_BOOLEAN, &value);
 }
 
+void ofono_cdma_connman_dormant_state_notify(struct ofono_cdma_connman *cm,
+						ofono_bool_t dormant)
+{
+	DBusConnection *conn = ofono_dbus_get_connection();
+	const char *path;
+
+	if (cm == NULL)
+		return;
+
+	cm->dormant = dormant;
+	path = __ofono_atom_get_path(cm->atom);
+
+	ofono_dbus_signal_property_changed(conn, path,
+				OFONO_CDMA_CONNECTION_MANAGER_INTERFACE,
+				"Dormant", DBUS_TYPE_BOOLEAN, &dormant);
+}
+
 static void cdma_connman_unregister(struct ofono_atom *atom)
 {
 	DBusConnection *conn = ofono_dbus_get_connection();
@@ -619,6 +692,8 @@ struct ofono_cdma_connman *ofono_cdma_connman_create(
 	if (cm == NULL)
 		return NULL;
 
+	cm->dormant_interval = -1;
+
 	cm->atom = __ofono_modem_add_atom(modem,
 					OFONO_ATOM_TYPE_CDMA_CONNMAN,
 					cdma_connman_remove, cm);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH_v0 4/6] huaweicdma: Specify vendor in creating cdma-connman atom
  2011-12-07 16:05 [PATCH_v0 0/6] Manage Dormant property for CDMA modems Guillaume Zajac
                   ` (2 preceding siblings ...)
  2011-12-07 16:05 ` [PATCH_v0 3/6] cdma-connman: Add DormantInterval porperty and dormant notification Guillaume Zajac
@ 2011-12-07 16:05 ` Guillaume Zajac
  2011-12-07 16:05 ` [PATCH_v0 5/6] cdmamodem: Add dormant notification and dormant interval setting Guillaume Zajac
  2011-12-07 16:05 ` [PATCH_v0 6/6] test: Add script to set dormant interval Guillaume Zajac
  5 siblings, 0 replies; 10+ messages in thread
From: Guillaume Zajac @ 2011-12-07 16:05 UTC (permalink / raw)
  To: ofono

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

---
 plugins/huaweicdma.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/plugins/huaweicdma.c b/plugins/huaweicdma.c
index 4c83114..50b4761 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;
@@ -147,6 +149,8 @@ static int huaweicdma_enable(struct ofono_modem *modem)
 		return -EIO;
 	}
 
+	g_at_chat_set_slave(data->modem, data->pcui);
+
 	g_at_chat_send(data->modem, "ATE0 &C0 +CMEE=1", NULL, NULL, NULL, NULL);
 	g_at_chat_send(data->pcui, "ATE0 &C0 +CMEE=1", NULL, NULL, NULL, NULL);
 
@@ -213,7 +217,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] 10+ messages in thread

* [PATCH_v0 5/6] cdmamodem: Add dormant notification and dormant interval setting
  2011-12-07 16:05 [PATCH_v0 0/6] Manage Dormant property for CDMA modems Guillaume Zajac
                   ` (3 preceding siblings ...)
  2011-12-07 16:05 ` [PATCH_v0 4/6] huaweicdma: Specify vendor in creating cdma-connman atom Guillaume Zajac
@ 2011-12-07 16:05 ` Guillaume Zajac
  2011-12-07 16:05 ` [PATCH_v0 6/6] test: Add script to set dormant interval Guillaume Zajac
  5 siblings, 0 replies; 10+ messages in thread
From: Guillaume Zajac @ 2011-12-07 16:05 UTC (permalink / raw)
  To: ofono

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

---
 drivers/cdmamodem/connman.c |   83 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/drivers/cdmamodem/connman.c b/drivers/cdmamodem/connman.c
index ec17e96..dade3f2 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"
 
@@ -58,10 +59,12 @@ enum state {
 struct connman_data {
 	GAtChat *chat;
 	GAtPPP *ppp;
+	unsigned int vendor;
 	enum state state;
 	char username[OFONO_CDMA_CONNMAN_MAX_USERNAME_LENGTH + 1];
 	char password[OFONO_CDMA_CONNMAN_MAX_PASSWORD_LENGTH + 1];
 	union {
+		ofono_cdma_connman_cb_t dormant_interval_cb;
 		ofono_cdma_connman_cb_t down_cb;	/* Down callback */
 		ofono_cdma_connman_up_cb_t up_cb;	/* Up callback */
 	};
@@ -220,9 +223,77 @@ static void cdma_connman_deactivate(struct ofono_cdma_connman *cm,
 	g_at_ppp_shutdown(cd->ppp);
 }
 
+static void cdma_cta_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);
+	struct ofono_error error;
+
+	decode_at_error(&error, g_at_result_final_response(result));
+
+	if (!ok) {
+		CALLBACK_WITH_FAILURE(cd->dormant_interval_cb, cd->cb_data);
+		return;
+	}
+
+	CALLBACK_WITH_SUCCESS(cd->dormant_interval_cb, cd->cb_data);
+}
+
+static void cdma_connman_set_dormant_interval(struct ofono_cdma_connman *cm,
+					int dormant_interval,
+					ofono_cdma_connman_cb_t cb,
+					void *data)
+{
+	struct connman_data *cd = ofono_cdma_connman_get_data(cm);
+	GAtChat *chat = g_at_chat_get_slave(cd->chat);
+	char buf[256];
+
+	DBG("");
+
+	cd->dormant_interval_cb = cb;
+	cd->cb_data = data;
+
+	snprintf(buf, sizeof(buf), "AT+CTA=%d", dormant_interval);
+
+	if (g_at_chat_send(chat, buf, none_prefix, cdma_cta_cb,
+			cm, NULL) > 0)
+		return;
+
+	CALLBACK_WITH_FAILURE(cb, data);
+}
+
+static void dsdormant_notify(GAtResult *result, gpointer user_data)
+{
+	struct ofono_cdma_connman *cm = user_data;
+	int dormant_state;
+	GAtResultIter iter;
+
+	g_at_result_iter_init(&iter, result);
+
+	if (!g_at_result_iter_next(&iter, "^DSDORMANT:"))
+		goto error;
+
+	if (!g_at_result_iter_next_number(&iter, &dormant_state))
+		goto error;
+
+	if (dormant_state == 1)
+		ofono_cdma_connman_dormant_state_notify(cm, TRUE);
+	else if (dormant_state == 0)
+		ofono_cdma_connman_dormant_state_notify(cm, FALSE);
+	else
+		goto error;
+
+	return;
+
+error:
+	ofono_error("Invalid DSDORMANT value");
+}
+
 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);
+	GAtChat *chat;
 
 	DBG("ok %d", ok);
 
@@ -232,6 +303,16 @@ static void at_c0_cb(gboolean ok, GAtResult *result, gpointer user_data)
 		return;
 	}
 
+	switch (cd->vendor) {
+	case OFONO_VENDOR_HUAWEI:
+		chat = g_at_chat_get_slave(cd->chat);
+		g_at_chat_register(chat, "^DSDORMANT",
+					dsdormant_notify, FALSE, cm, NULL);
+		break;
+	default:
+		break;
+	}
+
 	ofono_cdma_connman_register(cm);
 }
 
@@ -254,6 +335,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);
 
@@ -285,6 +367,7 @@ static struct ofono_cdma_connman_driver driver = {
 	.remove			= cdma_connman_remove,
 	.activate		= cdma_connman_activate,
 	.deactivate		= cdma_connman_deactivate,
+	.set_dormant_interval	= cdma_connman_set_dormant_interval,
 };
 
 void cdma_connman_init(void)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH_v0 6/6] test: Add script to set dormant interval
  2011-12-07 16:05 [PATCH_v0 0/6] Manage Dormant property for CDMA modems Guillaume Zajac
                   ` (4 preceding siblings ...)
  2011-12-07 16:05 ` [PATCH_v0 5/6] cdmamodem: Add dormant notification and dormant interval setting Guillaume Zajac
@ 2011-12-07 16:05 ` Guillaume Zajac
  5 siblings, 0 replies; 10+ messages in thread
From: Guillaume Zajac @ 2011-12-07 16:05 UTC (permalink / raw)
  To: ofono

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

---
 Makefile.am                    |    1 +
 test/cdma-set-dormant-interval |   24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100755 test/cdma-set-dormant-interval

diff --git a/Makefile.am b/Makefile.am
index 337aeb7..4555c09 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -549,6 +549,7 @@ test_scripts = test/backtrace \
 		test/cdma-dial-number \
 		test/cdma-hangup \
 		test/cdma-set-credentials \
+		test/cdma-set-dormant-interval \
 		test/disable-call-forwarding \
 		test/list-messages \
 		test/test-sms \
diff --git a/test/cdma-set-dormant-interval b/test/cdma-set-dormant-interval
new file mode 100755
index 0000000..f41bcd2
--- /dev/null
+++ b/test/cdma-set-dormant-interval
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+						'org.ofono.Manager')
+
+modems = manager.GetModems()
+
+for path, properties in modems:
+	if "org.ofono.cdma.ConnectionManager" not in properties["Interfaces"]:
+		continue
+
+	cm = dbus.Interface(bus.get_object('org.ofono', path),
+					'org.ofono.cdma.ConnectionManager')
+
+	print "Connecting CDMA Packet Data Service on modem %s..." % path
+
+	if len(sys.argv) > 1:
+		cm.SetProperty("DormantInterval", int(sys.argv[1]))
+		print "Setting Dormant Interval to %s seconds" % (sys.argv[1])
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH_v0 1/6] doc: Add DormantInterval property
  2011-12-07 12:34   ` Denis Kenzior
@ 2011-12-08  9:25     ` Guillaume Zajac
  2011-12-08 11:00       ` Denis Kenzior
  0 siblings, 1 reply; 10+ messages in thread
From: Guillaume Zajac @ 2011-12-08  9:25 UTC (permalink / raw)
  To: ofono

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

Hi Denis,

On 07/12/2011 13:34, Denis Kenzior wrote:
> Hi Guillaume,
>
> On 12/07/2011 10:05 AM, Guillaume Zajac wrote:
>> ---
>>   doc/cdma-connman-api.txt |    5 +++++
>>   1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/doc/cdma-connman-api.txt b/doc/cdma-connman-api.txt
>> index 48699a3..a6d1e56 100644
>> --- a/doc/cdma-connman-api.txt
>> +++ b/doc/cdma-connman-api.txt
>> @@ -35,6 +35,11 @@ Properties	boolean Powered [readwrite]
>>   			Contains whether the connection is dormant.  Will
>>   			always be false if the connection is not powered.
>>
>> +		int DormantInterval [readwrite]
>> +
>> +			Contains the interval in seconds to enter in dormant
>> +			Mode.
>> +
> Why would the user want to mess with this setting? What would be the
> right interval?  Remember, oFono only exports settings that are useful
> to show to the user, and that the user can understand what to do with.
> This this one certainly doesn't fit the above description.
>
> Besides, we should simply disable dormancy mode in the first place.  The
> base station can more intelligently manage that anyway.
>

Right, the user can't manage this value, however Dormant property is 
ReadOnly.
So should we have a specific DBus API to disable/enable the dormancy mode?

Kind regards,
Guillaume

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH_v0 1/6] doc: Add DormantInterval property
  2011-12-08  9:25     ` Guillaume Zajac
@ 2011-12-08 11:00       ` Denis Kenzior
  0 siblings, 0 replies; 10+ messages in thread
From: Denis Kenzior @ 2011-12-08 11:00 UTC (permalink / raw)
  To: ofono

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

Hi Guillaume,

> Right, the user can't manage this value, however Dormant property is
> ReadOnly.
> So should we have a specific DBus API to disable/enable the dormancy mode?
> 

No, just turn it off in the modem.  If the network forces us into
Dormant mode, so be it.  The API is modeled correctly right now.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-12-08 11:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07 16:05 [PATCH_v0 0/6] Manage Dormant property for CDMA modems Guillaume Zajac
2011-12-07 16:05 ` [PATCH_v0 1/6] doc: Add DormantInterval property Guillaume Zajac
2011-12-07 12:34   ` Denis Kenzior
2011-12-08  9:25     ` Guillaume Zajac
2011-12-08 11:00       ` Denis Kenzior
2011-12-07 16:05 ` [PATCH_v0 2/6] cdma-connman: Add dormant option configuration and notification Guillaume Zajac
2011-12-07 16:05 ` [PATCH_v0 3/6] cdma-connman: Add DormantInterval porperty and dormant notification Guillaume Zajac
2011-12-07 16:05 ` [PATCH_v0 4/6] huaweicdma: Specify vendor in creating cdma-connman atom Guillaume Zajac
2011-12-07 16:05 ` [PATCH_v0 5/6] cdmamodem: Add dormant notification and dormant interval setting Guillaume Zajac
2011-12-07 16:05 ` [PATCH_v0 6/6] test: Add script to set dormant interval 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.