[PATCH 1/4] gdbus: Fix crash when getting disconnected from the bus
by Luiz Augusto von Dentz
From: Johan Hedberg <johan.hedberg(a)intel.com>
When getting disconnected from the bus sometimes (maybe always?)
dbus_watch_handle() can cause the "info" context to be free'd meaning
that we should not try to access it after the call. The only member we
need access to is the connection pointer and as the code already has a
ref() call for it it's only natural to solve the issue by adding a local
variable not dependent on "info".
The backtrace of the crash fixed looks as follows:
Invalid read of size 8
at 0x121085: watch_func (mainloop.c:105)
by 0x4C72694: g_main_context_dispatch (gmain.c:2539)
by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146)
by 0x4C72DC1: g_main_loop_run (gmain.c:3340)
by 0x120541: main (main.c:551)
Address 0x5bbcd90 is 16 bytes inside a block of size 24 free'd
at 0x4A079AE: free (vg_replace_malloc.c:427)
by 0x4C7837E: g_free (gmem.c:252)
by 0x4F708BF: dbus_watch_set_data (dbus-watch.c:614)
by 0x4F70938: _dbus_watch_unref (dbus-watch.c:132)
by 0x4F6E9A7: _dbus_transport_handle_watch (dbus-transport.c:884)
by 0x4F59AFB: _dbus_connection_handle_watch (dbus-connection.c:1497)
by 0x4F70AF9: dbus_watch_handle (dbus-watch.c:683)
by 0x121084: watch_func (mainloop.c:103)
by 0x4C72694: g_main_context_dispatch (gmain.c:2539)
by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146)
by 0x4C72DC1: g_main_loop_run (gmain.c:3340)
by 0x120541: main (main.c:551)
---
gdbus/mainloop.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c
index cff326f..099b67f 100644
--- a/gdbus/mainloop.c
+++ b/gdbus/mainloop.c
@@ -92,8 +92,9 @@ static gboolean watch_func(GIOChannel *chan, GIOCondition cond, gpointer data)
struct watch_info *info = data;
unsigned int flags = 0;
DBusDispatchStatus status;
+ DBusConnection *conn;
- dbus_connection_ref(info->conn);
+ conn = dbus_connection_ref(info->conn);
if (cond & G_IO_IN) flags |= DBUS_WATCH_READABLE;
if (cond & G_IO_OUT) flags |= DBUS_WATCH_WRITABLE;
@@ -102,10 +103,10 @@ static gboolean watch_func(GIOChannel *chan, GIOCondition cond, gpointer data)
dbus_watch_handle(info->watch, flags);
- status = dbus_connection_get_dispatch_status(info->conn);
- queue_dispatch(info->conn, status);
+ status = dbus_connection_get_dispatch_status(conn);
+ queue_dispatch(conn, status);
- dbus_connection_unref(info->conn);
+ dbus_connection_unref(conn);
return TRUE;
}
--
1.7.11.4
8 years, 3 months
[PATCH] sim: Fix the quirk handling of CPIN for Wavecom Q2XXX
by Holger Hans Peter Freyther
From: Holger Hans Peter Freyther <hfreyther(a)sysmocom.de>
Commit 1ccecfe01eb7f9f4d1d931814deb66ef37840b73 added the quirk
handling for the Q2XXX module but it missed the first part of
the Wavecom quirk handling.
If decode_at_error is not fed with OK the error variable will be
set to an error and the sim_pin_query_cb will exit before doing
any notifications. This started to happen after git commit
72ce19bf3e87b5e73c053f7ea1095a5006f1aea9).
---
drivers/atmodem/sim.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index cf3345c..89445bb 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -980,7 +980,8 @@ static void at_cpin_cb(gboolean ok, GAtResult *result, gpointer user_data)
int len = sizeof(at_sim_name) / sizeof(*at_sim_name);
const char *final = g_at_result_final_response(result);
- if (sd->vendor == OFONO_VENDOR_WAVECOM && ok && strlen(final) > 7)
+ if ((sd->vendor == OFONO_VENDOR_WAVECOM ||
+ sd->vendor == OFONO_VENDOR_WAVECOM_Q2XXX) && ok && strlen(final) > 7)
decode_at_error(&error, "OK");
else
decode_at_error(&error, final);
--
1.7.10.4
8 years, 3 months
Ofono can't work with ZTE MF190S
by Yevhen Kyriukha
Hello!
I have a problems with Ofono while working with my 3G modem *ZTE MF190S*.
I can't connect to GPRS network.
I'm getting an error when I run *enable-gprs* test script.
Log files are attached.
As you can see there are messages like
*GPRS not supported on this device*
and
*Unable to initialize Network Registration*
in ofono.log and ofono-at.log.
--
Best regards,
Yevhen
8 years, 3 months
[PATCH 1/1] Set MNC length to 2 if EFad doesn't specify it
by Jonas Bonn
Byte 4 of the EFAD structure, which specifies the MNC length, is optional.
If this byte is not present, then there is no way to determine the length
of the MNC. As the, by far, most common length is 2, we might as well
default to this value.
This patch changes the ofono_error to a warning as it's not really an
error that we're encountering, but the user should nonetheless be given
a heads-up that something might not work as expected.
Signed-off-by: Jonas Bonn <jonas(a)southpole.se>
---
src/sim.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/sim.c b/src/sim.c
index 4384eb0..f6109c6 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1760,7 +1760,9 @@ static void sim_ad_read_cb(int ok, int length, int record,
return;
if (length < 4) {
- ofono_error("EFad should contain at least four bytes");
+ ofono_warn("EFad does not specify (optional) MNC length"
+ ", defaulting to 2");
+ sim->mnc_length = 2;
return;
}
--
1.7.9.5
8 years, 3 months
Ofono code flow info
by Rohit Pathania
Hi Sir/Mam,
I want to get information on ofono and its dbus api. How to build it.
So I can write some application by using ofono.
I am doing this because of interste in telephony.
so please help in it.
Thanks & Regards,
Rohit
8 years, 4 months
[PATCH] systemd: prevent duplicate logging messages in journal
by Marti Raudsepp
By default, both stderr and syslog messages go to the systemd journal,
which results in duplicate messages being logged.
Thanks to Vinicius Costa Gomes for pointing out this problem.
---
dundee/dundee.service.in | 1 +
src/ofono.service.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/dundee/dundee.service.in b/dundee/dundee.service.in
index c57c618..82c5ef1 100644
--- a/dundee/dundee.service.in
+++ b/dundee/dundee.service.in
@@ -6,6 +6,7 @@ After=syslog.target
Type=dbus
BusName=org.ofono.dundee
ExecStart=@prefix@/sbin/dundee -n
+StandardError=null
[Install]
WantedBy=multi-user.target
diff --git a/src/ofono.service.in b/src/ofono.service.in
index f4531a8..c24ac28 100644
--- a/src/ofono.service.in
+++ b/src/ofono.service.in
@@ -6,6 +6,7 @@ After=syslog.target
Type=dbus
BusName=org.ofono
ExecStart=@prefix@/sbin/ofonod -n
+StandardError=null
[Install]
WantedBy=multi-user.target
--
1.8.0
8 years, 4 months
oFono support for the Telit GC864-QUAD V2 serial port GSM/GPRS modem
by Markus Hubig
Hello @all,
I'm new here and I'm in the process of developing a Embedded Linux datalogger
appliance. At the moment I'm evaluating the modem part of it, and we are
looking forward to use the Telit GC864-QUAD V2 serial port GSM/GPRS modem with
oFono.
Unfortunately I couldn't find much "getting started" information for oFono, but
by reading throughout the old posts on this list I gathered at least some.
Please correct me if I get things wrong:
1. The one-and-only way to tell oFono to use a modem is by udev rules like
this:
KERNEL=="ttyUSB0", ENV{OFONO_DRIVER}="calypso"
2. Serial port GPRS modems like the Telit GC864 are not supported
out-of-the-box, so one has to write a special modem driver for it.
3. Since this modem supports CMUX multiplexing with the 3GPP 27.010 standard,
I can use 'GAtMux' like it's done in 'plugins/calypso.c'.
4. There is a telit modem driver, but this is only for the UC864 UMTS modem
which is connected via USB.
So in order to write a driver to support the GC864, what would be a good
starting point? Add support for serial port CMUX to the telit driver?
Looking forward for some advice ...
Cheers, Markus
8 years, 4 months
Fail to register to default network - maybe a race condition
by Martin Grimme
Hi,
I'm experiencing a strange behavior with ofono (1.10) and the Huawei
EM770W modem on Pegatron Lucid (WeTab) hardware. The same used to work
well with ofono 1.8.
As soon as I get notified about the availability of
org.ofono.NetworkRegistration, I'm calling
org.ofono.NetworkRegistration.Register on that modem. However, this
shows no effect.
See http://pastebin.com/CAVEvsA2 for a trace of ofonod.
But when using the test-network-registration test script from ofono to
connect to the default network, it works, even though the script also
only uses org.ofono.NetworkRegistration.Register to register.
See http://pastebin.com/9RQbd8QU for a trace of ofonod.
The code I'm using for registration is here:
http://pastebin.com/fkVVVc1a
Regards,
Martin
8 years, 4 months
[PATCH] smsutil: Remove compilation warning
by Henrique Dante de Almeida
---
src/smsutil.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/smsutil.c b/src/smsutil.c
index e3b4b72..7399fbe 100644
--- a/src/smsutil.c
+++ b/src/smsutil.c
@@ -4108,7 +4108,7 @@ char *cbs_decode_text(GSList *cbs_list, char *iso639_lang)
*/
for (; i < written; i++, bufsize++) {
if (unpacked[i] == '\r') {
- unsigned int t;
+ long t;
t = strspn((const char *) unpacked + i,
"\r");
--
1.7.12.rc2.16.g034161a
8 years, 4 months
oFono upstream test results_20121003
by Nicolas Paccou
Hello all,
Please find the test report of oFono v1.11 commit 7b97a8a.
During this testing, we ran 462 functional positive cases. 361 cases passed
and 101 are blocked due to missing software/missing hardware/Feature not
supported. The pass rate is 78% (+3%) which is similar to previous test
cycle (v1.10 commit 006a37c). Only few STK TCs have been able to be passed
thanks to changes done in Phonesim.
We found, reopened and verified no issue.
If you have any comment about this report, contact me please.
Test Objective
The aim of this test cycle was to validate the state of oFono upstream by
testing all its features over all material we had (according to what feature
was supported and by priority order: 3G dongle and phonesim). oFono has been
installed and tested on Ubuntu 12.04 device.
Test Environment
oFono: v1.11 (updated to commit 7b97a8a)
usb_modeswitch: v1.2.3
modeswitch data: 20120120
Hardware: Laptop
Ubuntu: v12.04
Modem: Huawei E173u-2 - Operator & SIM Card: Orange SIM Card (data only) -
Phone number +33677646185 and other specific SIM Cards
Phonesim: v1.19 (updated to commit d7f1f1a)
Issue Summary
New bug:
None
Known bug:
None
Closed bug:
None
Test Result
SUMMARY
Total Test Case 462
Passed 361
Failed 0
Blocked 101
TCs completed 100,0%
Run rate 78% (+3%)
Pass rate total 78% (+3%)
Blocked rate total 22% (-3%)
Pass rate of executed 100%
FEATURES TOTAL PASS FAIL BLOCKED
PASS % MODEM USED
Modem 16 16 0 0
100% 3G Dongle
SIM 20 20 0 0
100% 3G Dongle
Phonebook 1 1 0 0
100% 3G Dongle
Network 18 18 0 0
100% 3G Dongle
Radio 22 17 0 5
77% 3G Dongle
Connectivity 28 28 0 0
100% 3G Dongle
Voice Calls 50 40 0 10
80% mainly on 3G Dongle (using appropriate SIM Card)
Messaging 24 22 0 2
92% 3G Dongle (using appropriate SIM Card)
Smart Messaging 15 15 0 0
100% Phonesim
Message Waiting 8 8 0 0
100% Phonesim
Cell Broadcast 15 12 0 3
80% Phonesim
Call Settings 13 9 0 4
69% 3G Dongle
Supplementary Services 59 56 0 3
95% mainly on 3G Dongle (using appropriate SIM Card)
Call Meter 15 5 0 10
33% Phonesim
Call Barring 49 33 0 16
67% 3G Dongle (using appropriate SIM Cards)
Call Forwarding 5 5 0 0
100% Phonesim
SimToolKit 104 56 0 48
54% Phonesim
Please find details in the attached file.
Notes
22% of cases are blocked due to:
Missing software (e.g.: Missing feature in Phonesim or missing a visual
application for some blocked feature as Setup Idle ModeText, Select Item,
Send SMS, etc.)
Missing hardware (e.g.: Missing other SIM (having appropriate service
activated) or modem to be able to test certain feature or case (e.g.:
network simulator or smartphone device to test PIN/PIN2 cases, Call Barring
etc.).
Feature not supported by oFono.
Best regards,
Nicolas
8 years, 4 months