All of lore.kernel.org
 help / color / mirror / Atom feed
* [online-impl-v2 PATCH 00/10] implement Online property
@ 2010-09-06 18:46 Pekka.Pessi
  2010-09-06 18:46 ` [online-impl-v2 PATCH 01/10] atgen: " Pekka.Pessi
  2010-09-08 23:36 ` [online-impl-v2 PATCH 00/10] " Marcel Holtmann
  0 siblings, 2 replies; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

Hi all,

Here are 2nd stab at implementing Online property with various modem
drivers.

Some more obvious errors (in using g_at_chat_send()) have been
fixed. Huawei has been updated after the comment from Marcel.

I've dropped support for the Nokia usb stick, according to the spec it
does not implement but AT+CFUN=0 and AT+CFUN=1. (Not that I have tested
what AT+CFUN=0 does.)

Again, I have not been able to test with most modems. All of them might
not make sense (if the modem does not support AT+CFUN=4, for
instance). There might be some common caveats.  E.g., if the modem does
to wake up with AT+CFUN=4, it might work with an initial cfun command
like "AT+CFUN=1 ; +CFUN=4". At least Calypso requires such an
initialization command.

I'd appreciate if the people with access to various hardware could test
them with the patches here (using test/enable-modem, test/online-modem
and test/offline-modem, or, e.g., the connman with "ofono-refactor-v2"
and "service-leak" patches).

--Pekka


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

* [online-impl-v2 PATCH 01/10] atgen: implement Online property
  2010-09-06 18:46 [online-impl-v2 PATCH 00/10] implement Online property Pekka.Pessi
@ 2010-09-06 18:46 ` Pekka.Pessi
  2010-09-06 18:46   ` [online-impl-v2 PATCH 02/10] calypso: " Pekka.Pessi
  2010-09-08 23:30   ` [online-impl-v2 PATCH 01/10] atgen: " Marcel Holtmann
  2010-09-08 23:36 ` [online-impl-v2 PATCH 00/10] " Marcel Holtmann
  1 sibling, 2 replies; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 plugins/atgen.c |   47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 46 insertions(+), 1 deletions(-)

diff --git a/plugins/atgen.c b/plugins/atgen.c
index a6eee60..1ce2467 100644
--- a/plugins/atgen.c
+++ b/plugins/atgen.c
@@ -49,6 +49,7 @@
 #include <ofono/ussd.h>
 #include <ofono/voicecall.h>
 
+#include <drivers/atmodem/atutil.h>
 #include <drivers/atmodem/sim-poll.h>
 
 #include <ofono/gprs.h>
@@ -154,11 +155,45 @@ static int atgen_disable(struct ofono_modem *modem)
 
 	ofono_modem_set_data(modem, NULL);
 
