[PATCH] Fix ignore incoming bytes during parsing

2010-03-30 Thread Zhenhua Zhang
Server processes one command line at one time, so ignore the rest incoming bytes during the command parsing. --- gatchat/gatserver.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index e04e0d2..911bbef 100644 --- a/gatchat/gat

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Denis Kenzior
Hi Pekka, > >> I'm trying to > >> 1) load atoms only after when isimodem is up and running and reset the > >> state of the isimodem atoms in case the isimodem reboots (or user > >> turns off a Nokia handset connected via USB) > >> 2) have asyncronous probe and remove > >> 3) separate rf state and

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Pekka Pessi
2010/3/30 Marcel Holtmann : >> >> > So I'm still having trouble understanding the issue.  When oFono calls >> >> > disable, the driver is expected to take all necessary steps to disable >> >> > the >> >> > modem.  If that means waiting N seconds after the command has been >> >> > sent, so be >> >

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Aki Niemi
2010/3/30 Denis Kenzior : > We need to look closely at whether enabling flight mode (e.g. SIM on, while > TX/RX is off) makes sense.  It is something we should consider, but > challenging > since most of the SIM attributes are exposed through atoms which won't be > generally available when in Flig

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Denis Kenzior
Hi Aki, > 2010/3/30 Denis Kenzior : > > The answer is that exposing this as a property is not going to happen > > because it is fundamentally wrong. And in effect it already is exposed, > > e.g. the fact that modem object is present in oFono. You have several > > options here: > > So I think wh

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Marcel Holtmann
Hi Pekka, > >> > So I'm still having trouble understanding the issue. When oFono calls > >> > disable, the driver is expected to take all necessary steps to disable > >> > the > >> > modem. If that means waiting N seconds after the command has been sent, > >> > so be > >> > it. During shutdow

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Aki Niemi
2010/3/30 Denis Kenzior : > The answer is that exposing this as a property is not going to happen because > it is fundamentally wrong.  And in effect it already is exposed, e.g. the fact > that modem object is present in oFono.  You have several options here: So I think what you are saying is that

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Aki Niemi
Hi, 2010/3/30 Marcel Holtmann : >> It seems to me that Marcel thinks "Powered" should control the RF >> state, too. So, a separate property for enabling he RF would be nice, >> too. > > That is what I call RFKILL and we have a proper subsystem for that. And > it is different from your Power-1 and

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Pekka Pessi
2010/3/30 Marcel Holtmann : >> > So I'm still having trouble understanding the issue.  When oFono calls >> > disable, the driver is expected to take all necessary steps to disable the >> > modem.  If that means waiting N seconds after the command has been sent, >> > so be >> > it.  During shutdown

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Denis Kenzior
Hi Pekka, > Sure. > > I want Powered-1 that controls the atoms. Atoms should be loaded when > modem is in responsive state and removed when, e.g., modem reboots. > This we can do now, iow, if you connect a Nokia phone via USB, oFono > can follow its state via the MTC indications it sends on top o

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Marcel Holtmann
Hi Pekka, > >> That is also a problem. The other problem is that the party > >> controlling the modem power state is supposed to keep GPIO lines in > >> known position for a while after the modem has indicated it has been > >> powered down. In an N900 running maemo, a daemon called sscd does > >>

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Pekka Pessi
Hi Denis, 2010/3/30 Denis Kenzior : >> That is also a problem. The other problem is that the party >> controlling the modem power state is supposed to keep GPIO lines in >> known position for a while after the modem has indicated it has been >> powered down. In an N900 running maemo, a daemon call

Re: [PATCH v2 01/10] Add parser for items next action indicator objects

