[RFC v0 00/11] External HFP Profile
by Claudio Takahasi
BlueZ supports now external profile registration, see:
bluez/doc/profile-api.txt
This patch series has the initial implementation of the HFP external
profile in oFono. HandsfreeAgent and HandsfreeGateway interfaces were
removed from BlueZ.
The next step: implement SCO connection handling in oFono.
Claudio Takahasi (11):
hfp_hf: Add HFP external Profile registration
hfp_hf: Add BlueZ Profile handler
hfp_hf: Add parsing of Profile NewConnection call
hfp_hf: Add SLC setup
hfp_hf: Add Profile1 Release
hfp_hf: Remove HandsfreeAgent and HandsfreeGateway
hfp_hf: Register HFP modem dynamically
hfp_hf: Fix updating alias
bluetooth: Reuse D-Bus dictionary parser function
hfp_hf: Add Version and Features parsing
bluetooth: Use generic function to parse dict
plugins/bluetooth.c | 245 ++++++++++++++++++++++---------
plugins/bluetooth.h | 10 +-
plugins/hfp_hf.c | 404 +++++++++++++++++++++++++---------------------------
3 files changed, 379 insertions(+), 280 deletions(-)
--
1.7.11.7
8 years, 2 months
[PATCH v0 1/4] bluetooth: Fix reading Bluetooth Adapters
by Claudio Takahasi
This patch replaces GetProperties method by the Get method of the
object manager to read the available Bluetooth adapters.
---
plugins/bluetooth.c | 30 ++++++++++++++++++++++--------
plugins/bluetooth.h | 2 ++
2 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 5d28530..f35c755 100644
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -749,7 +749,7 @@ static gboolean device_removed(DBusConnection *conn,
return TRUE;
}
-static void parse_adapters(DBusMessageIter *array, gpointer user_data)
+static void parse_adapters(DBusMessageIter *array)
{
DBusMessageIter value;
@@ -776,26 +776,35 @@ static void parse_adapters(DBusMessageIter *array, gpointer user_data)
}
}
-static void manager_properties_cb(DBusPendingCall *call, gpointer user_data)
+static void adapters_objects_cb(DBusPendingCall *call, gpointer user_data)
{
DBusMessage *reply;
DBusError derr;
+ DBusMessageIter array, variant;
+
+ DBG("");
reply = dbus_pending_call_steal_reply(call);
dbus_error_init(&derr);
if (dbus_set_error_from_message(&derr, reply)) {
- ofono_error("Manager.GetProperties() replied an error: %s, %s",
+ ofono_error("Get(\"%s\", \"Adapters\") replied an error: %s, "
+ "%s", FREEDESKTOP_PROPERTIES_INTERFACE,
derr.name, derr.message);
dbus_error_free(&derr);
goto done;
}
- DBG("");
+ if (dbus_message_iter_init(reply, &variant) == FALSE)
+ goto done;
- bluetooth_parse_properties(reply, "Adapters", parse_adapters, NULL,
- NULL);
+ if (dbus_message_iter_get_arg_type(&variant) != DBUS_TYPE_VARIANT)
+ goto done;
+
+ dbus_message_iter_recurse(&variant, &array);
+
+ parse_adapters(&array);
done:
dbus_message_unref(reply);
@@ -803,8 +812,13 @@ done:
static void bluetooth_connect(DBusConnection *conn, void *user_data)
{
- bluetooth_send_with_reply("/", BLUEZ_MANAGER_INTERFACE, "GetProperties",
- NULL, manager_properties_cb, NULL, NULL, -1,
+ const char *interface = BLUEZ_MANAGER_INTERFACE;
+ const char *property = "Adapters";
+
+ bluetooth_send_with_reply("/", FREEDESKTOP_PROPERTIES_INTERFACE, "Get",
+ NULL, adapters_objects_cb, NULL, NULL, -1,
+ DBUS_TYPE_STRING, &interface,
+ DBUS_TYPE_STRING, &property,
DBUS_TYPE_INVALID);
bluetooth_send_with_reply("/", BLUEZ_MANAGER_INTERFACE, "FindAdapter",
diff --git a/plugins/bluetooth.h b/plugins/bluetooth.h
index 4fc16ad..af59d3d 100644
--- a/plugins/bluetooth.h
+++ b/plugins/bluetooth.h
@@ -29,6 +29,8 @@
#define BLUEZ_SERVICE_INTERFACE BLUEZ_SERVICE ".Service"
#define BLUEZ_SERIAL_INTERFACE BLUEZ_SERVICE ".Serial"
+#define FREEDESKTOP_PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
+
#define DBUS_TIMEOUT 15
#define DUN_GW_UUID "00001103-0000-1000-8000-00805f9b34fb"
--
1.7.11.7
8 years, 2 months
Telit HE910 modem --- unable be put on line by Connman
by Ming Li Wu
Hello,
I am working on Telit HE910 modem.
I am using ofono 1.11, and the commit is
6e3a6156b34c52bde253b097976d0ba9dd575879.
For the Telit modem, "AT+CFUN=4" is used to enable
the modem. According to "Telit He910 AT Commands
Reference Guide", "issuing AT+CFUN=4[,0] actually
causes the module to perform either a network
deregistration and a SIM deactivation."
After this command is sent out, an unsolicited indication
"\r\n#QSS: 0\r\n" is received by of ofono. This means that
the sim card cannot be detected by the modem. It turns out
that Connman will not put the modem on line.
if "AT+CFUN=5" was used, it worked fine.
My questions are:
1. Why is "AT+CFUN=4" used to enable the modem, instead of "AT+CFUN=1"
or "AT+CFUN=5"?
2. If "AT+CFUN=4" is reasonable, are there any solutions to solve this
problem?
Thanks!
Mingli
The following is the log when "AT+CFUN=4" was used.
ofonod[358]: plugins/udevng.c:setup_telit() modem=/dev/ttyACM0
aux=/dev/ttyACM3 gps=(null) diag=/dev/ttyACM1
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property
Modem
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Aux
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Diag
ofonod[358]: src/modem.c:ofono_modem_register() 0x1152008
ofonod[358]: plugins/telit.c:telit_probe() 0x1152008
ofonod[358]: src/modem.c:emit_modem_added() 0x1152008
ofonod[358]: src/modem.c:call_modemwatches() 0x1152008 added:1
ofonod[358]: plugins/hfp_ag.c:modem_watch() modem: 0x1152008, added: 1
ofonod[358]: plugins/dun_gw.c:modem_watch() modem: 0x1152008, added: 1
ofonod[358]: plugins/smart-messaging.c:modem_watch() modem: 0x1152008,
added: 1
ofonod[358]: plugins/push-notification.c:modem_watch() modem: 0x1152008,
added: 1
ofonod[358]: plugins/telit.c:telit_enable() 0x1152008
ofonod[358]: src/modem.c:get_modem_property() modem 0x1152008 property
Modem
ofonod[358]: plugins/telit.c:open_device() Modem /dev/ttyACM0
ofonod[358]: src/modem.c:get_modem_property() modem 0x1152008 property Aux
ofonod[358]: plugins/telit.c:open_device() Aux /dev/ttyACM3
ofonod[358]: Aux: > ATE0 +CMEE=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT#QSS=0\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CFUN=4\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: plugins/telit.c:cfun_enable_cb() 0x1152008
ofonod[358]: src/modem.c:modem_change_state() old state: 0, new state: 1
ofonod[358]: plugins/telit.c:telit_pre_sim() 0x1152008
ofonod[358]: Aux: > AT&C0\r
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+GCAP\r
ofonod[358]: Aux: < \r\n+GCAP: +CGSM,+DS,+FCLASS,+MS,+ES\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CRC=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CLIP=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CDIP=1\r
ofonod[358]: Aux: < \r\nERROR\r\n
ofonod[358]: Aux: > AT+CNAP=1\r
ofonod[358]: Aux: < \r\nERROR\r\n
ofonod[358]: Aux: > AT+COLP=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CSSN=1,1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+VTD?\r
ofonod[358]: Aux: < \r\n0\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CCWA=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: drivers/atmodem/voicecall.c:at_voicecall_initialized()
voicecall_init: registering to notifications
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30
ofonod[358]: Aux: > AT#AUTOATT=0\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT#QSS=2\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CGMI\r
ofonod[358]: Aux: < \r\nTelit\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CLCC\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CGMM\r
ofonod[358]: Aux: < \r\nHE910\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CGMR\r
ofonod[358]: Aux: < \r\n12.00.003\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CGSN\r
ofonod[358]: Aux: < \r\n357164040533674\r\n\r\nOK\r\n
ofonod[358]: Aux: < \r\n#QSS: 0\r\n
ofonod[358]: plugins/telit.c:telit_qss_notify() 0x1152008
ofonod[358]: plugins/telit.c:switch_sim_state_status() 0x1152008, SIM
status: 0
--
Mingli Wu South Pole AB
Phone: +46 8 56237100 Anderstorpsvägen 16
Mobile: +46 73 7628460 SE - 171 54 Solna
e-mail: mingli(a)southpole.se www.southpole.se
8 years, 3 months
Ofono Modem Service acces
by Rohit Pathania
HI All,
How ofono access multiple service of the modems. Is ofono work with
modem only on AT commands or access the service of modem through AT
commands?
What is this qmi interface. Please provide me answer. I have confusion on
it.
Thanks & Regards,
Rohit Pathania
8 years, 3 months
[PATCH] build: Fix build when optimization is disabled
by Vinicius Costa Gomes
FORTIFY_SOURCE requires that optimization is enabled, and causes build
to fail when it isn't. For example, from config.log:
configure:12459: checking for signalfd
configure:12459: gcc -o conftest -Wall -O2 -D_FORTIFY_SOURCE=2 -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wdeclaration-after-statement -Wmissing-declarations -Wredundant-decls -Wcast-align -DG_DISABLE_DEPRECATED -O0 -g conftest.c >&5
In file included from /usr/include/limits.h:26:0,
from /usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/include-fixed/limits.h:169,
from /usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/include-fixed/syslimits.h:7,
from /usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/include-fixed/limits.h:34,
from conftest.c:34:
/usr/include/features.h:330:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
cc1: all warnings being treated as errors
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 2d6247d..e284215 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ AC_PROG_LIBTOOL
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [
if (test "${enableval}" = "no"); then
- CFLAGS="$CFLAGS -O0"
+ CFLAGS="$CFLAGS -O0 -U_FORTIFY_SOURCE"
fi
])
--
1.8.0
8 years, 3 months
qmi on huawei
by Cedric Jehasse
Hi,
I have a Huawei E398 dongle with a qmi interface, and i'm trying to make
ofono use the qmi interface for the gprs-context atom. I have this working,
but depending on how i unref the qmi_device in huawei_disable, ofono
crashes or there's have a memory leak.
The first approach i've tried is the same as in the gobi plugin.
I call qmi_device_shutdown() from huawei_disable(), and unref the
qmi_device from the callback.
The problem with this is: when i unplug the device ofono crashes.
When the device is unplugged, first huawei_disable() is called, then
huawei_remove(), and
afterwards shutdown_cb() is called. At that time the ofono_modem struct is
already freed, shutdown_cb() tries to access it and crashes.
The second approach i've tried is to unref the qmi_device directly from
huawei_disable.
With this approach, i see a memory leak of the qmi_service.
qmi_gprs_context_remove() is being called from flush_atoms(). And i can see
release_client() is being called. But the service_release_callback(), which
should free the service, is never being called.
I think the request get's canceled because qmi_device_unref() is being
called from huawei_disable(). The request is destroyed and the callback
which should free the qmi_service is never called.
Does anyone have thoughts/ideas on how i can fix this?
Below are the changes to the huawei plugin to add qmi support (other
patches are needed to make it work, but they're not relevant to this issue).
Thanks,
Cedric
diff --git a/plugins/huawei.c b/plugins/huawei.c
index 5d8875a..7003760 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -26,6 +26,8 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
#include <glib.h>
#include <gatchat.h>
@@ -57,6 +59,10 @@
#include <drivers/atmodem/atutil.h>
#include <drivers/atmodem/vendor.h>
+#include <drivers/qmimodem/qmi.h>
+#include <drivers/qmimodem/dms.h>
+#include <drivers/qmimodem/util.h>
+
static const char *none_prefix[] = { NULL };
static const char *gcap_prefix[] = { "+GCAP:", NULL };
static const char *rfswitch_prefix[] = { "^RFSWITCH:", NULL };
@@ -78,6 +84,7 @@ enum {
struct huawei_data {
GAtChat *modem;
GAtChat *pcui;
+ struct qmi_device *device;
gboolean have_sim;
int sim_state;
guint sysinfo_poll_source;
@@ -120,6 +127,7 @@ static void huawei_remove(struct ofono_modem *modem)
/* Cleanup after hot-unplug */
g_at_chat_unref(data->pcui);
+ qmi_device_unref(data->device);
g_free(data);
}
@@ -577,6 +585,36 @@ static GAtChat *open_device(struct ofono_modem *modem,
return chat;
}
+static struct qmi_device *open_qmi_device(struct ofono_modem *modem,
+ const char *key, char *debug)
+
+{
+ const char *device;
+ struct qmi_device *qmi_device;
+ int fd;
+
+ device = ofono_modem_get_string(modem, key);
+ if (device == NULL)
+ return NULL;
+ DBG("%s %s", key, device);
+
+ fd = open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC);
+ if (fd < 0)
+ return NULL;
+
+ qmi_device = qmi_device_new(fd);
+ if (!qmi_device) {
+ close(fd);
+ return NULL;
+ }
+ if (getenv("OFONO_QMI_DEBUG"))
+ qmi_device_set_debug(qmi_device, huawei_debug, debug);
+
+ qmi_device_set_close_on_unref(qmi_device, true);
+ return qmi_device;
+
+}
+
static int huawei_enable(struct ofono_modem *modem)
{
struct huawei_data *data = ofono_modem_get_data(modem);
@@ -594,6 +632,8 @@ static int huawei_enable(struct ofono_modem *modem)
return -EIO;
}
+ data->device = open_qmi_device(modem, "Device", "QMI: ");
+
g_at_chat_set_slave(data->modem, data->pcui);
g_at_chat_send(data->modem, "ATE0 +CMEE=1", NULL, NULL, NULL, NULL);
@@ -622,6 +662,17 @@ static void cfun_disable(gboolean ok, GAtResult
*result, gpointer user_data)
ofono_modem_set_powered(modem, FALSE);
}
+static void qmi_shutdown_cb(void *user_data)
+{
+ struct ofono_modem *modem = user_data;
+ struct huawei_data *data = ofono_modem_get_data(modem);
+
+ DBG("");
+
+ qmi_device_unref(data->device);
+ data->device = NULL;
+}
+
static int huawei_disable(struct ofono_modem *modem)
{
struct huawei_data *data = ofono_modem_get_data(modem);
@@ -646,9 +697,14 @@ static int huawei_disable(struct ofono_modem *modem)
data->online_cbd = NULL;
}
+ if (data->device) {
+ qmi_device_unref(data->device);
+ data->device = NULL;
+ // qmi_device_shutdown(data->device, qmi_shutdown_cb, modem,
NULL);
+ }
+
g_at_chat_send(data->pcui, "AT+CFUN=0", none_prefix,
cfun_disable, modem, NULL);
-
return -EINPROGRESS;
}
@@ -804,6 +860,7 @@ static void huawei_post_sim(struct ofono_modem *modem)
{
struct huawei_data *data = ofono_modem_get_data(modem);
+
DBG("%p", modem);
if (data->have_voice == TRUE) {
@@ -822,11 +879,15 @@ static void huawei_post_sim(struct ofono_modem *modem)
ofono_sms_create(modem, OFONO_VENDOR_HUAWEI,
"atmodem", data->pcui);
-
gprs = ofono_gprs_create(modem, OFONO_VENDOR_HUAWEI,
"atmodem", data->pcui);
- gc = ofono_gprs_context_create(modem, 0,
+ if (data->device == NULL) {
+ gc = ofono_gprs_context_create(modem,
OFONO_VENDOR_HUAWEI,
"atmodem", data->modem);
+ } else {
+ gc = ofono_gprs_context_create(modem, 0,
+ "qmimodem", data->device);
+ }
if (gprs && gc)
ofono_gprs_add_context(gprs, gc);
8 years, 3 months
qmi on huawei
by Cedric Jehasse
Hi,
I have a Huawei E398 dongle with a qmi interface, and i'm trying to make
ofono use the qmi interface for the gprs-context atom. I have this working,
but depending on how i unref the qmi_device in huawei_disable, ofono
crashes or there's have a memory leak.
The first approach i've tried is the same as in the gobi plugin.
I call qmi_device_shutdown() from huawei_disable(), and unref the
qmi_device from the callback.
The problem with this is: when i unplug the device ofono crashes.
When the device is unplugged, first huawei_disable() is called, then
huawei_remove(), and
afterwards shutdown_cb() is called. At that time the ofono_modem struct is
already freed, shutdown_cb() tries to access it and crashes.
The second approach i've tried is to unref the qmi_device directly from
huawei_disable.
With this approach, i see a memory leak of the qmi_service.
qmi_gprs_context_remove() is being called from flush_atoms(). And i can see
release_client() is being called. But the service_release_callback(), which
should free the service, is never being called.
I think the request get's canceled because qmi_device_unref() is being
called from huawei_disable(). The request is destroyed and the callback
which should free the qmi_service is never called.
Does anyone have thoughts/ideas on how i can fix this?
Below are the changes to the huawei plugin to add qmi support (other
patches are needed to make it work, but they're not relevant to this issue).
Thanks,
Cedric
diff --git a/plugins/huawei.c b/plugins/huawei.c
index 5d8875a..7003760 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -26,6 +26,8 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
#include <glib.h>
#include <gatchat.h>
@@ -57,6 +59,10 @@
#include <drivers/atmodem/atutil.h>
#include <drivers/atmodem/vendor.h>
+#include <drivers/qmimodem/qmi.h>
+#include <drivers/qmimodem/dms.h>
+#include <drivers/qmimodem/util.h>
+
static const char *none_prefix[] = { NULL };
static const char *gcap_prefix[] = { "+GCAP:", NULL };
static const char *rfswitch_prefix[] = { "^RFSWITCH:", NULL };
@@ -78,6 +84,7 @@ enum {
struct huawei_data {
GAtChat *modem;
GAtChat *pcui;
+ struct qmi_device *device;
gboolean have_sim;
int sim_state;
guint sysinfo_poll_source;
@@ -120,6 +127,7 @@ static void huawei_remove(struct ofono_modem *modem)
/* Cleanup after hot-unplug */
g_at_chat_unref(data->pcui);
+ qmi_device_unref(data->device);
g_free(data);
}
@@ -577,6 +585,36 @@ static GAtChat *open_device(struct ofono_modem *modem,
return chat;
}
+static struct qmi_device *open_qmi_device(struct ofono_modem *modem,
+ const char *key, char *debug)
+
+{
+ const char *device;
+ struct qmi_device *qmi_device;
+ int fd;
+
+ device = ofono_modem_get_string(modem, key);
+ if (device == NULL)
+ return NULL;
+ DBG("%s %s", key, device);
+
+ fd = open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC);
+ if (fd < 0)
+ return NULL;
+
+ qmi_device = qmi_device_new(fd);
+ if (!qmi_device) {
+ close(fd);
+ return NULL;
+ }
+ if (getenv("OFONO_QMI_DEBUG"))
+ qmi_device_set_debug(qmi_device, huawei_debug, debug);
+
+ qmi_device_set_close_on_unref(qmi_device, true);
+ return qmi_device;
+
+}
+
static int huawei_enable(struct ofono_modem *modem)
{
struct huawei_data *data = ofono_modem_get_data(modem);
@@ -594,6 +632,8 @@ static int huawei_enable(struct ofono_modem *modem)
return -EIO;
}
+ data->device = open_qmi_device(modem, "Device", "QMI: ");
+
g_at_chat_set_slave(data->modem, data->pcui);
g_at_chat_send(data->modem, "ATE0 +CMEE=1", NULL, NULL, NULL, NULL);
@@ -622,6 +662,17 @@ static void cfun_disable(gboolean ok, GAtResult
*result, gpointer user_data)
ofono_modem_set_powered(modem, FALSE);
}
+static void qmi_shutdown_cb(void *user_data)
+{
+ struct ofono_modem *modem = user_data;
+ struct huawei_data *data = ofono_modem_get_data(modem);
+
+ DBG("");
+
+ qmi_device_unref(data->device);
+ data->device = NULL;
+}
+
static int huawei_disable(struct ofono_modem *modem)
{
struct huawei_data *data = ofono_modem_get_data(modem);
@@ -646,9 +697,14 @@ static int huawei_disable(struct ofono_modem *modem)
data->online_cbd = NULL;
}
+ if (data->device) {
+ qmi_device_unref(data->device);
+ data->device = NULL;
+ // qmi_device_shutdown(data->device, qmi_shutdown_cb, modem,
NULL);
+ }
+
g_at_chat_send(data->pcui, "AT+CFUN=0", none_prefix,
cfun_disable, modem, NULL);
-
return -EINPROGRESS;
}
@@ -804,6 +860,7 @@ static void huawei_post_sim(struct ofono_modem *modem)
{
struct huawei_data *data = ofono_modem_get_data(modem);
+
DBG("%p", modem);
if (data->have_voice == TRUE) {
@@ -822,11 +879,15 @@ static void huawei_post_sim(struct ofono_modem *modem)
ofono_sms_create(modem, OFONO_VENDOR_HUAWEI,
"atmodem", data->pcui);
-
gprs = ofono_gprs_create(modem, OFONO_VENDOR_HUAWEI,
"atmodem", data->pcui);
- gc = ofono_gprs_context_create(modem, 0,
+ if (data->device == NULL) {
+ gc = ofono_gprs_context_create(modem,
OFONO_VENDOR_HUAWEI,
"atmodem", data->modem);
+ } else {
+ gc = ofono_gprs_context_create(modem, 0,
+ "qmimodem", data->device);
+ }
if (gprs && gc)
ofono_gprs_add_context(gprs, gc);
8 years, 3 months
Can't activate context at boot time
by Yevhen Kyriukha
I use Huawei E153 modem and have problems with connecting to 2G internet at
boot time.
I have connman and ofono installed on my PC and configured auto connection
of my 2G internet.
When I boot my PC, no connection is made and in syslog I get following
message:
*Activating context failed with error: Unknown error type*
But when I run "activate-context" script after some time connection
establishes correctly.
I attached ofono debug log to this message.
--
Best regards,
Yevhen
8 years, 3 months
Can't power on modem
by Yevhen Kyriukha
Hi!
I use Huawei E153 modem and can't get it work with ofono properly.
Here are the steps I made:
1) Boot PC
2) Run ofono
3) Run "enable-modem"
After that I get:
... org.ofono.Error.Timeout exception.
But when I unplug and plug my modem again everything works.
I attached ofono debug log to this message.
--
Best regards,
Yevhen
8 years, 3 months
Re: Can't power on modem
by Cedric Jehasse
Hi Yevhen,
I've seen the same issue before with an Huawei modem.
It looks like not all modems can handle sending "ATE0 +CMEE=1" to the modem
and pcui port simultaneously.
Try removing this line from huawei_enable():
g_at_chat_send(data->modem, "ATE0 +CMEE=1", NULL, NULL, NULL, NULL);
Regards,
Cedric
8 years, 3 months