[PATCH] atmodem: implement standard PIN retries
by Rémi Denis-Courmont
---
drivers/atmodem/sim.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index 0938998..dfd40f8 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -57,6 +57,7 @@ static const char *cpin_prefix[] = { "+CPIN:", NULL };
static const char *clck_prefix[] = { "+CLCK:", NULL };
static const char *huawei_cpin_prefix[] = { "^CPIN:", NULL };
static const char *xpincnt_prefix[] = { "+XPINCNT:", NULL };
+static const char *cpinr_prefixes[] = { "+CPINR:", "+CPINRE:", NULL };
static const char *none_prefix[] = { NULL };
static void at_crsm_info_cb(gboolean ok, GAtResult *result, gpointer user_data)
@@ -554,6 +555,50 @@ error:
CALLBACK_WITH_FAILURE(cb, NULL, cbd->data);
}
+static void at_cpinr_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+ struct cb_data *cbd = user_data;
+ ofono_sim_pin_retries_cb_t cb = cbd->cb;
+ GAtResultIter iter;
+ struct ofono_error error;
+ int retries[OFONO_SIM_PASSWORD_INVALID];
+ size_t len = sizeof(at_sim_name) / sizeof(*at_sim_name);
+ size_t i;
+
+ decode_at_error(&error, g_at_result_final_response(result));
+
+ if (!ok) {
+ cb(&error, NULL, cbd->data);
+ return;
+ }
+
+ for (i = 0; i < OFONO_SIM_PASSWORD_INVALID; i++)
+ retries[i] = -1;
+
+ g_at_result_iter_init(&iter, result);
+
+ /* Ignore +CPINRE results... */
+ while (g_at_result_iter_next(&iter, "+CPINR:")) {
+ const char *name;
+ int val;
+
+ if (!g_at_result_iter_next_unquoted_string(&iter, &name))
+ continue;
+
+ if (!g_at_result_iter_next_number(&iter, &val))
+ continue;
+
+ for (i = 1; i < len; i++) {
+ if (!strcmp(name, at_sim_name[i].name)) {
+ retries[i] = val;
+ break;
+ }
+ }
+ }
+
+ cb(&error, retries, cbd->data);
+}
+
static void at_pin_retries_query(struct ofono_sim *sim,
ofono_sim_pin_retries_cb_t cb,
void *data)
@@ -577,6 +622,9 @@ static void at_pin_retries_query(struct ofono_sim *sim,
break;
default:
+ if (g_at_chat_send(sd->chat, "AT+CPINR", cpinr_prefixes,
+ at_cpinr_cb, cbd, g_free) > 0)
+ return;
break;
}
--
1.7.1
11 years, 4 months
[PATCH 0/1] Patch Description
by Yang Gu
This patch is to cancel the pending sms via D-Bus. Till now, I'm still not sure what kind of sms should be cancelled. In theory, one message, or part of it, would be sent by oFono can be cancelled. For some examples: Any part of a message that has never been sent can be cancelled; one message was sent but failed, we can cancel before retry; One message is split into several pieces, we can cancel before all of them are sent.
In current patch, I only cancel the sms that has never been sent. I wonder if it's enough or I should handle all the situations above.
Another question here is about the existed code. There is a hashtable "messages" in struct ofono_sms. Can we store the state in the tx_queue_entry, and remove the hashtable thoroughly to make the code more simple?
Yang Gu (1):
sms: Cancel pending message
include/history.h | 1 +
src/sms.c | 132 ++++++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 106 insertions(+), 27 deletions(-)
11 years, 4 months
[PATCH] ste: Add support for CBS interface
by Lasse Kunnasluoto
STE modems support standard AT commands in CBS
---
plugins/ste.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/plugins/ste.c b/plugins/ste.c
index 0b02a0d..cf8aed8 100644
--- a/plugins/ste.c
+++ b/plugins/ste.c
@@ -48,6 +48,7 @@
#include <ofono/netreg.h>
#include <ofono/phonebook.h>
#include <ofono/sim.h>
+#include <ofono/cbs.h>
#include <ofono/sms.h>
#include <ofono/ssn.h>
#include <ofono/ussd.h>
@@ -373,6 +374,7 @@ static void ste_post_online(struct ofono_modem *modem)
ofono_call_barring_create(modem, 0, "atmodem", data->chat);
ofono_ssn_create(modem, 0, "atmodem", data->chat);
ofono_call_volume_create(modem, 0, "atmodem", data->chat);
+ ofono_cbs_create(modem, 0, "atmodem", data->chat);
gprs = ofono_gprs_create(modem, OFONO_VENDOR_MBM,
"atmodem", data->chat);
--
1.7.0.4
11 years, 4 months
[PATCH 0/1] Add pin retry count support for mbm
by Jeevaka Badrappan
Hi,
Following patch adds pin retry count support for mbm modem.
Regards,
Jeevaka
Jeevaka Badrappan (1):
atmodem: Add pin retry count support for mbm
drivers/atmodem/sim.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
11 years, 4 months
[PATCH 0/1] Add pin retry count support for mbm
by Jeevaka Badrappan
Hi,
Following patch adds pin retry count support for mbm modem.
Regards,
Jeevaka
Jeevaka Badrappan (1):
atmodem: Add pin retry count support for mbm
drivers/atmodem/sim.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
11 years, 4 months
[PATCH 0/2] Fix issue with DST
by Jeevaka Badrappan
Hi,
Following patch converts the DST from hours to seconds which is the
expected outcome.
Regards,
Jeevaka
Jeevaka Badrappan (2):
atmodem: convert dst from hours to seconds
isimodem: convert dst from hours to seconds
drivers/atmodem/network-registration.c | 2 +-
drivers/isimodem/network-registration.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
11 years, 4 months
[PATCH] Phonesim HACKING update to refer to phonesim.conf
by Essi Vehmersalo
---
HACKING | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/HACKING b/HACKING
index 8316ed5..e9ff227 100644
--- a/HACKING
+++ b/HACKING
@@ -81,15 +81,15 @@ Running from within the source code repository
When using "./configure --enable-maintainer-mode" the automake scripts will
use the plugins directly from within the repository. This removes the need
to use "make install" when testing "phonesim". The "bootstrap-configure"
-automatically includes this option.
+automatically includes this option. See phonesim.conf sample configuration
+under ofono/plugins on how to configure oFono to use phonesim.
Run phonesim in foreground using the following options
# ./src/phonesim -p 12345 -gui src/default.xml
-Check your modem.conf file and enable the phonesim configuration before
-executing the above command. Argument -p should be followed by the proper
-port number, in case you have changed the default "12345". Argument -gui
-will launch the gui once the modem is enabled.
+Argument -p should be followed by the proper port number, in case you have
+changed the default "12345". Argument -gui will launch the gui once the
+modem is enabled.
To enable the modem, make sure the ofono daemon is running and execute the
enable-modem script with /phonesim argument (default defined in modem.conf,
--
1.7.1
11 years, 4 months
RE: [RFC] doc: Proposal for LTE/IMS API.
by Kjetil ASDAL
Hi,
> ---------- Forwarded message ----------
> From: <Jeevaka.Badrappan(a)elektrobit.com>
> Date: Fri, Jan 28, 2011 at 11:22 AM
> Subject: RE: [RFC] doc: Proposal for LTE/IMS API.
> To: ofono(a)ofono.org
> Cc: sjur.brandeland(a)stericsson.com
>
>
> Hi Sjur,
>
> ofono-bounces(a)ofono.org wrote:
> >
> > - SIM identities used for IMS registration such as:
> > PrivateImsIdentity, PublicImsIdentity, HomeDomainName.
>
> Correct me if I'm wrong. Private Identity is the one used for
> registration, authorisation, administration and billing purposes
> whereas the Public Identity is the identity by which the other parties
> know the subscriber. Basically, Public Identity is not used for IMS
> registration.
The Private Identity is used to allow the UE access to the IMS network (for,
as you say, the purpose of registration, authorization, administration and
billing).
The Public Identity is used to identify a specific IMS user (there may be more
than one associated with one Private Identity). This information is conveyed to
the IMS CN during registration so that the network can know what IMS users that
are registered and available for service (e.g. a reception of a voice session).
As far as I can see, the Home Network Domain Name is also part of the SIP
registration procedure.
>
> > + string PrivateImsIdentity [readonly, optional]
> > +
> > + Identity used for IMS registration.
> > + Available if present on the ISIM.
> > +
>
> May I know whats the use of making it available to the user?
> EFimpi is a mandatory file on the ISIM, so it is available always if
> the ISIM is present in an UICC card.
>
> > + string PublicImsIdentity [readonly, optional]
> > +
> > + Identity used for IMS registration.
> > + Available if present on the ISIM.
>
> There can be more than one public identity. And also public identity
> is not used for IMS registration. same as EFimpi, EFimpu is a
> mandatory file on the ISIM.
>
> > +
> > + string HomeDomainName[readonly, optional]
> > +
> > + Identity used for IMS registration.
> > + Available if present on the ISIM.
> > +
>
> same as EFimpi and EFimpu, EFdomain is a mandatory file.
> Correct me if I'm wrong. Domain name just indicates the home network
> of the subscriber.
> Is it really used for registration?
>
> > + array{string} PcscfAddresses[readonly]
> > +
> > + Domain Name or IP Address of the P-CSCF servers.
> > + (SIP Proxy).
>
> If I'm correct, this information also comes from the sim file EFp-cscf
> and it is optional.
>
> Regards,
> Jeevaka
> _______________________________________________
> ofono mailing list
> ofono(a)ofono.org
> http://lists.ofono.org/listinfo/ofono
>
Regards,
Kjetil
11 years, 4 months
[PATCH v7] ifx: Adding modem selftest for Infineon modem
by Robertino Benis
Infineon modem selftest, during ifx_enable().
Two steps trigger, with timeout. In case one
fails, modem will not power up.
---
plugins/ifx.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/plugins/ifx.c b/plugins/ifx.c
index 411c012..da8ed0b 100644
--- a/plugins/ifx.c
+++ b/plugins/ifx.c
@@ -72,6 +72,8 @@
#define GPRS3_DLC 4
#define AUX_DLC 5
+#define IFX_SETUP_TIMEOUT 10
+
static char *dlc_prefixes[NUM_DLC] = { "Voice: ", "Net: ", "GPRS1: ",
"GPRS2: ", "GPRS3: ", "Aux: " };
@@ -524,10 +526,12 @@ static gboolean mux_timeout_cb(gpointer user_data)
struct ofono_modem *modem = user_data;
struct ifx_data *data = ofono_modem_get_data(modem);
- ofono_error("Timeout with multiplexer setup");
+ ofono_error("Timeout with AT command setup");
data->mux_init_timeout = 0;
+ g_at_chat_cancel_all(data->dlcs[AUX_DLC]);
+
g_at_chat_unref(data->dlcs[AUX_DLC]);
data->dlcs[AUX_DLC] = NULL;
@@ -539,6 +543,35 @@ static gboolean mux_timeout_cb(gpointer user_data)
return FALSE;
}
+static void dev_ver_selftest_cb(gboolean ok, GAtResult *result,
+ gpointer user_data)
+{
+
+ struct ofono_modem *modem = user_data;
+ struct ifx_data *data = ofono_modem_get_data(modem);
+
+ if (!ok) {
+ ofono_error("ERROR:IFX Selftest at@vers:device_version_id()"
+ "-FAILED");
+
+ g_at_chat_cancel_all(data->dlcs[AUX_DLC]);
+ }
+}
+
+static void rtc_gti_selftest_cb(gboolean ok, GAtResult *result,
+ gpointer user_data)
+{
+ struct ofono_modem *modem = user_data;
+ struct ifx_data *data = ofono_modem_get_data(modem);
+
+ if (!ok) {
+ ofono_error("ERROR:IFX Selftest"
+ "at@rtc:rtc_gti_test_verify_32khz()-FAILED");
+
+ g_at_chat_cancel_all(data->dlcs[AUX_DLC]);
+ }
+}
+
static int ifx_enable(struct ofono_modem *modem)
{
struct ifx_data *data = ofono_modem_get_data(modem);
@@ -592,13 +625,24 @@ static int ifx_enable(struct ofono_modem *modem)
g_at_chat_send(chat, "ATE0 +CMEE=1", NULL,
NULL, NULL, NULL);
+ /* Execute Modem Self tests */
+ data->dlcs[AUX_DLC] = chat;
+
+ g_at_chat_send(data->dlcs[AUX_DLC],
+ "at@rtc:rtc_gti_test_verify_32khz()",
+ NULL, rtc_gti_selftest_cb, modem, NULL);
+
+ g_at_chat_send(data->dlcs[AUX_DLC], "at@vers:device_version_id()",
+ NULL, dev_ver_selftest_cb, modem, NULL);
+
+ /* Enable MUX Channels */
data->frame_size = 1509;
g_at_chat_send(chat, "AT+CMUX=0,0,,1509,10,3,30,,", NULL,
mux_setup_cb, modem, NULL);
- data->mux_init_timeout = g_timeout_add_seconds(5, mux_timeout_cb,
- modem);
+ data->mux_init_timeout = g_timeout_add_seconds(
+ IFX_SETUP_TIMEOUT, mux_timeout_cb, modem);
data->dlcs[AUX_DLC] = chat;
--
1.7.1
11 years, 4 months
[PATCH] Phonesim HACKING updated to refer to phonesim.conf instead of modem.conf.
by Essi Vehmersalo
---
HACKING | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/HACKING b/HACKING
index 8316ed5..7997b06 100644
--- a/HACKING
+++ b/HACKING
@@ -81,15 +81,15 @@ Running from within the source code repository
When using "./configure --enable-maintainer-mode" the automake scripts will
use the plugins directly from within the repository. This removes the need
to use "make install" when testing "phonesim". The "bootstrap-configure"
-automatically includes this option.
+automatically includes this option. See phonesim.conf sample configuration
+under ofono/plugins on how to configure oFono to use phonesim.
Run phonesim in foreground using the following options
# ./src/phonesim -p 12345 -gui src/default.xml
-Check your modem.conf file and enable the phonesim configuration before
-executing the above command. Argument -p should be followed by the proper
-port number, in case you have changed the default "12345". Argument -gui
-will launch the gui once the modem is enabled.
+Argument -p should be followed by the proper port number, in case you have
+changed the default "12345". Argument -gui will launch the gui once the
+modem is enabled.
To enable the modem, make sure the ofono daemon is running and execute the
enable-modem script with /phonesim argument (default defined in modem.conf,
--
1.7.1
11 years, 4 months