2010-03-30 Thread Denis Kenzior
Hi Yang, > +/* For data object that only has a byte array with variable length */ > +static gboolean parse_dataobj_common_byte_array( > + struct comprehension_tlv_iter *iter, > + enum stk_data_object_type type, > + unsigned char *array, u

Re: [PATCH v2 09/10] Adjust the sequence of icon identifier structure

2010-03-30 Thread Denis Kenzior
Hi Yang, > --- > src/stkutil.h | 19 ++- > 1 files changed, 10 insertions(+), 9 deletions(-) Please sanity check your patches, while applying I got this: Applying: Add parser for items next action indicator objects Applying: Adjust the sequence of comprehension tlv structures

Testing asset for oFono

2010-03-30 Thread Aki Niemi
Hi, There are currently a bunch of helper scripts under /test for the D-Bus API in addition to unit tests, and I'm wondering if there are any plans to automate especially the former into a suite that could be run semi-regularly, or even at 'make distcheck'? I think it would be useful to have some

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Marcel Holtmann
Hi Pekka, > >> I've been porting the N900 modem control code to oFono. The semantics > >> of Powered is fine with respect of the atoms, in other words, if the > >> modem crashes and boots itself, all the atoms are flushed nicely. > >> When powering up, the Powered can be set to true when the modem

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Marcel Holtmann
Hi Aki, > > Another solution is to use sscd-like daemon also with ofono (the oFono > > Powered property would then just follow the power state of the modem). > > My preference would be to have these things handled as oFono plugins. > That being the recommended way of course doesn't preclude some

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Denis Kenzior
Hi Pekka, > That is also a problem. The other problem is that the party > controlling the modem power state is supposed to keep GPIO lines in > known position for a while after the modem has indicated it has been > powered down. In an N900 running maemo, a daemon called sscd does > that. sscd exit

[PATCH 2/2] Add flag to parse one command line at once

2010-03-30 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 5f21766..ce78857 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -119,6 +119,7 @@ struct _GAtServer { GAtServerResult las

[PATCH 1/2] Add server send result code

2010-03-30 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 141 +++ gatchat/gatserver.h | 17 ++ 2 files changed, 137 insertions(+), 21 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index c75fbf5..5f21766 100644 --- a/gatchat/gatserver.c +++ b/gatchat/g

Updated v2 patches to handle the asynchronized callback

2010-03-30 Thread Zhenhua Zhang
Hi, Please review updated patches. Thanks! ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Aki Niemi
ti, 2010-03-30 kello 13:36 +0200, ext Pekka Pessi kirjoitti: > Another solution is to use sscd-like daemon also with ofono (the oFono > Powered property would then just follow the power state of the modem). My preference would be to have these things handled as oFono plugins. That being the recomm

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Pekka Pessi
2010/3/29 Bastian, Waldo : > Pekka Pessi wrote: >> I've been porting the N900 modem control code to oFono. The semantics >> of Powered is fine with respect of the atoms, in other words, if the >> modem crashes and boots itself, all the atoms are flushed nicely. >> When powering up, the Powered can

Re: Access to SIM card when Modem is not "Powered"

2010-03-30 Thread Pekka Pessi
2010/3/29 Denis Kenzior : >> However, then powering modem down, there are problems. The N900 modem >> control needs to make difference between the state where the modem is >> no more useful and the safe-to-exit state when the power off request >> has been completed, modem has flushed its state to f

[PATCH v2 10/10] Add parser for item icon identifier list objects

2010-03-30 Thread Yang Gu
--- src/stkutil.c | 26 ++ src/stkutil.h | 12 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/src/stkutil.c b/src/stkutil.c index c901213..5b95cba 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -793,6 +793,30 @@ static gboolean parse_dat

[PATCH v2 08/10] Add enum for icon qualifier

2010-03-30 Thread Yang Gu
--- src/stkutil.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/stkutil.h b/src/stkutil.h index 1eae1cd..0820dda 100644 --- a/src/stkutil.h +++ b/src/stkutil.h @@ -296,6 +296,11 @@ enum stk_service_state { STK_NO_SERVICE =0x02 }; +enum stk_icon

[PATCH v2 06/10] Add parser for transaction identifier objects

2010-03-30 Thread Yang Gu
--- src/stkutil.c | 12 src/stkutil.h |9 + 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/stkutil.c b/src/stkutil.c index 37cb81e..189d831 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -743,6 +743,16 @@ static gboolean parse_dataobj_location_sta

[PATCH v2 09/10] Adjust the sequence of icon identifier structure

2010-03-30 Thread Yang Gu
--- src/stkutil.h | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/stkutil.h b/src/stkutil.h index 0820dda..a3674e4 100644 --- a/src/stkutil.h +++ b/src/stkutil.h @@ -343,15 +343,6 @@ struct stk_ccp { }; /* - * Icon ID denotes a file on the SIM fi

[PATCH v2 07/10] Add parser for call control requested action objects

2010-03-30 Thread Yang Gu
--- src/stkutil.c | 20 src/stkutil.h |6 ++ 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/src/stkutil.c b/src/stkutil.c index 189d831..c901213 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -753,6 +753,24 @@ static gboolean parse_dataobj_transac

[PATCH v2 05/10] Add parser for location status objects

2010-03-30 Thread Yang Gu
--- src/stkutil.c | 30 ++ src/stkutil.h |6 ++ 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/src/stkutil.c b/src/stkutil.c index 14d3999..37cb81e 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -67,6 +67,26 @@ static gboolean parse_dataobj

[PATCH v2 02/10] Adjust the sequence of comprehension tlv structures

2010-03-30 Thread Yang Gu
--- src/stkutil.h | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stkutil.h b/src/stkutil.h index c4b8970..0a9c145 100644 --- a/src/stkutil.h +++ b/src/stkutil.h @@ -347,17 +347,6 @@ struct stk_result { unsigned char *additional; }; -/

[PATCH v2 04/10] Add parser for cause objects

2010-03-30 Thread Yang Gu
--- src/stkutil.c | 30 ++ src/stkutil.h |9 + 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/src/stkutil.c b/src/stkutil.c index aa57543..14d3999 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -687,6 +687,34 @@ static gboolean parse_da

[PATCH v2 03/10] Add parser for event list objects

2010-03-30 Thread Yang Gu
--- src/stkutil.c | 12 src/stkutil.h | 33 + 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/src/stkutil.c b/src/stkutil.c index 3f7183f..aa57543 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -677,6 +677,16 @@ static gboolean pa

[PATCH v2 01/10] Add parser for items next action indicator objects

2010-03-30 Thread Yang Gu
--- src/stkutil.c | 36 src/stkutil.h |9 + 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/src/stkutil.c b/src/stkutil.c index c5e0369..3f7183f 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -67,6 +67,29 @@ static gboolean pars