* [PATCH 5/6] atutil: Parse CMS and CME error codes.
@ 2010-08-05 17:31 Andrzej Zaborowski
2010-08-05 17:31 ` [PATCH 6/6] calypso: Create STK atom and reorder initialisation Andrzej Zaborowski
2010-08-06 17:20 ` [PATCH 5/6] atutil: Parse CMS and CME error codes Denis Kenzior
0 siblings, 2 replies; 8+ messages in thread
From: Andrzej Zaborowski @ 2010-08-05 17:31 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 873 bytes --]
From: root <root@neo.(none)>
---
drivers/atmodem/atutil.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/atmodem/atutil.c b/drivers/atmodem/atutil.c
index 5dad679..e668602 100644
--- a/drivers/atmodem/atutil.c
+++ b/drivers/atmodem/atutil.c
@@ -40,6 +40,12 @@ void decode_at_error(struct ofono_error *error, const char *final)
if (!strcmp(final, "OK")) {
error->type = OFONO_ERROR_TYPE_NO_ERROR;
error->error = 0;
+ } else if (g_str_has_prefix(final, "+CMS ERROR:")) {
+ error->type = OFONO_ERROR_TYPE_CMS;
+ error->error = strtol(&final[11], NULL, 0);
+ } else if (g_str_has_prefix(final, "+CME ERROR:")) {
+ error->type = OFONO_ERROR_TYPE_CME;
+ error->error = strtol(&final[11], NULL, 0);
} else {
error->type = OFONO_ERROR_TYPE_FAILURE;
error->error = 0;
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/6] calypso: Create STK atom and reorder initialisation.
2010-08-05 17:31 [PATCH 5/6] atutil: Parse CMS and CME error codes Andrzej Zaborowski
@ 2010-08-05 17:31 ` Andrzej Zaborowski
2010-08-06 8:25 ` Support of call hold for a single call Kouassu, AlainX
2010-08-06 17:20 ` [PATCH 5/6] atutil: Parse CMS and CME error codes Denis Kenzior
1 sibling, 1 reply; 8+ messages in thread
From: Andrzej Zaborowski @ 2010-08-05 17:31 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 4263 bytes --]
See comment in the code. The Sim Toolkit apps seem to work rather
reliably with this, tested on both PIN-enabled and unprotected cards.
---
plugins/calypso.c | 81 +++++++++++++++++++++++++++++++++++-----------------
1 files changed, 54 insertions(+), 27 deletions(-)
diff --git a/plugins/calypso.c b/plugins/calypso.c
index 5367684..6ef6968 100644
--- a/plugins/calypso.c
+++ b/plugins/calypso.c
@@ -54,6 +54,7 @@
#include <ofono/ssn.h>
#include <ofono/ussd.h>
#include <ofono/voicecall.h>
+#include <ofono/stk.h>
#include <drivers/atmodem/vendor.h>
@@ -86,6 +87,7 @@ struct calypso_data {
};
static const char *cpin_prefix[] = { "+CPIN:", NULL };
+static const char *none_prefix[] = { NULL };
static void calypso_debug(const char *str, void *data)
{
@@ -197,31 +199,6 @@ static void setup_modem(struct ofono_modem *modem)
NULL, NULL, NULL);
}
-static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data)
-{
- struct ofono_modem *modem = user_data;
- struct calypso_data *data = ofono_modem_get_data(modem);
-
- DBG("");
-
- if (ok == FALSE) {
- int i;
-
- for (i = 0; i < NUM_DLC; i++) {
- g_at_chat_unref(data->dlcs[i]);
- data->dlcs[i] = NULL;
- }
-
- g_at_mux_shutdown(data->mux);
- g_at_mux_unref(data->mux);
- data->mux = NULL;
- } else {
- setup_modem(modem);
- }
-
- ofono_modem_set_powered(modem, ok);
-}
-
static void simpin_check_cb(gboolean ok, GAtResult *result, gpointer user_data)
{
struct ofono_modem *modem = user_data;
@@ -232,8 +209,9 @@ static void simpin_check_cb(gboolean ok, GAtResult *result, gpointer user_data)
/* Modem returns ERROR if there is no SIM in slot. */
data->have_sim = ok;
- g_at_chat_send(data->dlcs[SETUP_DLC], "AT+CFUN=1", NULL,
- cfun_set_on_cb, modem, NULL);
+ setup_modem(modem);
+
+ ofono_modem_set_powered(modem, TRUE);
}
static void init_simpin_check(struct ofono_modem *modem)
@@ -469,6 +447,55 @@ static void calypso_pre_sim(struct ofono_modem *modem)
sim = ofono_sim_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]);
ofono_voicecall_create(modem, 0, "calypsomodem", data->dlcs[VOICE_DLC]);
+ /*
+ * The STK atom is only useful after SIM has been initialised,
+ * so really it belongs in post_sim. However, the order of the
+ * following three actions is adapted to work around different
+ * issues with the Calypso's firmware in its different versions
+ * (may have been fixed starting at some version, but this order
+ * should work with any version).
+ *
+ * To deal with PIN-enabled and PIN-disabled SIM cards, the order
+ * needs to be as follows:
+ *
+ * AT%SATC="..."
+ * ...
+ * AT+CFUN=1
+ * ...
+ * AT+CPIN="..."
+ *
+ * %SATC comes before the other two actions because it provides
+ * the Terminal Profile data to the modem, which will be used
+ * during the Profile Download either during +CFUN=1 (on
+ * unprotected cards) or +CPIN="..." (on protected cards).
+ * The STK atom needs to be present at this time because the
+ * card may start issuing proactive commands immediately after
+ * the Download.
+ *
+ * +CFUN=1 appears before PIN entry because switching from +CFUN
+ * mode 0 later, on the Calypso has side effects at least on some
+ * versions of the firmware:
+ *
+ * mode 0 -> 1 transition forces PIN re-authentication.
+ * mode 0 -> 4 doesn't work at all.
+ * mode 1 -> 4 and
+ * mode 4 -> 1 transitions work and have no side effects.
+ *
+ * So in order to switch to Offline mode at startup,
+ * AT+CFUN=1;+CFUN=4 would be needed.
+ *
+ * Additionally AT+CFUN=1 response is not checked: on PIN-enabled
+ * cards, it will in most situations return "+CME ERROR: SIM PIN
+ * required" (CME ERROR 11) even though the switch to mode 1
+ * succeeds. It will not perform Profile Download on those cards
+ * though, until another +CPIN command.
+ */
+ if (data->have_sim && 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);
}
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Support of call hold for a single call
2010-08-05 17:31 ` [PATCH 6/6] calypso: Create STK atom and reorder initialisation Andrzej Zaborowski
@ 2010-08-06 8:25 ` Kouassu, AlainX
2010-08-06 8:29 ` Li, Zhigang
2010-08-06 14:56 ` Ofono limit the max length for a phone number to 20 digit Kouassu, AlainX
0 siblings, 2 replies; 8+ messages in thread
From: Kouassu, AlainX @ 2010-08-06 8:25 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 832 bytes --]
All,
We know that Ofono provide the function HoldAndAnswer() which put an active call on hold and answer the incoming call.
Is Ofono support call hold feature for a single outgoing call ?
How does it work ?
Regards,
Alain Kouassu
Celad for Intel
---------------------------------------------------------------------
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Support of call hold for a single call
2010-08-06 8:25 ` Support of call hold for a single call Kouassu, AlainX
@ 2010-08-06 8:29 ` Li, Zhigang
2010-08-06 14:56 ` Ofono limit the max length for a phone number to 20 digit Kouassu, AlainX
1 sibling, 0 replies; 8+ messages in thread
From: Li, Zhigang @ 2010-08-06 8:29 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
>-----Original Message-----
>From: ofono-bounces(a)ofono.org [mailto:ofono-bounces(a)ofono.org] On Behalf Of
>Kouassu, AlainX
>Sent: 2010年8月6日 16:25
>To: ofono(a)ofono.org
>Subject: Support of call hold for a single call
>
>All,
>
>We know that Ofono provide the function HoldAndAnswer() which put an active call
>on hold and answer the incoming call.
>Is Ofono support call hold feature for a single outgoing call ?
>How does it work ?
Swapcalls() will hold/retrieve a signal call
>
>Regards,
>
>Alain Kouassu
>Celad for Intel
>
>---------------------------------------------------------------------
>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(a)ofono.org
>http://lists.ofono.org/listinfo/ofono
^ permalink raw reply [flat|nested] 8+ messages in thread
* Ofono limit the max length for a phone number to 20 digit
2010-08-06 8:25 ` Support of call hold for a single call Kouassu, AlainX
2010-08-06 8:29 ` Li, Zhigang
@ 2010-08-06 14:56 ` Kouassu, AlainX
2010-08-06 15:46 ` Denis Kenzior
1 sibling, 1 reply; 8+ messages in thread
From: Kouassu, AlainX @ 2010-08-06 14:56 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 946 bytes --]
Is there a particular motivation for Ofono to limit the max length of a phone number to 20 digit ?
The limit to 20 digit for a phone number could be a potential risk since according to IUT-T a phone number can have up to 15 digit + international prefix. Some country have international dialing prefix greater than 6 digit.
Regards,
Alain Kouassu
Celad for Intel
---------------------------------------------------------------------
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Ofono limit the max length for a phone number to 20 digit
2010-08-06 14:56 ` Ofono limit the max length for a phone number to 20 digit Kouassu, AlainX
@ 2010-08-06 15:46 ` Denis Kenzior
2010-08-09 9:03 ` Kouassu, AlainX
0 siblings, 1 reply; 8+ messages in thread
From: Denis Kenzior @ 2010-08-06 15:46 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 934 bytes --]
Hi Alain,
On 08/06/2010 09:56 AM, Kouassu, AlainX wrote:
> Is there a particular motivation for Ofono to limit the max length of a phone number to 20 digit ?
> The limit to 20 digit for a phone number could be a potential risk since according to IUT-T a phone number can have up to 15 digit + international prefix. Some country have international dialing prefix greater than 6 digit.
Limit of 20 was chosen for several reasons:
- That is the maximum incoming party number size (24.008 Calling Party
BCD Number)
- Most networks do not support Calling Party BCD number more than 20
characters (24.008 Calling Party BCD Number)
- SMS Address is limited to 20 characters (23.040)
- oFono does not support EFadn extensions, and thus numbers are limited
to 20 characters (31.102)
There might be exceptions to this where more than 20 characters are
required. Patches are of course always welcome.
Regards,
-Denis
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5/6] atutil: Parse CMS and CME error codes.
2010-08-05 17:31 [PATCH 5/6] atutil: Parse CMS and CME error codes Andrzej Zaborowski
2010-08-05 17:31 ` [PATCH 6/6] calypso: Create STK atom and reorder initialisation Andrzej Zaborowski
@ 2010-08-06 17:20 ` Denis Kenzior
1 sibling, 0 replies; 8+ messages in thread
From: Denis Kenzior @ 2010-08-06 17:20 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]
Hi Andrew,
On 08/05/2010 12:31 PM, Andrzej Zaborowski wrote:
> From: root <root@neo.(none)>
>
I had to manually edit this commit to fix the authorship information...
Please be careful with this one.
Regards,
-Denis
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Ofono limit the max length for a phone number to 20 digit
2010-08-06 15:46 ` Denis Kenzior
@ 2010-08-09 9:03 ` Kouassu, AlainX
0 siblings, 0 replies; 8+ messages in thread
From: Kouassu, AlainX @ 2010-08-09 9:03 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2072 bytes --]
Hi Denis,
Thanks for your answer.
Actually 24.008 states that the Called party BCD can have a maximum length of 43 octets, we are far from the 20 characters supported by Ofono.
The Calling party BCD is not mandatory when making a mobile originated voice call (24.008).
I hope this could help.
Regards,
Alain
-----Original Message-----
From: Denis Kenzior [mailto:denkenz(a)gmail.com]
Sent: Friday, August 06, 2010 5:46 PM
To: ofono(a)ofono.org
Cc: Kouassu, AlainX
Subject: Re: Ofono limit the max length for a phone number to 20 digit
Hi Alain,
On 08/06/2010 09:56 AM, Kouassu, AlainX wrote:
> Is there a particular motivation for Ofono to limit the max length of a phone number to 20 digit ?
> The limit to 20 digit for a phone number could be a potential risk since according to IUT-T a phone number can have up to 15 digit + international prefix. Some country have international dialing prefix greater than 6 digit.
Limit of 20 was chosen for several reasons:
- That is the maximum incoming party number size (24.008 Calling Party
BCD Number)
- Most networks do not support Calling Party BCD number more than 20
characters (24.008 Calling Party BCD Number)
- SMS Address is limited to 20 characters (23.040)
- oFono does not support EFadn extensions, and thus numbers are limited
to 20 characters (31.102)
There might be exceptions to this where more than 20 characters are
required. Patches are of course always welcome.
Regards,
-Denis
---------------------------------------------------------------------
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-08-09 9:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 17:31 [PATCH 5/6] atutil: Parse CMS and CME error codes Andrzej Zaborowski
2010-08-05 17:31 ` [PATCH 6/6] calypso: Create STK atom and reorder initialisation Andrzej Zaborowski
2010-08-06 8:25 ` Support of call hold for a single call Kouassu, AlainX
2010-08-06 8:29 ` Li, Zhigang
2010-08-06 14:56 ` Ofono limit the max length for a phone number to 20 digit Kouassu, AlainX
2010-08-06 15:46 ` Denis Kenzior
2010-08-09 9:03 ` Kouassu, AlainX
2010-08-06 17:20 ` [PATCH 5/6] atutil: Parse CMS and CME error codes Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.