RE: SEGV during offline with IFX modem

2011-04-05 Thread Li, Zhigang
Hi Shane,
With the attached log, I think it's IFX firmware issue. Could you try the new 
FW 11-05 or later?

We tried the 0325 image with ofono-0.41.2.2 version, no this issue.

B,R
Zhigang

 
-Original Message-
From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of 
Shane Bryan
Sent: Wednesday, April 06, 2011 3:59 AM
To: ofono@ofono.org
Subject: Re: SEGV during offline with IFX modem

On Tue, 5 Apr 2011 12:50:23 -0700
Shane Bryan  wrote:

> I'm running into a crash (SIGSEGV) when using offline-modem script to 
> set the modem into offline mode.  Is this known behavior?  If so, is 
> there a bugzilla entry someplace for it?
> 
> Backtrace is attached.  Version is 0.41 from MeeGo Trunk RPM package 
> [1]
> 
> I have a core with debug symbols available also, if that would be 
> helpful.
> 
> Shane...
> [1]http://repo.meego.com/MeeGo/builds/trunk/1.1.99.0.20110329.5/repos/
> oss/ia32/packages/i586/ofono-0.41-2.1.i586.rpm

Attaching full log (ofonod -n -d "*") as requested on IRC.

Shane...
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: SEGV during offline with IFX modem

2011-04-05 Thread Shane Bryan
On Tue, 5 Apr 2011 12:50:23 -0700
Shane Bryan  wrote:

> I'm running into a crash (SIGSEGV) when using offline-modem script to
> set the modem into offline mode.  Is this known behavior?  If so, is
> there a bugzilla entry someplace for it?
> 
> Backtrace is attached.  Version is 0.41 from MeeGo Trunk RPM package
> [1]
> 
> I have a core with debug symbols available also, if that would be
> helpful.
> 
> Shane...
> [1]http://repo.meego.com/MeeGo/builds/trunk/1.1.99.0.20110329.5/repos/oss/ia32/packages/i586/ofono-0.41-2.1.i586.rpm

Attaching full log (ofonod -n -d "*") as requested on IRC.

Shane...ofonod[1608]: oFono version 0.41
ofonod[1608]: src/plugin.c:__ofono_plugin_init() 
ofonod[1608]: stat file: 8016
ofonod[1608]: Unread: 0, Header: 2336, Tail: 2336, serialno: 29
ofonod[1608]: src/history.c:ofono_history_driver_register() driver: 0xb7766200 name: Voice Call History
ofonod[1608]: plugins/push-notification.c:push_notification_init() 
ofonod[1608]: plugins/smart-messaging.c:smart_messaging_init() 
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813ad40, name: hfp
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813ace0, name: nokiacdma
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813ac80, name: nokia
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813ac20, name: tc65
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813aba0, name: ste
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813ab40, name: ifx
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813aae0, name: palmpre
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813aa80, name: novatel
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813aa20, name: sierra
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813a9c0, name: huawei
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813a960, name: zte
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813a900, name: hso
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813a8a0, name: mbm
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813a840, name: calypso
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813a7e0, name: wavecom
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813a780, name: gobi
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813a720, name: g1
ofonod[1608]: src/cdma-voicecall.c:ofono_cdma_voicecall_driver_register() driver: 0x813a6c4, name: cdmamodem
ofonod[1608]: src/modem.c:ofono_devinfo_driver_register() driver: 0x813a6d8, name: cdmamodem
ofonod[1608]: src/modem.c:ofono_modem_driver_register() driver: 0x813a680, name: phonesim
ofonod[1608]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x813a66c, name: phonesim
ofonod[1608]: src/ctm.c:ofono_ctm_driver_register() driver: 0x813a658, name: phonesim
ofonod[1608]: plugins/phonesim.c:parse_config() filename /etc/ofono/phonesim.conf
ofonod[1608]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x813a580, name: stemodem
ofonod[1608]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x813a60c, name: stemodem
ofonod[1608]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x813a5e0, name: stemodem
ofonod[1608]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x813a440, name: ifxmodem
ofonod[1608]: src/audio-settings.c:ofono_audio_settings_driver_register() driver: 0x813a490, name: ifxmodem
ofonod[1608]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x813a4c0, name: ifxmodem
ofonod[1608]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x813a4ec, name: ifxmodem
ofonod[1608]: src/stk.c:ofono_stk_driver_register() driver: 0x813a510, name: ifxmodem
ofonod[1608]: src/ctm.c:ofono_ctm_driver_register() driver: 0x813a534, name: ifxmodem
ofonod[1608]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x813a3ac, name: hsomodem
ofonod[1608]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x813a3e0, name: hsomodem
ofonod[1608]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x813a354, name: mbmmodem
ofonod[1608]: src/stk.c:ofono_stk_driver_register() driver: 0x813a378, name: mbmmodem
ofonod[1608]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x813a280, name: hfpmodem
ofonod[1608]: src/network.c:ofono_netreg_driver_register() driver: 0x813a2e0, name: hfpmodem
ofonod[1608]: src/call-volume.c:ofono_call_volume_driver_register() driver: 0x813a314, name: hfpmodem
ofonod[1608]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x813a200, name: calypsomodem
ofonod[1608]: src/stk.c:ofono_stk_driver_register() driver: 0x813a248, name: calypsomodem
ofonod[1608]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x813a120, name: huaweimodem
ofonod[1608]: src/audio-settings.c:ofono_audio_settings_driver_register() driver: 0x813a168, 

SEGV during offline with IFX modem

2011-04-05 Thread Shane Bryan
I'm running into a crash (SIGSEGV) when using offline-modem script to
set the modem into offline mode.  Is this known behavior?  If so, is
there a bugzilla entry someplace for it?

Backtrace is attached.  Version is 0.41 from MeeGo Trunk RPM package [1]

I have a core with debug symbols available also, if that would be
helpful.

Shane...
[1]http://repo.meego.com/MeeGo/builds/trunk/1.1.99.0.20110329.5/repos/oss/ia32/packages/i586/ofono-0.41-2.1.i586.rpm

ofonod-offline-segv.bt
Description: Binary data
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 3/7] emulator: add RING for HFP AG

2011-04-05 Thread Frédéric Dalleau

Dear list,

On 04/05/2011 05:49 PM, Frédéric Dalleau wrote:

j'aime pas cette variable

+gboolean active_call;

d'autant plus que call est le premier indicateur de la liste, c'est 
donc une copie de ((struct indicator*)indicators->data)->value



Sorry for the spam,

Frederic Dalleau

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 3/7] emulator: add RING for HFP AG

2011-04-05 Thread Frédéric Dalleau

j'aime pas cette variable

+   gboolean active_call;

d'autant plus que call est le premier indicateur de la liste, c'est donc 
une copie de ((struct indicator*)indicators->data)->value


On 04/05/2011 05:40 PM, Frédéric Danis wrote:

---
  src/emulator.c |   45 +
  1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c
index 2707592..104693d 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -37,6 +37,8 @@
  #define DUN_DNS_SERVER_1   "10.10.10.10"
  #define DUN_DNS_SERVER_2   "10.10.10.11"

