[PATCH 2/7] cdma-connman: add CDMA Connection Manager support
by christian.lam@nokia.com
From: Christian Lam <christian.lam(a)nokia.com>
---
Makefile.am | 3 +-
include/cdma-connman.h | 79 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 1 deletions(-)
create mode 100644 include/cdma-connman.h
diff --git a/Makefile.am b/Makefile.am
index 9933e32..c4f5983 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,8 @@ pkginclude_HEADERS = include/log.h include/plugin.h include/history.h \
include/radio-settings.h include/stk.h \
include/audio-settings.h include/nettime.h \
include/ctm.h include/cdma-voicecall.h \
- include/cdma-sms.h include/sim-auth.h
+ include/cdma-sms.h include/sim-auth.h \
+ include/cdma-connman.h
nodist_pkginclude_HEADERS = include/version.h
diff --git a/include/cdma-connman.h b/include/cdma-connman.h
new file mode 100644
index 0000000..22252e0
--- /dev/null
+++ b/include/cdma-connman.h
@@ -0,0 +1,79 @@
+/*
+ *
+ * oFono - Open Source Telephony
+ *
+ * Copyright (C) 2010-2011 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
+ *
+ */
+
+#ifndef __OFONO_CDMA_CONNMAN_H
+#define __OFONO_CDMA_CONNMAN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ofono/types.h>
+
+struct ofono_cdma_connman;
+
+typedef void (*ofono_cdma_connman_cb_t)(const struct ofono_error *error,
+ void *data);
+typedef void (*ofono_cdma_connman_up_cb_t)(const struct ofono_error *error,
+ const char *interface,
+ ofono_bool_t static_ip,
+ const char *address,
+ const char *netmask,
+ const char *gw,
+ const char **dns,
+ void *data);
+
+struct ofono_cdma_connman_driver {
+ const char *name;
+ int (*probe)(struct ofono_cdma_connman *cm, unsigned int vendor,
+ void *data);
+ void (*remove)(struct ofono_cdma_connman *cm);
+ void (*activate)(struct ofono_cdma_connman *cm,
+ ofono_cdma_connman_up_cb_t cb,
+ void *data);
+ void (*deactivate)(struct ofono_cdma_connman *cm,
+ ofono_cdma_connman_cb_t cb,
+ void *data);
+};
+
+int ofono_cdma_connman_driver_register(
+ const struct ofono_cdma_connman_driver *d);
+void ofono_cdma_connman_driver_unregister(
+ const struct ofono_cdma_connman_driver *d);
+
+struct ofono_cdma_connman *ofono_cdma_connman_create(
+ struct ofono_modem *modem,
+ unsigned int vendor,
+ const char *driver,
+ void *data);
+
+void ofono_cdma_connman_register(struct ofono_cdma_connman *cm);
+void ofono_cdma_connman_remove(struct ofono_cdma_connman *cm);
+
+void ofono_cdma_connman_set_data(struct ofono_cdma_connman *cm,
+ void *data);
+void *ofono_cdma_connman_get_data(struct ofono_cdma_connman *cm);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OFONO_CDMA_CONNMAN_H */
--
1.7.0.4
11 years, 7 months
[PATCH 1/7] dbus: add CDMA Connection Manager interface
by christian.lam@nokia.com
From: Christian Lam <christian.lam(a)nokia.com>
---
include/dbus.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/dbus.h b/include/dbus.h
index 83a0590..6f436ca 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -59,6 +59,7 @@ extern "C" {
/* CDMA Interfaces */
#define OFONO_CDMA_VOICECALL_MANAGER_INTERFACE "org.ofono.cdma.VoiceCallManager"
#define OFONO_CDMA_MESSAGE_MANAGER_INTERFACE "org.ofono.cdma.MessageManager"
+#define OFONO_CDMA_CONNECTION_MANAGER_INTERFACE "org.ofono.cdma.ConnectionManager"
/* Essentially a{sv} */
#define OFONO_PROPERTIES_ARRAY_SIGNATURE DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING \
--
1.7.0.4
11 years, 7 months
[PATCH] bluetooth: Add bluetooth server support
by Frédéric Danis
Based on patches from: Zhenhua Zhang <zhenhua.zhang at intel.com>
It watches Bluetooth adapter property changes and adds SDP record to
listen client connection request.
It supports multiple servers and multiple client connections for each
server.
---
Authorization code will be added in next patch
Makefile.am | 1 +
plugins/bluetooth.c | 247 +++++++++++++++++++++++++++++++++++++++++++++++++++
plugins/bluetooth.h | 9 ++
3 files changed, 257 insertions(+), 0 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 9933e32..abd5d11 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -317,6 +317,7 @@ builtin_sources += plugins/bluetooth.c plugins/bluetooth.h
builtin_modules += hfp
builtin_sources += plugins/hfp.c plugins/bluetooth.h
+builtin_sources += $(btio_sources)
builtin_cflags += @BLUEZ_CFLAGS@
builtin_libadd += @BLUEZ_LIBS@
endif
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 93dd7a1..56e22c6 100644
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -35,12 +35,30 @@
#include <ofono/dbus.h>
+#include <btio.h>
#include "bluetooth.h"
static DBusConnection *connection;
static GHashTable *uuid_hash = NULL;
static GHashTable *adapter_address_hash = NULL;
static gint bluetooth_refcount;
+static GSList *server_list = NULL;
+
+struct server {
+ guint8 channel;
+ char *sdp_record;
+ GIOChannel *io;
+ char *adapter;
+ guint handle;
+ ConnectFunc connect_cb;
+ gpointer user_data;
+ GSList *client_list;
+};
+
+struct client_data {
+ struct server *server;
+ guint source;
+};
void bluetooth_create_path(const char *dev_addr, const char *adapter_addr,
char *buf, int size)
@@ -371,6 +389,161 @@ static gboolean property_changed(DBusConnection *connection, DBusMessage *msg,
return TRUE;
}
+static void server_stop(gpointer data, gpointer user_data)
+{
+ struct server *server = data;
+ DBusMessage *msg;
+
+ /* calling g_source_remove will also remove it from client list */
+ while (server->client_list)
+ g_source_remove((guint) server->client_list->data);
+
+ if (server->handle == 0)
+ goto out;
+
+ msg = dbus_message_new_method_call(BLUEZ_SERVICE, server->adapter,
+ BLUEZ_SERVICE_INTERFACE,
+ "RemoveRecord");
+ if (msg == NULL) {
+ ofono_error("Unable to allocate D-Bus RemoveRecord message");
+ goto out;
+ }
+
+ dbus_message_append_args(msg, DBUS_TYPE_UINT32, &server->handle,
+ DBUS_TYPE_INVALID);
+ g_dbus_send_message(connection, msg);
+
+ server->handle = 0;
+
+out:
+ if (server->io != NULL) {
+ g_io_channel_shutdown(server->io, TRUE, NULL);
+ g_io_channel_unref(server->io);
+ server->io = NULL;
+ }
+
+ g_free(server->adapter);
+ server->adapter = NULL;
+}
+
+static void client_remove(struct client_data *cl)
+{
+ cl->server->client_list = g_slist_remove(cl->server->client_list,
+ (void *) cl->source);
+ g_free(cl);
+}
+
+static gboolean client_event(GIOChannel *chan, GIOCondition cond, gpointer data)
+{
+ return FALSE;
+}
+
+static void confirm_event(GIOChannel *io, gpointer user_data)
+{
+ struct server *server = user_data;
+ GError *err = NULL;
+ char address[18];
+ guint8 channel;
+ struct client_data *cl;
+
+ bt_io_get(io, BT_IO_RFCOMM, &err, BT_IO_OPT_DEST, address,
+ BT_IO_OPT_CHANNEL, &channel,
+ BT_IO_OPT_INVALID);
+ if (err) {
+ ofono_error("%s", err->message);
+ g_error_free(err);
+ return;
+ }
+
+ ofono_info("New connection from: %s, channel %u", address, channel);
+
+ if (!bt_io_accept(io, server->connect_cb, server->user_data,
+ NULL, &err)) {
+ ofono_error("%s", err->message);
+ g_error_free(err);
+ g_io_channel_unref(io);
+ return;
+ }
+
+ cl = g_try_new0(struct client_data, 1);
+ if (cl == NULL) {
+ ofono_error("Unable to allocate new client event structure");
+ return;
+ }
+
+ cl->server = server;
+ cl->source = g_io_add_watch_full(io, G_PRIORITY_DEFAULT,
+ G_IO_HUP | G_IO_ERR | G_IO_NVAL,
+ client_event, cl,
+ (GDestroyNotify) client_remove);
+ server->client_list = g_slist_prepend(server->client_list,
+ (void *)cl->source);
+}
+
+static void add_record_cb(DBusPendingCall *call, gpointer user_data)
+{
+ struct server *server = user_data;
+ DBusMessage *reply = dbus_pending_call_steal_reply(call);
+ DBusError derr;
+ guint32 handle;
+
+ dbus_error_init(&derr);
+
+ if (dbus_set_error_from_message(&derr, reply)) {
+ ofono_error("Replied with an error: %s, %s",
+ derr.name, derr.message);
+ dbus_error_free(&derr);
+ server_stop(server, NULL);
+ goto done;
+ }
+
+ dbus_message_get_args(reply, NULL, DBUS_TYPE_UINT32, &handle,
+ DBUS_TYPE_INVALID);
+ server->handle = handle;
+
+ ofono_info("Registered handle: 0x%x for channel %d", handle,
+ server->channel);
+
+done:
+ dbus_message_unref(reply);
+}
+
+static void server_start(gpointer data, gpointer user_data)
+{
+ struct server *server = data;
+ char *path = user_data;
+ char *adapter_addr;
+ GError *err = NULL;
+
+ if (server->io != NULL)
+ return;
+
+ adapter_addr = g_hash_table_lookup(adapter_address_hash, path);
+
+ server->io = bt_io_listen(BT_IO_RFCOMM, NULL, confirm_event,
+ server, NULL, &err,
+ BT_IO_OPT_SOURCE, adapter_addr,
+ BT_IO_OPT_CHANNEL, server->channel,
+ BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
+ BT_IO_OPT_INVALID);
+ if (server->io == NULL) {
+ ofono_error("Bluetooth channel %d register failed: %s",
+ server->channel, err->message);
+ g_error_free(err);
+ server_stop(server, NULL);
+ return;
+ }
+
+ server->adapter = g_strdup(path);
+
+ if (server->sdp_record != NULL)
+ bluetooth_send_with_reply(path, BLUEZ_SERVICE_INTERFACE,
+ "AddRecord", add_record_cb,
+ server, NULL, -1,
+ DBUS_TYPE_STRING, &server->sdp_record,
+ DBUS_TYPE_INVALID);
+}
+
static void adapter_properties_cb(DBusPendingCall *call, gpointer user_data)
{
const char *path = user_data;
@@ -395,6 +568,9 @@ static void adapter_properties_cb(DBusPendingCall *call, gpointer user_data)
g_hash_table_insert(adapter_address_hash,
g_strdup(path), g_strdup(addr));
+ if (server_list)
+ g_slist_foreach(server_list, server_start, (gpointer)path);
+
for (l = device_list; l; l = l->next) {
const char *device = l->data;
@@ -429,11 +605,26 @@ static gboolean adapter_removed(DBusConnection *connection,
DBusMessage *message, void *user_data)
{
const char *path;
+ GSList *l;
if (dbus_message_get_args(message, NULL, DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID) == TRUE)
g_hash_table_remove(adapter_address_hash, path);
+ for (l = server_list; l; l = l->next) {
+ struct server *server = l->data;
+
+ if (server->adapter == NULL)
+ continue;
+
+ if (g_str_equal(path, server->adapter) == FALSE)
+ continue;
+
+ /* Don't remove handle if the adapter has been removed */
+ server->handle = 0;
+ server_stop(server, NULL);
+ }
+
return TRUE;
}
@@ -555,6 +746,8 @@ remove:
static void bluetooth_unref(void)
{
+ GSList *l;
+
if (g_atomic_int_dec_and_test(&bluetooth_refcount) == FALSE)
return;
@@ -565,6 +758,19 @@ static void bluetooth_unref(void)
g_hash_table_destroy(uuid_hash);
g_hash_table_destroy(adapter_address_hash);
+
+ if (server_list == NULL)
+ return;
+
+ for (l = server_list; l; l = l->next) {
+ struct server *server = l->data;
+
+ server_stop(server, NULL);
+ g_free(server);
+ }
+
+ g_slist_free(server_list);
+ server_list = NULL;
}
int bluetooth_register_uuid(const char *uuid, struct bluetooth_profile *profile)
@@ -590,5 +796,46 @@ void bluetooth_unregister_uuid(const char *uuid)
bluetooth_unref();
}
+struct server *bluetooth_register_server(guint8 channel, const char *sdp_record,
+ ConnectFunc cb, gpointer user_data)
+{
+ struct server *server;
+
+ server = g_try_new0(struct server, 1);
+ if (!server)
+ return NULL;
+
+ bluetooth_ref();
+
+ if (bluetooth_refcount == 0) {
+ g_free(server);
+ return NULL;
+ }
+
+ server->channel = channel;
+ if (sdp_record != NULL)
+ server->sdp_record = g_strdup(sdp_record);
+ server->connect_cb = cb;
+ server->user_data = user_data;
+
+ server_list = g_slist_prepend(server_list, server);
+
+ bluetooth_send_with_reply("/", BLUEZ_MANAGER_INTERFACE, "GetProperties",
+ manager_properties_cb, NULL, NULL, -1,
+ DBUS_TYPE_INVALID);
+
+ return server;
+}
+
+void bluetooth_unregister_server(struct server *server)
+{
+ server_list = g_slist_remove(server_list, server);
+ server_stop(server, NULL);
+ g_free(server->sdp_record);
+ g_free(server);
+
+ bluetooth_unref();
+}
+
OFONO_PLUGIN_DEFINE(bluetooth, "Bluetooth Utils Plugins", VERSION,
OFONO_PLUGIN_PRIORITY_DEFAULT, NULL, NULL)
diff --git a/plugins/bluetooth.h b/plugins/bluetooth.h
index 42b0d13..505d908 100644
--- a/plugins/bluetooth.h
+++ b/plugins/bluetooth.h
@@ -23,6 +23,7 @@
#define BLUEZ_MANAGER_INTERFACE BLUEZ_SERVICE ".Manager"
#define BLUEZ_ADAPTER_INTERFACE BLUEZ_SERVICE ".Adapter"
#define BLUEZ_DEVICE_INTERFACE BLUEZ_SERVICE ".Device"
+#define BLUEZ_SERVICE_INTERFACE BLUEZ_SERVICE ".Service"
#define DBUS_TIMEOUT 15
@@ -39,10 +40,18 @@ struct bluetooth_profile {
void (*set_alias)(const char *device, const char *);
};
+struct server;
+
+typedef void (*ConnectFunc)(GIOChannel *io, GError *err, gpointer user_data);
+
int bluetooth_register_uuid(const char *uuid,
struct bluetooth_profile *profile);
void bluetooth_unregister_uuid(const char *uuid);
+struct server *bluetooth_register_server(guint8 channel, const char *sdp_record,
+ ConnectFunc cb, gpointer user_data);
+void bluetooth_unregister_server(struct server *server);
+
void bluetooth_create_path(const char *dev_addr, const char *adapter_addr,
char *buf, int size);
--
1.7.1
11 years, 7 months
[PATCH 1/3] PPP: Fix transmit ACCM and receive ACCM setting issue
by martin.xu@intel.com
From: Martin Xu <martin.xu(a)intel.com>
Tramsmit ACCM and receive ACCM is mixed up.
According to RFC1662 Section 7.1, ACCM Configuration Option is
used to inform the peer which control characters MUST remain
mapped when the peer sends them.
---
gatchat/ppp_lcp.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index 3a80a62..cc3e231 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -149,7 +149,13 @@ static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet)
while (ppp_option_iter_next(&iter) == TRUE) {
switch (ppp_option_iter_get_type(&iter)) {
case ACCM:
- ppp_set_xmit_accm(pppcp_get_ppp(pppcp), 0);
+ /*
+ * RFC1662 Section 7.1
+ * The Configuration Option is used to inform the peer
+ * which control characters MUST remain mapped when
+ * the peer sends them.
+ */
+ ppp_set_recv_accm(pppcp_get_ppp(pppcp), 0);
break;
default:
break;
@@ -263,7 +269,13 @@ static enum rcr_result lcp_rcr(struct pppcp_data *pppcp,
while (ppp_option_iter_next(&iter) == TRUE) {
switch (ppp_option_iter_get_type(&iter)) {
case ACCM:
- ppp_set_recv_accm(ppp,
+ /*
+ * RFC1662 Section 7.1
+ * The Configuration Option is used to inform the peer
+ * which control characters MUST remain mapped when
+ * the peer sends them.
+ */
+ ppp_set_xmit_accm(ppp,
get_host_long(ppp_option_iter_get_data(&iter)));
break;
case AUTH_PROTO:
--
1.6.1.3
11 years, 7 months
test script to establish 3G connection
by yanni
Hi All,
I'm looking for an example how to active 3G connection(ppp) with Huawei
E180.
not sure if these step's should work:
1)/ofono-0.39/test# ./enable-modem
Connecting modem /huawei0...
2)/ofono-0.39/test# ./online-modem
Setting modem /huawei0 online...
3)/ofono-0.39/test# ./list-modems
[ /huawei0 ]
Features = sms gprs cbs net rat sim
Powered = 1
Lockdown = 0
Interfaces = org.ofono.SmartMessaging org.ofono.PushNotification
org.ofono.MessageManager org.ofono.ConnectionManager
org.ofono.CellBroadcast org.ofono.NetworkRegistration
org.ofono.SupplementaryServices org.ofono.Phonebook
org.ofono.RadioSettings org.ofono.SimManager
Online = 1
4)./create-internet-context internet
5)./list-contexts
[ /huawei0 ]./list-contexts
[ /huawei0 ]
[ /huawei0/context1 ]
Username =
Protocol = ip
Name = Internet
Settings = { }
Active = 0
AccessPointName = internet
Password =
Type = internet
6)./process-context-settings , no output
[ /huawei0/context1 ]
Username =
Protocol = ip
Name = Internet
Settings = { }
Active = 0
AccessPointName = internet
Password =
Type = internet
./process-context-settings "Receive no output here??...."
Thanks
11 years, 7 months
[PATCH 1/4] Remove initialisers for enum ofono_atom_type.
by Andrzej Zaborowski
They have no effect, enum already ensures the values are unique.
---
src/ofono.h | 48 ++++++++++++++++++++++++------------------------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/ofono.h b/src/ofono.h
index 77567c2..badc2ee 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -103,30 +103,30 @@ void __ofono_modem_append_properties(struct ofono_modem *modem,
struct ofono_atom;
enum ofono_atom_type {
- OFONO_ATOM_TYPE_DEVINFO = 0,
- OFONO_ATOM_TYPE_CALL_BARRING = 1,
- OFONO_ATOM_TYPE_CALL_FORWARDING = 2,
- OFONO_ATOM_TYPE_CALL_METER = 3,
- OFONO_ATOM_TYPE_CALL_SETTINGS = 4,
- OFONO_ATOM_TYPE_NETREG = 5,
- OFONO_ATOM_TYPE_PHONEBOOK = 6,
- OFONO_ATOM_TYPE_SMS = 7,
- OFONO_ATOM_TYPE_SIM = 8,
- OFONO_ATOM_TYPE_USSD = 9,
- OFONO_ATOM_TYPE_VOICECALL = 10,
- OFONO_ATOM_TYPE_HISTORY = 11,
- OFONO_ATOM_TYPE_SSN = 12,
- OFONO_ATOM_TYPE_MESSAGE_WAITING = 13,
- OFONO_ATOM_TYPE_CBS = 14,
- OFONO_ATOM_TYPES_CALL_VOLUME = 15,
- OFONO_ATOM_TYPE_GPRS = 16,
- OFONO_ATOM_TYPE_GPRS_CONTEXT = 17,
- OFONO_ATOM_TYPE_RADIO_SETTINGS = 18,
- OFONO_ATOM_TYPE_AUDIO_SETTINGS = 19,
- OFONO_ATOM_TYPE_STK = 20,
- OFONO_ATOM_TYPE_NETTIME = 21,
- OFONO_ATOM_TYPE_CTM = 22,
- OFONO_ATOM_TYPE_CDMA_VOICECALL_MANAGER = 23,
+ OFONO_ATOM_TYPE_DEVINFO,
+ OFONO_ATOM_TYPE_CALL_BARRING,
+ OFONO_ATOM_TYPE_CALL_FORWARDING,
+ OFONO_ATOM_TYPE_CALL_METER,
+ OFONO_ATOM_TYPE_CALL_SETTINGS,
+ OFONO_ATOM_TYPE_NETREG,
+ OFONO_ATOM_TYPE_PHONEBOOK,
+ OFONO_ATOM_TYPE_SMS,
+ OFONO_ATOM_TYPE_SIM,
+ OFONO_ATOM_TYPE_USSD,
+ OFONO_ATOM_TYPE_VOICECALL,
+ OFONO_ATOM_TYPE_HISTORY,
+ OFONO_ATOM_TYPE_SSN,
+ OFONO_ATOM_TYPE_MESSAGE_WAITING,
+ OFONO_ATOM_TYPE_CBS,
+ OFONO_ATOM_TYPES_CALL_VOLUME,
+ OFONO_ATOM_TYPE_GPRS,
+ OFONO_ATOM_TYPE_GPRS_CONTEXT,
+ OFONO_ATOM_TYPE_RADIO_SETTINGS,
+ OFONO_ATOM_TYPE_AUDIO_SETTINGS,
+ OFONO_ATOM_TYPE_STK,
+ OFONO_ATOM_TYPE_NETTIME,
+ OFONO_ATOM_TYPE_CTM,
+ OFONO_ATOM_TYPE_CDMA_VOICECALL_MANAGER,
};
enum ofono_atom_watch_condition {
--
1.7.1.86.g0e460.dirty
11 years, 7 months
oFono exits on new voicecall with disconnected system bus
by Nicola Mfb
Hi!
that's happen with oFono 0.38 on freerunner with debian sid on the
first incoming/outgoing call:
ofonod[6232]: drivers/calypsomodem/voicecall.c:cpi_notify() id:1,
msgtype:0, direction:1, mode:0
ofonod[6232]: drivers/calypsomodem/voicecall.c:cpi_notify() Len > 0
ofonod[6232]: drivers/calypsomodem/voicecall.c:cpi_notify() type obtained
ofonod[6232]: drivers/calypsomodem/voicecall.c:cpi_notify()
num:+xxxxxxxxxxxx, type:145
ofonod[6232]: drivers/calypsomodem/voicecall.c:cpi_notify() cause:892800, line:0
ofonod[6232]: src/voicecall.c:ofono_voicecall_notify() Got a voicecall
event, status: 4, id: 1, number: +xxxxxxxxxxx
ofonod[6232]: src/voicecall.c:ofono_voicecall_notify() Did not find a
call with id: 1
ofonod[6232]: System bus has disconnected!
Sometimes (about 1 of 10) oFono runs fine and survives to multiple voice calls.
Any suggestion?
Regards
Niko
11 years, 7 months
[PATCH 0/5 v3] Network Time plugin
by Antti Paila
This series of patches introduces the network time part of
the NITZ feature as outlined in 3GPP spec 22.042.
The plugin is for delivering network indicated time information
to timed process which is responsible for maintaining the system
time. The delivery is achieved by timed implementing an interface
with a method that is called by the nettime plugin with time related
info as a parameter of the method.
Antti Paila (5):
nettime: Header file for nettime plugins
nettime: Network time plugin implementation
nettime: DBUS and compilation configuration
nettime: Documentation
nettime: Mock Timed for testing
Makefile.am | 9 +-
doc/network-time-api.txt | 36 +++++
include/nettime.h | 4 +
plugins/nettime.c | 317 ++++++++++++++++++++++++++++++++++++++++++++++
src/ofono.conf | 2 +
test/test-nettime | 35 +++++
6 files changed, 401 insertions(+), 2 deletions(-)
create mode 100644 doc/network-time-api.txt
create mode 100644 plugins/nettime.c
create mode 100755 test/test-nettime
11 years, 7 months
[PATCH] isimodem: fix sending DTMF
by Kai Vehmanen
isi_call_dtmf_send_resp() handles the success case incorrectly, and
thus all send_tones attempts fail with bogus error codes.
---
drivers/isimodem/voicecall.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/isimodem/voicecall.c b/drivers/isimodem/voicecall.c
index e5842aa..acbaa63 100644
--- a/drivers/isimodem/voicecall.c
+++ b/drivers/isimodem/voicecall.c
@@ -865,7 +865,7 @@ static void isi_call_dtmf_send_resp(const GIsiMessage *msg, void *data)
struct isi_call_req_ctx *irc = data;
GIsiSubBlockIter iter;
uint8_t cause_type;
- uint8_t cause;
+ uint8_t cause = CALL_CAUSE_NO_CAUSE;
if (!check_response_status(msg, CALL_DTMF_SEND_RESP))
goto error;
--
1.7.0.4
11 years, 7 months
[PATCH] isimodem: fix issue with user busy release
by Jeevaka Badrappan
when the user rejects the incoming call, hangup_active
will get called on the driver side whereas when the user
rejects the waiting call, set_udub will get called on the
driver side.
---
drivers/isimodem/voicecall.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/isimodem/voicecall.c b/drivers/isimodem/voicecall.c
index e5842aa..9aa9454 100644
--- a/drivers/isimodem/voicecall.c
+++ b/drivers/isimodem/voicecall.c
@@ -973,6 +973,7 @@ static void isi_hangup_current(struct ofono_voicecall *ovc,
*/
struct isi_voicecall *ivc = ofono_voicecall_get_data(ovc);
int id = 0;
+ uint8_t cause = CALL_CAUSE_RELEASE_BY_USER;
for (id = 1; id <= 7; id++) {
if (ivc->calls[id].call_id & CALL_ID_WAITING)
@@ -983,19 +984,23 @@ static void isi_hangup_current(struct ofono_voicecall *ovc,
switch (ivc->calls[id].status) {
case CALL_STATUS_CREATE:
case CALL_STATUS_COMING:
- case CALL_STATUS_PROCEEDING:
case CALL_STATUS_MO_ALERTING:
- case CALL_STATUS_MT_ALERTING:
case CALL_STATUS_ANSWERED:
goto release_by_id;
+ case CALL_STATUS_MT_ALERTING:
+ cause = CALL_CAUSE_BUSY_USER_REQUEST;
+ goto release_by_id;
+ case CALL_STATUS_PROCEEDING:
+ if (ivc->calls[id].mode_info & CALL_MODE_ORIGINATOR)
+ cause = CALL_CAUSE_BUSY_USER_REQUEST;
+ goto release_by_id;
}
}
id = CALL_ID_ACTIVE;
release_by_id:
- isi_call_release_req(ovc, id, CALL_CAUSE_TYPE_CLIENT,
- CALL_CAUSE_RELEASE_BY_USER, cb, data);
+ isi_call_release_req(ovc, id, CALL_CAUSE_TYPE_CLIENT, cause, cb, data);
}
static void isi_release_all_held(struct ofono_voicecall *ovc,
--
1.7.0.4
11 years, 7 months