[PATCH] Add missing PreferredLanguages property to SimManager documentation
by Alexander Kanavin
---
doc/sim-api.txt | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/doc/sim-api.txt b/doc/sim-api.txt
index 22fe22b..ba8fdb1 100644
--- a/doc/sim-api.txt
+++ b/doc/sim-api.txt
@@ -114,6 +114,11 @@ Properties boolean Present [readonly]
Contains the list of subscriber numbers. This is
usually stored in the EFmsisdn sim file.
+ array{string} PreferredLanguages [readonly, optional]
+
+ Contains the list of preferred languages from the SIM,
+ if available.
+
dict{string,string} ServiceNumbers [readonly, optional]
Contains a dictionary of service dialing numbers from
--
1.7.4.1
9 years, 5 months
[PATCH] speedup: blacklist the NO CARRIER terminator for control channel
by Bertrand Aygon
Some Speedup cards will send the NO CARRIER in the control channel.
---
plugins/speedup.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/plugins/speedup.c b/plugins/speedup.c
index 0142ece..12ff501 100644
--- a/plugins/speedup.c
+++ b/plugins/speedup.c
@@ -182,6 +182,9 @@ static int speedup_enable(struct ofono_modem *modem)
return -EIO;
}
+ g_at_chat_blacklist_terminator(data->aux,
+ G_AT_CHAT_TERMINATOR_NO_CARRIER);
+
g_at_chat_send(data->modem, "ATE0 +CMEE=1", NULL, NULL, NULL, NULL);
g_at_chat_send(data->aux, "ATE0 +CMEE=1", NULL, NULL, NULL, NULL);
--
1.7.4.1
---------------------------------------------------------------------
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.
9 years, 5 months
[PATCH] atutil: put CME ERROR 10 in CPIN polling.
by Bertrand Aygon
Some modem also return CME ERROR 10 during boot, until SIM is ready.
ofonod[5073]: Modem: > ATE0 +CMEE=1\r
ofonod[5073]: Aux: > ATE0 +CMEE=1\r
ofonod[5073]: Aux: < \r\nOK\r\n
ofonod[5073]: Aux: > AT+CFUN=1\r
ofonod[5073]: Modem: < \r\nOK\r\n
ofonod[5073]: Aux: < \r\nUSAT_OP_FINISH\r\n\r\n+STRSP:0x14\r\n\r\nOK\r\n
ofonod[5073]: plugins/speedup.c:cfun_enable()
ofonod[5073]: Aux: > AT+CPIN?\r
ofonod[5073]: Aux: < \r\n+CME ERROR: 10\r\n
ofonod[5073]: Aux: > AT+CPIN?\r
ofonod[5073]: Aux: < \r\n+CPIN: READY\r\n\r\nOK\r\n
---
drivers/atmodem/atutil.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/atmodem/atutil.c b/drivers/atmodem/atutil.c
index 63b1301..34e2d3e 100644
--- a/drivers/atmodem/atutil.c
+++ b/drivers/atmodem/atutil.c
@@ -527,11 +527,11 @@ static void cpin_check_cb(gboolean ok, GAtResult *result, gpointer userdata)
goto done;
switch (error.error) {
- case 10:
- case 13:
+ case 13: /* SIM failure */
goto done;
- case 14:
+ case 10: /* SIM not inserted */
+ case 14: /* SIM Busy */
goto tryagain;
default:
--
1.7.4.1
---------------------------------------------------------------------
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.
9 years, 5 months
[RFC 0/2] Add stubs for dun gprs-context and dun_dt plug-in.
by mario@tokarz.eu
From: Mario Tokarz <mario.tokarz(a)bmw-carit.de>
Hi all,
so, this is basically a draft for the missing piece in the dun functionality.
The gprs-context brings up the PPP, while the basic bluetooth communication is
part of the dun_dt plug-in.
Still, I don't have it all straight yet. The code will bring up the modem once,
but closing PPP in the context will also close the IoChannel, which means it
cannot be reopened.
I'm sure the solution is pretty obvious, but I am a bit trapped in the dark,
so any hint on how to best sort the necessary calls would be highly appreciated.
Cheers,
Mario
Mario Tokarz (2):
dunmodem: Add stub for gprs-context.
dun_dt: Add baseline for dun_dt plug-in.
Makefile.am | 6 +-
drivers/dunmodem/dunmodem.c | 2 +
drivers/dunmodem/dunmodem.h | 3 +
drivers/dunmodem/gprs-context.c | 220 +++++++++++++++++++++++
plugins/dun_dt.c | 375 +++++++++++++++++++++++++++++++++++++++
5 files changed, 605 insertions(+), 1 deletions(-)
create mode 100644 drivers/dunmodem/gprs-context.c
create mode 100644 plugins/dun_dt.c
--
1.7.4.1
9 years, 5 months
[PATCH] udev: add support for Olive HSDPA modem, which seems to be a SpeedUP.
by Bertrand Aygon
---
plugins/ofono.rules | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/plugins/ofono.rules b/plugins/ofono.rules
index 27a6316..4e697af 100644
--- a/plugins/ofono.rules
+++ b/plugins/ofono.rules
@@ -385,7 +385,10 @@ ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9800", ENV{ID_USB_INTERFACE_NUM}=="0
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e00", ENV{ID_USB_INTERFACE_NUM}=="00", ENV{OFONO_SPEEDUP_TYPE}="modem"
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e00", ENV{ID_USB_INTERFACE_NUM}=="03", ENV{OFONO_SPEEDUP_TYPE}="aux"
-# SpeedUp 8000
+# SpeedUp
+ATTRS{idVendor}=="2020", ATTRS{idProduct}=="1005", ENV{ID_USB_INTERFACE_NUM}=="03", ENV{OFONO_SPEEDUP_TYPE}="modem"
+ATTRS{idVendor}=="2020", ATTRS{idProduct}=="1005", ENV{ID_USB_INTERFACE_NUM}=="01", ENV{OFONO_SPEEDUP_TYPE}="aux"
+
ATTRS{idVendor}=="2020", ATTRS{idProduct}=="1008", ENV{ID_USB_INTERFACE_NUM}=="03", ENV{OFONO_SPEEDUP_TYPE}="modem"
ATTRS{idVendor}=="2020", ATTRS{idProduct}=="1008", ENV{ID_USB_INTERFACE_NUM}=="01", ENV{OFONO_SPEEDUP_TYPE}="aux"
@@ -446,8 +449,8 @@ ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9800", ENV{OFONO_DRIVER}="speedup"
ATTRS{idVendor}=="1c9e", ATTRS{serial}=="1234567890ABCDEF", ENV{ID_SERIAL_SHORT}=""
-# SpeedUp 8000
-ATTRS{idVendor}=="2020", ATTRS{idProduct}=="1008", ENV{OFONO_DRIVER}="speedup"
+# SpeedUp
+ATTRS{idVendor}=="2020", ENV{OFONO_DRIVER}="speedup"
ATTRS{idVendor}=="2020", ATTRS{serial}=="1234567890ABCDEF", ENV{ID_SERIAL_SHORT}=""
--
1.7.4.1
---------------------------------------------------------------------
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.
9 years, 5 months
[PATCH 0/4] ZTE/SpeedUp specificities
by Philippe Nunes
On ZTE/Speedup modem, AT+CPIN? keeps returning CME ERROR 14 for a moment after successful AT+CPIN=".."
As there is no card status notification, a pooling with CPIN queries is used to detect the state change.
On SpeedUp modem (vendor id 0x1c9e), use the proprietary command AT+CPNNUM? to get the remaining SIM PIN attempts.
Philippe Nunes (4):
atmodem: Add vendor entry for SpeedUp modems
speedup: Create SIM atom with SpeedUp vendor to handle proprietary
commands
atmodem: Add a polling based on CPIN query to detect SIM state change
atmodem: Add support for the PIN counter command AT+CPNNUM
drivers/atmodem/sim.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++
drivers/atmodem/vendor.h | 1 +
plugins/speedup.c | 2 +-
3 files changed, 153 insertions(+), 1 deletions(-)
9 years, 5 months
[PATCH] dunmodem: Add stub for gprs.
by mario@tokarz.eu
From: Mario Tokarz <mario.tokarz(a)bmw-carit.de>
---
Makefile.am | 3 +-
drivers/dunmodem/dunmodem.c | 2 +
drivers/dunmodem/dunmodem.h | 3 +
drivers/dunmodem/gprs.c | 99 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 106 insertions(+), 1 deletions(-)
create mode 100644 drivers/dunmodem/gprs.c
diff --git a/Makefile.am b/Makefile.am
index cef9892..9c56711 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -248,7 +248,8 @@ builtin_modules += dunmodem
builtin_sources += drivers/atmodem/atutil.h \
drivers/dunmodem/dunmodem.h \
drivers/dunmodem/dunmodem.c \
- drivers/dunmodem/network-registration.c
+ drivers/dunmodem/network-registration.c \
+ drivers/dunmodem/gprs.c
builtin_modules += hfpmodem
builtin_sources += drivers/atmodem/atutil.h \
diff --git a/drivers/dunmodem/dunmodem.c b/drivers/dunmodem/dunmodem.c
index 67d6257..35a7dbb 100644
--- a/drivers/dunmodem/dunmodem.c
+++ b/drivers/dunmodem/dunmodem.c
@@ -35,6 +35,7 @@
static int dunmodem_init(void)
{
dun_netreg_init();
+ dun_gprs_init();
return 0;
}
@@ -42,6 +43,7 @@ static int dunmodem_init(void)
static void dunmodem_exit(void)
{
dun_netreg_exit();
+ dun_gprs_exit();
}
OFONO_PLUGIN_DEFINE(dunmodem, "Dialup modem driver", VERSION,
diff --git a/drivers/dunmodem/dunmodem.h b/drivers/dunmodem/dunmodem.h
index 9a87841..4fbd4a5 100644
--- a/drivers/dunmodem/dunmodem.h
+++ b/drivers/dunmodem/dunmodem.h
@@ -23,3 +23,6 @@
extern void dun_netreg_init(void);
extern void dun_netreg_exit(void);
+
+extern void dun_gprs_init(void);
+extern void dun_gprs_exit(void);
diff --git a/drivers/dunmodem/gprs.c b/drivers/dunmodem/gprs.c
new file mode 100644
index 0000000..fb9755e
--- /dev/null
+++ b/drivers/dunmodem/gprs.c
@@ -0,0 +1,99 @@
+/*
+ *
+ * oFono - Open Source Telephony
+ *
+ * Copyright (C) 2011 BMW Car IT GmbH. 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/gprs.h>
+
+#include "gatchat.h"
+
+#include "dunmodem.h"
+
+static void dun_gprs_set_attached(struct ofono_gprs *gprs, int attached,
+ ofono_gprs_cb_t cb, void *data)
+{
+ DBG("");
+
+ CALLBACK_WITH_SUCCESS(cb, data);
+}
+
+static gboolean dun_gprs_finish_registration(gpointer user_data)
+{
+ struct ofono_gprs *gprs = user_data;
+
+ ofono_gprs_register(gprs);
+
+ return FALSE;
+}
+
+static int dun_gprs_probe(struct ofono_gprs *gprs,
+ unsigned int vendor, void *data)
+{
+ DBG("");
+
+ g_idle_add(dun_gprs_finish_registration, gprs);
+
+ return 0;
+}
+
+static void dun_gprs_remove(struct ofono_gprs *gprs)
+{
+ DBG("");
+}
+
+static void dun_gprs_attached_status(struct ofono_gprs *gprs,
+ ofono_gprs_status_cb_t cb,
+ void *data)
+{
+ DBG("");
+
+ CALLBACK_WITH_SUCCESS(cb, 1, data);
+}
+
+static struct ofono_gprs_driver driver = {
+ .name = "dunmodem",
+ .probe = dun_gprs_probe,
+ .remove = dun_gprs_remove,
+ .set_attached = dun_gprs_set_attached,
+ .attached_status = dun_gprs_attached_status,
+};
+
+void dun_gprs_init(void)
+{
+ ofono_gprs_driver_register(&driver);
+}
+
+void dun_gprs_exit(void)
+{
+ ofono_gprs_driver_unregister(&driver);
+}
--
1.7.4.1
9 years, 5 months
[PATCH] cdmamodem: Use correct prefixes to parse devinfo AT results correctly
by Guillaume Zajac
---
drivers/cdmamodem/devinfo.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/cdmamodem/devinfo.c b/drivers/cdmamodem/devinfo.c
index 2a5813c..06b759c 100644
--- a/drivers/cdmamodem/devinfo.c
+++ b/drivers/cdmamodem/devinfo.c
@@ -67,7 +67,7 @@ static void cdma_query_manufacturer(struct ofono_devinfo *info,
struct cb_data *cbd = cb_data_new(cb, data);
GAtChat *chat = ofono_devinfo_get_data(info);
- cbd->user = "AT+GMI";
+ cbd->user = "+GMI:";
if (g_at_chat_send(chat, "AT+GMI", NULL, attr_cb, cbd, g_free) > 0)
return;
@@ -83,7 +83,7 @@ static void cdma_query_model(struct ofono_devinfo *info,
struct cb_data *cbd = cb_data_new(cb, data);
GAtChat *chat = ofono_devinfo_get_data(info);
- cbd->user = "AT+GMM";
+ cbd->user = "+GMM:";
if (g_at_chat_send(chat, "AT+GMM", NULL, attr_cb, cbd, g_free) > 0)
return;
@@ -99,7 +99,7 @@ static void cdma_query_revision(struct ofono_devinfo *info,
struct cb_data *cbd = cb_data_new(cb, data);
GAtChat *chat = ofono_devinfo_get_data(info);
- cbd->user = "AT+GMR";
+ cbd->user = "+GMR:";
if (g_at_chat_send(chat, "AT+GMR", NULL, attr_cb, cbd, g_free) > 0)
return;
@@ -115,7 +115,7 @@ static void cdma_query_serial(struct ofono_devinfo *info,
struct cb_data *cbd = cb_data_new(cb, data);
GAtChat *chat = ofono_devinfo_get_data(info);
- cbd->user = "AT+GSN";
+ cbd->user = "+GSN:";
if (g_at_chat_send(chat, "AT+GSN", NULL, attr_cb, cbd, g_free) > 0)
return;
--
1.7.1
9 years, 5 months
[PATCH] cdmamodem: remove an unneeded buffer and sprintf.
by Bertrand Aygon
---
drivers/cdmamodem/connman.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/cdmamodem/connman.c b/drivers/cdmamodem/connman.c
index 0df93eb..7d77387 100644
--- a/drivers/cdmamodem/connman.c
+++ b/drivers/cdmamodem/connman.c
@@ -188,7 +188,6 @@ static void cdma_connman_activate(struct ofono_cdma_connman *cm,
void *data)
{
struct connman_data *cd = ofono_cdma_connman_get_data(cm);
- char buf[64];
DBG("");
@@ -199,9 +198,7 @@ static void cdma_connman_activate(struct ofono_cdma_connman *cm,
cd->state = STATE_ENABLING;
- sprintf(buf, "ATD#777");
-
- if (g_at_chat_send(cd->chat, buf, none_prefix,
+ if (g_at_chat_send(cd->chat, "ATD#777", none_prefix,
atd_cb, cm, NULL) > 0)
return;
--
1.7.4.1
---------------------------------------------------------------------
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.
9 years, 5 months
[PATCH 0/2] Some boiler plate code for dunmodem
by mario@tokarz.eu
From: Mario Tokarz <mario.tokarz(a)bmw-carit.de>
Hi,
I saw Marcel being active on that one. I need to apologize for my
suboptimal time management, but still here's some boiler plate I wrote
which might save some typing.
Best,
Mario
Mario Tokarz (2):
bluetooth: Add UUID for DUN.
dunmodem: Add stub for gprs.
Makefile.am | 3 +-
drivers/dunmodem/dunmodem.c | 2 +
drivers/dunmodem/dunmodem.h | 3 +
drivers/dunmodem/gprs.c | 99 +++++++++++++++++++++++++++++++++++++++++++
plugins/bluetooth.h | 1 +
5 files changed, 107 insertions(+), 1 deletions(-)
create mode 100644 drivers/dunmodem/gprs.c
--
1.7.4.1
9 years, 5 months