+#define RING_TIMEOUT 3
+
  struct ofono_emulator {
struct ofono_atom *atom;
enum ofono_emulator_type type;
@@ -49,6 +51,8 @@ struct ofono_emulator {
int events_mode;
gboolean events_ind;
GSList *indicators;
+   guint ring;
+   gboolean active_call;
  };

  struct indicator {
@@ -177,6 +181,18 @@ error:
g_at_server_send_final(em->server, G_AT_SERVER_RESULT_ERROR);
  }

+static gboolean ring_cb(gpointer user_data)
+{
+   struct ofono_emulator *em = user_data;
+
+   if (em->type == OFONO_EMULATOR_TYPE_HFP&&  em->slc == FALSE)
+   return TRUE;
+
+   g_at_server_send_unsolicited(em->server, "RING");
+
+   return TRUE;
+}
+
  static void brsf_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
  {
@@ -418,6 +434,11 @@ static void emulator_unregister(struct ofono_atom *atom)
em->source = 0;
}

+   if (em->ring) {
+   g_source_remove(em->ring);
+   em->ring = 0;
+   }
+
for (l = em->indicators; l; l = l->next) {
struct indicator *ind = l->data;

@@ -697,11 +718,35 @@ void ofono_emulator_set_indicator(struct ofono_emulator 
*em,

ind->value = value;

+   if (g_str_equal(name, OFONO_EMULATOR_IND_CALL) == TRUE)
+   em->active_call = value;
+
if (em->events_mode == 3&&  em->events_ind&&  em->slc) {
sprintf(buf, "+CIEV: %d,%d", i, ind->value);
g_at_server_send_info(em->server, buf, TRUE);
}

+   /*
+* Ring timer should be started when callsetup indicator
+* is set to Incoming, but only if there is no active or held
+* call (active indicator set to 1)
+* It should be stopped for all other values of callsetup
+*/
+   if (g_str_equal(name, OFONO_EMULATOR_IND_CALLSETUP) == TRUE) {
+   if (value == OFONO_EMULATOR_CALLSETUP_INCOMING&&
+   !em->active_call&&  em->ring == 0) {
+   ring_cb(em);
+   em->ring = g_timeout_add_seconds(RING_TIMEOUT,
+   ring_cb, em);
+   }
+
+   if (value != OFONO_EMULATOR_CALLSETUP_INCOMING&&
+   em->ring) {
+   g_source_remove(em->ring);
+   em->ring = 0;
+   }
+   }
+
return;
}
  }


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 7/7] voicecall: add +CHUP support for HFP emulator

2011-04-05 Thread Frédéric Danis
---
 src/voicecall.c |  108 +++
 1 files changed, 108 insertions(+), 0 deletions(-)

diff --git a/src/voicecall.c b/src/voicecall.c
index cf02bb6..8aec0a0 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -60,6 +60,7 @@ struct ofono_voicecall {
GQueue *toneq;
guint tone_source;
unsigned int hfp_watch;
+   GSList *hfp_release_list;
 };
 
 struct voicecall {
@@ -95,6 +96,11 @@ struct tone_queue_entry {
int id;
 };
 
+struct emulator_release {
+   struct ofono_voicecall *vc;
+   struct ofono_emulator *em;
+};
+
 static const char *default_en_list[] = { "911", "112", NULL };
 static const char *default_en_list_no_sim[] = { "119", "118", "999", "110",
"08", "000", NULL };
@@ -102,6 +108,7 @@ static const char *default_en_list_no_sim[] = { "119", 
"118", "999", "110",
 static void generic_callback(const struct ofono_error *error, void *data);
 static void multirelease_callback(const struct ofono_error *err, void *data);
 static gboolean tone_request_run(gpointer user_data);
+static void emulator_release_next(struct emulator_release *er);
 
 static gint call_compare_by_id(gconstpointer a, gconstpointer b)
 {
@@ -2344,6 +2351,10 @@ static void voicecall_unregister(struct ofono_atom *atom)
OFONO_ATOM_TYPE_EMULATOR_HFP,
emulator_remove_handler,
"A");
+   __ofono_modem_foreach_registered_atom(modem,
+   OFONO_ATOM_TYPE_EMULATOR_HFP,
+   emulator_remove_handler,
+   "+CHUP");
 
__ofono_modem_remove_atom_watch(modem, vc->hfp_watch);
 
@@ -2558,6 +2569,102 @@ fail:
};
 }
 
+static void emulator_multirelease_callback(const struct ofono_error *error,
+   void *data)
+{
+   struct emulator_release *er = data;
+   struct ofono_voicecall *vc = er->vc;
+
+   if (vc->hfp_release_list != NULL) {
+   emulator_release_next(er);
+   return;
+   }
+
+   emulator_generic_cb(error, er->em);
+
+   g_free(er);
+}
+
+static void emulator_release_next(struct emulator_release *er)
+{
+   struct ofono_voicecall *vc;
+   struct voicecall *call;
+
+   vc = er->vc;
+
+   call = vc->hfp_release_list->data;
+
+   vc->hfp_release_list = g_slist_remove(vc->hfp_release_list, call);
+
+   vc->driver->release_specific(vc, call->call->id,
+   emulator_multirelease_callback, er);
+}
+
+static void emulator_chup_cb(struct ofono_emulator *em,
+   struct ofono_emulator_request *req, void *userdata)
+{
+   struct ofono_voicecall *vc = userdata;
+   struct ofono_error result;
+   struct emulator_release *er;
+   GSList *l;
+   struct voicecall *call;
+
+   result.error = 0;
+
+   switch (ofono_emulator_request_get_type(req)) {
+   case OFONO_EMULATOR_REQUEST_TYPE_COMMAND_ONLY:
+   if (vc->driver->release_specific == NULL &&
+   vc->driver->hangup_active == NULL)
+   goto fail;
+
+   if (vc->driver->hangup_active) {
+   vc->driver->hangup_active(vc, emulator_generic_cb, em);
+   goto done;
+   }
+
+   /* if there is already a CHUP pending we return an error */
+   if (vc->hfp_release_list)
+   goto fail;
+
+   er = g_try_new0(struct emulator_release, 1);
+   if (er == NULL) {
+   ofono_error("Unable to allocate release structure");
+   goto fail;
+   }
+
+   er->vc = vc;
+   er->em = em;
+
+   for (l = vc->call_list; l; l = l->next) {
+   call = l->data;
+
+   if (call->call->status == CALL_STATUS_WAITING ||
+   call->call->status == CALL_STATUS_HELD)
+   continue;
+
+   vc->hfp_release_list = g_slist_prepend(
+   vc->hfp_release_list,
+   l->data);
+   }
+
+   if (vc->hfp_release_list == NULL) {
+   g_free(er);
+   goto fail;
+   }
+
+   emulator_release_next(er);
+
+done:
+   dial_request_user_cancel(vc, NULL);
+   break;
+
+   default:
+fail:
+   result.type = OFONO_ERROR_TYPE_FAILURE;
+   ofono_emulator_send_final(em, &result);
+   };
+}
+
 static void emulator_hfp_watch(struct ofono_atom *atom,
  

[PATCH 6/7] voicecall: add ATA support for HFP emulator

2011-04-05 Thread Frédéric Danis
---
 src/voicecall.c |   58 +-
 1 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/src/voicecall.c b/src/voicecall.c
index 8e68243..cf02bb6 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -2314,6 +2314,13 @@ void ofono_voicecall_driver_unregister(const struct 
ofono_voicecall_driver *d)
g_drivers = g_slist_remove(g_drivers, (void *) d);
 }
 
