RE: Removal of modemconf plugin

2010-08-17 Thread Zhang, Caiwen
Hi Marcel,

What about dual mode modems that with two different serial ports? 
e.g. a modem support both GSM and CDMA, there is a serial port
For GSM, and there is a serial another for CDMA.


Why not keep both udev and modemconf plug-in. It remains for the user
To decide which way to use. I think maybe we can change the compile
Scrips, let user to select which plug-in to use.

Best regards,
Caiwen

 -Original Message-
 From: Marcel Holtmann [mailto:mar...@holtmann.org]
 Sent: Friday, August 13, 2010 8:56 PM
 To: ofono@ofono.org
 Subject: Re: Removal of modemconf plugin
 
 Hi Kalle,
 
   Using special udev rules for special devices (in conjunction with
 the
   oFono auto-detection rule) make the process of setting up oFono for
 the
   system integrator a lot simpler. No manual configuration file
 patching
   anymore. Just installation of an additional udev rule.
  
   The open here is the ISI modem detection, but this should be
 clearly
   done via a Phonet plugin. And also the N900 specific case inside
   modemconf is just wrong. This needs to be fixed and just auto-
 detected
   via Phonet or maybe just via RTNL directly.
 
  What about old style serial port modems? How can we configure them if
  you remove modemconf?
 
 with a proper udev rule. All old style modems show up in udev as well.
 
 Regards
 
 Marcel
 
 

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


RE: Removal of modemconf plugin

2010-08-17 Thread Gu, Yang
Hi,


-Original Message-
From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of
Marcel Holtmann
Sent: Tuesday, August 17, 2010 5:54 PM
To: ofono@ofono.org
Subject: RE: Removal of modemconf plugin

Hi Caiwen,

a gentle reminder that this mailing list doesn't allow top posting,
please follow the netiquette for open source mailing lists.

 What about dual mode modems that with two different serial ports?
 e.g. a modem support both GSM and CDMA, there is a serial port
 For GSM, and there is a serial another for CDMA.


 Why not keep both udev and modemconf plug-in. It remains for the user
 To decide which way to use. I think maybe we can change the compile
 Scrips, let user to select which plug-in to use.

I don't even see a problem with this at all. Every serial port is
present in udev, so you can write proper udev rules for it. A modem with
a serial port for GSM and another one CDMA will be just presented as two
modems inside oFono. So no problem at all.

So modemconf plugin will be removed since it is not needed at all. The
only component that needs it is the phonesim plugin. And that will get
its own configuration file.

Can we just add some code in phonesim to make it look like a pseudo serial 
device which can be managed by udev? That is, if we start the phonesim, it will 
simulate some tty ports under /dev and udevd will inform the oFono there is a 
new device (We need some rule for phonesim). And the device disappears if 
phonesim meets an end.
Maybe this is possible if we can send message to udevd the same way as kernel 
via netlink.


Regards

Marcel




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


RE: Removal of modemconf plugin

2010-08-17 Thread Marcel Holtmann
Hi Yang,

  What about dual mode modems that with two different serial ports?
  e.g. a modem support both GSM and CDMA, there is a serial port
  For GSM, and there is a serial another for CDMA.
 
 
  Why not keep both udev and modemconf plug-in. It remains for the user
  To decide which way to use. I think maybe we can change the compile
  Scrips, let user to select which plug-in to use.
 
 I don't even see a problem with this at all. Every serial port is
 present in udev, so you can write proper udev rules for it. A modem with
 a serial port for GSM and another one CDMA will be just presented as two
 modems inside oFono. So no problem at all.
 
 So modemconf plugin will be removed since it is not needed at all. The
 only component that needs it is the phonesim plugin. And that will get
 its own configuration file.
 
 Can we just add some code in phonesim to make it look like a pseudo serial 
 device which can be managed by udev? That is, if we start the phonesim, it 
 will simulate some tty ports under /dev and udevd will inform the oFono there 
 is a new device (We need some rule for phonesim). And the device disappears 
 if phonesim meets an end.
 Maybe this is possible if we can send message to udevd the same way as kernel 
 via netlink.

in theory yes, but phonesim is the one piece that also works via TCP. So
just having a /etc/ofono/phonesim.conf is a lot simpler.

Regards

Marcel


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


RE: Removal of modemconf plugin

2010-08-17 Thread Wang, Pengzhuo
Hi Marcel,

Best Regards
 
pengzhuo wang(bobwang)
Professional Service | WindRiver P.R.China Room3-H,New JinQiao Plaza,
No.585 Xizhang Rd(M),Shanghai,23,P.R.C Tel:86-21-63585586/87/89/90
ext.208 Fax:86-21-63585591

 

 -Original Message-
 From: ofono-boun...@ofono.org 
 [mailto:ofono-boun...@ofono.org] On Behalf Of Marcel Holtmann
 Sent: Tuesday, August 17, 2010 5:54 PM
 To: ofono@ofono.org
 Subject: RE: Removal of modemconf plugin
 
 Hi Caiwen,
 
 a gentle reminder that this mailing list doesn't allow top 
 posting, please follow the netiquette for open source mailing lists.
 
  What about dual mode modems that with two different serial ports? 
  e.g. a modem support both GSM and CDMA, there is a serial port For 
  GSM, and there is a serial another for CDMA.
  
  
  Why not keep both udev and modemconf plug-in. It remains 
 for the user 
  To decide which way to use. I think maybe we can change the compile 
  Scrips, let user to select which plug-in to use.
 
 I don't even see a problem with this at all. Every serial 
 port is present in udev, so you can write proper udev rules 
 for it. A modem with a serial port for GSM and another one 
 CDMA will be just presented as two modems inside oFono. So no 
 problem at all.
 
Udev really can work, but in many embedded devices,udev service is being
forbidden because
of boot-up speed issue. In addtion, on these devices, device nodes are
often explictly defined.
 
 So modemconf plugin will be removed since it is not needed at 
 all. The only component that needs it is the phonesim plugin. 
 And that will get its own configuration file.
 
 Regards
 
 Marcel
 
 
 ___
 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: Removal of modemconf plugin

2010-08-17 Thread Marcel Holtmann
Hi Pengzhuo,

  a gentle reminder that this mailing list doesn't allow top 
  posting, please follow the netiquette for open source mailing lists.
  
   What about dual mode modems that with two different serial ports? 
   e.g. a modem support both GSM and CDMA, there is a serial port For 
   GSM, and there is a serial another for CDMA.
   
   
   Why not keep both udev and modemconf plug-in. It remains 
  for the user 
   To decide which way to use. I think maybe we can change the compile 
   Scrips, let user to select which plug-in to use.
  
  I don't even see a problem with this at all. Every serial 
  port is present in udev, so you can write proper udev rules 
  for it. A modem with a serial port for GSM and another one 
  CDMA will be just presented as two modems inside oFono. So no 
  problem at all.
  
 Udev really can work, but in many embedded devices,udev service is being
 forbidden because
 of boot-up speed issue. In addtion, on these devices, device nodes are
 often explictly defined.

this is just an urban myth. udev works as nicely on embedded system as
it works on servers. If you think it is not working fine, then lets have
Kay fix it. Also with the integration of devtmpfs all the last issues
with initial device nodes are solved and udev execution time on a really
static environment is almost non existent. If you have a problem with
your boot time, then it is somewhere else. I highly doubt it is really a
problem of udev.

Regards

Marcel


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


[PATCH v5 0/8] Resubmitting STE Driver Patches.

2010-08-17 Thread Sjur Brændeland
Resubmitting same changes as last patch set, but
some of the patches are split up in smaller parts.
The RTNL patch is removed and replaced by a separate RFC.

Sjur Brændeland (8):
  plugins/ste: SIM - STE registers as MBM to utilize mbm quirks.
  stemodem: Add polling for SIM ready.
  plugins/ste: Add AT Channel configurations (new)
  stemodem: Add Radio Settings to STE Modem
  plugins/ste: Add Radio-Settings
  plugins/modemconf.c add support for Interface for STE plugin. (new)
  plugins/ste: Use SOCK_STREAM for CAIF and enable interface
specification.
  plugins: Add STE sample to modem.conf (new)

 Makefile.am   |2 +
 drivers/stemodem/radio-settings.c |  225 +
 drivers/stemodem/stemodem.c   |2 +
 drivers/stemodem/stemodem.h   |2 +
 plugins/modem.conf|5 +
 plugins/modemconf.c   |1 +
 plugins/ste.c |   79 -
 7 files changed, 311 insertions(+), 5 deletions(-)
 create mode 100644 drivers/stemodem/radio-settings.c

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


[PATCH v5 2/8] stemodem: Add polling for SIM ready.

2010-08-17 Thread Sjur Brændeland
Interim solution until support for SIM 'ready' notification is supported.
---
Change: AT-channel configuration is moved to separate patch.

 plugins/ste.c |   52 ++--
 1 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/plugins/ste.c b/plugins/ste.c
index ef375ea..fcf4d15 100644
--- a/plugins/ste.c
+++ b/plugins/ste.c
@@ -60,8 +60,13 @@
 #include drivers/stemodem/caif_socket.h
 #include drivers/stemodem/if_caif.h
 
+static const char *cpin_prefix[] = { +CPIN:, NULL };
+
 struct ste_data {
GAtChat *chat;
+   guint cpin_poll_source;
+   guint cpin_poll_count;
+   gboolean have_sim;
 };
 
 static int ste_probe(struct ofono_modem *modem)
@@ -88,6 +93,10 @@ static void ste_remove(struct ofono_modem *modem)
ofono_modem_set_data(modem, NULL);
 
g_at_chat_unref(data-chat);
+
+   if (data-cpin_poll_source  0)
+   g_source_remove(data-cpin_poll_source);
+
g_free(data);
 }
 
@@ -96,16 +105,55 @@ static void ste_debug(const char *str, void *user_data)
ofono_info(%s, str);
 }
 
