[PATCH v2 0/1] Add ifxmodem support for enable/disable tty
by Jeevaka Badrappan
Hi,
Following patch adds the ifxmodem support for enabling/disabling tty mode.
Regards,
Jeevaka
Jeevaka Badrappan (1):
ifxmodem: add enable/disable ctm support
Makefile.am | 3 +-
drivers/ifxmodem/ctm.c | 194 +++++++++++++++++++++++++++++++++++++++++++
drivers/ifxmodem/ifxmodem.c | 2 +
drivers/ifxmodem/ifxmodem.h | 3 +
4 files changed, 201 insertions(+), 1 deletions(-)
create mode 100644 drivers/ifxmodem/ctm.c
11 years, 8 months
[PATCH 0/10] Packet switched data technology
by Rémi Denis-Courmont
Hello,
This merges my three different patch sets around data technology. This exposes
both the technology supported by the network, and the one actually in use by
the device. I have seen "conflicting" requirements where some people want to
follow one and some want to follow the other. So lets provide both.
This should address most earlier comments.
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
11 years, 8 months
[PATCH 1/4] Define packet switched bearers
by Rémi Denis-Courmont
---
src/common.c | 14 ++++++++++++++
src/common.h | 13 +++++++++++++
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/src/common.c b/src/common.c
index d4e567b..6664007 100644
--- a/src/common.c
+++ b/src/common.c
@@ -714,6 +714,20 @@ const char *registration_tech_to_string(int tech)
}
}
+const char *packet_bearer_to_string(int bearer)
+{
+ static const char list[][6] = {
+ "none",
+ "gsm", "edge",
+ "umts", "hsupa", "hsdpa", "hspa",
+ "lte",
+ };
+
+ if (((unsigned)bearer) < sizeof (list) / sizeof (list[0]))
+ return list[bearer];
+ return "unknown";
+}
+
gboolean is_valid_apn(const char *apn)
{
int i;
diff --git a/src/common.h b/src/common.h
index 64f297e..d11cd8e 100644
--- a/src/common.h
+++ b/src/common.h
@@ -87,6 +87,18 @@ enum bearer_class {
BEARER_CLASS_PAD = 128
};
+/* 27.007 Section 7.29 */
+enum packet_bearer {
+ PACKET_BEARER_NONE = 0,
+ PACKET_BEARER_GPRS = 1,
+ PACKET_BEARER_EDGE = 2,
+ PACKET_BEARER_UMTS = 3,
+ PACKET_BEARER_HSUPA = 4,
+ PACKET_BEARER_HSDPA = 5,
+ PACKET_BEARER_HSUPA_HSDPA = 6,
+ PACKET_BEARER_LTE = 7,
+};
+
/* 22.030 Section 6.5.2 */
enum ss_control_type {
SS_CONTROL_TYPE_ACTIVATION,
@@ -158,5 +170,6 @@ gboolean is_valid_pin(const char *pin, enum pin_type type);
const char *registration_status_to_string(int status);
const char *registration_tech_to_string(int tech);
+const char *packet_bearer_to_string(int bearer);
gboolean is_valid_apn(const char *apn);
--
1.7.1
11 years, 8 months
[PATCH 1/3] atmodem: Share common devinfo utilities
by Dara Spieker-Doyle
---
drivers/atmodem/atutil.c | 56 ++++++++++++++++++++++++++++++++++++++++++
drivers/atmodem/atutil.h | 2 +
drivers/atmodem/devinfo.c | 59 +++-----------------------------------------
3 files changed, 62 insertions(+), 55 deletions(-)
diff --git a/drivers/atmodem/atutil.c b/drivers/atmodem/atutil.c
index 427b098..7d7fa1b 100644
--- a/drivers/atmodem/atutil.c
+++ b/drivers/atmodem/atutil.c
@@ -438,3 +438,59 @@ gboolean at_util_parse_cscs_query(GAtResult *result,
return FALSE;
}
+
+typedef void (*at_util_attr_cb_t)(const struct ofono_error *error,
+ const char *attribute, void *data);
+
+const char *at_util_fixup_return(const char *line, const char *prefix)
+{
+ if (g_str_has_prefix(line, prefix) == FALSE)
+ return line;
+
+ line += strlen(prefix);
+
+ while (line[0] == ' ')
+ line++;
+
+ return line;
+}
+
+void at_util_attr_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+ struct cb_data *cbd = user_data;
+ at_util_attr_cb_t cb = cbd->cb;
+ const char *prefix = cbd->user;
+ struct ofono_error error;
+ int numlines = g_at_result_num_response_lines(result);
+ GAtResultIter iter;
+ const char *line;
+ int i;
+
+ decode_at_error(&error, g_at_result_final_response(result));
+
+ if (!ok) {
+ cb(&error, NULL, cbd->data);
+ return;
+ }
+
+ if (numlines == 0) {
+ CALLBACK_WITH_FAILURE(cb, NULL, cbd->data);
+ return;
+ }
+
+ g_at_result_iter_init(&iter, result);
+
+ /*
+ * We have to be careful here, sometimes a stray unsolicited
+ * notification will appear as part of the response and we
+ * cannot rely on having a prefix to recognize the actual
+ * response line. So use the last line only as the response
+ */
+ for (i = 0; i < numlines; i++)
+ g_at_result_iter_next(&iter, NULL);
+
+ line = g_at_result_iter_raw_line(&iter);
+
+ cb(&error, at_util_fixup_return(line, prefix), cbd->data);
+}
+
diff --git a/drivers/atmodem/atutil.h b/drivers/atmodem/atutil.h
index 3901801..cab9340 100644
--- a/drivers/atmodem/atutil.h
+++ b/drivers/atmodem/atutil.h
@@ -70,6 +70,8 @@ gboolean at_util_parse_sms_index_delivery(GAtResult *result, const char *prefix,
gboolean at_util_parse_cscs_supported(GAtResult *result, int *supported);
gboolean at_util_parse_cscs_query(GAtResult *result,
enum at_util_charset *charset);
+const char *at_util_fixup_return(const char *line, const char *prefix);
+void at_util_attr_cb(gboolean ok, GAtResult *result, gpointer user_data);
struct cb_data {
void *cb;
diff --git a/drivers/atmodem/devinfo.c b/drivers/atmodem/devinfo.c
index 84ff898..b3ae9ad 100644
--- a/drivers/atmodem/devinfo.c
+++ b/drivers/atmodem/devinfo.c
@@ -35,57 +35,6 @@
#include "atmodem.h"
-static const char *fixup_return(const char *line, const char *prefix)
-{
- if (g_str_has_prefix(line, prefix) == FALSE)
- return line;
-
- line = line + strlen(prefix);
-
- while (line[0] == ' ')
- line++;
-
- return line;
-}
-
-static void attr_cb(gboolean ok, GAtResult *result, gpointer user_data)
-{
- struct cb_data *cbd = user_data;
- ofono_devinfo_query_cb_t cb = cbd->cb;
- const char *prefix = cbd->user;
- struct ofono_error error;
- int numlines = g_at_result_num_response_lines(result);
- GAtResultIter iter;
- const char *line;
- int i;
-
- decode_at_error(&error, g_at_result_final_response(result));
-
- if (!ok) {
- cb(&error, NULL, cbd->data);
- return;
- }
-
- if (numlines == 0) {
- CALLBACK_WITH_FAILURE(cb, NULL, cbd->data);
- return;
- }
-
- g_at_result_iter_init(&iter, result);
-
- /* We have to be careful here, sometimes a stray unsolicited
- * notification will appear as part of the response and we
- * cannot rely on having a prefix to recognize the actual
- * response line. So use the last line only as the response
- */
- for (i = 0; i < numlines; i++)
- g_at_result_iter_next(&iter, NULL);
-
- line = g_at_result_iter_raw_line(&iter);
-
- cb(&error, fixup_return(line, prefix), cbd->data);
-}
-
static void at_query_manufacturer(struct ofono_devinfo *info,
ofono_devinfo_query_cb_t cb, void *data)
{
@@ -98,7 +47,7 @@ static void at_query_manufacturer(struct ofono_devinfo *info,
cbd->user = "+CGMI:";
if (g_at_chat_send(chat, "AT+CGMI", NULL,
- attr_cb, cbd, g_free) > 0)
+ at_util_attr_cb, cbd, g_free) > 0)
return;
error:
@@ -119,7 +68,7 @@ static void at_query_model(struct ofono_devinfo *info,
cbd->user = "+CGMM:";
if (g_at_chat_send(chat, "AT+CGMM", NULL,
- attr_cb, cbd, g_free) > 0)
+ at_util_attr_cb, cbd, g_free) > 0)
return;
error:
@@ -140,7 +89,7 @@ static void at_query_revision(struct ofono_devinfo *info,
cbd->user = "+CGMR:";
if (g_at_chat_send(chat, "AT+CGMR", NULL,
- attr_cb, cbd, g_free) > 0)
+ at_util_attr_cb, cbd, g_free) > 0)
return;
error:
@@ -161,7 +110,7 @@ static void at_query_serial(struct ofono_devinfo *info,
cbd->user = "+CGSN:";
if (g_at_chat_send(chat, "AT+CGSN", NULL,
- attr_cb, cbd, g_free) > 0)
+ at_util_attr_cb, cbd, g_free) > 0)
return;
error:
--
1.7.0.4
11 years, 8 months
[PATCH v5, 5/5] udev: Add nokiacdma device
by Dara Spieker-Doyle
---
plugins/udev.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/plugins/udev.c b/plugins/udev.c
index e502669..58308e3 100644
--- a/plugins/udev.c
+++ b/plugins/udev.c
@@ -507,6 +507,19 @@ static void add_tc65(struct ofono_modem *modem,
ofono_modem_register(modem);
}
+static void add_nokiacdma(struct ofono_modem *modem,
+ struct udev_device *udev_device)
+{
+ const char *devnode;
+
+ DBG("modem %p", modem);
+
+ devnode = udev_device_get_devnode(udev_device);
+ ofono_modem_set_string(modem, "Device", devnode);
+
+ ofono_modem_register(modem);
+}
+
static void add_modem(struct udev_device *udev_device)
{
struct ofono_modem *modem;
@@ -597,6 +610,8 @@ done:
add_calypso(modem, udev_device);
else if (g_strcmp0(driver, "tc65") == 0)
add_tc65(modem, udev_device);
+ else if (g_strcmp0(driver, "nokiacdma") == 0)
+ add_nokiacdma(modem, udev_device);
}
static gboolean devpath_remove(gpointer key, gpointer value, gpointer user_data)
--
1.7.0.4
11 years, 8 months
[PATCH v5, 4/5] ofono-rules: Add nokiacdma device
by Dara Spieker-Doyle
---
plugins/ofono.rules | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/plugins/ofono.rules b/plugins/ofono.rules
index d1d18b2..fe62db0 100644
--- a/plugins/ofono.rules
+++ b/plugins/ofono.rules
@@ -438,4 +438,8 @@ ATTRS{idVendor}=="0421", ATTRS{idProduct}=="060e", ENV{OFONO_DRIVER}="nokia"
# Nokia Internet Stick CS-17
ATTRS{idVendor}=="0421", ATTRS{idProduct}=="0623", ENV{OFONO_DRIVER}="nokia"
+# Nokia CDMA Device
+ATTRS{idVendor}=="0421", ATTRS{idProduct}=="023e", ENV{OFONO_DRIVER}="nokiacdma"
+ATTRS{idVendor}=="0421", ATTRS{idProduct}=="00b6", ENV{OFONO_DRIVER}="nokiacdma"
+
LABEL="ofono_end"
--
1.7.0.4
11 years, 8 months
[PATCH v5, 3/5] nokiacdma: Add plugin and CDMA MO Call Support
by Dara Spieker-Doyle
---
Makefile.am | 3 +
plugins/nokiacdma.c | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 174 insertions(+), 0 deletions(-)
create mode 100644 plugins/nokiacdma.c
diff --git a/Makefile.am b/Makefile.am
index 7bced88..5c9445f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -302,6 +302,9 @@ builtin_sources += plugins/caif.c
builtin_modules += tc65
builtin_sources += plugins/tc65.c
+
+builtin_modules += nokiacdma
+builtin_sources += plugins/nokiacdma.c
endif
if MAINTAINER_MODE
diff --git a/plugins/nokiacdma.c b/plugins/nokiacdma.c
new file mode 100644
index 0000000..4b11f9d
--- /dev/null
+++ b/plugins/nokiacdma.c
@@ -0,0 +1,171 @@
+/*
+ * This file is part of oFono - Open Source Telephony
+ *
+ * Copyright (C) 2010 Nokia Corporation. All rights reserved.
+ *
+ * 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
+
+#include <stdlib.h>
+#include <errno.h>
+#include <termios.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <glib.h>
+#include <gatchat.h>
+#include <gattty.h>
+
+#define OFONO_API_SUBJECT_TO_CHANGE
+#include <ofono/plugin.h>
+#include <ofono/log.h>
+#include <ofono/modem.h>
+
+#include <drivers/atmodem/atutil.h>
+#include <ofono/cdma-voicecall.h>
+
+#include "common.h"
+
+struct nokiacdma_data {
+ GAtChat *chat;
+};
+
+static void nokiacdma_debug(const char *str, void *data)
+{
+ const char *prefix = data;
+
+ ofono_info("%s%s", prefix, str);
+}
+
+static int nokiacdma_probe(struct ofono_modem *modem)
+{
+ struct nokiacdma_data *data;
+
+ DBG("%p", modem);
+
+ data = g_try_new0(struct nokiacdma_data, 1);
+ if (data == NULL)
+ return -ENOMEM;
+
+ ofono_modem_set_data(modem, data);
+
+ return 0;
+}
+
+static void nokiacdma_remove(struct ofono_modem *modem)
+{
+ struct nokiacdma_data *data = ofono_modem_get_data(modem);
+
+ DBG("%p", modem);
+
+ ofono_modem_set_data(modem, NULL);
+
+ g_at_chat_unref(data->chat);
+
+ g_free(data);
+}
+
+static int nokiacdma_enable(struct ofono_modem *modem)
+{
+ struct nokiacdma_data *data = ofono_modem_get_data(modem);
+ GAtSyntax *syntax;
+ GIOChannel *channel;
+ const char *device;
+
+ device = ofono_modem_get_string(modem, "Device");
+ if (device == NULL)
+ return -EINVAL;
+
+ channel = g_at_tty_open(device, NULL);
+ if (channel == NULL)
+ return -EIO;
+
+ /* TODO: Will need a CDMA AT syntax parser later. Using GSM V1 for now. */
+ syntax = g_at_syntax_new_gsmv1();
+
+ data->chat = g_at_chat_new(channel, syntax);
+ g_at_syntax_unref(syntax);
+ g_io_channel_unref(channel);
+
+ if (data->chat == NULL)
+ return -ENOMEM;
+
+ if (getenv("OFONO_AT_DEBUG"))
+ g_at_chat_set_debug(data->chat, nokiacdma_debug,
+ "CDMA Device: ");
+
+ return 0;
+}
+
+static int nokiacdma_disable(struct ofono_modem *modem)
+{
+ struct nokiacdma_data *data = ofono_modem_get_data(modem);
+
+ DBG("%p", modem);
+
+ g_at_chat_unref(data->chat);
+ data->chat = NULL;
+
+ return 0;
+}
+
+static void nokiacdma_pre_sim(struct ofono_modem *modem)
+{
+ struct nokiacdma_data *data = ofono_modem_get_data(modem);
+
+ ofono_cdma_voicecall_create(modem, 0, "cdmamodem", data->chat);
+}
+
+static void nokiacdma_post_sim(struct ofono_modem *modem)
+{
+}
+
+static void nokiacdma_post_online(struct ofono_modem *modem)
+{
+ DBG("%p", modem);
+}
+
+static struct ofono_modem_driver nokiacdma_driver = {
+ .name = "nokiacdma",
+ .probe = nokiacdma_probe,
+ .remove = nokiacdma_remove,
+ .enable = nokiacdma_enable,
+ .disable = nokiacdma_disable,
+ .pre_sim = nokiacdma_pre_sim,
+ .post_sim = nokiacdma_post_sim,
+ .post_online = nokiacdma_post_online,
+};
+
+static int nokiacdma_init(void)
+{
+ return ofono_modem_driver_register(&nokiacdma_driver);
+}
+
+static void nokiacdma_exit(void)
+{
+ ofono_modem_driver_unregister(&nokiacdma_driver);
+}
+
+OFONO_PLUGIN_DEFINE(nokiacdma, "Generic CDMA AT Modem", VERSION,
+ OFONO_PLUGIN_PRIORITY_DEFAULT,
+ nokiacdma_init, nokiacdma_exit)
--
1.7.0.4
11 years, 8 months
[PATCH v5, 1/5] cdmamodem: Add CDMA MO Call support
by Dara Spieker-Doyle
---
Makefile.am | 4 +-
drivers/cdmamodem/cdmamodem.c | 3 +
drivers/cdmamodem/cdmamodem.h | 3 +
drivers/cdmamodem/voicecall.c | 160 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 169 insertions(+), 1 deletions(-)
create mode 100644 drivers/cdmamodem/voicecall.c
diff --git a/Makefile.am b/Makefile.am
index b509757..5f54efe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -247,7 +247,9 @@ endif
if CDMAMODEM
builtin_modules += cdmamodem
-builtin_sources += drivers/cdmamodem/cdmamodem.h drivers/cdmamodem/cdmamodem.c
+builtin_sources += drivers/cdmamodem/cdmamodem.h \
+ drivers/cdmamodem/cdmamodem.c \
+ drivers/cdmamodem/voicecall.c
endif
builtin_modules += g1
diff --git a/drivers/cdmamodem/cdmamodem.c b/drivers/cdmamodem/cdmamodem.c
index e7546e0..1c15da0 100644
--- a/drivers/cdmamodem/cdmamodem.c
+++ b/drivers/cdmamodem/cdmamodem.c
@@ -34,11 +34,14 @@
static int cdmamodem_init(void)
{
+ cdma_at_voicecall_init();
+
return 0;
}
static void cdmamodem_exit(void)
{
+ cdma_at_voicecall_exit();
}
OFONO_PLUGIN_DEFINE(cdmamodem, "CDMA AT modem driver", VERSION,
diff --git a/drivers/cdmamodem/cdmamodem.h b/drivers/cdmamodem/cdmamodem.h
index 114d1fd..a5991cf 100644
--- a/drivers/cdmamodem/cdmamodem.h
+++ b/drivers/cdmamodem/cdmamodem.h
@@ -20,3 +20,6 @@
*/
#include <drivers/atmodem/atutil.h>
+
+extern void cdma_at_voicecall_init();
+extern void cdma_at_voicecall_exit();
diff --git a/drivers/cdmamodem/voicecall.c b/drivers/cdmamodem/voicecall.c
new file mode 100644
index 0000000..ba4d2d4
--- /dev/null
+++ b/drivers/cdmamodem/voicecall.c
@@ -0,0 +1,160 @@
+/*
+ *
+ * oFono - Open Source Telephony
+ *
+ * Copyright (C) 2010 Nokia Corporation. All rights reserved.
+ *
+ * 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/cdma-voicecall.h>
+
+#include "gatchat.h"
+#include "gatresult.h"
+
+#include "cdmamodem.h"
+
+static const char *none_prefix[] = { NULL };
+
+struct voicecall_driver {
+ GAtChat *chat;
+ unsigned int vendor;
+};
+
+static void at_template(const char *cmd, struct ofono_cdma_voicecall *vc,
+ GAtResultFunc result_cb, ofono_cdma_voicecall_cb_t cb,
+ void *data)
+{
+ struct voicecall_driver *vd = ofono_cdma_voicecall_get_data(vc);
+ struct cb_data *cbd = cb_data_new(cb, data);
+
+ if (cbd == NULL)
+ goto error;
+
+ cbd->user = vc;
+ cbd->cb = cb;
+ cbd->data = data;
+
+ if (g_at_chat_send(vd->chat, cmd, none_prefix,
+ result_cb, cbd, g_free) > 0)
+ return;
+
+error:
+ g_free(cbd);
+
+ CALLBACK_WITH_FAILURE(cb, data);
+}
+
+static void generic_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+ struct cb_data *cbd = user_data;
+ ofono_cdma_voicecall_cb_t cb = cbd->cb;
+ struct ofono_error error;
+
+ decode_at_error(&error, g_at_result_final_response(result));
+
+ cb(&error, cbd->data);
+}
+
+static void at_dial(struct ofono_cdma_voicecall *vc,
+ const struct ofono_cdma_phone_number *ph,
+ ofono_cdma_voicecall_cb_t cb, void *data)
+{
+ char buf[OFONO_CDMA_MAX_PHONE_NUMBER_LENGTH + 8];
+
+ snprintf(buf, sizeof(buf), "AT+CDV=%s", ph->number);
+ at_template(buf, vc, generic_cb, cb, data);
+}
+
+static void at_hangup_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+ struct cb_data *cbd = user_data;
+
+ generic_cb(ok, result, user_data);
+
+ /* TODO: this should come from a modem solicited notification */
+ ofono_cdma_voicecall_disconnected(cbd->user,
+ OFONO_DISCONNECT_REASON_LOCAL_HANGUP,
+ NULL);
+}
+
+static void at_hangup(struct ofono_cdma_voicecall *vc,
+ ofono_cdma_voicecall_cb_t cb, void *data)
+{
+ /* Hangup active call */
+ at_template("AT+CHV", vc, at_hangup_cb, cb, data);
+}
+
+static int at_voicecall_probe(struct ofono_cdma_voicecall *vc,
+ unsigned int vendor, void *data)
+{
+ GAtChat *chat = data;
+ struct voicecall_driver *vd;
+
+ vd = g_try_new0(struct voicecall_driver, 1);
+ if (vd == NULL)
+ return -ENOMEM;
+
+ vd->chat = g_at_chat_clone(chat);
+ vd->vendor = vendor;
+
+ ofono_cdma_voicecall_set_data(vc, vd);
+
+ ofono_cdma_voicecall_register(vc);
+
+ return 0;
+}
+
+static void at_voicecall_remove(struct ofono_cdma_voicecall *vc)
+{
+ struct voicecall_driver *vd = ofono_cdma_voicecall_get_data(vc);
+
+ ofono_cdma_voicecall_set_data(vc, NULL);
+
+ g_at_chat_unref(vd->chat);
+ g_free(vd);
+}
+
+static struct ofono_cdma_voicecall_driver driver = {
+ .name = "cdmamodem",
+ .probe = at_voicecall_probe,
+ .remove = at_voicecall_remove,
+ .dial = at_dial,
+ .hangup = at_hangup,
+};
+
+void cdma_at_voicecall_init()
+{
+ ofono_cdma_voicecall_driver_register(&driver);
+}
+
+void cdma_at_voicecall_exit()
+{
+ ofono_cdma_voicecall_driver_unregister(&driver);
+}
--
1.7.0.4
11 years, 8 months
[PATCH 0/6] Add conformance sim application
by Jeevaka Badrappan
Hi,
Following set of patches adds the ui support for selecting
sim applications and also adds conformance sim application.
DisplayText, Get Inkey, Get Input and MoreTime test cases
are added to the conformance sim application. Logging of the
result in a file can be done but it is not part of this patch.
Regards,
Jeevaka
Jeevaka Badrappan (6):
phonesim: add ui support for sim app selection
phonesim: Add conformance sim application
phonesim: Add DisplayText test cases
phonesim: Add Get Inkey test cases
phonesim: Add Get Input test cases
phonesim: Add MoreTime test case
Makefile.am | 3 +-
src/conformancesimapplication.cpp | 1732 +++++++++++++++++++++++++++++++++++++
src/control.cpp | 5 +-
src/controlbase.ui | 10 +-
src/hardwaremanipulator.cpp | 19 +-
src/hardwaremanipulator.h | 4 +-
src/phonesim.cpp | 28 +-
src/phonesim.h | 4 +
src/simapplication.h | 33 +
9 files changed, 1808 insertions(+), 30 deletions(-)
create mode 100644 src/conformancesimapplication.cpp
11 years, 8 months
[PATCH] phonesim: Add +CUAD command and EFdir EF.
by Andrzej Zaborowski
Add +PTTY in +CLAC output too.
---
src/default.xml | 23 +++++++++++++++++++++++
src/simfilesystem.cpp | 5 +++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/default.xml b/src/default.xml
index ab1ed06..803c539 100644
--- a/src/default.xml
+++ b/src/default.xml
@@ -3165,6 +3165,7 @@
+CMEE
+CMGF
+CMGS
++CUAD
+DR
+DS
+GCAP
@@ -3179,6 +3180,7 @@
+ILRR
+IPR
+FCLASS
++PTTY
+VBT
+VCID
+VGR
@@ -3234,6 +3236,20 @@ OK</response>
<response>+PTTY: ${PTTY}\n\nOK</response>
</chat>
+<chat>
+ <!-- Discover UICC applications -->
+ <!-- the response is in sync with the EFdir contents in the filesystem
+ definition below -->
+ <command>AT+CUAD</command>
+ <response>+CUAD: "611B4F10A0000000871002FFFFFFFF8905080000FFFFFFFFFFFFFFFFFFFFFFFFFF611F4F0CA000000063504B43532D313550094D49445066696C657351043F007F80"\n\nOK</response>
+</chat>
+
+<chat>
+ <!-- Query "Discover UICC applications" support -->
+ <command>AT+CUAD=?</command>
+ <response>OK</response>
+</chat>
+
<!-- SIM filesystem definition, based on standard test strings
presented in GSM 11.10-4. This is primarily intended for
testing icon definitions within SIM toolkit applications -->
@@ -3476,6 +3492,13 @@ OK</response>
5A 55
</file>
+<file name="EFdir" recordsize="33">
+ 61 1B 4F 10 A0 00 00 00 87 10 02 FF FF FF FF 89 05 08 00 00 FF FF
+ FF FF FF FF FF FF FF FF FF FF FF
+ 61 1F 4F 0C A0 00 00 00 63 50 4B 43 53 2D 31 35 50 09 4D 49 44 50
+ 66 69 6C 65 73 51 04 3F 00 7F 80"
+</file>
+
</filesystem>
</simulator>
diff --git a/src/simfilesystem.cpp b/src/simfilesystem.cpp
index 6e05039..46f3b1f 100644
--- a/src/simfilesystem.cpp
+++ b/src/simfilesystem.cpp
@@ -121,6 +121,11 @@ static SimFileInfo const knownFiles[] =
{"6F16", "7F20", "EFcphs_info", 0x14ff44, FILE_TYPE_TRANSPARENT},
{"6F17", "7F20", "EFcphs_mbdn", 0x11ff44, FILE_TYPE_LINEAR_FIXED},
{"6F11", "7F20", "EFcphs_mwis", 0x11ff44, FILE_TYPE_TRANSPARENT},
+
+ // TS 102.221
+ {"2F00", "3F00", "EFdir", 0x04ff44, FILE_TYPE_LINEAR_FIXED},
+ {"2F06", "3F00", "EFarr", 0x04ff44, FILE_TYPE_LINEAR_FIXED},
+
{0, 0, 0, 0, FILE_TYPE_TRANSPARENT}
};
--
1.7.1.86.g0e460.dirty
11 years, 8 months