+static void emulator_remove_handler(struct ofono_atom *atom, void *data)
+{
+   struct ofono_emulator *em = __ofono_atom_get_data(atom);
+
+   ofono_emulator_remove_handler(em, data);
+}
+
 static void voicecall_unregister(struct ofono_atom *atom)
 {
DBusConnection *conn = ofono_dbus_get_connection();
@@ -2333,6 +2340,11 @@ static void voicecall_unregister(struct ofono_atom *atom)
OFONO_ATOM_TYPE_EMULATOR_HFP,
emulator_callheld_status_cb, 0);
 
+   __ofono_modem_foreach_registered_atom(modem,
+   OFONO_ATOM_TYPE_EMULATOR_HFP,
+   emulator_remove_handler,
+   "A");
+
__ofono_modem_remove_atom_watch(modem, vc->hfp_watch);
 
if (vc->sim_watch) {
@@ -2510,12 +2522,54 @@ static void sim_watch(struct ofono_atom *atom,
sim_state_watch(ofono_sim_get_state(sim), vc);
 }
 
+static void emulator_generic_cb(const struct ofono_error *error, void *data)
+{
+   struct ofono_emulator *em = data;
+   struct ofono_error result;
+
+   result.type = error->type;
+
+   ofono_emulator_send_final(em, &result);
+}
+
+static void emulator_ata_cb(struct ofono_emulator *em,
+   struct ofono_emulator_request *req, void *userdata)
+{
+   struct ofono_voicecall *vc = userdata;
+   struct ofono_error result;
+
+   result.error = 0;
+
+   switch (ofono_emulator_request_get_type(req)) {
+   case OFONO_EMULATOR_REQUEST_TYPE_COMMAND_ONLY:
+   if (!voicecalls_have_incoming(vc))
+   goto fail;
+
+   if (vc->driver->answer == NULL)
+   goto fail;
+
+   vc->driver->answer(vc, emulator_generic_cb, em);
+   break;
+
+   default:
+fail:
+   result.type = OFONO_ERROR_TYPE_FAILURE;
+   ofono_emulator_send_final(em, &result);
+   };
+}
+
 static void emulator_hfp_watch(struct ofono_atom *atom,
enum ofono_atom_watch_condition cond,
void *data)
 {
-   if (cond == OFONO_ATOM_WATCH_CONDITION_REGISTERED)
-   notify_emulator_call_status(data);
+   struct ofono_emulator *em = __ofono_atom_get_data(atom);
+
+   if (cond != OFONO_ATOM_WATCH_CONDITION_REGISTERED)
+   return;
+
+   notify_emulator_call_status(data);
+
+   ofono_emulator_add_handler(em, "A", emulator_ata_cb, data, NULL);
 }
 
 void ofono_voicecall_register(struct ofono_voicecall *vc)
-- 
1.7.1

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 5/7] emulator: add +CLIP support for HFP AG

2011-04-05 Thread Frédéric Danis
---
 src/emulator.c  |   56 +++
 src/voicecall.c |   17 ++-
 2 files changed, 71 insertions(+), 2 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c
index 104693d..5a1e509 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -29,6 +29,7 @@
 #include 
 
 #include "ofono.h"
+#include "common.h"
 #include "gatserver.h"
 #include "gatppp.h"
 
@@ -53,6 +54,9 @@ struct ofono_emulator {
GSList *indicators;
guint ring;
gboolean active_call;
+   struct ofono_call *incoming;
+   gboolean clip;
+   char clip_str[OFONO_MAX_PHONE_NUMBER_LENGTH + 13 + 1];
 };
 
 struct indicator {
@@ -184,12 +188,25 @@ error:
 static gboolean ring_cb(gpointer user_data)
 {
struct ofono_emulator *em = user_data;
+   const char *phone;
 
if (em->type == OFONO_EMULATOR_TYPE_HFP && em->slc == FALSE)
return TRUE;
 
g_at_server_send_unsolicited(em->server, "RING");
 
+   if (!em->clip || !em->incoming ||
+   em->incoming->clip_validity != CLIP_VALIDITY_VALID)
+   return TRUE;
+
+   if (em->clip_str[0] == '\0') {
+   phone = phone_number_to_string(&em->incoming->phone_number);
+   sprintf(em->clip_str, "+CLIP: \"%s\",%d", phone,
+   em->incoming->phone_number.type);
+   }
+
+   g_at_server_send_unsolicited(em->server, em->clip_str);
+
return TRUE;
 }
 
@@ -403,6 +420,35 @@ fail:
}
 }
 
+static void clip_cb(GAtServer *server, GAtServerRequestType type,
+   GAtResult *result, gpointer user_data)
+{
+   struct ofono_emulator *em = user_data;
+   GAtResultIter iter;
+   int val;
+
+   switch (type) {
+   case G_AT_SERVER_REQUEST_TYPE_SET:
+   g_at_result_iter_init(&iter, result);
+   g_at_result_iter_next(&iter, "");
+
+   if (!g_at_result_iter_next_number(&iter, &val))
+   goto fail;
+
+   if (val != 0 && val != 1)
+   goto fail;
+
+   em->clip = val;
+
+   g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
+   break;
+
+   default:
+fail:
+   g_at_server_send_final(server, G_AT_SERVER_RESULT_ERROR);
+   };
+}
+
 static void emulator_add_indicator(struct ofono_emulator *em, const char* name,
int min, int max, int dflt)
 {
@@ -488,6 +534,7 @@ void ofono_emulator_register(struct ofono_emulator *em, int 
fd)
g_at_server_register(em->server, "+BRSF", brsf_cb, em, NULL);
g_at_server_register(em->server, "+CIND", cind_cb, em, NULL);
g_at_server_register(em->server, "+CMER", cmer_cb, em, NULL);
+   g_at_server_register(em->server, "+CLIP", clip_cb, em, NULL);
}
 
__ofono_atom_register(em->atom, emulator_unregister);
@@ -531,6 +578,7 @@ struct ofono_emulator *ofono_emulator_create(struct 
ofono_modem *modem,
/* TODO: Check real local features */
em->l_features = 32;
em->events_mode = 3;/* default mode is forwarding events */
+   em->clip_str[0] = '\0';
 
em->atom = __ofono_modem_add_atom_offline(modem, atom_t,
emulator_remove, em);
@@ -744,9 +792,17 @@ void ofono_emulator_set_indicator(struct ofono_emulator 
*em,
em->ring) {
g_source_remove(em->ring);
em->ring = 0;
+   em->incoming = NULL;
+   em->clip_str[0] = '\0';
}
}
 
return;
}
 }
+
+void ofono_emulator_incoming_call(struct ofono_emulator *em,
+   struct ofono_call *call)
+{
+   em->incoming = call;
+}
diff --git a/src/voicecall.c b/src/voicecall.c
index a3ea6de..8e68243 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -714,6 +714,13 @@ static void emulator_callheld_status_cb(struct ofono_atom 
*atom, void *data)
GPOINTER_TO_INT(data));
 }
 