+static gboolean init_simpin_check(gpointer user_data);
+
+static void simpin_check(gboolean ok, GAtResult *result, gpointer user_data)
+{
+   struct ofono_modem *modem = user_data;
+   struct ste_data *data = ofono_modem_get_data(modem);
+
+   /* Modem returns +CME ERROR: 10 if SIM is not ready. */
+   if (!ok  result-final_or_pdu 
+   !strcmp(result-final_or_pdu, +CME ERROR: 10) 
+   data-cpin_poll_count++  5) {
+   data-cpin_poll_source =
+   g_timeout_add_seconds(1, init_simpin_check, modem);
+   return;
+   }
+
+   data-cpin_poll_count = 0;
+
+   /* Modem returns ERROR if there is no SIM in slot. */
+   data-have_sim = ok;
+
+   ofono_modem_set_powered(modem, TRUE);
+}
+
+static gboolean init_simpin_check(gpointer user_data)
+{
+   struct ofono_modem *modem = user_data;
+   struct ste_data *data = ofono_modem_get_data(modem);
+
+   data-cpin_poll_source = 0;
+
+   g_at_chat_send(data-chat, AT+CPIN?, cpin_prefix,
+   simpin_check, modem, NULL);
+
+   return FALSE;
+}
+
 static void cfun_enable(gboolean ok, GAtResult *result, gpointer user_data)
 {
struct ofono_modem *modem = user_data;
 
DBG();
 
-   if (!ok)
+   if (!ok) {
ofono_modem_set_powered(modem, FALSE);
+   return;
+   }
 
-   ofono_modem_set_powered(modem, TRUE);
+   init_simpin_check(modem);
 }
 
 static int ste_enable(struct ofono_modem *modem)
-- 
1.6.3.3

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


[PATCH v5 3/8] plugins/ste: Add AT Channel configurations

2010-08-17 Thread Sjur Brændeland
---
 plugins/ste.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/ste.c b/plugins/ste.c
index fcf4d15..bcf2704 100644
--- a/plugins/ste.c
+++ b/plugins/ste.c
@@ -216,7 +216,8 @@ static int ste_enable(struct ofono_modem *modem)
if (getenv(OFONO_AT_DEBUG))
g_at_chat_set_debug(data-chat, ste_debug, NULL);
 
-   g_at_chat_send(data-chat, ATE0 +CMEE=1, NULL, NULL, NULL, NULL);
+   g_at_chat_send(data-chat, ATF E0 V1 X4 C1 +CMEE=1,
+   NULL, NULL, NULL, NULL);
g_at_chat_send(data-chat, AT+CFUN=1, NULL, cfun_enable, modem, NULL);
 
return -EINPROGRESS;
-- 
1.6.3.3

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


[PATCH v5 4/7] stemodem: Add Radio Settings to STE Modem

2010-08-17 Thread Sjur Brændeland
---
Changes:
o Changed order of files in Makefile
o Fixed missing empty line in copyright
o Formatted enum better
o Removed default is switches
o Removed ste in function names

 Makefile.am   |2 +
 drivers/stemodem/radio-settings.c |  230 +
 drivers/stemodem/stemodem.c   |2 +
 drivers/stemodem/stemodem.h   |2 +
 4 files changed, 236 insertions(+), 0 deletions(-)
 create mode 100644 drivers/stemodem/radio-settings.c

diff --git a/Makefile.am b/Makefile.am
index 16a3a3d..d8f36f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -202,10 +202,12 @@ builtin_sources += drivers/atmodem/atutil.h \
drivers/stemodem/stemodem.h \
drivers/stemodem/stemodem.c \
drivers/stemodem/voicecall.c \
+   drivers/stemodem/radio-settings.c \
drivers/stemodem/gprs-context.c \
drivers/stemodem/caif_socket.h \
drivers/stemodem/if_caif.h
 
+
 builtin_modules += phonesim
 builtin_sources += plugins/phonesim.c
 
diff --git a/drivers/stemodem/radio-settings.c 
b/drivers/stemodem/radio-settings.c
new file mode 100644
index 000..9f93695
--- /dev/null
+++ b/drivers/stemodem/radio-settings.c
@@ -0,0 +1,230 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2008-2010  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2010 ST-Ericsson AB.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
+#define _GNU_SOURCE
+#include string.h
+#include stdlib.h
+#include stdio.h
+#include errno.h
+
+#include glib.h
+
+#include ofono/log.h
+#include ofono/modem.h
+#include ofono/radio-settings.h
+
+#include gatchat.h
+#include gatresult.h
+
+#include stemodem.h
+
+static const char *none_prefix[] = { NULL };
+static const char *cfun_prefix[] = { +CFUN:, NULL };
+
+struct radio_settings_data {
+   GAtChat *chat;
+};
+
+enum ste_radio_mode {
+   STE_RADIO_OFF = 0,
+   STE_RADIO_ON =  1,
+   STE_RADIO_FLIGHT_MODE = 4,
+   STE_RADIO_GSM_ONLY =5,
+   STE_RADIO_WCDMA_ONLY =  6
+};
+
+static gboolean ste_mode_to_ofono_mode(enum ste_radio_mode stemode,
+   enum ofono_radio_access_mode *mode)
+{
+   switch (stemode) {
+   case STE_RADIO_ON:
+   *mode = OFONO_RADIO_ACCESS_MODE_ANY;
+   return TRUE;
+   case STE_RADIO_GSM_ONLY:
+   *mode = OFONO_RADIO_ACCESS_MODE_GSM;
+   return TRUE;
+   case STE_RADIO_WCDMA_ONLY:
+   *mode = OFONO_RADIO_ACCESS_MODE_UMTS;
+   return TRUE;
+   case STE_RADIO_OFF:
+   case STE_RADIO_FLIGHT_MODE:
+   break;
+   }
+
+   return FALSE;
+}
+
+static gboolean ofono_mode_to_ste_mode(enum ofono_radio_access_mode mode,
+   enum ste_radio_mode *stemode)
+{
+   switch (mode) {
+   case OFONO_RADIO_ACCESS_MODE_ANY:
+   *stemode = STE_RADIO_ON;
+   return TRUE;
+   case OFONO_RADIO_ACCESS_MODE_GSM:
+   *stemode = STE_RADIO_GSM_ONLY;
+   return TRUE;
+   case OFONO_RADIO_ACCESS_MODE_UMTS:
+   *stemode = STE_RADIO_WCDMA_ONLY;
+   return TRUE;
+   case OFONO_RADIO_ACCESS_MODE_LTE:
+   break;
+   }
+
+   return FALSE;
+}
+
+static void rat_query_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+   struct cb_data *cbd = user_data;
+   ofono_radio_settings_rat_mode_query_cb_t cb = cbd-cb;
+   enum ofono_radio_access_mode mode;
+   struct ofono_error error;
+   GAtResultIter iter;
+   int value;
+
+   decode_at_error(error, g_at_result_final_response(result));
+
+   if (!ok) {
+   cb(error, -1, cbd-data);
+   return;
+   }
+
+   g_at_result_iter_init(iter, result);
+
+   if (!g_at_result_iter_next(iter, +CFUN:))
+   goto err;
+
+   if (!g_at_result_iter_next_number(iter, value))
+   goto err;
+
+   if (!ste_mode_to_ofono_mode(value, mode))
+   goto err;
+
+   CALLBACK_WITH_SUCCESS(cb, mode, cbd-data);
+
+   return;
+
+err:
+   CALLBACK_WITH_FAILURE(cb, -1, cbd-data);
+}
+

[PATCH v5 5/8] plugins/ste: Add Radio-Settings

2010-08-17 Thread Sjur Brændeland
---
 drivers/stemodem/radio-settings.c |5 +
 plugins/ste.c |2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/plugins/ste.c b/plugins/ste.c
index bcf2704..16ddbe1 100644
--- a/plugins/ste.c
+++ b/plugins/ste.c
@@ -54,6 +54,7 @@
 #include ofono/voicecall.h
 #include ofono/gprs.h
 #include ofono/gprs-context.h
+#include ofono/radio-settings.h
 #include ofono/stk.h
 #include drivers/atmodem/vendor.h
 
@@ -279,6 +280,7 @@ static void ste_post_sim(struct ofono_modem *modem)
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);
ofono_call_settings_create(modem, 0, atmodem, data-chat);
-- 
1.6.3.3

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


[PATCH v5 7/8] plugins/ste: Use SOCK_STREAM for CAIF and enable interface specification.

2010-08-17 Thread Sjur Brændeland
---
 plugins/ste.c |   20 +++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/plugins/ste.c b/plugins/ste.c
index 16ddbe1..479d85c 100644
--- a/plugins/ste.c
+++ b/plugins/ste.c
@@ -30,6 +30,7 @@
 #include stdlib.h
 #include string.h
 #include unistd.h
+#include net/if.h
 
 #include glib.h
 #include gatchat.h