+	g_at_chat_send(chat, "AT+CFUN=4", NULL, NULL, NULL, NULL);
+
 	g_at_chat_unref(chat);
 
 	return 0;
 }
 
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void atgen_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	GAtChat *chat = ofono_modem_get_data(modem);
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
 static void atgen_pre_sim(struct ofono_modem *modem)
 {
 	GAtChat *chat = ofono_modem_get_data(modem);
@@ -177,6 +212,15 @@ static void atgen_pre_sim(struct ofono_modem *modem)
 static void atgen_post_sim(struct ofono_modem *modem)
 {
 	GAtChat *chat = ofono_modem_get_data(modem);
+
+	DBG("%p", modem);
+
+	ofono_phonebook_create(modem, 0, "atmodem", chat);
+}
+
+static void atgen_post_online(struct ofono_modem *modem)
+{
+	GAtChat *chat = ofono_modem_get_data(modem);
 	struct ofono_message_waiting *mw;
 	struct ofono_gprs *gprs;
 	struct ofono_gprs_context *gc;
@@ -191,7 +235,6 @@ static void atgen_post_sim(struct ofono_modem *modem)
 	ofono_call_barring_create(modem, 0, "atmodem", chat);
 	ofono_ssn_create(modem, 0, "atmodem", chat);
 	ofono_sms_create(modem, 0, "atmodem", chat);
-	ofono_phonebook_create(modem, 0, "atmodem", chat);
 	gprs = ofono_gprs_create(modem,0, "atmodem", chat);
 	gc = ofono_gprs_context_create(modem, 0, "atmodem", chat);
 	if (gprs && gc)
@@ -208,8 +251,10 @@ static struct ofono_modem_driver atgen_driver = {
 	.remove		= atgen_remove,
 	.enable		= atgen_enable,
 	.disable	= atgen_disable,
+	.set_online     = atgen_set_online,
 	.pre_sim	= atgen_pre_sim,
 	.post_sim	= atgen_post_sim,
+	.post_online	= atgen_post_online,
 };
 
 static int atgen_init(void)
-- 
1.7.0.4


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

* [online-impl-v2 PATCH 02/10] calypso: implement Online property
  2010-09-06 18:46 ` [online-impl-v2 PATCH 01/10] atgen: " Pekka.Pessi
@ 2010-09-06 18:46   ` Pekka.Pessi
  2010-09-06 18:46     ` [online-impl-v2 PATCH 03/10] g1: " Pekka.Pessi
  2010-09-08 23:30   ` [online-impl-v2 PATCH 01/10] atgen: " Marcel Holtmann
  1 sibling, 1 reply; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 plugins/calypso.c |   43 +++++++++++++++++++++++++++++++++++++++----
 1 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/plugins/calypso.c b/plugins/calypso.c
index a2d4ec8..0cecc76 100644
--- a/plugins/calypso.c
+++ b/plugins/calypso.c
@@ -56,6 +56,7 @@
 #include <ofono/voicecall.h>
 #include <ofono/stk.h>
 
+#include <drivers/atmodem/atutil.h>
 #include <drivers/atmodem/vendor.h>
 
 #define CALYPSO_POWER_PATH "/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on"
@@ -507,7 +508,7 @@ static void calypso_pre_sim(struct ofono_modem *modem)
 	 * mode 4 -> 1 transitions work and have no side effects.
 	 *
 	 * So in order to switch to Offline mode at startup,
-	 * AT+CFUN=1;+CFUN=4 would be needed.
+	 * AT+CFUN=1;+CFUN=4 is be needed.
 	 *
 	 * Additionally AT+CFUN=1 response is not checked: on PIN-enabled
 	 * cards, it will in most situations return "+CME ERROR: SIM PIN
@@ -518,14 +519,47 @@ static void calypso_pre_sim(struct ofono_modem *modem)
 	if (data->have_sim && data->sim)
 		ofono_stk_create(modem, 0, "calypsomodem", data->dlcs[AUX_DLC]);
 
-	g_at_chat_send(data->dlcs[AUX_DLC], "AT+CFUN=1",
+	g_at_chat_send(data->dlcs[AUX_DLC], "AT+CFUN=1;+CFUN=4",
 			none_prefix, NULL, NULL, NULL);
 
 	if (data->have_sim && data->sim)
 		ofono_sim_inserted_notify(data->sim, TRUE);
 }
 
-static void calypso_post_sim(struct ofono_modem *modem)
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void calypso_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	struct calypso_data *data = ofono_modem_get_data(modem);
+	GAtChat *chat = data->dlcs[AUX_DLC];
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void calypso_post_online(struct ofono_modem *modem)
 {
 	struct calypso_data *data = ofono_modem_get_data(modem);
 	struct ofono_message_waiting *mw;
@@ -553,8 +587,9 @@ static struct ofono_modem_driver calypso_driver = {
 	.remove		= calypso_remove,
 	.enable		= calypso_enable,
 	.disable	= calypso_disable,
+	.set_online     = calypso_set_online,
 	.pre_sim	= calypso_pre_sim,
-	.post_sim	= calypso_post_sim,
+	.post_online	= calypso_post_online,
 };
 
 static int calypso_init(void)
-- 
1.7.0.4


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

* [online-impl-v2 PATCH 03/10] g1: implement Online property
  2010-09-06 18:46   ` [online-impl-v2 PATCH 02/10] calypso: " Pekka.Pessi
@ 2010-09-06 18:46     ` Pekka.Pessi
  2010-09-06 18:46       ` [online-impl-v2 PATCH 04/10] hso: " Pekka.Pessi
  0 siblings, 1 reply; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 plugins/g1.c |   40 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/plugins/g1.c b/plugins/g1.c
index fa96eb1..c1ad30f 100644
--- a/plugins/g1.c
+++ b/plugins/g1.c
@@ -48,6 +48,7 @@
 #include <ofono/ussd.h>
 #include <ofono/voicecall.h>
 
+#include <drivers/atmodem/atutil.h>
 #include <drivers/atmodem/vendor.h>
 
 static void g1_debug(const char *str, void *data)
@@ -120,7 +121,7 @@ static int g1_enable(struct ofono_modem *modem)
 	g_at_chat_send(chat, "ATE0Q0V1", NULL, NULL, NULL, NULL);
 
 	/* power up modem */
-	g_at_chat_send(chat, "AT+CFUN=1", NULL, cfun_set_on_cb, modem, NULL);
+	g_at_chat_send(chat, "AT+CFUN=4", NULL, cfun_set_on_cb, modem, NULL);
 
 	return 0;
 }
@@ -168,7 +169,39 @@ static void g1_pre_sim(struct ofono_modem *modem)
 		ofono_sim_inserted_notify(sim, TRUE);
 }
 
-static void g1_post_sim(struct ofono_modem *modem)
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void g1_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	GAtChat *chat = ofono_modem_get_data(modem);
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void g1_post_online(struct ofono_modem *modem)
 {
 	GAtChat *chat = ofono_modem_get_data(modem);
 	struct ofono_message_waiting *mw;
@@ -196,8 +229,9 @@ static struct ofono_modem_driver g1_driver = {
 	.remove		= g1_remove,
 	.enable		= g1_enable,
 	.disable	= g1_disable,
+	.set_online     = g1_set_online,
 	.pre_sim	= g1_pre_sim,
-	.post_sim	= g1_post_sim,
+	.post_online	= g1_post_online,
 };
 
 static int g1_init(void)
-- 
1.7.0.4


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

* [online-impl-v2 PATCH 04/10] hso: implement Online property
  2010-09-06 18:46     ` [online-impl-v2 PATCH 03/10] g1: " Pekka.Pessi
@ 2010-09-06 18:46       ` Pekka.Pessi
  2010-09-06 18:46         ` [online-impl-v2 PATCH 05/10] huawei: " Pekka.Pessi
  2010-09-08 23:30         ` [online-impl-v2 PATCH 04/10] hso: " Marcel Holtmann
  0 siblings, 2 replies; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 plugins/hso.c |   41 ++++++++++++++++++++++++++++++++++++++---
 1 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/plugins/hso.c b/plugins/hso.c
index 8611e07..25ca157 100644
--- a/plugins/hso.c
+++ b/plugins/hso.c
@@ -45,6 +45,7 @@
 #include <ofono/radio-settings.h>
 #include <ofono/log.h>
 
+#include <drivers/atmodem/atutil.h>
 #include <drivers/atmodem/vendor.h>
 
 static const char *none_prefix[] = { NULL };
@@ -172,7 +173,7 @@ static int hso_enable(struct ofono_modem *modem)
 	g_at_chat_send(data->control, "ATE0", none_prefix, NULL, NULL, NULL);
 	g_at_chat_send(data->app, "ATE0", none_prefix, NULL, NULL, NULL);
 
-	g_at_chat_send(data->control, "AT+CFUN=1", none_prefix,
+	g_at_chat_send(data->control, "AT+CFUN=4", none_prefix,
 					cfun_enable, modem, NULL);
 
 	return -EINPROGRESS;
@@ -213,6 +214,39 @@ static int hso_disable(struct ofono_modem *modem)
 	return -EINPROGRESS;
 }
 
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void hso_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	struct hso_data *data = ofono_modem_get_data(modem);
+	GAtChat *chat = data->control;
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
 static void hso_pre_sim(struct ofono_modem *modem)
 {
 	struct hso_data *data = ofono_modem_get_data(modem);
@@ -228,7 +262,7 @@ static void hso_pre_sim(struct ofono_modem *modem)
 		ofono_sim_inserted_notify(sim, TRUE);
 }
 
-static void hso_post_sim(struct ofono_modem *modem)
+static void hso_post_online(struct ofono_modem *modem)
 {
 	struct hso_data *data = ofono_modem_get_data(modem);
 	struct ofono_gprs *gprs;
@@ -260,8 +294,9 @@ static struct ofono_modem_driver hso_driver = {
 	.remove		= hso_remove,
 	.enable		= hso_enable,
 	.disable	= hso_disable,
+	.set_online     = hso_set_online,
 	.pre_sim	= hso_pre_sim,
-	.post_sim	= hso_post_sim,
+	.post_online	= hso_post_online,
 };
 
 static int hso_init(void)
-- 
1.7.0.4


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

* [online-impl-v2 PATCH 05/10] huawei: implement Online property
  2010-09-06 18:46       ` [online-impl-v2 PATCH 04/10] hso: " Pekka.Pessi
@ 2010-09-06 18:46         ` Pekka.Pessi
  2010-09-06 18:46           ` [online-impl-v2 PATCH 06/10] mbm: " Pekka.Pessi
  2010-09-08 23:30           ` [online-impl-v2 PATCH 05/10] huawei: " Marcel Holtmann
  2010-09-08 23:30         ` [online-impl-v2 PATCH 04/10] hso: " Marcel Holtmann
  1 sibling, 2 replies; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

Huawei uses +CFUN=5 for offline
---
 plugins/huawei.c |   53 ++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 46 insertions(+), 7 deletions(-)

diff --git a/plugins/huawei.c b/plugins/huawei.c
index 88dff66..ccb5290 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -520,7 +520,7 @@ static int huawei_enable(struct ofono_modem *modem)
 
 	g_at_chat_send(data->pcui, "ATE0", none_prefix, NULL, NULL, NULL);
 
-	g_at_chat_send(data->pcui, "AT+CFUN=1", none_prefix,
+	g_at_chat_send(data->pcui, "AT+CFUN=1;+CFUN=5", none_prefix,
 					cfun_enable, modem, NULL);
 
 	return -EINPROGRESS;
@@ -564,6 +564,39 @@ static int huawei_disable(struct ofono_modem *modem)
 	return -EINPROGRESS;
 }
 
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void huawei_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	struct huawei_data *data = ofono_modem_get_data(modem);
+	GAtChat *chat = data->pcui;
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=5";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
 static void huawei_pre_sim(struct ofono_modem *modem)
 {
 	struct huawei_data *data = ofono_modem_get_data(modem);
@@ -582,15 +615,20 @@ static void huawei_pre_sim(struct ofono_modem *modem)
 static void huawei_post_sim(struct ofono_modem *modem)
 {
 	struct huawei_data *data = ofono_modem_get_data(modem);
-	struct ofono_netreg *netreg;
-	struct ofono_message_waiting *mw;
 
 	DBG("%p", modem);
 
-	if (data->sim_state == HUAWEI_SIM_STATE_INVALID_PS_AND_CS) {
-		ofono_phonebook_create(modem, 0, "atmodem", data->pcui);
+	ofono_phonebook_create(modem, 0, "atmodem", data->pcui);
+}
+
+static void huawei_post_online(struct ofono_modem *modem)
+{
+	struct huawei_data *data = ofono_modem_get_data(modem);
+	struct ofono_netreg *netreg;
+	struct ofono_message_waiting *mw;
+
+	if (data->sim_state == HUAWEI_SIM_STATE_INVALID_PS_AND_CS)
 		return;
-	}
 
 	netreg = ofono_netreg_create(modem, OFONO_VENDOR_HUAWEI, "atmodem",
 								data->pcui);
@@ -600,7 +638,6 @@ static void huawei_post_sim(struct ofono_modem *modem)
 						"atmodem", data->pcui);
 	ofono_ussd_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
 						"atmodem", data->pcui);
-	ofono_phonebook_create(modem, 0, "atmodem", data->pcui);
 
 	if (data->sim_state == HUAWEI_SIM_STATE_VALID ||
 			data->sim_state == HUAWEI_SIM_STATE_INVALID_CS) {
@@ -632,8 +669,10 @@ static struct ofono_modem_driver huawei_driver = {
 	.remove		= huawei_remove,
 	.enable		= huawei_enable,
 	.disable	= huawei_disable,
+	.set_online     = huawei_set_online,
 	.pre_sim	= huawei_pre_sim,
 	.post_sim	= huawei_post_sim,
+	.post_online    = huawei_post_online,
 };
 
 static int huawei_init(void)
-- 
1.7.0.4


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

* [online-impl-v2 PATCH 06/10] mbm: implement Online property
  2010-09-06 18:46         ` [online-impl-v2 PATCH 05/10] huawei: " Pekka.Pessi
@ 2010-09-06 18:46           ` Pekka.Pessi
  2010-09-06 18:46             ` [online-impl-v2 PATCH 07/10] novatel: " Pekka.Pessi
  2010-09-08 23:30             ` [online-impl-v2 PATCH 06/10] mbm: " Marcel Holtmann
  2010-09-08 23:30           ` [online-impl-v2 PATCH 05/10] huawei: " Marcel Holtmann
  1 sibling, 2 replies; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 plugins/mbm.c |   51 +++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/plugins/mbm.c b/plugins/mbm.c
index 5bc4575..7ea9f48 100644
--- a/plugins/mbm.c
+++ b/plugins/mbm.c
@@ -46,6 +46,7 @@
 #include <ofono/gprs-context.h>
 #include <ofono/log.h>
 
+#include <drivers/atmodem/atutil.h>
 #include <drivers/atmodem/vendor.h>
 
 static const char *cfun_prefix[] = { "+CFUN:", NULL };
@@ -221,8 +222,8 @@ static void cfun_query(gboolean ok, GAtResult *result, gpointer user_data)
 
 	g_at_result_iter_next_number(&iter, &status);
 
-	if (status == 4) {
-		g_at_chat_send(data->modem_port, "AT+CFUN=1", none_prefix,
+	if (status != 4) {
+		g_at_chat_send(data->modem_port, "AT+CFUN=4", none_prefix,
 				cfun_enable, modem, NULL);
 		return;
 	}
@@ -417,6 +418,39 @@ static int mbm_disable(struct ofono_modem *modem)
 	return -EINPROGRESS;
 }
 
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void mbm_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	struct mbm_data *data = ofono_modem_get_data(modem);
+	GAtChat *chat = data->modem_port;
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
 static void mbm_pre_sim(struct ofono_modem *modem)
 {
 	struct mbm_data *data = ofono_modem_get_data(modem);
@@ -435,12 +469,19 @@ static void mbm_pre_sim(struct ofono_modem *modem)
 static void mbm_post_sim(struct ofono_modem *modem)
 {
 	struct mbm_data *data = ofono_modem_get_data(modem);
-	struct ofono_gprs *gprs;
-	struct ofono_gprs_context *gc;
 
 	DBG("%p", modem);
 
 	ofono_stk_create(modem, 0, "mbmmodem", data->modem_port);
+}
+
+static void mbm_post_online(struct ofono_modem *modem)
+{
+	struct mbm_data *data = ofono_modem_get_data(modem);
+	struct ofono_gprs *gprs;
+	struct ofono_gprs_context *gc;
+
+	DBG("%p", modem);
 
 	ofono_netreg_create(modem, OFONO_VENDOR_MBM,
 					"atmodem", data->modem_port);
@@ -472,8 +513,10 @@ static struct ofono_modem_driver mbm_driver = {
 	.remove		= mbm_remove,
 	.enable		= mbm_enable,
 	.disable	= mbm_disable,
+	.set_online     = mbm_set_online,
 	.pre_sim	= mbm_pre_sim,
 	.post_sim	= mbm_post_sim,
+	.post_online    = mbm_post_online,
 };
 
 static int mbm_init(void)
-- 
1.7.0.4


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

* [online-impl-v2 PATCH 07/10] novatel: implement Online property
  2010-09-06 18:46           ` [online-impl-v2 PATCH 06/10] mbm: " Pekka.Pessi
@ 2010-09-06 18:46             ` Pekka.Pessi
  2010-09-06 18:46               ` [online-impl-v2 PATCH 08/10] palmpre: " Pekka.Pessi
  2010-09-08 23:30               ` [online-impl-v2 PATCH 07/10] novatel: " Marcel Holtmann
  2010-09-08 23:30             ` [online-impl-v2 PATCH 06/10] mbm: " Marcel Holtmann
  1 sibling, 2 replies; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 plugins/novatel.c |   40 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/plugins/novatel.c b/plugins/novatel.c
index 38a6c3b..51360ab 100644
--- a/plugins/novatel.c
+++ b/plugins/novatel.c
@@ -156,7 +156,7 @@ static void nwdmat_action(gboolean ok, GAtResult *result, gpointer user_data)
 							NULL, NULL, NULL);
 
 done:
-	g_at_chat_send(data->primary, "AT+CFUN=1", none_prefix,
+	g_at_chat_send(data->primary, "AT+CFUN=4", none_prefix,
 						cfun_enable, modem, NULL);
 }
 
@@ -288,6 +288,39 @@ static int novatel_disable(struct ofono_modem *modem)
 	return -EINPROGRESS;
 }
 
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void novatel_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	struct novatel_data *data = ofono_modem_get_data(modem);
+	GAtChat *chat = data->primary;
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd || !chat)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
 static void novatel_pre_sim(struct ofono_modem *modem)
 {
 	struct novatel_data *data = ofono_modem_get_data(modem);
@@ -309,7 +342,7 @@ static void novatel_pre_sim(struct ofono_modem *modem)
 		ofono_sim_inserted_notify(sim, TRUE);
 }
 
-static void novatel_post_sim(struct ofono_modem *modem)
+static void novatel_post_online(struct ofono_modem *modem)
 {
 	struct novatel_data *data = ofono_modem_get_data(modem);
 
@@ -351,8 +384,9 @@ static struct ofono_modem_driver novatel_driver = {
 	.remove		= novatel_remove,
 	.enable		= novatel_enable,
 	.disable	= novatel_disable,
+	.set_online     = novatel_set_online,
 	.pre_sim	= novatel_pre_sim,
-	.post_sim	= novatel_post_sim,
+	.post_online	= novatel_post_online,
 };
 
 static int novatel_init(void)
-- 
1.7.0.4


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

* [online-impl-v2 PATCH 08/10] palmpre: implement Online property
  2010-09-06 18:46             ` [online-impl-v2 PATCH 07/10] novatel: " Pekka.Pessi
@ 2010-09-06 18:46               ` Pekka.Pessi
  2010-09-06 18:46                 ` [online-impl-v2 PATCH 09/10] ste: " Pekka.Pessi
  2010-09-08 23:30               ` [online-impl-v2 PATCH 07/10] novatel: " Marcel Holtmann
  1 sibling, 1 reply; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 plugins/palmpre.c |   49 ++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/plugins/palmpre.c b/plugins/palmpre.c
index 7d2aeb4..081b151 100644
--- a/plugins/palmpre.c
+++ b/plugins/palmpre.c
@@ -44,6 +44,7 @@
 #include <ofono/gprs-context.h>
 #include <ofono/sms.h>
 
+#include <drivers/atmodem/atutil.h>
 #include <drivers/atmodem/vendor.h>
 
 struct palmpre_data {
@@ -132,7 +133,7 @@ static int palmpre_enable(struct ofono_modem *modem)
 	g_at_chat_send(data->chat, "ATZ E0 +CMEE=1", NULL, NULL, NULL, NULL);
 
 	/* Power modem up */
-	g_at_chat_send(data->chat, "AT+CFUN=1", NULL,
+	g_at_chat_send(data->chat, "AT+CFUN=4", NULL,
 			cfun_set_on_cb, modem, NULL);
 
 	return 0;
@@ -167,6 +168,39 @@ static int palmpre_disable(struct ofono_modem *modem)
 	return -EINPROGRESS;
 }
 
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void palmpre_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	struct palmpre_data *data = ofono_modem_get_data(modem);
+	GAtChat *chat = data->chat;
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
 static void palmpre_pre_sim(struct ofono_modem *modem)
 {
 	struct palmpre_data *data = ofono_modem_get_data(modem);
@@ -186,6 +220,14 @@ static void palmpre_pre_sim(struct ofono_modem *modem)
 static void palmpre_post_sim(struct ofono_modem *modem)
 {
 	struct palmpre_data *data = ofono_modem_get_data(modem);
+	DBG("%p", modem);
+
+	ofono_phonebook_create(modem, 0, "atmodem", data->chat);
+}
+
+static void palmpre_post_online(struct ofono_modem *modem)
+{
+	struct palmpre_data *data = ofono_modem_get_data(modem);
 	struct ofono_message_waiting *mw;
 	struct ofono_gprs *gprs;
 	struct ofono_gprs_context *gc;
@@ -195,7 +237,6 @@ static void palmpre_post_sim(struct ofono_modem *modem)
 	ofono_netreg_create(modem, 0, "atmodem", data->chat);
 	ofono_sms_create(modem, OFONO_VENDOR_QUALCOMM_MSM, "atmodem",
 				data->chat);
-	ofono_phonebook_create(modem, 0, "atmodem", data->chat);
 
 	gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
 	gc = ofono_gprs_context_create(modem, 0, "atmodem", data->chat);
@@ -214,8 +255,10 @@ static struct ofono_modem_driver palmpre_driver = {
 	.remove		= palmpre_remove,
 	.enable		= palmpre_enable,
 	.disable	= palmpre_disable,
+	.set_online     = palmpre_set_online,
 	.pre_sim	= palmpre_pre_sim,
-	.post_sim	= palmpre_post_sim
+	.post_sim	= palmpre_post_sim,
+	.post_online	= palmpre_post_online,
 };
 
 static int palmpre_init(void)
-- 
1.7.0.4


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

* [online-impl-v2 PATCH 09/10] ste: implement Online property
  2010-09-06 18:46               ` [online-impl-v2 PATCH 08/10] palmpre: " Pekka.Pessi
@ 2010-09-06 18:46                 ` Pekka.Pessi
  2010-09-06 18:46                   ` [online-impl-v2 PATCH 10/10] zte: " Pekka.Pessi
  2010-09-08 23:30                   ` [online-impl-v2 PATCH 09/10] ste: " Marcel Holtmann
  0 siblings, 2 replies; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 plugins/ste.c |   51 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/plugins/ste.c b/plugins/ste.c
index 63c36ce..aab0704 100644
--- a/plugins/ste.c
+++ b/plugins/ste.c
@@ -57,6 +57,8 @@
 #include <ofono/gprs-context.h>
 #include <ofono/radio-settings.h>
 #include <ofono/stk.h>
+
+#include <drivers/atmodem/atutil.h>
 #include <drivers/atmodem/vendor.h>
 
 #include <drivers/stemodem/caif_socket.h>
@@ -237,7 +239,7 @@ static int ste_enable(struct ofono_modem *modem)
 
 	g_at_chat_send(data->chat, "AT&F E0 V1 X4 &C1 +CMEE=1",
 			NULL, NULL, NULL, NULL);
-	g_at_chat_send(data->chat, "AT+CFUN=1", NULL, cfun_enable, modem, NULL);
+	g_at_chat_send(data->chat, "AT+CFUN=4", NULL, cfun_enable, modem, NULL);
 
 	return -EINPROGRESS;
 }
@@ -273,6 +275,39 @@ static int ste_disable(struct ofono_modem *modem)
 	return -EINPROGRESS;
 }
 
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void ste_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	struct ste_data *data = ofono_modem_get_data(modem);
+	GAtChat *chat = data->chat;
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
 static void ste_pre_sim(struct ofono_modem *modem)
 {
 	struct ste_data *data = ofono_modem_get_data(modem);
@@ -291,13 +326,22 @@ static void ste_pre_sim(struct ofono_modem *modem)
 static void ste_post_sim(struct ofono_modem *modem)
 {
 	struct ste_data *data = ofono_modem_get_data(modem);
+
+	DBG("%p", modem);
+
+	ofono_stk_create(modem, 0, "mbmmodem", data->chat);
+	ofono_phonebook_create(modem, 0, "atmodem", data->chat);
+}
+
+static void ste_post_online(struct ofono_modem *modem)
+{
+	struct ste_data *data = ofono_modem_get_data(modem);
 	struct ofono_message_waiting *mw;
 	struct ofono_gprs *gprs;
 	struct ofono_gprs_context *gc;
 
 	DBG("%p", modem);
 
-	ofono_stk_create(modem, 0, "mbmmodem", data->chat);
 	ofono_radio_settings_create(modem, 0, "stemodem", data->chat);
 	ofono_ussd_create(modem, 0, "atmodem", data->chat);
 	ofono_call_forwarding_create(modem, 0, "atmodem", data->chat);
@@ -307,7 +351,6 @@ static void ste_post_sim(struct ofono_modem *modem)
 	ofono_call_barring_create(modem, 0, "atmodem", data->chat);
 	ofono_ssn_create(modem, 0, "atmodem", data->chat);
 	ofono_sms_create(modem, 0, "atmodem", data->chat);
-	ofono_phonebook_create(modem, 0, "atmodem", data->chat);
 	ofono_call_volume_create(modem, 0, "atmodem", data->chat);
 
 	gprs = ofono_gprs_create(modem, OFONO_VENDOR_MBM,
@@ -329,8 +372,10 @@ static struct ofono_modem_driver ste_driver = {
 	.remove		= ste_remove,
 	.enable		= ste_enable,
 	.disable	= ste_disable,
+	.set_online     = ste_set_online,
 	.pre_sim	= ste_pre_sim,
 	.post_sim	= ste_post_sim,
+	.post_online    = ste_post_online,
 };
 
 static int ste_init(void)
-- 
1.7.0.4


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

* [online-impl-v2 PATCH 10/10] zte: implement Online property
  2010-09-06 18:46                 ` [online-impl-v2 PATCH 09/10] ste: " Pekka.Pessi
@ 2010-09-06 18:46                   ` Pekka.Pessi
  2010-09-08 23:30                     ` Marcel Holtmann
  2010-09-08 23:30                   ` [online-impl-v2 PATCH 09/10] ste: " Marcel Holtmann
  1 sibling, 1 reply; 23+ messages in thread
From: Pekka.Pessi @ 2010-09-06 18:46 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 plugins/zte.c |   49 ++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/plugins/zte.c b/plugins/zte.c
index 7a8c9c7..c82b2b5 100644
--- a/plugins/zte.c
+++ b/plugins/zte.c
@@ -45,6 +45,7 @@
 #include <ofono/phonebook.h>
 #include <ofono/log.h>
 
+#include <drivers/atmodem/atutil.h>
 #include <drivers/atmodem/vendor.h>
 
 static const char *none_prefix[] = { NULL };
@@ -182,7 +183,7 @@ static int zte_enable(struct ofono_modem *modem)
 	g_at_chat_send(data->aux, "ATE0 +CMEE=1", none_prefix,
 						NULL, NULL, NULL);
 
-	g_at_chat_send(data->aux, "AT+CFUN=1", none_prefix,
+	g_at_chat_send(data->aux, "AT+CFUN=4", none_prefix,
 					cfun_enable, modem, NULL);
 
 	return -EINPROGRESS;
@@ -226,6 +227,39 @@ static int zte_disable(struct ofono_modem *modem)
 	return -EINPROGRESS;
 }
 
+static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+	struct cb_data *cbd = user_data;
+	ofono_modem_online_cb_t cb = cbd->cb;
+
+	if (ok)
+		CALLBACK_WITH_SUCCESS(cb, cbd->data);
+	else
+		CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
+static void zte_set_online(struct ofono_modem *modem, ofono_bool_t online,
+				ofono_modem_online_cb_t cb, void *user_data)
+{
+	struct zte_data *data = ofono_modem_get_data(modem);
+	GAtChat *chat = data->aux;
+	struct cb_data *cbd = cb_data_new(cb, user_data);
+	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=4";
+
+	DBG("modem %p %s", modem, online ? "online" : "offline");
+
+	if (!cbd || !chat)
+		goto error;
+
+	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
+		return;
+
+error:
+	g_free(cbd);
+
+	CALLBACK_WITH_FAILURE(cb, cbd->data);
+}
+
 static void zte_pre_sim(struct ofono_modem *modem)
 {
 	struct zte_data *data = ofono_modem_get_data(modem);
@@ -247,6 +281,15 @@ static void zte_post_sim(struct ofono_modem *modem)
 
 	DBG("%p", modem);
 
+	ofono_phonebook_create(modem, 0, "atmodem", data->aux);
+}
+
+static void zte_post_online(struct ofono_modem *modem)
+{
+	struct zte_data *data = ofono_modem_get_data(modem);
+
+	DBG("%p", modem);
+
 	ofono_netreg_create(modem, OFONO_VENDOR_ZTE, "atmodem", data->aux);
 
 	ofono_sms_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
@@ -255,8 +298,6 @@ static void zte_post_sim(struct ofono_modem *modem)
 					"atmodem", data->aux);
 	ofono_ussd_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
 					"atmodem", data->aux);
-	ofono_phonebook_create(modem, 0, "atmodem", data->aux);
-
 	data->gprs = ofono_gprs_create(modem, 0, "atmodem", data->aux);
 
 	data->gc = ofono_gprs_context_create(modem, 0, "atmodem", data->modem);
@@ -271,8 +312,10 @@ static struct ofono_modem_driver zte_driver = {
 	.remove		= zte_remove,
 	.enable		= zte_enable,
 	.disable	= zte_disable,
+	.set_online     = zte_set_online,
 	.pre_sim	= zte_pre_sim,
 	.post_sim	= zte_post_sim,
+	.post_online    = zte_post_online,
 };
 
 static int zte_init(void)
-- 
1.7.0.4


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

* Re: [online-impl-v2 PATCH 01/10] atgen: implement Online property
  2010-09-06 18:46 ` [online-impl-v2 PATCH 01/10] atgen: " Pekka.Pessi
  2010-09-06 18:46   ` [online-impl-v2 PATCH 02/10] calypso: " Pekka.Pessi
@ 2010-09-08 23:30   ` Marcel Holtmann
  1 sibling, 0 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-08 23:30 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

>  plugins/atgen.c |   47 ++++++++++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 46 insertions(+), 1 deletions(-)

patch has been applied.

Regards

Marcel



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

* Re: [online-impl-v2 PATCH 05/10] huawei: implement Online property
  2010-09-06 18:46         ` [online-impl-v2 PATCH 05/10] huawei: " Pekka.Pessi
  2010-09-06 18:46           ` [online-impl-v2 PATCH 06/10] mbm: " Pekka.Pessi
@ 2010-09-08 23:30           ` Marcel Holtmann
  1 sibling, 0 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-08 23:30 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

> Huawei uses +CFUN=5 for offline
> ---
>  plugins/huawei.c |   53 ++++++++++++++++++++++++++++++++++++++++++++++-------
>  1 files changed, 46 insertions(+), 7 deletions(-)

patch has been applied.

Regards

Marcel



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

* Re: [online-impl-v2 PATCH 04/10] hso: implement Online property
  2010-09-06 18:46       ` [online-impl-v2 PATCH 04/10] hso: " Pekka.Pessi
  2010-09-06 18:46         ` [online-impl-v2 PATCH 05/10] huawei: " Pekka.Pessi
@ 2010-09-08 23:30         ` Marcel Holtmann
  1 sibling, 0 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-08 23:30 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

> ---
>  plugins/hso.c |   41 ++++++++++++++++++++++++++++++++++++++---
>  1 files changed, 38 insertions(+), 3 deletions(-)

patch has been applied.

Regards

Marcel



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

* Re: [online-impl-v2 PATCH 07/10] novatel: implement Online property
  2010-09-06 18:46             ` [online-impl-v2 PATCH 07/10] novatel: " Pekka.Pessi
  2010-09-06 18:46               ` [online-impl-v2 PATCH 08/10] palmpre: " Pekka.Pessi
@ 2010-09-08 23:30               ` Marcel Holtmann
  1 sibling, 0 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-08 23:30 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

> ---
>  plugins/novatel.c |   40 +++++++++++++++++++++++++++++++++++++---
>  1 files changed, 37 insertions(+), 3 deletions(-)

patch has been applied.

Regards

Marcel



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

* Re: [online-impl-v2 PATCH 06/10] mbm: implement Online property
  2010-09-06 18:46           ` [online-impl-v2 PATCH 06/10] mbm: " Pekka.Pessi
  2010-09-06 18:46             ` [online-impl-v2 PATCH 07/10] novatel: " Pekka.Pessi
@ 2010-09-08 23:30             ` Marcel Holtmann
  1 sibling, 0 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-08 23:30 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

> ---
>  plugins/mbm.c |   51 +++++++++++++++++++++++++++++++++++++++++++++++----
>  1 files changed, 47 insertions(+), 4 deletions(-)

patch has been applied.

Regards

Marcel



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

* Re: [online-impl-v2 PATCH 09/10] ste: implement Online property
  2010-09-06 18:46                 ` [online-impl-v2 PATCH 09/10] ste: " Pekka.Pessi
  2010-09-06 18:46                   ` [online-impl-v2 PATCH 10/10] zte: " Pekka.Pessi
@ 2010-09-08 23:30                   ` Marcel Holtmann
  1 sibling, 0 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-08 23:30 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

> ---
>  plugins/ste.c |   51 ++++++++++++++++++++++++++++++++++++++++++++++++---
>  1 files changed, 48 insertions(+), 3 deletions(-)

patch has been applied.

Regards

Marcel



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

* Re: [online-impl-v2 PATCH 10/10] zte: implement Online property
  2010-09-06 18:46                   ` [online-impl-v2 PATCH 10/10] zte: " Pekka.Pessi
@ 2010-09-08 23:30                     ` Marcel Holtmann
  0 siblings, 0 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-08 23:30 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

> ---
>  plugins/zte.c |   49 ++++++++++++++++++++++++++++++++++++++++++++++---
>  1 files changed, 46 insertions(+), 3 deletions(-)

patch has been applied.

Regards

Marcel



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

* Re: [online-impl-v2 PATCH 00/10] implement Online property
  2010-09-06 18:46 [online-impl-v2 PATCH 00/10] implement Online property Pekka.Pessi
  2010-09-06 18:46 ` [online-impl-v2 PATCH 01/10] atgen: " Pekka.Pessi
@ 2010-09-08 23:36 ` Marcel Holtmann
  2010-09-14 18:49   ` Pekka Pessi
  2010-09-14 20:06   ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
  1 sibling, 2 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-08 23:36 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

> Here are 2nd stab at implementing Online property with various modem
> drivers.

so I pushed most of them, but not all of them.

STE version needs testing by the STE guys, but I did run into some SIM
not ready issues with MBM when switching online/offline a few times. So
that needs to be looked into.

I did leave Palm Pre and G1 patches out. Andrew is the best candidate
for testing these. I have no idea on how they behave.

> Some more obvious errors (in using g_at_chat_send()) have been
> fixed. Huawei has been updated after the comment from Marcel.

The Huawei has more and more issues with SIM not ready now. This needs
fixing anyway. I pushed the patch anymore to make these symptoms more
clear to everybody.

> I've dropped support for the Nokia usb stick, according to the spec it
> does not implement but AT+CFUN=0 and AT+CFUN=1. (Not that I have tested
> what AT+CFUN=0 does.)

I have that stuck, but that beast is broken like crazy. The firmware has
even a bug with AT+COPS :(

> Again, I have not been able to test with most modems. All of them might
> not make sense (if the modem does not support AT+CFUN=4, for
> instance). There might be some common caveats.  E.g., if the modem does
> to wake up with AT+CFUN=4, it might work with an initial cfun command
> like "AT+CFUN=1 ; +CFUN=4". At least Calypso requires such an
> initialization command.
> 
> I'd appreciate if the people with access to various hardware could test
> them with the patches here (using test/enable-modem, test/online-modem
> and test/offline-modem, or, e.g., the connman with "ofono-refactor-v2"
> and "service-leak" patches).

I have done basic testing and so far so good. Huawei and MBM needs
further attention for sure. I am more than shocked that I actually do
have all this crap hardware on my desk :(

Regards

Marcel



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

* Re: [online-impl-v2 PATCH 00/10] implement Online property
  2010-09-08 23:36 ` [online-impl-v2 PATCH 00/10] " Marcel Holtmann
@ 2010-09-14 18:49   ` Pekka Pessi
  2010-09-14 21:30     ` Marcel Holtmann
  2010-09-14 20:06   ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
  1 sibling, 1 reply; 23+ messages in thread
From: Pekka Pessi @ 2010-09-14 18:49 UTC (permalink / raw)
  To: ofono

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

Hi,

2010/9/9 Marcel Holtmann <marcel@holtmann.org>:
>> Here are 2nd stab at implementing Online property with various modem
>> drivers.
>
> so I pushed most of them, but not all of them.

Ok. Cool.

> STE version needs testing by the STE guys, but I did run into some SIM
> not ready issues with MBM when switching online/offline a few times. So
> that needs to be looked into.

Please have a peek in your AT log and see if there are some spurious
+GCAP: lines? My Dell 5530 branded MBM apparently sends internal
AT+GCAP command. Command and its results gets echoed to the serial
port which obviously confuses the AT parser. Perhaps most MBMs would
benefit from registering dummy "+GCAP:".

> The Huawei has more and more issues with SIM not ready now. This needs
> fixing anyway. I pushed the patch anymore to make these symptoms more
> clear to everybody.

I'll try to remember to fish out my Huawei from the junk box and see
what it has to offer now. ;)

-- 
Pekka.Pessi mail at nokia.com

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

* Re: [online-impl-v2 PATCH 00/10] implement Online property
  2010-09-08 23:36 ` [online-impl-v2 PATCH 00/10] " Marcel Holtmann
  2010-09-14 18:49   ` Pekka Pessi
@ 2010-09-14 20:06   ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
  2010-09-14 21:28     ` Marcel Holtmann
  1 sibling, 1 reply; 23+ messages in thread
From: Sjur =?unknown-8bit?q?Br=C3=A6ndeland?= @ 2010-09-14 20:06 UTC (permalink / raw)
  To: ofono

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

[Marcel]
> STE version needs testing by the STE guys, but I did run into some SIM
> not ready issues with MBM when switching online/offline a few times. So
> that needs to be looked into.

OK, I'll put in on our list.
Perhaps you could send me thelogs if you still have them around?

Regards
Sjur

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

* Re: [online-impl-v2 PATCH 00/10] implement Online property
  2010-09-14 20:06   ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
@ 2010-09-14 21:28     ` Marcel Holtmann
  0 siblings, 0 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-14 21:28 UTC (permalink / raw)
  To: ofono

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

Hi Sjur,

> > STE version needs testing by the STE guys, but I did run into some SIM
> > not ready issues with MBM when switching online/offline a few times. So
> > that needs to be looked into.
> 
> OK, I'll put in on our list.
> Perhaps you could send me thelogs if you still have them around?

don't have them with me. But I just did a lot off online-modem,
offline-modem, disable-modem, enable-modem executions in random order to
see how it behaves. MBM with older F35xx models had some issues. The STE
I haven't tested, but it might be similar. Maybe it is just fine
actually.

Regards

Marcel



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

* Re: [online-impl-v2 PATCH 00/10] implement Online property
  2010-09-14 18:49   ` Pekka Pessi
@ 2010-09-14 21:30     ` Marcel Holtmann
  0 siblings, 0 replies; 23+ messages in thread
From: Marcel Holtmann @ 2010-09-14 21:30 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

> > STE version needs testing by the STE guys, but I did run into some SIM
> > not ready issues with MBM when switching online/offline a few times. So
> > that needs to be looked into.
> 
> Please have a peek in your AT log and see if there are some spurious
> +GCAP: lines? My Dell 5530 branded MBM apparently sends internal
> AT+GCAP command. Command and its results gets echoed to the serial
> port which obviously confuses the AT parser. Perhaps most MBMs would
> benefit from registering dummy "+GCAP:".

that is clearly not with mine. I have the MBM original and the Lenovo
branded ones which are not branded at all actually. So these behave
properly and no +GCAP in between.

> > The Huawei has more and more issues with SIM not ready now. This needs
> > fixing anyway. I pushed the patch anymore to make these symptoms more
> > clear to everybody.
> 
> I'll try to remember to fish out my Huawei from the junk box and see
> what it has to offer now. ;)

I have like 5 different Huawei models now. I just didn't have the time
to dig into this to get it fixed. Basically the online mode support show
the same symptoms than plugging in the modem while ofonod is already
running. So the SIM ready support needs a bit of re-work I assume.

Regards

Marcel



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

end of thread, other threads:[~2010-09-14 21:30 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-06 18:46 [online-impl-v2 PATCH 00/10] implement Online property Pekka.Pessi
2010-09-06 18:46 ` [online-impl-v2 PATCH 01/10] atgen: " Pekka.Pessi
2010-09-06 18:46   ` [online-impl-v2 PATCH 02/10] calypso: " Pekka.Pessi
2010-09-06 18:46     ` [online-impl-v2 PATCH 03/10] g1: " Pekka.Pessi
2010-09-06 18:46       ` [online-impl-v2 PATCH 04/10] hso: " Pekka.Pessi
2010-09-06 18:46         ` [online-impl-v2 PATCH 05/10] huawei: " Pekka.Pessi
2010-09-06 18:46           ` [online-impl-v2 PATCH 06/10] mbm: " Pekka.Pessi
2010-09-06 18:46             ` [online-impl-v2 PATCH 07/10] novatel: " Pekka.Pessi
2010-09-06 18:46               ` [online-impl-v2 PATCH 08/10] palmpre: " Pekka.Pessi
2010-09-06 18:46                 ` [online-impl-v2 PATCH 09/10] ste: " Pekka.Pessi
2010-09-06 18:46                   ` [online-impl-v2 PATCH 10/10] zte: " Pekka.Pessi
2010-09-08 23:30                     ` Marcel Holtmann
2010-09-08 23:30                   ` [online-impl-v2 PATCH 09/10] ste: " Marcel Holtmann
2010-09-08 23:30               ` [online-impl-v2 PATCH 07/10] novatel: " Marcel Holtmann
2010-09-08 23:30             ` [online-impl-v2 PATCH 06/10] mbm: " Marcel Holtmann
2010-09-08 23:30           ` [online-impl-v2 PATCH 05/10] huawei: " Marcel Holtmann
2010-09-08 23:30         ` [online-impl-v2 PATCH 04/10] hso: " Marcel Holtmann
2010-09-08 23:30   ` [online-impl-v2 PATCH 01/10] atgen: " Marcel Holtmann
2010-09-08 23:36 ` [online-impl-v2 PATCH 00/10] " Marcel Holtmann
2010-09-14 18:49   ` Pekka Pessi
2010-09-14 21:30     ` Marcel Holtmann
2010-09-14 20:06   ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-09-14 21:28     ` Marcel Holtmann

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.