+static void emulator_incoming_cb(struct ofono_atom *atom, void *data)
+{
+   struct ofono_emulator *em = __ofono_atom_get_data(atom);
+
+   ofono_emulator_incoming_call(em, data);
+}
+
 static void notify_emulator_call_status(struct ofono_voicecall *vc)
 {
struct ofono_modem *modem = __ofono_atom_get_modem(vc->atom);
@@ -726,6 +733,7 @@ static void notify_emulator_call_status(struct 
ofono_voicecall *vc)
gboolean waiting = FALSE;
GSList *l;
struct voicecall *v;
+   struct ofono_call *caller = NULL;
 
for (l = vc->call_list; l; l = l->next) {
v = l->data;
@@ -749,10 +757,12 @@ static void notify_emulator_call_status(struct 
ofono_

[PATCH 4/7] emulator: add incoming call API

2011-04-05 Thread Frédéric Danis
---
 include/emulator.h |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/emulator.h b/include/emulator.h
index 5cd894b..55e3b9c 100644
--- a/include/emulator.h
+++ b/include/emulator.h
@@ -105,6 +105,9 @@ enum ofono_emulator_request_type 
ofono_emulator_request_get_type(
 void ofono_emulator_set_indicator(struct ofono_emulator *em,
const char *name, int value);
 
+void ofono_emulator_incoming_call(struct ofono_emulator *em,
+   struct ofono_call *call);
+
 #ifdef __cplusplus
 }
 #endif
-- 
1.7.1

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 2/7] emulator: add call, callsetup and callheld indicators

2011-04-05 Thread Frédéric Danis
---
 src/emulator.c  |5 ++
 src/voicecall.c |  131 +++
 2 files changed, 136 insertions(+), 0 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c
index c84f0a9..2707592 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -455,6 +455,11 @@ void ofono_emulator_register(struct ofono_emulator *em, 
int fd)
 
if (em->type == OFONO_EMULATOR_TYPE_HFP) {
emulator_add_indicator(em, OFONO_EMULATOR_IND_SERVICE, 0, 1, 0);
+   emulator_add_indicator(em, OFONO_EMULATOR_IND_CALL, 0, 1, 0);
+   emulator_add_indicator(em, OFONO_EMULATOR_IND_CALLSETUP, 0, 3,
+   0);
+   emulator_add_indicator(em, OFONO_EMULATOR_IND_CALLHELD, 0, 2,
+   0);
emulator_add_indicator(em, OFONO_EMULATOR_IND_SIGNAL, 0, 5, 0);
emulator_add_indicator(em, OFONO_EMULATOR_IND_ROAMING, 0, 1, 0);
emulator_add_indicator(em, OFONO_EMULATOR_IND_BATTERY, 0, 5, 5);
diff --git a/src/voicecall.c b/src/voicecall.c
index 469b939..a3ea6de 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -59,6 +59,7 @@ struct ofono_voicecall {
struct dial_request *dial_req;
GQueue *toneq;
guint tone_source;
+   unsigned int hfp_watch;
 };
 
 struct voicecall {
@@ -689,6 +690,107 @@ static void voicecall_emit_multiparty(struct voicecall 
*call, gboolean mpty)
&val);
 }
 
+static void emulator_call_status_cb(struct ofono_atom *atom, void *data)
+{
+   struct ofono_emulator *em = __ofono_atom_get_data(atom);
+
+   ofono_emulator_set_indicator(em, OFONO_EMULATOR_IND_CALL,
+   GPOINTER_TO_INT(data));
+}
+
+static void emulator_callsetup_status_cb(struct ofono_atom *atom, void *data)
+{
+   struct ofono_emulator *em = __ofono_atom_get_data(atom);
+
+   ofono_emulator_set_indicator(em, OFONO_EMULATOR_IND_CALLSETUP,
+   GPOINTER_TO_INT(data));
+}
+
+static void emulator_callheld_status_cb(struct ofono_atom *atom, void *data)
+{
+   struct ofono_emulator *em = __ofono_atom_get_data(atom);
+
+   ofono_emulator_set_indicator(em, OFONO_EMULATOR_IND_CALLHELD,
+   GPOINTER_TO_INT(data));
+}
+
+static void notify_emulator_call_status(struct ofono_voicecall *vc)
+{
+   struct ofono_modem *modem = __ofono_atom_get_modem(vc->atom);
+   int status;
+   gboolean call = FALSE;
+   gboolean held = FALSE;
+   gboolean incoming = FALSE;
+   gboolean dialing = FALSE;
+   gboolean alerting = FALSE;
+   gboolean waiting = FALSE;
+   GSList *l;
+   struct voicecall *v;
+
+   for (l = vc->call_list; l; l = l->next) {
+   v = l->data;
+
+   switch (v->call->status) {
+   case CALL_STATUS_ACTIVE:
+   call = TRUE;
+   break;
+
+   case CALL_STATUS_HELD:
+   held = TRUE;
+   break;
+
+   case CALL_STATUS_DIALING:
+   dialing = TRUE;
+   break;
+
+   case CALL_STATUS_ALERTING:
+   alerting = TRUE;
+   break;
+
+   case CALL_STATUS_INCOMING:
+   incoming = TRUE;
+   break;
+
+   case CALL_STATUS_WAITING:
+   waiting = TRUE;
+   break;
+   }
+   }
+
+   status = call || held ? OFONO_EMULATOR_CALL_ACTIVE :
+   OFONO_EMULATOR_CALL_INACTIVE;
+
+   __ofono_modem_foreach_registered_atom(modem,
+   OFONO_ATOM_TYPE_EMULATOR_HFP,
+   emulator_call_status_cb,
+   GINT_TO_POINTER(status));
+
+   if (incoming || waiting)
+   status = OFONO_EMULATOR_CALLSETUP_INCOMING;
+   else if (dialing)
+   status = OFONO_EMULATOR_CALLSETUP_OUTGOING;
+   else if (alerting)
+   status = OFONO_EMULATOR_CALLSETUP_ALERTING;
+   else
+   status = OFONO_EMULATOR_CALLSETUP_INACTIVE;
+
+   __ofono_modem_foreach_registered_atom(modem,
+   OFONO_ATOM_TYPE_EMULATOR_HFP,
+   emulator_callsetup_status_cb,
+   GINT_TO_POINTER(status));
+
+   if (held)
+   status = call ? OFONO_EMULATOR_CALLHELD_MULTIPLE :
+   OFONO_EMULATOR_CALLHELD_ON_HOLD;
+   else
+   status = OFONO_EMULATOR_CALLHELD_NONE;
+
+   

[PATCH 3/7] emulator: add RING for HFP AG

2011-04-05 Thread Frédéric Danis
---
 src/emulator.c |   45 +
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c
index 2707592..104693d 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -37,6 +37,8 @@
 #define DUN_DNS_SERVER_1   "10.10.10.10"
 #define DUN_DNS_SERVER_2   "10.10.10.11"
 
+#define RING_TIMEOUT 3
+
 struct ofono_emulator {
struct ofono_atom *atom;
enum ofono_emulator_type type;
@@ -49,6 +51,8 @@ struct ofono_emulator {
int events_mode;
gboolean events_ind;
GSList *indicators;
+   guint ring;
+   gboolean active_call;
 };
 
 struct indicator {
@@ -177,6 +181,18 @@ error:
g_at_server_send_final(em->server, G_AT_SERVER_RESULT_ERROR);
 }
 
+static gboolean ring_cb(gpointer user_data)
+{
+   struct ofono_emulator *em = user_data;
+
+   if (em->type == OFONO_EMULATOR_TYPE_HFP && em->slc == FALSE)
+   return TRUE;
+
+   g_at_server_send_unsolicited(em->server, "RING");
+
+   return TRUE;
+}
+
 static void brsf_cb(GAtServer *server, GAtServerRequestType type,
GAtResult *result, gpointer user_data)
 {
@@ -418,6 +434,11 @@ static void emulator_unregister(struct ofono_atom *atom)
em->source = 0;
}
 
+   if (em->ring) {
+   g_source_remove(em->ring);
+   em->ring = 0;
+   }
+
for (l = em->indicators; l; l = l->next) {
struct indicator *ind = l->data;
 
@@ -697,11 +718,35 @@ void ofono_emulator_set_indicator(struct ofono_emulator 
*em,
 
ind->value = value;
 
+   if (g_str_equal(name, OFONO_EMULATOR_IND_CALL) == TRUE)
+   em->active_call = value;
+
if (em->events_mode == 3 && em->events_ind && em->slc) {
sprintf(buf, "+CIEV: %d,%d", i, ind->value);
g_at_server_send_info(em->server, buf, TRUE);
}
 
+   /*
+* Ring timer should be started when callsetup indicator
+* is set to Incoming, but only if there is no active or held
+* call (active indicator set to 1)
+* It should be stopped for all other values of callsetup
+*/
+   if (g_str_equal(name, OFONO_EMULATOR_IND_CALLSETUP) == TRUE) {
+   if (value == OFONO_EMULATOR_CALLSETUP_INCOMING &&
+   !em->active_call && em->ring == 0) {
+   ring_cb(em);
+   em->ring = g_timeout_add_seconds(RING_TIMEOUT,
+   ring_cb, em);
+   }
+
+   if (value != OFONO_EMULATOR_CALLSETUP_INCOMING &&
+   em->ring) {
+   g_source_remove(em->ring);
+   em->ring = 0;
+   }
+   }
+
return;
}
 }
-- 
1.7.1

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 1/7] emulator: add defines for call, callsetup and callheld indicators

2011-04-05 Thread Frédéric Danis
---
 include/emulator.h |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/emulator.h b/include/emulator.h
index 71b7c24..5cd894b 100644
--- a/include/emulator.h
+++ b/include/emulator.h
@@ -36,6 +36,18 @@ extern "C" {
 #define OFONO_EMULATOR_IND_SERVICE "service"
 #define OFONO_EMULATOR_IND_SIGNAL "signal"
 
+#define OFONO_EMULATOR_CALL_INACTIVE 0
+#define OFONO_EMULATOR_CALL_ACTIVE 1
+
+#define OFONO_EMULATOR_CALLSETUP_INACTIVE 0
+#define OFONO_EMULATOR_CALLSETUP_INCOMING 1
+#define OFONO_EMULATOR_CALLSETUP_OUTGOING 2
+#define OFONO_EMULATOR_CALLSETUP_ALERTING 3
+
+#define OFONO_EMULATOR_CALLHELD_NONE 0
+#define OFONO_EMULATOR_CALLHELD_MULTIPLE 1
+#define OFONO_EMULATOR_CALLHELD_ON_HOLD 2
+
 struct ofono_emulator;
 struct ofono_emulator_request;
 
-- 
1.7.1

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 0/7] emulator: add simple incoming call support

2011-04-05 Thread Frédéric Danis
Add call related indicators, +CLIP, RING to signal incoming call,
ATA to allow reception and AT+CHUP to reject or finish
of an incoming call in HFP AG

Frédéric Danis (7):
  emulator: add defines for call, callsetup and callheld indicators
  emulator: add call, callsetup and callheld indicators
  emulator: add RING for HFP AG
  emulator: add incoming call API
  emulator: add +CLIP support for HFP AG
  voicecall: add ATA support for HFP emulator
  voicecall: add +CHUP support for HFP emulator

 include/emulator.h |   15 +++
 src/emulator.c |  106 ++
 src/voicecall.c|  306 
 3 files changed, 427 insertions(+), 0 deletions(-)

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: PATCH H24 early support

2011-04-05 Thread Denis Kenzior
Hi Christophe,

On 04/05/2011 01:03 AM, Ostermann, Christophe wrote:
> Hi,
> 
>  
> 
> I have a first working support of Motorola H24 modem. I ve tested sms /
> gprs / call.
> 
> Note that for call I have not fully tested since on my device I do not
> have any microphone….
> 
> If patch is not in the right format, ask me to provide it in another
> way. (I ve used quilt to generate it)
> 

This is a great start.  However, the patch is all mangled up, either by
your MTA or your mail server.  I suggest that you use git, git
format-patch and git-send-email.  It is by far the most painless (and
preferred) way to submit patches.

> ===
> 
> --- ofono-0.45.orig/Makefile.in 2011-03-15 15:11:23.0 +0100
> 
> +++ ofono-0.45/Makefile.in 2011-04-04 15:00:52.806400966 +0200
> 

Please note that this file is not part of the git repository, you really
want Makefile.am.  Makefile.in is generated by the build system.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] isimodem:hangupall failed for hold initiated call

2011-04-05 Thread ext-arun . 1 . ravindran
From: Arun Ravindran 

---
 drivers/isimodem/voicecall.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/isimodem/voicecall.c b/drivers/isimodem/voicecall.c
index 05f7c09..2cbd046 100644
--- a/drivers/isimodem/voicecall.c
+++ b/drivers/isimodem/voicecall.c
@@ -1496,6 +1496,7 @@ static void isi_hangup_current(struct ofono_voicecall 
*ovc,
case CALL_STATUS_COMING:
case CALL_STATUS_MO_ALERTING:
case CALL_STATUS_ANSWERED:
+   case CALL_STATUS_HOLD_INITIATED:
goto release_by_id;
case CALL_STATUS_MT_ALERTING:
cause = CALL_CAUSE_BUSY_USER_REQUEST;
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] Avoid error when URL is null

2011-04-05 Thread Nicolas Bertrand
Avoid error with STK command "LAUNCH BROWSER" and default URL

---
 src/stkagent.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/stkagent.c b/src/stkagent.c
index 54ca575..220812e 100644
--- a/src/stkagent.c
+++ b/src/stkagent.c
@@ -1061,6 +1061,9 @@ int stk_agent_confirm_launch_browser(struct stk_agent 
*agent, const char *text,
if (agent->msg == NULL)
return -ENOMEM;
 
+   if (url == NULL)
+   url = "";
+
dbus_message_append_args(agent->msg,
DBUS_TYPE_STRING, &text,
DBUS_TYPE_BYTE, &icon_id,
-- 
1.7.1

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: Trouble using Huwei E160G

2011-04-05 Thread Claudio Degioanni
Il 05/04/2011 12.09, Aygon, Bertrand ha scritto:
> Hi,
>
>>> From what I can see when you do the 'list-modem', your modem is already 
>>> enabled and online, so you do not have to do the >>./enable_modem and 
>>> ./online-modem.
>>>
>>> The PS context is also created (looking at ./list-contexts answer).
>>>
>>> So just the ./activate-context should be fine.
>>>
>>> But there is an error ... From what I can see in the source code, it should 
>>> be enable 'post sim'. And still according to source code, >>the Huawei 
>>> modem seems to skip some SIM status during warm start.
>>>
>>> So, can you please unplug replug the USB key, wait a few, just execute 
>>> ./list-modems and ./list-contexts (nothing else).
>>> You should see the modem enabled and online, and your context created. 
>>> If so, just execute ./activate-context
>> I have made the test proposed, I still recive the same error :)
>>
>> I have attacched the new log of test. Ofono create the connection context, 
>> but on activation it repond with not implemented.
> Sorry, I have no idea, I have try all I have in mind, but now, we need the 
> help of someone else.
>
> Huawei modem should support data call. The AT log looks correct. Why there is 
> a not implemented error, I don't know...
Thanks very much for help, I have made some search on target and on
ubuntu 11.04. There is a difference in product id of device, after usb
modem swicth.

Target:

Bus 001 Device 001: ID 1d6b:0002 
Bus 002 Device 001: ID 1d6b:0002 
Bus 002 Device 002: ID 05e3:0608 
Bus 002 Device 003: ID 0951:1653 
Bus 002 Device 004: ID 2001:3c05 
*Bus 002 Device 005: ID 12d1:1436  *
Bus 003 Device 001: ID 1d6b:0002

Ubuntu:

Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 0a5c:2110 Broadcom Corp. Bluetooth Controller
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 050d:5055 Belkin Components F5D5055 Gigabit
Network Adapter [AX88xxx]
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
*Bus 001 Device 007: ID 12d1:140c Huawei Technologies Co., Ltd. *
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Can be helpful ?
> Sorry again,
>
> Bertrand.
> -
> Intel Corporation SAS (French simplified joint stock company)
> Registered headquarters: "Les Montalets"- 2, rue de Paris, 
> 92196 Meudon Cedex, France
> Registration Number:  302 456 199 R.C.S. NANTERRE
> Capital: 4,572,000 Euros
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
> ___
> ofono mailing list
> ofono@ofono.org
> http://lists.ofono.org/listinfo/ofono

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


RE: Trouble using Huwei E160G

2011-04-05 Thread Aygon, Bertrand
Hi,

>> From what I can see when you do the 'list-modem', your modem is already 
>> enabled and online, so you do not have to do the >>./enable_modem and 
>> ./online-modem.
>>
>> The PS context is also created (looking at ./list-contexts answer).
>>
>> So just the ./activate-context should be fine.
>>
>> But there is an error ... From what I can see in the source code, it should 
>> be enable 'post sim'. And still according to source code, >>the Huawei modem 
>> seems to skip some SIM status during warm start.
>>
>> So, can you please unplug replug the USB key, wait a few, just execute 
>> ./list-modems and ./list-contexts (nothing else).
>> You should see the modem enabled and online, and your context created. 
>> If so, just execute ./activate-context
>
>I have made the test proposed, I still recive the same error :)
>
>I have attacched the new log of test. Ofono create the connection context, but 
>on activation it repond with not implemented.

Sorry, I have no idea, I have try all I have in mind, but now, we need the help 
of someone else.

Huawei modem should support data call. The AT log looks correct. Why there is a 
not implemented error, I don't know...

Sorry again,

Bertrand.
-
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: Trouble using Huwei E160G

2011-04-05 Thread Claudio Degioanni
Hi beltrand,

Il 05/04/2011 11.35, Aygon, Bertrand ha scritto:
> Hi,
>
>>> 1) Connect 3G key and wait for umts coverage (blue led)
>>>
>>> I activated the 3g connection, but ofono response is
>>>
>>> Error org.ofono.Error.NotImplemented: Implementation not provided
> From what I can see when you do the 'list-modem', your modem is already 
> enabled and online, so you do not have to do the ./enable_modem and 
> ./online-modem.
>
> The PS context is also created (looking at ./list-contexts answer).
>
> So just the ./activate-context should be fine.
>
> But there is an error ... From what I can see in the source code, it should 
> be enable 'post sim'. And still according to source code, the Huawei modem 
> seems to skip some SIM status during warm start.
>
> So, can you please unplug replug the USB key, wait a few, just execute 
> ./list-modems and ./list-contexts (nothing else).
> You should see the modem enabled and online, and your context created. If so, 
> just execute ./activate-context

I have made the test proposed, I still recive the same error :)