@@ -171,14 +172,31 @@ static int ste_enable(struct ofono_modem *modem)
if (!device) {
struct sockaddr_caif addr;
int err;
+   const char *interface;
 
/* Create a CAIF socket for AT Service */
-   fd = socket(AF_CAIF, SOCK_SEQPACKET, CAIFPROTO_AT);
+   fd = socket(AF_CAIF, SOCK_STREAM, CAIFPROTO_AT);
if (fd  0) {
ofono_error(Failed to create CAIF socket for AT);
return -EIO;
}
 
+   /* Bind CAIF socket to specified interface */
+   interface = ofono_modem_get_string(modem, Interface);
+   if (interface) {
+   struct ifreq ifreq;
+   memset(ifreq, 0, sizeof(ifreq));
+   strcpy(ifreq.ifr_name, interface);
+   err = setsockopt(fd, SOL_SOCKET,
+   SO_BINDTODEVICE, ifreq, sizeof(ifreq));
+   if (err  0) {
+   ofono_error(Failed to bind caif socket 
+   to interface);
+   close(fd);
+   return err;
+   }
+   }
+
memset(addr, 0, sizeof(addr));
addr.family = AF_CAIF;
addr.u.at.type = CAIF_ATTYPE_PLAIN;
-- 
1.6.3.3

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


[PATCH v5 6/8] plugins/modemconf.c add support for Interface for STE plugin.

2010-08-17 Thread Sjur Brændeland
---
 plugins/modemconf.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/plugins/modemconf.c b/plugins/modemconf.c
index 3747cd9..d7b1354 100644
--- a/plugins/modemconf.c
+++ b/plugins/modemconf.c
@@ -138,6 +138,7 @@ static struct {
{ g1, set_device  },
{ wavecom,set_device  },
{ ste,set_device  },
+   { ste,set_interface   },
{ calypso,set_device  },
{ palmpre,set_device  },
{ isimodem,   set_interface   },
-- 
1.6.3.3

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


[PATCH v5 8/8] plugins: Add STE sample to modem.conf

2010-08-17 Thread Sjur Brændeland
---
 plugins/modem.conf |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/plugins/modem.conf b/plugins/modem.conf
index 66bf932..b577114 100644
--- a/plugins/modem.conf
+++ b/plugins/modem.conf
@@ -44,3 +44,8 @@
 #[n900]
 #Driver=n900modem
 #Interface=phonet0
+
+# Sample STE modem
+#[ste]
+#Interface=cfttyS0
+#Driver=ste
-- 
1.6.3.3

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


Re: [PATCH v5 1/8] plugins/ste: SIM - STE registers as MBM to utilize mbm quirks.

2010-08-17 Thread Marcel Holtmann
Hi Sjur,

 ---
  Change: This time the right line is hopefully being edited.
 
  plugins/ste.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

patch has been applied. Thanks.

Regards

Marcel


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


Re: [PATCH v5 5/8] plugins/ste: Add Radio-Settings

2010-08-17 Thread Marcel Holtmann
Hi Sjur,

 ---
  drivers/stemodem/radio-settings.c |5 +
  plugins/ste.c |2 ++
  2 files changed, 7 insertions(+), 0 deletions(-)

your diffstat is wrong here. Please check the tools you use to create
them.

Patch has been applied.

Regards

Marcel


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


Re: [PATCH v5 4/7] stemodem: Add Radio Settings to STE Modem

2010-08-17 Thread Marcel Holtmann
Hi Sjur,

 ---
 Changes:
 o Changed order of files in Makefile
 o Fixed missing empty line in copyright
 o Formatted enum better
 o Removed default is switches
 o Removed ste in function names
 
  Makefile.am   |2 +
  drivers/stemodem/radio-settings.c |  230 
 +
  drivers/stemodem/stemodem.c   |2 +
  drivers/stemodem/stemodem.h   |2 +
  4 files changed, 236 insertions(+), 0 deletions(-)
  create mode 100644 drivers/stemodem/radio-settings.c

patch has been applied.

 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -202,10 +202,12 @@ builtin_sources += drivers/atmodem/atutil.h \
   drivers/stemodem/stemodem.h \
   drivers/stemodem/stemodem.c \
   drivers/stemodem/voicecall.c \
 + drivers/stemodem/radio-settings.c \
   drivers/stemodem/gprs-context.c \
   drivers/stemodem/caif_socket.h \
   drivers/stemodem/if_caif.h
  
 +
  builtin_modules += phonesim
  builtin_sources += plugins/phonesim.c

I fixed this for you, but in the future, please don't add extra unneeded
empty lines.

Regards

Marcel


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


Re: [PATCH v5 3/8] plugins/ste: Add AT Channel configurations

2010-08-17 Thread Marcel Holtmann
Hi Sjur,

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

patch has been applied. Thanks.

Regards

Marcel


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


Re: [PATCH v5 7/8] plugins/ste: Use SOCK_STREAM for CAIF and enable interface specification.

2010-08-17 Thread Marcel Holtmann
Hi Sjur,

 ---
  plugins/ste.c |   20 +++-
  1 files changed, 19 insertions(+), 1 deletions(-)

patch has been applied. Thanks.

Regards

Marcel


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


Re: [PATCH v5 6/8] plugins/modemconf.c add support for Interface for STE plugin.

2010-08-17 Thread Marcel Holtmann
Hi Sjur,

  plugins/modemconf.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/plugins/modemconf.c b/plugins/modemconf.c
 index 3747cd9..d7b1354 100644
 --- a/plugins/modemconf.c
 +++ b/plugins/modemconf.c
 @@ -138,6 +138,7 @@ static struct {
   { g1, set_device  },
   { wavecom,set_device  },
   { ste,set_device  },
 + { ste,set_interface   },
   { calypso,set_device  },
   { palmpre,set_device  },
   { isimodem,   set_interface   },

I applied this patch, but keep in mind that modemconf will go away
pretty soon.

Regards

Marcel


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


Re: [PATCH v5 8/8] plugins: Add STE sample to modem.conf

2010-08-17 Thread Marcel Holtmann
Hi Sjur,

  plugins/modem.conf |5 +
  1 files changed, 5 insertions(+), 0 deletions(-)

patch has been applied. Thanks.

Regards

Marcel


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


Re: [PATCH v5 2/8] stemodem: Add polling for SIM ready.

2010-08-17 Thread Marcel Holtmann
Hi Sjur,

 Interim solution until support for SIM 'ready' notification is supported.
 ---
 Change: AT-channel configuration is moved to separate patch.
 
  plugins/ste.c |   52 ++--
  1 files changed, 50 insertions(+), 2 deletions(-)

patch has been applied.

Denis, if you don't like it then feel free to revert it. For me it
looked fine until we have better solution for this.

Regards

Marcel


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


[PATCH] [RfC] stk-api: Proposed Set Up Call api.

2010-08-17 Thread Andrzej Zaborowski
---
 doc/stk-api.txt |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/doc/stk-api.txt b/doc/stk-api.txt
index 2e863a9..b85c7db 100644
--- a/doc/stk-api.txt
+++ b/doc/stk-api.txt
@@ -55,6 +55,14 @@ Signals  PropertyChanged(string property, 
variant value)
Signal is emitted whenever a property has changed.
The new value is passed as the signal argument.
 
+   CallSetUp(string message, byte icon_id, object call)
+
+   Informs about a new VoiceCall that is being set
+   up as a result of a UICC request and gives the
+   message associated with the call to be shown to
+   the user.  Hanging-up the call before it is
+   connected will terminate the current session.
+
 Properties string IdleText
 
Contains the text to be used when the home screen is
@@ -189,6 +197,13 @@ Methodsbyte RequestSelection(string title, 
byte icon_id,
 
Possible Errors: [service].Error.SimToolkit.GoBack
 
+   boolean ConfirmCallSetup(string message, byte icon_id)
+
+   Asks the agent to request user to confirm an
+   outgoing call setup.
+
+   Possible Errors: [service].Error.SimToolkit.EndSession
+
void Cancel()
 
Asks the agent to cancel any ongoing operation in
-- 
1.7.1.86.g0e460.dirty

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


Re: [PATCH] [RfC] stk-api: Proposed Set Up Call api.

2010-08-17 Thread Marcel Holtmann
Hi Andrew,

 ---
  doc/stk-api.txt |   15 +++
  1 files changed, 15 insertions(+), 0 deletions(-)
 
 diff --git a/doc/stk-api.txt b/doc/stk-api.txt
 index 2e863a9..b85c7db 100644
 --- a/doc/stk-api.txt
 +++ b/doc/stk-api.txt
 @@ -55,6 +55,14 @@ SignalsPropertyChanged(string property, 
 variant value)
   Signal is emitted whenever a property has changed.
   The new value is passed as the signal argument.
  
 + CallSetUp(string message, byte icon_id, object call)

to be consistent this should be CallSetup(...)

 + Informs about a new VoiceCall that is being set
 + up as a result of a UICC request and gives the
 + message associated with the call to be shown to
 + the user.  Hanging-up the call before it is
 + connected will terminate the current session.
 +
  Properties   string IdleText
  
   Contains the text to be used when the home screen is
 @@ -189,6 +197,13 @@ Methods  byte RequestSelection(string title, 
 byte icon_id,
  
   Possible Errors: [service].Error.SimToolkit.GoBack
  
 + boolean ConfirmCallSetup(string message, byte icon_id)
 +
 + Asks the agent to request user to confirm an
 + outgoing call setup.
 +
 + Possible Errors: [service].Error.SimToolkit.EndSession
 +
   void Cancel()
  
   Asks the agent to cancel any ongoing operation in

Why do we need two handlers here. One signal and one agent callback. I
do understand the agent callback. That is pretty obvious, but why do you
also wanna send the signal as well. Would this be just go via the voice
call interface and be transparent for the dialer?

Regards

Marcel


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


Re: [PATCH] [RfC] stk-api: Proposed Set Up Call api.

2010-08-17 Thread Andrzej Zaborowski
Hi,

On 17 August 2010 16:39, Marcel Holtmann mar...@holtmann.org wrote:
 Hi Andrew,

 ---
  doc/stk-api.txt |   15 +++
  1 files changed, 15 insertions(+), 0 deletions(-)

 diff --git a/doc/stk-api.txt b/doc/stk-api.txt
 index 2e863a9..b85c7db 100644
 --- a/doc/stk-api.txt
 +++ b/doc/stk-api.txt
 @@ -55,6 +55,14 @@ Signals            PropertyChanged(string property, 
 variant value)
                       Signal is emitted whenever a property has changed.
                       The new value is passed as the signal argument.

 +             CallSetUp(string message, byte icon_id, object call)

 to be consistent this should be CallSetup(...)

They're not interchangeable though because setup is a noun, and in
this case we're notifying that a call has been set up / is being set
up.


 +                     Informs about a new VoiceCall that is being set
 +                     up as a result of a UICC request and gives the
 +                     message associated with the call to be shown to
 +                     the user.  Hanging-up the call before it is
 +                     connected will terminate the current session.
 +
  Properties   string IdleText

                       Contains the text to be used when the home screen is
 @@ -189,6 +197,13 @@ Methods          byte RequestSelection(string title, 
 byte icon_id,

                       Possible Errors: [service].Error.SimToolkit.GoBack

 +             boolean ConfirmCallSetup(string message, byte icon_id)
 +
 +                     Asks the agent to request user to confirm an
 +                     outgoing call setup.
 +
 +                     Possible Errors: [service].Error.SimToolkit.EndSession
 +
               void Cancel()

                       Asks the agent to cancel any ongoing operation in

 Why do we need two handlers here. One signal and one agent callback. I
 do understand the agent callback. That is pretty obvious, but why do you
 also wanna send the signal as well. Would this be just go via the voice
 call interface and be transparent for the dialer?

This is a possiblity, I'm not very sure what would be the best option.
 The reason for the signal was so that the alpha id can be associated
with given VoiceCall object. (The same VoiceCall object will of course
be available in VoiceCallManager properties).

The timeline for call setup is something like:

 * Modem asks user for confirmation using icon1 / alphaId1.
 * User confirms
 * Modem starts dialling, screen displays icon2 / alphaId2,
 * Call is connected, modem replies to the proactive command, screen
keeps displaying icon2 / alphaId2 until the phone call is over.

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


Re: [PATCH] [RfC] stk-api: Proposed Set Up Call api.

2010-08-17 Thread Marcel Holtmann
Hi Andrew,

   doc/stk-api.txt |   15 +++
   1 files changed, 15 insertions(+), 0 deletions(-)
 
  diff --git a/doc/stk-api.txt b/doc/stk-api.txt
  index 2e863a9..b85c7db 100644
  --- a/doc/stk-api.txt
  +++ b/doc/stk-api.txt
  @@ -55,6 +55,14 @@ SignalsPropertyChanged(string property, 
  variant value)
Signal is emitted whenever a property has changed.
The new value is passed as the signal argument.
 
  + CallSetUp(string message, byte icon_id, object call)
 
  to be consistent this should be CallSetup(...)
 
 They're not interchangeable though because setup is a noun, and in
 this case we're notifying that a call has been set up / is being set
 up.

then I prefer something like CallSetupCompleted or similar. Do we need a
CallSetupFailed as well? Can it fail? Is this an expected behavior, can
we ignore it?

  + Informs about a new VoiceCall that is being set
  + up as a result of a UICC request and gives the
  + message associated with the call to be shown to
  + the user.  Hanging-up the call before it is
  + connected will terminate the current session.
  +
   Properties   string IdleText
 
Contains the text to be used when the home screen is
  @@ -189,6 +197,13 @@ Methods  byte RequestSelection(string title, 
  byte icon_id,
 
Possible Errors: [service].Error.SimToolkit.GoBack
 
  + boolean ConfirmCallSetup(string message, byte icon_id)
  +
  + Asks the agent to request user to confirm an
  + outgoing call setup.
  +
  + Possible Errors: 
  [service].Error.SimToolkit.EndSession
  +
void Cancel()
 
Asks the agent to cancel any ongoing operation in
 
  Why do we need two handlers here. One signal and one agent callback. I
  do understand the agent callback. That is pretty obvious, but why do you
  also wanna send the signal as well. Would this be just go via the voice
  call interface and be transparent for the dialer?
 
 This is a possiblity, I'm not very sure what would be the best option.
  The reason for the signal was so that the alpha id can be associated
 with given VoiceCall object. (The same VoiceCall object will of course
 be available in VoiceCallManager properties).
 
 The timeline for call setup is something like:
 
  * Modem asks user for confirmation using icon1 / alphaId1.
  * User confirms
  * Modem starts dialling, screen displays icon2 / alphaId2,
  * Call is connected, modem replies to the proactive command, screen
 keeps displaying icon2 / alphaId2 until the phone call is over.

For simplicity, I would say that this should just happen via the new
CallAdded signal and we make icon and alphaid part of the call
properties. That would be my idea right now.

Maybe we just generalize this into Message and Icon property anyway. The
Icon is rather useless, but the Message could be useful for CNAP support
as well. Just an idea.

Regards

Marcel


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


RAT , signal Strength indication ofono 0.23

2010-08-17 Thread Kouassu, AlainX
All,

Is the Strength property and the Technology fully implemented in 
org.ofono.NetworkRegistration  on Ofono 0.23 ?
Is org.ofono.NetworkRegistration is  fully integrated on Ofono 0.23 ?

I am testing Ofono 0.23 on top of Medfield platform with a Agilent 8960 
(Network simulator)
I have noticed  that at ofono level  RAT indication and signal strength are not 
updated when the RAT change or when the signal level change.


Thanks,
Alain

-
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: RAT , signal Strength indication ofono 0.23

2010-08-17 Thread Denis Kenzior
Hi Alain,

On 08/17/2010 11:05 AM, Kouassu, AlainX wrote:
 All,
 
  
 
 Is the “Strength” property and the “Technology” fully implemented in
 org.ofono.NetworkRegistration  on Ofono 0.23 ?
 
 Is org.ofono.NetworkRegistration is  fully integrated on Ofono 0.23 ?
 
  

If the modem driver provides it, then sure.  Please do keep in mind that
oFono 0.23 is pretty ancient now, our development moves pretty quickly.

 
 I am testing Ofono 0.23 on top of Medfield platform with a Agilent 8960
 (Network simulator)
 
 I have noticed  that at ofono level  RAT indication and signal strength
 are not updated when the RAT change or when the signal level change.
 
  

What modem are you using?  Is the driver for this modem upstream?

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


ppp0 interface is not configured

2010-08-17 Thread Florian Mayer (Mayer Electronics)

Hello all,

we currently test the PPP dialup with a Huawei EM770W modem. We can 
connect with create-context and activate context but the ppp device is 
not configured. connman says that the device is not connected. We use 
connman 0.55 and ofono 0.26.

What did we do wrong? The kernel is 2.6.35~pre5 from Meego 1.1 devel.

Regards
Florian Mayer
Mayer Electronics

# /usr/lib/ofono/test/list-modems
[ /huawei0 ]
   Features = sms gprs cbs net sim
   Powered = 1
   Interfaces = org.ofono.SmsManager org.ofono.DataConnectionManager 
org.ofono.CellBroadcast org.ofono.NetworkRegistration 
org.ofono.SupplementaryServices org.ofono.SimManager

   Online = 1
   Model = EM770W
   Manufacturer = huawei
   Serial = xyz
   Revision = 11.126.10.81.00
   [ org.ofono.SmsManager ]
   UseDeliveryReports = 0
   Bearer = cs-preferred
   ServiceCenterAddress = +49171076
   [ org.ofono.DataConnectionManager ]
   Powered = 1
   Attached = 1
   PrimaryContexts = /huawei0/primarycontext1
   RoamingAllowed = 1
   [ org.ofono.CellBroadcast ]
   Topics =
   Powered = 1
   [ org.ofono.NetworkRegistration ]
   Status = registered
   Strength = 70
   Name = T-Mobile D
   Operators = /huawei0/operator/26201
   LocationAreaCode = 34591
   Mode = auto
   MobileCountryCode = 262
   CellId = 5950877
   MobileNetworkCode = 01
   [ org.ofono.SupplementaryServices ]
   State = idle
   [ org.ofono.SimManager ]
   SubscriberNumbers =
   LockedPins =
   SubscriberIdentity = xyz
   Present = 1
   PinRequired = none

# /usr/lib/ofono/test/list-contexts
[ /huawei0 ]
   [ /huawei0/primarycontext1 ]
   Username =
   Protocol = ip
   Name = 3G Connection
   Settings = { Interface=ppp0 Netmask=255.255.255.255 
Method=static DomainNameServers=193.254.160.1,10.74.83.22, 
Address=88.128.36.75 }

   Active = 1
   AccessPointName = internet.t-d1.de
   Password =
   Type = internet

# /usr/lib/connman/test/list-networks

[ /org/moblin/connman/device/262012020178698 ]
   [ /org/moblin/connman/device/262012020178698/primarycontext1 ]
   Device = /org/moblin/connman/device/262012020178698
   Strength = 70
   Connected = 0
   Name = T-Mobile D

# /usr/lib/connman/test/list-devices

[ /org/moblin/connman/device/262012020178698 ]
   Networks = /org/moblin/connman/device/262012020178698/primarycontext1
   Type = cellular
   Name = Cellular
   Powered = 1



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


ppp0 interface is not configured

2010-08-17 Thread Florian Mayer (Mayer Electronics)

Hello all,

we currently test the PPP dialup with a Huawei EM770W modem. We can 
connect with create-context and activate context but the ppp device is 
not configured. connman says that the device is not connected. We use 
connman 0.55 and ofono 0.26.

What did we do wrong? The kernel is 2.6.35~pre5 from Meego 1.1 devel.

Regards
Florian Mayer
Mayer Electronics

# /usr/lib/ofono/test/list-modems
[ /huawei0 ]
   Features = sms gprs cbs net sim
   Powered = 1
   Interfaces = org.ofono.SmsManager org.ofono.DataConnectionManager 
org.ofono.CellBroadcast org.ofono.NetworkRegistration 
org.ofono.SupplementaryServices org.ofono.SimManager

   Online = 1
   Model = EM770W
   Manufacturer = huawei
   Serial = xyz
   Revision = 11.126.10.81.00
   [ org.ofono.SmsManager ]
   UseDeliveryReports = 0
   Bearer = cs-preferred
   ServiceCenterAddress = +49171076
   [ org.ofono.DataConnectionManager ]
   Powered = 1
   Attached = 1
   PrimaryContexts = /huawei0/primarycontext1
   RoamingAllowed = 1
   [ org.ofono.CellBroadcast ]
   Topics =
   Powered = 1
   [ org.ofono.NetworkRegistration ]
   Status = registered
   Strength = 70
   Name = T-Mobile D
   Operators = /huawei0/operator/26201
   LocationAreaCode = 34591
   Mode = auto
   MobileCountryCode = 262
   CellId = 5950877
   MobileNetworkCode = 01
   [ org.ofono.SupplementaryServices ]
   State = idle
   [ org.ofono.SimManager ]
   SubscriberNumbers =
   LockedPins =
   SubscriberIdentity = xyz
   Present = 1
   PinRequired = none

# /usr/lib/ofono/test/list-contexts
[ /huawei0 ]
   [ /huawei0/primarycontext1 ]
   Username =
   Protocol = ip
   Name = 3G Connection
   Settings = { Interface=ppp0 Netmask=255.255.255.255 
Method=static DomainNameServers=193.254.160.1,10.74.83.22, 
Address=88.128.36.75 }

   Active = 1
   AccessPointName = internet.t-d1.de
   Password =
   Type = internet

# /usr/lib/connman/test/list-networks

[ /org/moblin/connman/device/262012020178698 ]
   [ /org/moblin/connman/device/262012020178698/primarycontext1 ]
   Device = /org/moblin/connman/device/262012020178698
   Strength = 70
   Connected = 0
   Name = T-Mobile D

# /usr/lib/connman/test/list-devices

[ /org/moblin/connman/device/262012020178698 ]
   Networks = /org/moblin/connman/device/262012020178698/primarycontext1
   Type = cellular
   Name = Cellular
   Powered = 1



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


Re: ppp0 interface is not configured

2010-08-17 Thread Marcel Holtmann
Hi Florian,

 we currently test the PPP dialup with a Huawei EM770W modem. We can 
 connect with create-context and activate context but the ppp device is 
 not configured. connman says that the device is not connected. We use 
 connman 0.55 and ofono 0.26.
 What did we do wrong? The kernel is 2.6.35~pre5 from Meego 1.1 devel.

I never tested this with the EM777W modem, but with the Huawei modems I
have it works just fine.

Especially if it shows the DataConnectionManager interface since then
you have this properly setup and running.

 [ org.ofono.DataConnectionManager ]
 Powered = 1
 Attached = 1
 PrimaryContexts = /huawei0/primarycontext1
 RoamingAllowed = 1
 [ org.ofono.NetworkRegistration ]
 Status = registered
 Strength = 70
 Name = T-Mobile D
 Operators = /huawei0/operator/26201
 LocationAreaCode = 34591
 Mode = auto
 MobileCountryCode = 262
 CellId = 5950877
 MobileNetworkCode = 01

 # /usr/lib/ofono/test/list-contexts
 [ /huawei0 ]
 [ /huawei0/primarycontext1 ]
 Username =
 Protocol = ip
 Name = 3G Connection
 Settings = { Interface=ppp0 Netmask=255.255.255.255 
 Method=static DomainNameServers=193.254.160.1,10.74.83.22, 
 Address=88.128.36.75 }
 Active = 1
 AccessPointName = internet.t-d1.de
 Password =
 Type = internet

This looks like an active Internet context. How did you activate this
one. Via ConnMan or via activate-context test script. If via the script,
then I think that ConnMan is not picking this up. I think that is a bug
in ConnMan.

What does list-services from ConnMan says? The devices and networks are
actually irrelevant.

Regards

Marcel


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


Re: ppp0 interface is not configured

2010-08-17 Thread Florian Mayer (Mayer Electronics)

Marcel Holtmann schrieb:

Hi Florian,

  
we currently test the PPP dialup with a Huawei EM770W modem. We can 
connect with create-context and activate context but the ppp device is 
not configured. connman says that the device is not connected. We use 
connman 0.55 and ofono 0.26.

What did we do wrong? The kernel is 2.6.35~pre5 from Meego 1.1 devel.



I never tested this with the EM777W modem, but with the Huawei modems I
have it works just fine.

Especially if it shows the DataConnectionManager interface since then
you have this properly setup and running.

  

[ org.ofono.DataConnectionManager ]
Powered = 1
Attached = 1
PrimaryContexts = /huawei0/primarycontext1
RoamingAllowed = 1
[ org.ofono.NetworkRegistration ]
Status = registered
Strength = 70
Name = T-Mobile D
Operators = /huawei0/operator/26201
LocationAreaCode = 34591
Mode = auto
MobileCountryCode = 262
CellId = 5950877
MobileNetworkCode = 01



  

# /usr/lib/ofono/test/list-contexts
[ /huawei0 ]
[ /huawei0/primarycontext1 ]
Username =
Protocol = ip
Name = 3G Connection
Settings = { Interface=ppp0 Netmask=255.255.255.255 
Method=static DomainNameServers=193.254.160.1,10.74.83.22, 
Address=88.128.36.75 }

Active = 1
AccessPointName = internet.t-d1.de
Password =
Type = internet



This looks like an active Internet context. How did you activate this
one. Via ConnMan or via activate-context test script. If via the script,
then I think that ConnMan is not picking this up. I think that is a bug
in ConnMan.

What does list-services from ConnMan says? The devices and networks are
actually irrelevant.
  

Hello,

thanks for the fast reply.
Yes I activated the context with the ofono activate-context script. I 
tested this method some time ago with connman 0.54 and ofono 0.24. There 
it worked.

Here is the result of connman list-services:
[ /profile/default/cellular_262012020178698_primarycontext1 ]
   AutoConnect = false
   Strength = 74
   Name = T-Mobile D
   SetupRequired = true
   Nameservers = [ ]
   Proxy = { }
   Favorite = false
   Domains.Configuration = [ ]
   State = idle
   IPv4 = { }
   Nameservers.Configuration = [ ]
   Mode = gprs
   Domains = [ ]
   Ethernet = { }
   Roaming = 0
   IPv4.Configuration = { }
   Type = cellular
   Immutable = false
   LoginRequired = false

How can I activate the the service from connman side via command line?
To get it right: each created context in ofono (and in the modem) is a 
service for connman, right?
I have to provide some hardware testing scripts for my customer. They 
want to do it automated.


Regards
Florian


Regards

Marcel


___
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: ppp0 interface is not configured

2010-08-17 Thread Marcel Holtmann
Hi Florian,

  we currently test the PPP dialup with a Huawei EM770W modem. We can 
  connect with create-context and activate context but the ppp device is 
  not configured. connman says that the device is not connected. We use 
  connman 0.55 and ofono 0.26.
  What did we do wrong? The kernel is 2.6.35~pre5 from Meego 1.1 devel.
  
 
  I never tested this with the EM777W modem, but with the Huawei modems I
  have it works just fine.
 
  Especially if it shows the DataConnectionManager interface since then
  you have this properly setup and running.
 

  [ org.ofono.DataConnectionManager ]
  Powered = 1
  Attached = 1
  PrimaryContexts = /huawei0/primarycontext1
  RoamingAllowed = 1
  [ org.ofono.NetworkRegistration ]
  Status = registered
  Strength = 70
  Name = T-Mobile D
  Operators = /huawei0/operator/26201
  LocationAreaCode = 34591
  Mode = auto
  MobileCountryCode = 262
  CellId = 5950877
  MobileNetworkCode = 01
  
 

  # /usr/lib/ofono/test/list-contexts
  [ /huawei0 ]
  [ /huawei0/primarycontext1 ]
  Username =
  Protocol = ip
  Name = 3G Connection
  Settings = { Interface=ppp0 Netmask=255.255.255.255 
  Method=static DomainNameServers=193.254.160.1,10.74.83.22, 
  Address=88.128.36.75 }
  Active = 1
  AccessPointName = internet.t-d1.de
  Password =
  Type = internet
  
 
  This looks like an active Internet context. How did you activate this
  one. Via ConnMan or via activate-context test script. If via the script,
  then I think that ConnMan is not picking this up. I think that is a bug
  in ConnMan.
 
  What does list-services from ConnMan says? The devices and networks are
  actually irrelevant.

 Yes I activated the context with the ofono activate-context script. I 
 tested this method some time ago with connman 0.54 and ofono 0.24. There 
 it worked.
 Here is the result of connman list-services:
 [ /profile/default/cellular_262012020178698_primarycontext1 ]
 AutoConnect = false
 Strength = 74
 Name = T-Mobile D
 SetupRequired = true
 Nameservers = [ ]
 Proxy = { }
 Favorite = false
 Domains.Configuration = [ ]
 State = idle
 IPv4 = { }
 Nameservers.Configuration = [ ]
 Mode = gprs
 Domains = [ ]
 Ethernet = { }
 Roaming = 0
 IPv4.Configuration = { }
 Type = cellular
 Immutable = false
 LoginRequired = false
 
 How can I activate the the service from connman side via command line?
 To get it right: each created context in ofono (and in the modem) is a 
 service for connman, right?
 I have to provide some hardware testing scripts for my customer. They 
 want to do it automated.

I am using test-connman list and test-connman connect  Make sure
the APN is set properly, but it can also be set via test-connman script.

Regards

Marcel


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


Re: [RFC_PATCH 2/4] smsutil: Editorial changes to sms status report function

2010-08-17 Thread Denis Kenzior
Hi Petteri,

On 08/16/2010 02:08 AM, Petteri Tikander wrote:
 ---
  src/smsutil.c |  202 +++-
  1 files changed, 198 insertions(+), 4 deletions(-)
 

Can we change the commit message a bit, something about storing /
loading sms status report assemblies over reboots ;)

 diff --git a/src/smsutil.c b/src/smsutil.c
 index 22c70cf..0972988 100644
 --- a/src/smsutil.c
 +++ b/src/smsutil.c
 @@ -45,6 +45,10 @@
  #define SMS_BACKUP_PATH_DIR SMS_BACKUP_PATH /%s-%i-%i
  #define SMS_BACKUP_PATH_FILE SMS_BACKUP_PATH_DIR /%03i
  
 +#define SMS_SR_BACKUP_PATH STORAGEDIR /%s/sms_sr
 +#define SMS_SR_BACKUP_PATH_DIR SMS_SR_BACKUP_PATH /%s-%i-%i
 +#define SMS_SR_BACKUP_PATH_FILE SMS_SR_BACKUP_PATH_DIR /%i
 +
  #define SMS_ADDR_FMT %24[0-9A-F]
  
  static GSList *sms_assembly_add_fragment_backup(struct sms_assembly 
 *assembly,
 @@ -2642,20 +2646,204 @@ void sms_assembly_expire(struct sms_assembly 
 *assembly, time_t before)
   }
  }
  
 +static void sr_assembly_load_backup(GHashTable *assembly_table,
 + const char *imsi,
 + const struct dirent *addr_dir)
 +{
 + char *path;
 + struct dirent **ids;
 + struct sms_address sms_addr, *addr;
 + struct id_table_node *node;
 + GHashTable *id_table;
 + int len;
 + int r;
 + unsigned char buf[sizeof(node-mrs) + sizeof(node-total_mrs) +
 + sizeof(node-sent_mrs) + sizeof(node-deliverable)];
 + char *assembly_table_key;
 + unsigned int *id_table_key;
 + struct stat segment_stat;
 +
 + if (addr_dir-d_type != DT_DIR)
 + return;
 +
 + addr = sms_addr;
 +
 + if (sscanf(addr_dir-d_name, SMS_ADDR_FMT -%i-%i,
 + addr-address, (int *) addr-number_type,
 + (int *) addr-numbering_plan)  3) {
 + return;
 + }

Lets follow what the sms_assembly does here.  Namely SMS_ADDR_FMT is
actually geared towards a hex-encoded address.  This already contains
the address, number_type and numbering_plan elements.  So simply using
sms_assembly_extract_address() afterwards is actually fine.  This has
the advantage of getting rid of the unnecessary casts.

 +
 + /* Go through different msg_ids. */
 + path = g_strdup_printf(SMS_SR_BACKUP_PATH /%s, imsi,
 + addr_dir-d_name);
 + len = scandir(path, ids, NULL, versionsort);
 +
 + g_free(path);
 +
 + if (len  0)
 + return;
 +
 + id_table = g_hash_table_new_full(g_int_hash, g_int_equal,
 + g_free, g_free);
 +
 + assembly_table_key = g_try_malloc(sizeof(addr-address));
 +
 + if (assembly_table_key == NULL)
 + return;
 +
 + g_strlcpy(assembly_table_key, addr-address, sizeof(addr-address));
 + g_hash_table_insert(assembly_table, assembly_table_key, id_table);
 +
 + while (len--) {
 + path = g_strdup_printf(SMS_SR_BACKUP_PATH /%s/%s,
 + imsi, addr_dir-d_name, ids[len]-d_name);
 + r = read_file(buf, sizeof(buf), SMS_SR_BACKUP_PATH /%s/%s,
 + imsi, addr_dir-d_name, ids[len]-d_name);
 +
 + if (r  0) {
 + g_free(path);
 + g_free(ids[len]);
 + continue;
 + }
 +
 + r = stat(path, segment_stat);
 +
 + if (r != 0) {
 + g_free(path);
 + g_free(ids[len]);
 + continue;
 + }
 + /* Gather the data for id_table node */
 + node = g_new0(struct id_table_node, 1);
 + memcpy(node-to, addr, sizeof(*addr));

So I got rid of the node-to for now.  There's no reason to have it that
I can see...  Any time you are building / loading / accessing a node,
you actually know the current to address anyway.

 + node-expiration = segment_stat.st_mtime;
 + memcpy(node-mrs, buf, sizeof(node-mrs));
 + memcpy(node-total_mrs, buf + sizeof(node-mrs),
 + sizeof(node-total_mrs));
 + memcpy(node-sent_mrs,
 + buf + sizeof(node-mrs) + sizeof(node-total_mrs),
 + sizeof(node-sent_mrs));
 +
 + memcpy(node-deliverable, buf + sizeof(node-mrs) +
 + sizeof(node-total_mrs) + sizeof(node-sent_mrs),
 + sizeof(node-deliverable));

To make our lives easier, I'd make the id_table_node structure packed
and read the data directly into it.  We don't have to worry about
byte-ordering at this point.

 + /* Node ready, create key and add them to the table */
 + id_table_key = g_new0(unsigned int, 1);
 + *id_table_key = atoi(ids[len]-d_name);
 +
 + g_hash_table_insert(id_table, 

Re: [RFC_PATCH 3/4] smsutil:add proper checking of sms-address in status report-function

2010-08-17 Thread Denis Kenzior
Hi Petteri,

On 08/16/2010 02:08 AM, Petteri Tikander wrote:
 ---
  src/smsutil.c |   54 ++
  1 files changed, 26 insertions(+), 28 deletions(-)
 
 diff --git a/src/smsutil.c b/src/smsutil.c
 index 0972988..25e405c 100644
 --- a/src/smsutil.c
 +++ b/src/smsutil.c
 @@ -46,7 +46,7 @@
  #define SMS_BACKUP_PATH_FILE SMS_BACKUP_PATH_DIR /%03i
  
  #define SMS_SR_BACKUP_PATH STORAGEDIR /%s/sms_sr
 -#define SMS_SR_BACKUP_PATH_DIR SMS_SR_BACKUP_PATH /%s-%i-%i
 +#define SMS_SR_BACKUP_PATH_DIR SMS_SR_BACKUP_PATH /%s

Aha you're already following my comments from last patch :)  Can you
please modify the previous patch to include this change?

  #define SMS_SR_BACKUP_PATH_FILE SMS_SR_BACKUP_PATH_DIR /%i
  
  #define SMS_ADDR_FMT %24[0-9A-F]
 @@ -2417,7 +2417,7 @@ static void sms_assembly_backup_free(struct 
 sms_assembly *assembly,
  {
   char *path;
   int seq;
 - char straddr[25];
 + DECLARE_SMS_ADDR_STR(straddr);

Same comment as above, squish into previous patch.

  
   if (!assembly-imsi)
   return;
 @@ -2652,7 +2652,8 @@ static void sr_assembly_load_backup(GHashTable 
 *assembly_table,
  {
   char *path;
   struct dirent **ids;
 - struct sms_address sms_addr, *addr;
 + struct sms_address addr;
 + DECLARE_SMS_ADDR_STR(straddr);

Here as well, squish into previous patch.

   struct id_table_node *node;
   GHashTable *id_table;
   int len;
 @@ -2666,13 +2667,12 @@ static void sr_assembly_load_backup(GHashTable 
 *assembly_table,
   if (addr_dir-d_type != DT_DIR)
   return;
  
 - addr = sms_addr;
 + /* Max of SMS address size is 12 bytes, hex encoded */
 + if (sscanf(addr_dir-d_name, SMS_ADDR_FMT, straddr)  1)
 + return;
  
 - if (sscanf(addr_dir-d_name, SMS_ADDR_FMT -%i-%i,
 - addr-address, (int *) addr-number_type,
 - (int *) addr-numbering_plan)  3) {
 + if (sms_assembly_extract_address(straddr, addr) == FALSE)
   return;
 - }

And here

  
   /* Go through different msg_ids. */
   path = g_strdup_printf(SMS_SR_BACKUP_PATH /%s, imsi,
 @@ -2687,12 +2687,12 @@ static void sr_assembly_load_backup(GHashTable 
 *assembly_table,
   id_table = g_hash_table_new_full(g_int_hash, g_int_equal,
   g_free, g_free);
  
 - assembly_table_key = g_try_malloc(sizeof(addr-address));
 + assembly_table_key = g_try_malloc(sizeof(addr.address));
  
   if (assembly_table_key == NULL)
   return;
  
 - g_strlcpy(assembly_table_key, addr-address, sizeof(addr-address));
 + g_strlcpy(assembly_table_key, addr.address, sizeof(addr.address));
   g_hash_table_insert(assembly_table, assembly_table_key, id_table);

g_strdup(sms_address_to_string(addr)) seems better.  Squish this one
into the previous patch as well.

  
   while (len--) {
 @@ -2716,7 +2716,7 @@ static void sr_assembly_load_backup(GHashTable 
 *assembly_table,
   }
   /* Gather the data for id_table node */
   node = g_new0(struct id_table_node, 1);
 - memcpy(node-to, addr, sizeof(*addr));
 + memcpy(node-to, addr, sizeof(addr));
   node-expiration = segment_stat.st_mtime;
   memcpy(node-mrs, buf, sizeof(node-mrs));
   memcpy(node-total_mrs, buf + sizeof(node-mrs),
 @@ -2766,7 +2766,6 @@ struct status_report_assembly 
 *status_report_assembly_new(const char *imsi)
   /* Go through different addresses. Each address can relate to
* 1-n msg_ids.
*/
 -

Again, please leave this newline here.

   while (len--) {
   sr_assembly_load_backup(ret-assembly_table, imsi,
   addresses[len]);
 @@ -2786,10 +2785,14 @@ static gboolean sr_assembly_add_fragment_backup(const 
 char *imsi,
   int len = sizeof(node-mrs) + sizeof(node-total_mrs) +
   sizeof(node-sent_mrs) + sizeof(node-deliverable);
   unsigned char buf[len];
 + DECLARE_SMS_ADDR_STR(straddr);
  
   if (!imsi)
   return FALSE;
  
 + if (sms_address_to_hex_string(node-to, straddr) == FALSE)
 + return FALSE;
 +

And squish here as well..

   memcpy(buf, node-mrs, sizeof(node-mrs));
  
   memcpy(buf + sizeof(node-mrs), node-total_mrs,
 @@ -2801,10 +2804,9 @@ static gboolean sr_assembly_add_fragment_backup(const 
 char *imsi,
   memcpy(buf + sizeof(node-mrs) + sizeof(node-total_mrs) +
   sizeof(node-sent_mrs), node-deliverable, sizeof(node-deliverable));
  
 - /* storagedir/%s/sms_sr/%s-%i-%i/%i */
 + /* storagedir/%s/sms_sr/%s/%i */
   if (write_file(buf, len, SMS_BACKUP_MODE, SMS_SR_BACKUP_PATH_FILE, imsi,
 - node-to.address, node-to.number_type,
 - 

Re: [RFC_PATCH 4/4] smsutil: added function for data handling of status report

2010-08-17 Thread Denis Kenzior
Hi Petteri,

On 08/16/2010 02:08 AM, Petteri Tikander wrote:
 ---
  src/smsutil.c |  158 
 +
  1 files changed, 92 insertions(+), 66 deletions(-)
 
 diff --git a/src/smsutil.c b/src/smsutil.c
 index 25e405c..a12bede 100644
 --- a/src/smsutil.c
 +++ b/src/smsutil.c
 @@ -57,6 +57,15 @@ static GSList *sms_assembly_add_fragment_backup(struct 
 sms_assembly *assembly,
   guint16 ref, guint8 max, guint8 seq,
   gboolean backup);
  
 +static void sr_assembly_add_fragment_backup(
 + struct status_report_assembly *assembly,
 + unsigned int msg_id, time_t ts,
 + const struct sms_address *to,
 + unsigned int *mrs,
 + unsigned char total_mrs,
 + unsigned char sent_mrs,
 + gboolean backup);
 +

Please avoid forward-declarations unless absolutely necessary.  It is
better to just move the function upwards.

  /*
   * This function uses the meanings of digits 10..15 according to the rules
   * defined in 23.040 Section 9.1.2.3 and 24.008 Table 10.5.118
 @@ -2646,22 +2655,19 @@ void sms_assembly_expire(struct sms_assembly 
 *assembly, time_t before)
   }
  }
  
 -static void sr_assembly_load_backup(GHashTable *assembly_table,
 - const char *imsi,
 - const struct dirent *addr_dir)
 +static void sr_assembly_load_backup(
 + struct status_report_assembly *assembly_table,
 + const struct dirent *addr_dir)
  {
   char *path;
   struct dirent **ids;
   struct sms_address addr;
   DECLARE_SMS_ADDR_STR(straddr);
   struct id_table_node *node;
 - GHashTable *id_table;
   int len;
   int r;
   unsigned char buf[sizeof(node-mrs) + sizeof(node-total_mrs) +
   sizeof(node-sent_mrs) + sizeof(node-deliverable)];
 - char *assembly_table_key;
 - unsigned int *id_table_key;
   struct stat segment_stat;
  
   if (addr_dir-d_type != DT_DIR)
 @@ -2675,7 +2681,7 @@ static void sr_assembly_load_backup(GHashTable 
 *assembly_table,
   return;
  
   /* Go through different msg_ids. */
 - path = g_strdup_printf(SMS_SR_BACKUP_PATH /%s, imsi,
 + path = g_strdup_printf(SMS_SR_BACKUP_PATH /%s, assembly_table-imsi,
   addr_dir-d_name);
   len = scandir(path, ids, NULL, versionsort);
  
 @@ -2684,22 +2690,13 @@ static void sr_assembly_load_backup(GHashTable 
 *assembly_table,
   if (len  0)
   return;
  
 - id_table = g_hash_table_new_full(g_int_hash, g_int_equal,
 - g_free, g_free);
 -
 - assembly_table_key = g_try_malloc(sizeof(addr.address));
 -
 - if (assembly_table_key == NULL)
 - return;
 -
 - g_strlcpy(assembly_table_key, addr.address, sizeof(addr.address));
 - g_hash_table_insert(assembly_table, assembly_table_key, id_table);
 -
   while (len--) {
   path = g_strdup_printf(SMS_SR_BACKUP_PATH /%s/%s,
 - imsi, addr_dir-d_name, ids[len]-d_name);
 + assembly_table-imsi, addr_dir-d_name,
 + ids[len]-d_name);
   r = read_file(buf, sizeof(buf), SMS_SR_BACKUP_PATH /%s/%s,
 - imsi, addr_dir-d_name, ids[len]-d_name);
 + assembly_table-imsi, addr_dir-d_name,
 + ids[len]-d_name);
  
   if (r  0) {
   g_free(path);
 @@ -2714,29 +2711,21 @@ static void sr_assembly_load_backup(GHashTable 
 *assembly_table,
   g_free(ids[len]);
   continue;
   }
 - /* Gather the data for id_table node */
 - node = g_new0(struct id_table_node, 1);
 - memcpy(node-to, addr, sizeof(addr));
 - node-expiration = segment_stat.st_mtime;
 - memcpy(node-mrs, buf, sizeof(node-mrs));
 - memcpy(node-total_mrs, buf + sizeof(node-mrs),
 - sizeof(node-total_mrs));
 - memcpy(node-sent_mrs,
 - buf + sizeof(node-mrs) + sizeof(node-total_mrs),
 - sizeof(node-sent_mrs));
 -
 - memcpy(node-deliverable, buf + sizeof(node-mrs) +
 - sizeof(node-total_mrs) + sizeof(node-sent_mrs),
 - sizeof(node-deliverable));
 - /* Node ready, create key and add them to the table */
 - id_table_key = g_new0(unsigned int, 1);
 - *id_table_key = 

Re: [PATCH 2/2] Add: n900modem driver

2010-08-17 Thread Denis Kenzior
Hi Pekka,

On 08/13/2010 01:31 PM, pekka.pe...@nokia.com wrote:
 From: Pekka Pessi pekka.pe...@nokia.com
 
 The N900 modem is based on isimodem. It works natively on N900 with Maemo or
 Meego kernel.
 
 The configuration option --disable-n900modem can be used to disable it (if,
 for instance, using ofono with Maemo 5 userspace).

Just had a quick look and this caught my eye:

 +static int n900modem_init(void)
 +{
 + isi_devinfo_init();
 + isi_phonebook_init();
 + isi_netreg_init();
 + isi_voicecall_init();
 + isi_sms_init();
 + isi_cbs_init();
 + isi_sim_init();
 + isi_ssn_init();
 + isi_ussd_init();
 + isi_call_forwarding_init();
 + isi_call_settings_init();
 + isi_call_barring_init();
 + isi_call_meter_init();
 + isi_radio_settings_init();
 +
 + ofono_modem_driver_register(driver);
 +
 + return 0;
 +}
 +
 +static void n900modem_exit(void)
 +{
 + ofono_modem_driver_unregister(driver);
 +
 + isi_devinfo_exit();
 + isi_phonebook_exit();
 + isi_netreg_exit();
 + isi_voicecall_exit();
 + isi_sms_exit();
 + isi_cbs_exit();
 + isi_sim_exit();
 + isi_ssn_exit();
 + isi_ussd_exit();
 + isi_call_forwarding_exit();
 + isi_call_settings_exit();
 + isi_call_barring_exit();
 + isi_call_meter_exit();
 + isi_radio_settings_exit();
 +}
 +

Why are we doing this inside n900modem?  Can't we simply:

1. Make isimodem/isimodem.c register these (just like atmodem, stemodem,
mbmmodem, etc does)
2. Rip out the actual modem driver out of isimodem/isimodem.c
3. Have plugins/n900.c contain the modem driver?

 +OFONO_PLUGIN_DEFINE(n900modem, Nokia N900 modem driver, VERSION,
 + OFONO_PLUGIN_PRIORITY_HIGH, n900modem_init, n900modem_exit)
 diff --git a/plugins/usbpnmodem.c b/plugins/usbpnmodem.c
 index 68beb6f..9fcf0c8 100644
 --- a/plugins/usbpnmodem.c
 +++ b/plugins/usbpnmodem.c
 @@ -39,9 +39,22 @@
  
  static GPhonetNetlink *link = NULL;
  
 +static int match_ifname(char const *name, char const *ifname)
 +{
 + size_t namelen = strlen(name);
 +
 + if (strncmp(name, ifname, namelen) != 0)
 + return FALSE;
 +
 + if (ifname[namelen + strspn(ifname + namelen, 0123456789)] != '\0')
 + return FALSE;
 +
 + return TRUE;
 +}
 +
  /*
   * Add or remove isimodems
 - * when usbpn* phonet interfaces are added/removed
 + * when usbpn* or phonet* phonet interfaces are added/removed
   */
  static void usbpn_status_cb(GIsiModem *idx,
   GPhonetLinkState st,
 @@ -50,15 +63,25 @@ static void usbpn_status_cb(GIsiModem *idx,
  {
   struct ofono_modem *modem;
   int error;
 + char const *driver;
 + uint8_t address = 0;
  
   DBG(Phonet link %s (%u) is %s,
   ifname, g_isi_modem_index(idx),
   st == PN_LINK_REMOVED ? removed :
   st == PN_LINK_DOWN ? down : up);
  
 - /* Expect phonet interface name usbpnidx */
 - if (strncmp(ifname, usbpn, 5) ||
 - ifname[5 + strspn(ifname + 5, 0123456789)])
 + if (match_ifname(usbpn, ifname)) {
 + driver = isimodem;
 + address = PN_DEV_PC;
 + } else if (strcmp(phonet0, ifname) == 0) {
 +#if HAVE_N900MODEM
 + driver = n900modem;
 +#else
 + driver = isimodem;
 +#endif

And this really needs to go...

 + address = PN_DEV_SOS;
 + } else
   return;

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


Connecting with Huawei E226

2010-08-17 Thread Thiago Cangussu de Castro Gomes
Hi all,

I'm trying to connect with a Huawei E226, but I'm getting
different behavior whether I start ofonod with the modem (USB) plugged in or
not:

Scenario 1:

1 - start ofonod
2 - plug the modem
3 - not working

Log: huawei-connected.log (attached)

Scenario 2:

1 - start ofonod
2 - plug the modem
3 - call disable-modem
4 - call enable-modem
5 - it works

Log: huawei-testscripts.log

Scenario 3:

1 - plug the modem
2 - start ofonod
3 - it works

Log file: huawei-not-connected.log

I'm testing with MeeGo, ofono from git and connman 0.57.

thanks,
Thiago
ofonod[2309]: oFono version 0.26
ofonod[2309]: src/plugin.c:__ofono_plugin_init() 
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x81047c0, name: ste
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x8104760, name: palmpre
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x8104680, name: hfp
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x8104600, name: novatel
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x81045a0, name: huawei
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x8104540, name: zte
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x81044e0, name: hso
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x8104480, name: mbm
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x8104420, name: calypso
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x81043c0, name: wavecom
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x8104360, name: g1
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x8104300, name: atgen
ofonod[2309]: src/modem.c:ofono_modem_driver_register() driver: 0x81042a0, name: phonesim
ofonod[2309]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x81041e0, name: stemodem
ofonod[2309]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x8104244, name: stemodem
ofonod[2309]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x8104228, name: stemodem
ofonod[2309]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x8104190, name: hsomodem
ofonod[2309]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x81041ac, name: hsomodem
ofonod[2309]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x8104138, name: mbm
ofonod[2309]: src/stk.c:ofono_stk_driver_register() driver: 0x810415c, name: mbmmodem
ofonod[2309]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x8104060, name: hfpmodem
ofonod[2309]: src/network.c:ofono_netreg_driver_register() driver: 0x81040c0, name: hfpmodem
ofonod[2309]: src/call-volume.c:ofono_call_volume_driver_register() driver: 0x81040f8, name: hfpmodem
ofonod[2309]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x8103fe0, name: calypsomodem
ofonod[2309]: src/stk.c:ofono_stk_driver_register() driver: 0x8104028, name: calypsomodem
ofonod[2309]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x8103fa0, name: nwmodem
ofonod[2309]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x8103e60, name: atmodem
ofonod[2309]: src/modem.c:ofono_devinfo_driver_register() driver: 0x8103f0c, name: atmodem
ofonod[2309]: src/call-barring.c:ofono_call_barring_driver_register() driver: 0x8103eb8, name: atmodem
ofonod[2309]: src/call-forwarding.c:ofono_call_forwarding_driver_register() driver: 0x8103cc0, name: atmodem
ofonod[2309]: src/call-meter.c:ofono_call_meter_driver_register() driver: 0x8103d00, name: atmodem
ofonod[2309]: src/call-settings.c:ofono_call_settings_driver_register() driver: 0x8103be0, name: atmodem
ofonod[2309]: src/phonebook.c:ofono_phonebook_driver_register() driver: 0x8103ed8, name: atmodem
ofonod[2309]: src/ssn.c:ofono_ssn_driver_register() driver: 0x8103f00, name: atmodem
ofonod[2309]: src/ussd.c:ofono_ussd_driver_register() driver: 0x8103e40, name: atmodem
ofonod[2309]: src/sms.c:ofono_sms_driver_register() driver: 0x8103c40, name: atmodem
ofonod[2309]: src/sim.c:ofono_sim_driver_register() driver: 0x8103dc0, name: atmodem
ofonod[2309]: src/stk.c:ofono_stk_driver_register() driver: 0x8103e1c, name: atmodem
ofonod[2309]: src/network.c:ofono_netreg_driver_register() driver: 0x8103d60, name: atmodem
ofonod[2309]: src/cbs.c:ofono_cbs_driver_register() driver: 0x8103ca0, name: atmodem
ofonod[2309]: src/call-volume.c:ofono_call_volume_driver_register() driver: 0x8103f28, name: atmodem
ofonod[2309]: src/gprs.c:ofono_gprs_driver_register() driver: 0x8103f50, name: atmodem
ofonod[2309]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x8103f74, name: atmodem
ofonod[2309]: src/modem.c:ofono_devinfo_driver_register() driver: 0x81037b4, name: isimodem
ofonod[2309]: src/phonebook.c:ofono_phonebook_driver_register() driver: 0x81037a4, name: isimodem
ofonod[2309]: src/network.c:ofono_netreg_driver_register() driver: 0x81037e0, name: isimodem
ofonod[2309]: src/voicecall.c:ofono_voicecall_driver_register() driver: 

Re: Connecting with Huawei E226

2010-08-17 Thread Denis Kenzior
Hi Thiago,

On 08/17/2010 03:31 PM, Thiago Cangussu de Castro Gomes wrote:
 Hi all,
 
 I'm trying to connect with a Huawei E226, but I'm getting
 different behavior whether I start ofonod with the modem (USB) plugged
 in or not:
 
 Scenario 1:
 
 1 - start ofonod
 2 - plug the modem
 3 - not working
 
 Log: huawei-connected.log (attached)
 
 Scenario 2:
 
 1 - start ofonod
 2 - plug the modem
 3 - call disable-modem
 4 - call enable-modem
 5 - it works
 
 Log: huawei-testscripts.log
 
 Scenario 3:
 
 1 - plug the modem
 2 - start ofonod
 3 - it works
 
 Log file: huawei-not-connected.log
 
 I'm testing with MeeGo, ofono from git and connman 0.57.

The problem with the failed cases it that oFono / ConnMan combination is
simply too fast.  It tries to access the Modem before it had the chance
to properly initialize the SIM card.  We have pushed some fixes upstream
after the 0.26 release that should alleviate this.

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


[PATCH] stkagent: Free pending call when destroying agent.

2010-08-17 Thread Andrzej Zaborowski
Otherwise we leak memory and additionally D-bus invokes the method
callback and since the agent is already destroyed, we segfault.
---
 src/stkagent.c |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/stkagent.c b/src/stkagent.c
index fc05493..e71436d 100644
--- a/src/stkagent.c
+++ b/src/stkagent.c
@@ -127,19 +127,20 @@ void stk_agent_request_cancel(struct stk_agent *agent)
return;
 
dbus_pending_call_cancel(agent-call);
-   stk_agent_send_cancel(agent);
+
+   if (agent-disconnect_watch)
+   stk_agent_send_cancel(agent);
+
stk_agent_request_end(agent);
 }
 
 void stk_agent_free(struct stk_agent *agent)
 {
DBusConnection *conn = ofono_dbus_get_connection();
-   gboolean busy = agent-call != NULL;
 
-   if (agent-disconnect_watch) {
-   if (busy)
-   stk_agent_send_cancel(agent);
+   stk_agent_request_cancel(agent);
 
+   if (agent-disconnect_watch) {
stk_agent_send_release(agent);
 
g_dbus_remove_watch(conn, agent-disconnect_watch);
-- 
1.7.1.86.g0e460.dirty

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


[PATCH] list-modems: Pretty-print main menu.

2010-08-17 Thread Andrzej Zaborowski
---
 test/list-modems |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/test/list-modems b/test/list-modems
index 191743b..eee00b0 100755
--- a/test/list-modems
+++ b/test/list-modems
@@ -58,6 +58,9 @@ for path in properties[Modems]:
MicrophoneVolume,
SpeakerVolume]:
val = int(properties[key])
+   elif key in [MainMenu]:
+   val = , .join([ text +  ( + str(int(icon)) +
+   ) for text, icon in properties[key] ])
else:
val = str(properties[key])
print %s = %s % (key, val)
-- 
1.7.1.86.g0e460.dirty

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


[PATCH] calypso: Subscribe to %SIMREM, %SIMINS notifications.

2010-08-17 Thread Andrzej Zaborowski
These notifications should be emitted on SIM removal and insertion.
These notifications don't work very well though, on the hardware this
has been tested on, the modem never issued %SIMINS, and %SIMREM was
emitted only in some specific circumenstances.
---
 plugins/calypso.c |   35 ++-
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/plugins/calypso.c b/plugins/calypso.c
index 6ef6968..a2d4ec8 100644
--- a/plugins/calypso.c
+++ b/plugins/calypso.c
@@ -84,6 +84,7 @@ struct calypso_data {
gboolean phonebook_added;
gboolean sms_added;
gboolean have_sim;
+   struct ofono_sim *sim;
 };
 
 static const char *cpin_prefix[] = { +CPIN:, NULL };
@@ -170,6 +171,23 @@ static void cstat_notify(GAtResult *result, gpointer 
user_data)
}
 }
 
+static void simind_notify(GAtResult *result, gpointer user_data)
+{
+   struct ofono_modem *modem = user_data;
+   struct calypso_data *data = ofono_modem_get_data(modem);
+   GAtResultIter iter;
+
+   if (!data-sim)
+   return;
+
+   g_at_result_iter_init(iter, result);
+
+   if (g_at_result_iter_next(iter, %SIMREM:))
+   ofono_sim_inserted_notify(data-sim, FALSE);
+   else if (g_at_result_iter_next(iter, %SIMINS:))
+   ofono_sim_inserted_notify(data-sim, TRUE);
+}
+
 static void setup_modem(struct ofono_modem *modem)
 {
struct calypso_data *data = ofono_modem_get_data(modem);
@@ -197,6 +215,14 @@ static void setup_modem(struct ofono_modem *modem)
/* Disable deep sleep */
g_at_chat_send(data-dlcs[SETUP_DLC], AT%SLEEP=2, NULL,
NULL, NULL, NULL);
+
+   /* Enable SIM removed/inserted notifications */
+   g_at_chat_register(data-dlcs[SETUP_DLC], %SIMREM:, simind_notify,
+   FALSE, modem, NULL);
+   g_at_chat_register(data-dlcs[SETUP_DLC], %SIMINS:, simind_notify,
+   FALSE, modem, NULL);
+   g_at_chat_send(data-dlcs[SETUP_DLC], AT%SIMIND=1, NULL,
+   NULL, NULL, NULL);
 }
 
 static void simpin_check_cb(gboolean ok, GAtResult *result, gpointer user_data)
@@ -439,12 +465,11 @@ static int calypso_disable(struct ofono_modem *modem)
 static void calypso_pre_sim(struct ofono_modem *modem)
 {
struct calypso_data *data = ofono_modem_get_data(modem);
-   struct ofono_sim *sim;
 
DBG();
 
ofono_devinfo_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
-   sim = ofono_sim_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
+   data-sim = ofono_sim_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
ofono_voicecall_create(modem, 0, calypsomodem, data-dlcs[VOICE_DLC]);
 
/*
@@ -490,14 +515,14 @@ static void calypso_pre_sim(struct ofono_modem *modem)
 * succeeds.  It will not perform Profile Download on those cards
 * though, until another +CPIN command.
 */
-   if (data-have_sim  sim)
+   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,
none_prefix, NULL, NULL, NULL);
 
-   if (data-have_sim  sim)
-   ofono_sim_inserted_notify(sim, TRUE);
+   if (data-have_sim  data-sim)
+   ofono_sim_inserted_notify(data-sim, TRUE);
 }
 
 static void calypso_post_sim(struct ofono_modem *modem)
-- 
1.7.1.86.g0e460.dirty

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


[PATCH] stk: Update agent_called with GetInkey and GetInput support.

2010-08-17 Thread Andrzej Zaborowski
---
 src/stk.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/stk.c b/src/stk.c
index 7d98f92..16cc906 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -424,6 +424,8 @@ static gboolean agent_called(struct ofono_stk *stk)
switch (stk-pending_cmd-type) {
case STK_COMMAND_TYPE_SELECT_ITEM:
case STK_COMMAND_TYPE_DISPLAY_TEXT:
+   case STK_COMMAND_TYPE_GET_INPUT:
+   case STK_COMMAND_TYPE_GET_INKEY:
return TRUE;
}
 
-- 
1.7.1.86.g0e460.dirty

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


[PATCH v2] [RfC] doc: Proposed Set Up Call api.

2010-08-17 Thread Andrzej Zaborowski
The normal sequence for call setup is:

* Modem asks user for confirmation using icon1 / alphaId1.
* User confirms
* Modem starts dialling, screen displays icon2 / alphaId2,
* Call is connected, modem replies to the proactive command, screen
  keeps displaying icon2 / alphaId2 until the phone call is over.
---
 doc/stk-api.txt   |   11 +++
 doc/voicecall-api.txt |   11 +++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/doc/stk-api.txt b/doc/stk-api.txt
index 2e863a9..dcb8e2b 100644
--- a/doc/stk-api.txt
+++ b/doc/stk-api.txt
@@ -189,6 +189,17 @@ Methodsbyte RequestSelection(string title, 
byte icon_id,
 
Possible Errors: [service].Error.SimToolkit.GoBack
 
+   boolean ConfirmCallSetup(string message, byte icon_id)
+
+   Asks the agent to request user to confirm an
+   outgoing call setup.  If confirmed, the next new
+   outgoing call reported by VoiceCallManager will
+   have the Information and IconID properties set to
+   inform the user.  Hanging up before the call is
+   connected will cause EndSession reply to be sent.
+
+   Possible Errors: [service].Error.SimToolkit.EndSession
+
void Cancel()
 
Asks the agent to cancel any ongoing operation in
diff --git a/doc/voicecall-api.txt b/doc/voicecall-api.txt
index efeae42..dae3ec2 100644
--- a/doc/voicecall-api.txt
+++ b/doc/voicecall-api.txt
@@ -106,3 +106,14 @@ Properties string LineIdentification [readonly]
stamped when the call enters the active state.
Client applications can use this to infer somewhat
reliable call duration information.
+
+   string Information [readonly, optional]
+
+   Contains information related to the call for the
+   user.  Currently this property is set for calls
+   initiated by SIM Toolkit applications.
+
+   string IconID [readonly, optional]
+
+   Icon identifier to be used instead of or together
+   with the text information.
-- 
1.7.1.86.g0e460.dirty

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


Re: [PATCH v2] [RfC] doc: Proposed Set Up Call api.

2010-08-17 Thread Denis Kenzior
Hi Andrew,

 diff --git a/doc/voicecall-api.txt b/doc/voicecall-api.txt
 index efeae42..dae3ec2 100644
 --- a/doc/voicecall-api.txt
 +++ b/doc/voicecall-api.txt
 @@ -106,3 +106,14 @@ Properties   string LineIdentification [readonly]
   stamped when the call enters the active state.
   Client applications can use this to infer somewhat
   reliable call duration information.
 +
 + string Information [readonly, optional]
 +
 + Contains information related to the call for the
 + user.  Currently this property is set for calls
 + initiated by SIM Toolkit applications.
 +
 + string IconID [readonly, optional]
 +
 + Icon identifier to be used instead of or together
 + with the text information.

So my preference here is simply Icon, or IconIdentifier.  IconID breaks
our pure CamelCase rules for APIs.

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


Re: [PATCH] stkagent: Free pending call when destroying agent.

2010-08-17 Thread Denis Kenzior
Hi Andrew,

On 08/17/2010 10:37 AM, Andrzej Zaborowski wrote:
 Otherwise we leak memory and additionally D-bus invokes the method
 callback and since the agent is already destroyed, we segfault.
 ---

Good catch.  Patch has been applied, thanks.

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


Re: [PATCH] stk: Update agent_called with GetInkey and GetInput support.

2010-08-17 Thread Denis Kenzior
Hi Andrew,

On 08/17/2010 10:37 AM, Andrzej Zaborowski wrote:
 ---
  src/stk.c |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
 

Patch has been applied, thanks.

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