I have attacched the new log of test. Ofono create the connection
context, but on activation it repond
with not implemented.

regs
Claudio
> Regards,
>
> Bertrand.
> -
> Intel Corporation SAS (French simplified joint stock company)
> Registered headquarters: "Les Montalets"- 2, rue de Paris, 
> 92196 Meudon Cedex, France
> Registration Number:  302 456 199 R.C.S. NANTERRE
> Capital: 4,572,000 Euros
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
> ___
> ofono mailing list
> ofono@ofono.org
> http://lists.ofono.org/listinfo/ofono

ofonod[1289]: src/modem.c:ofono_modem_create() name: (null), type: huawei
ofonod[1289]: src/modem.c:set_modem_property() modem 0x102580 property Path
ofonod[1289]: src/modem.c:set_modem_property() modem 0x102580 property 
Registered
ofonod[1289]: plugins/udev.c:add_modem() 
/devices/platform/tegra-ehci.1/usb2/2-1/2-1.4/2-1.4:1.4/ttyUSB2/tty/ttyUSB2 
(huawei)
ofonod[1289]: plugins/udev.c:add_huawei() modem 0x102580
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property 
ModemRegistered
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property 
PcuiRegistered
ofonod[1289]: src/modem.c:set_modem_property() modem 0x102580 property Pcui
ofonod[1289]: src/modem.c:set_modem_property() modem 0x102580 property 
PcuiRegistered
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property Path
ofonod[1289]: plugins/udev.c:add_modem() 
/devices/platform/tegra-ehci.1/usb2/2-1/2-1.4/2-1.4:1.3/ttyUSB1/tty/ttyUSB1 
(huawei)
ofonod[1289]: plugins/udev.c:add_huawei() modem 0x102580
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property 
ModemRegistered
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property 
PcuiRegistered
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property Path
ofonod[1289]: plugins/udev.c:add_modem() 
/devices/platform/tegra-ehci.1/usb2/2-1/2-1.4/2-1.4:1.0/ttyUSB0/tty/ttyUSB0 
(huawei)
ofonod[1289]: plugins/udev.c:add_huawei() modem 0x102580
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property 
ModemRegistered
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property 
PcuiRegistered
ofonod[1289]: src/modem.c:set_modem_property() modem 0x102580 property Modem
ofonod[1289]: src/modem.c:set_modem_property() modem 0x102580 property 
ModemRegistered
ofonod[1289]: plugins/huawei.c:huawei_probe() 0x102580
ofonod[1289]: plugins/smart-messaging.c:modem_watch() modem: 0x102580, added: 1
ofonod[1289]: plugins/push-notification.c:modem_watch() modem: 0x102580, added: 
1
ofonod[1289]: plugins/huawei.c:huawei_enable() 0x102580
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property NDIS
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property Modem
ofonod[1289]: plugins/huawei.c:open_device() Modem /dev/ttyUSB0
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property Pcui
ofonod[1289]: plugins/huawei.c:open_device() Pcui /dev/ttyUSB2
ofonod[1289]: src/modem.c:get_modem_property() modem 0x102580 property HasVoice
ofonod[1289]: plugins/huawei.c:query_sim_state() 
ofonod[1289]: PCUI: > ATE0 +CMEE=1\r
ofonod[1289]: PCUI: < ATE0 +CMEE=1\r\r\nOK\r\n
ofonod[1289]: PCUI: > AT+CFUN=1\r
ofonod[1289]: PCUI: < \r\nOK\r\n
ofonod[1289]: plugins/huawei.c:cfun_enable() 
ofonod[1289]: PCUI: > AT^SYSINFO\r
ofonod[1289]: PCUI: < \r\n^SYSINFO:0,0,0,0,255,,0\r\n\r\nOK\r\n
ofonod[1289]: plugins/huawei.c:notify_sim_state() 255
ofonod[1289]: PCUI: > AT^U2DIAG?\r
ofonod[1289]: PCUI: < \r\n276\r\n\r\nOK\r\n\r\n^STIN:0,0,0\r\n
ofonod[1289]: PCUI: > AT^GETPORT

[PATCH] isimodem:Remove reporting active state wrongly

2011-04-05 Thread ext-arun . 1 . ravindran
From: Arun Ravindran 

---
 drivers/isimodem/voicecall.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/isimodem/voicecall.c b/drivers/isimodem/voicecall.c
index 5cbba1f..05f7c09 100644
--- a/drivers/isimodem/voicecall.c
+++ b/drivers/isimodem/voicecall.c
@@ -405,7 +405,6 @@ static int isi_call_status_to_clcc(const struct isi_call 
*call)
case CALL_STATUS_TERMINATED:
return 6;
 
-   case CALL_STATUS_ANSWERED:
case CALL_STATUS_ACTIVE:
case CALL_STATUS_HOLD_INITIATED:
return 0;
@@ -551,6 +550,10 @@ static void isi_call_notify(struct ofono_voicecall *ovc, 
struct isi_call *call)
case CALL_STATUS_MT_RELEASE:
case CALL_STATUS_TERMINATED:
isi_call_set_disconnect_reason(call);
+   break;
+   case CALL_STATUS_ANSWERED:
+   DBG("State need not be reported to Core");
+   return;
}
 
ocall = isi_call_as_ofono_call(call);
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


RE: Trouble using Huwei E160G

2011-04-05 Thread Aygon, Bertrand
Hi,

>> 1) Connect 3G key and wait for umts coverage (blue led)
>>
>> I activated the 3g connection, but ofono response is
>>
>> Error org.ofono.Error.NotImplemented: Implementation not provided

>From what I can see when you do the 'list-modem', your modem is already 
>enabled and online, so you do not have to do the ./enable_modem and 
>./online-modem.

The PS context is also created (looking at ./list-contexts answer).

So just the ./activate-context should be fine.

But there is an error ... From what I can see in the source code, it should be 
enable 'post sim'. And still according to source code, the Huawei modem seems 
to skip some SIM status during warm start.

So, can you please unplug replug the USB key, wait a few, just execute 
./list-modems and ./list-contexts (nothing else).
You should see the modem enabled and online, and your context created. If so, 
just execute ./activate-context

Regards,

Bertrand.
-
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: Trouble using Huwei E160G

2011-04-05 Thread Claudio Degioanni
Hi Beltrand,

Il 05/04/2011 10.29, Aygon, Bertrand ha scritto:
> Hi again,
>> 1) Connect 3G key and wait for umts coverage (blue led)
>>
>> I activated the 3g connection, but ofono response is
>>
>> Error org.ofono.Error.NotImplemented: Implementation not provided
> Can you please send the full log for this case, and also the term output, 
> so I can see what you are exactly doing.
 I have attached the log on test 1 and 2.
>>> Can you please add the full output of the oFono test scripts (since the 
>>> ./list_modems to the error you have)?
>> I have attacced the log for utms, for gprs I have some trouble to get the 
>> signal now.
> Mail has been sent to fast.
>
> After the step 2 (Enable the modem), can you please do ./list-contexts ?
>
> For step 3, you can do ./create-internet-context ibox.tim.it
>
> And for step 4, you can do ./active-context
I have attacched the new log to the mail

regs
> Regards,
>
> Bertrand.
> -
> Intel Corporation SAS (French simplified joint stock company)
> Registered headquarters: "Les Montalets"- 2, rue de Paris, 
> 92196 Meudon Cedex, France
> Registration Number:  302 456 199 R.C.S. NANTERRE
> Capital: 4,572,000 Euros
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
> ___
> ofono mailing list
> ofono@ofono.org
> http://lists.ofono.org/listinfo/ofono
> -
> Intel Corporation SAS (French simplified joint stock company)
> Registered headquarters: "Les Montalets"- 2, rue de Paris, 
> 92196 Meudon Cedex, France
> Registration Number:  302 456 199 R.C.S. NANTERRE
> Capital: 4,572,000 Euros
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
> ___
> ofono mailing list
> ofono@ofono.org
> http://lists.ofono.org/listinfo/ofono

~ # OFONO_AT_DEBUG=1 OFONO_PPP_DEBUG=1 ofonod -nd
ofonod[1336]: oFono version 0.45
ofonod[1336]: src/plugin.c:__ofono_plugin_init() 
ofonod[1336]: plugins/push-notification.c:push_notification_init() 
ofonod[1336]: plugins/smart-messaging.c:smart_messaging_init() 
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd69ec, name: 
linktop
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd69b0, name: 
nokiacdma
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd6974, name: 
nokia
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd6938, name: 
tc65
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd68cc, name: 
ste
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd6888, name: 
ifx
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd684c, name: 
palmpre
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd6808, name: 
novatel
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd67cc, name: 
sierra
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd6778, name: 
huawei
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd673c, name: 
zte
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd66f0, name: 
hso
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd66a4, name: 
mbm
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd6660, name: 
calypso
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd6624, name: 
wavecom
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd65e8, name: 
gobi
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd65ac, name: 
g1
ofonod[1336]: src/cdma-voicecall.c:ofono_cdma_voicecall_driver_register() 
driver: 0xd6568, name: cdmamodem
ofonod[1336]: src/modem.c:ofono_devinfo_driver_register() driver: 0xd657c, 
name: cdmamodem
ofonod[1336]: src/cdma-connman.c:ofono_cdma_connman_driver_register() driver: 
0xd6598, name: cdmamodem
ofonod[1336]: src/modem.c:ofono_modem_driver_register() driver: 0xd650c, name: 
phonesim
ofonod[1336]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0xd64f8, 
name: phonesim
ofonod[1336]: src/ctm.c:ofono_ctm_driver_register() driver: 0xd64e4, name: 
phonesim
ofonod[1336]: plugins/phonesim.c:parse_config() filename 
/etc/ofono/phonesim.conf
ofonod[1336]: src/voicecall.c:ofono_voicecall_driver_register() driver: 
0xd6448, name: stemodem
ofonod[1336]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0xd64bc, 
name: stemodem
ofonod[1336]: src/radio-settings.c:ofono_

RE: Trouble using Huwei E160G

2011-04-05 Thread Aygon, Bertrand
Hi again,

> 1) Connect 3G key and wait for umts coverage (blue led)
>
> I activated the 3g connection, but ofono response is
>
> Error org.ofono.Error.NotImplemented: Implementation not provided
 Can you please send the full log for this case, and also the term output, 
 so I can see what you are exactly doing.
>>> I have attached the log on test 1 and 2.
>> Can you please add the full output of the oFono test scripts (since the 
>> ./list_modems to the error you have)?
>I have attacced the log for utms, for gprs I have some trouble to get the 
>signal now.

Mail has been sent to fast.

After the step 2 (Enable the modem), can you please do ./list-contexts ?

For step 3, you can do ./create-internet-context ibox.tim.it

And for step 4, you can do ./active-context

Regards,

Bertrand.
-
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono
-
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


RE: Trouble using Huwei E160G

2011-04-05 Thread Aygon, Bertrand
Hi,

> 1) Connect 3G key and wait for umts coverage (blue led)
>
> I activated the 3g connection, but ofono response is
>
> Error org.ofono.Error.NotImplemented: Implementation not provided
 Can you please send the full log for this case, and also the term output, 
 so I can see what you are exactly doing.
>>> I have attached the log on test 1 and 2.
>> Can you please add the full output of the oFono test scripts (since the 
>> ./list_modems to the error you have)?
>I have attacced the log for utms, for gprs I have some trouble to get the 
>signal now.

Thanks.

After the step 2 (Enable the modem), can you please do ./list-contexts ?

And for step 4, you can do ./active-context

Regards,

Bertrand.
-
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: Trouble using Huwei E160G

2011-04-05 Thread Claudio Degioanni
Hi Bertrand,

Il 04/04/2011 11.31, Aygon, Bertrand ha scritto:
> Hi,
 1) Connect 3G key and wait for umts coverage (blue led)

 I activated the 3g connection, but ofono response is

 Error org.ofono.Error.NotImplemented: Implementation not provided
>>> Can you please send the full log for this case, and also the term output, 
>>> so I can see what you are exactly doing.
>> I have attached the log on test 1 and 2.
> Can you please add the full output of the oFono test scripts (since the 
> ./list_modems to the error you have)?

I have attacced the log for utms, for gprs I have some trouble to get
the signal now.

regs
Claudio

> Thanks,
>
> Bertrand.
>
> -
> Intel Corporation SAS (French simplified joint stock company)
> Registered headquarters: "Les Montalets"- 2, rue de Paris, 
> 92196 Meudon Cedex, France
> Registration Number:  302 456 199 R.C.S. NANTERRE
> Capital: 4,572,000 Euros
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
> ___
> ofono mailing list
> ofono@ofono.org
> http://lists.ofono.org/listinfo/ofono

1) List the modem (note no pin is required)

/tmp # ./list-modems 
[ /huawei0 ]
Features = gprs cbs net ussd sms rat sim 
Powered = 1
Lockdown = 0
Interfaces = org.ofono.ConnectionManager org.ofono.CellBroadcast 
org.ofono.NetworkRegistration org.ofono.SupplementaryServices 
org.ofono.CallBarring org.ofono.CallSettings org.ofono.CallForwarding 
org.ofono.MessageWaiting org.ofono.SmartMessaging org.ofono.PushNotification 
org.ofono.MessageManager org.ofono.Phonebook org.ofono.RadioSettings 
org.ofono.SimManager 
Online = 1
Model = E1692
Manufacturer = huawei
Serial = 353108032160081
Revision = 11.126.08.00.192
[ org.ofono.ConnectionManager ]
Powered = 1
Attached = 1
Bearer = none
Suspended = 0
RoamingAllowed = 0
[ org.ofono.CellBroadcast ]
Topics = 
Powered = 1
[ org.ofono.NetworkRegistration ]
Status = registered
Strength = 41
Name = Telecom Italia M
LocationAreaCode = 61108
Mode = auto
MobileCountryCode = 222
CellId = 72657880
MobileNetworkCode = 01
[ org.ofono.SupplementaryServices ]
State = idle
[ org.ofono.CallBarring ]
VoiceOutgoing = disabled
VoiceIncoming = disabled
[ org.ofono.CallSettings ]
HideCallerId = default
CallingLinePresentation = enabled
VoiceCallWaiting = disabled
CalledLinePresentation = disabled
ConnectedLineRestriction = unknown
ConnectedLinePresentation = disabled
CallingLineRestriction = off
CallingNamePresentation = unknown
[ org.ofono.CallForwarding ]
ForwardingFlagOnSim = 0
VoiceNoReplyTimeout = 20
VoiceNotReachable = +39363338585692
VoiceBusy = +39363338585692
VoiceNoReply = +39363338585692
VoiceUnconditional = 
[ org.ofono.MessageWaiting ]
VoicemailMessageCount = 0
VoicemailMailboxNumber = 
VoicemailWaiting = 0
[ org.ofono.SmartMessaging ]
[ org.ofono.PushNotification ]
[ org.ofono.MessageManager ]
Alphabet = default
UseDeliveryReports = 0
Bearer = cs-preferred
ServiceCenterAddress = +393359609600
[ org.ofono.Phonebook ]
[ org.ofono.RadioSettings ]
UmtsBand = any
TechnologyPreference = any
GsmBand = any
[ org.ofono.SimManager ]
Retries = [pin2 = 3] [puk2 = 10] [pin = 3] [puk = 10] 
MobileCountryCode = 222
FixedDialing = 0
SubscriberNumbers = 3338585692 
PreferredLanguages = it en 
BarredDialing = 0
ServiceNumbers = [12.54] = '1254' [MilleunaTIM] = '40848' [Disattiva 
Segr] = '##002#' [TIM Taxi] = '42494' [Serv. Clienti] = '+393399119' 
[Segreteria Tel] = '41919' [Avv Chiam NO] = '#43#' [Attiva Segr.] = 
'**62*41919#' [Avv Chiam SI] = '*43#' 
CardIdentifier = 8939011387706456
LockedPins = 
MobileNetworkCode = 01
SubscriberIdentity = 222019903120772
Present = 1
PinRequired = none

2) Enable the modem

/tmp # ./enable-modem /huawei0
Connecting modem /huawei0...
/tmp # ./online-modem  /huawei0
Setting modem /huawei0 online...
/tmp # cat en

3) Setting the apn 

dbus-send --system --print-reply --reply-timeout=12 --type=method_call 
--dest='org.ofono' /huawei0/context1 org.ofono.ConnectionContext.SetProperty 
string:AccessPoint
Name variant:string:ibox.tim.it
method return sender=:1.9 -> dest=:1.14 reply_serial=2

4) Activate the context
/tmp # dbus-send --system --print-reply --reply-timeo