* [PATCH BlueZ 03/11] avrcp: Add EVENT_VOLUME_CHANGED to CT capabilities
From: João Paulo Rechi Vita @ 2013-01-11 20:25 UTC (permalink / raw)
To: linux-bluetooth
Cc: vinicius.gomes, claudio.takahasi, luiz.von.dentz,
João Paulo Rechi Vita
In-Reply-To: <1357935934-20033-1-git-send-email-jprvita@openbossa.org>
---
profiles/audio/avrcp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index ef324b0..bb8ab24 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -2164,6 +2164,9 @@ static void session_ct_init(struct avrcp *session)
session->control_handlers = ct_control_handlers;
+ if (session->version >= 0x0104)
+ session->supported_events = (1 << AVRCP_EVENT_VOLUME_CHANGED);
+
DBG("%p version 0x%04x", session, session->version);
session->control_id = avctp_register_pdu_handler(session->conn,
--
1.7.11.7
^ permalink raw reply related
* [PATCH BlueZ 02/11] transport: Store the value set through the 'Volume' property
From: João Paulo Rechi Vita @ 2013-01-11 20:25 UTC (permalink / raw)
To: linux-bluetooth
Cc: vinicius.gomes, claudio.takahasi, luiz.von.dentz,
João Paulo Rechi Vita
In-Reply-To: <1357935934-20033-1-git-send-email-jprvita@openbossa.org>
---
profiles/audio/transport.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 6ffa98a..f3caa1b 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -658,6 +658,8 @@ static void set_volume(const GDBusPropertyTable *property,
if (a2dp->volume != volume)
avrcp_set_volume(transport->device, volume);
+ a2dp->volume = volume;
+
g_dbus_pending_property_success(id);
}
--
1.7.11.7
^ permalink raw reply related
* [PATCH BlueZ 01/11] transport: Initialize the "Volume" property with 50%
From: João Paulo Rechi Vita @ 2013-01-11 20:25 UTC (permalink / raw)
To: linux-bluetooth
Cc: vinicius.gomes, claudio.takahasi, luiz.von.dentz,
João Paulo Rechi Vita
In-Reply-To: <1357935934-20033-1-git-send-email-jprvita@openbossa.org>
---
profiles/audio/transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index a4370a5..6ffa98a 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -787,7 +787,7 @@ struct media_transport *media_transport_create(struct media_endpoint *endpoint,
struct a2dp_transport *a2dp;
a2dp = g_new0(struct a2dp_transport, 1);
- a2dp->volume = -1;
+ a2dp->volume = 63;
transport->resume = resume_a2dp;
transport->suspend = suspend_a2dp;
--
1.7.11.7
^ permalink raw reply related
* [PATCH BlueZ 00/11] AVRCP Absolute Volume Control support
From: João Paulo Rechi Vita @ 2013-01-11 20:25 UTC (permalink / raw)
To: linux-bluetooth
Cc: vinicius.gomes, claudio.takahasi, luiz.von.dentz,
João Paulo Rechi Vita
This series implements support for the Absolute Volume Control feature for the
CT role of AVRCP version 1.5.
João Paulo Rechi Vita (11):
transport: Initialize the "Volume" property with 50%
transport: Store the value set through the 'Volume' property
avrcp: Add EVENT_VOLUME_CHANGED to CT capabilities
transport: Get volume from transport
transport: Keep a list o all existent transports
transport: Get volume passing only audio_device
avrcp: Handle RegisterNotification for volume
avrcp: Notify remote of volume changes
transport: Update volume passing only audio_device
avrcp: Handle SetAbsoluteVolume command
audio: Bump AVRCP CT version to 1.5
profiles/audio/avrcp.c | 76 +++++++++++++++++++++++++++++++++++++++++-----
profiles/audio/transport.c | 55 ++++++++++++++++++++++++++++++++-
profiles/audio/transport.h | 6 ++++
3 files changed, 128 insertions(+), 9 deletions(-)
--
1.7.11.7
^ permalink raw reply
* Re: pull request: bluetooth 2013-01-10
From: John W. Linville @ 2013-01-11 19:11 UTC (permalink / raw)
To: Gustavo Padovan, linux-wireless, linux-bluetooth, linux-kernel
In-Reply-To: <20130110073423.GE18821@joana>
On Thu, Jan 10, 2013 at 05:34:23AM -0200, Gustavo Padovan wrote:
> Hi John,
>
> A few fixes for 3.8. Five of them are just new devices ids addition.
> Apart from the that there is fix to a kernel memory leak to userspace from
> Anderson Lizardo, two interoperability fixes from Jaganath Kanakkassery and
> Szymon Janc. And a crash fix by me.
>
> Please pull, or let me know of any problem with these patches. Thanks.
>
> Gustavo
Pulled, thanks!
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* [PATCH 1/1] test: Make map script a command line client
From: Christian Fetzer @ 2013-01-11 16:44 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
Rework the map-client test script into an interactive command line client.
Now multiple MCE functions can be called in one active session.
The script also allows to specify all filters or optional parameters including
auto completion.
Change-Id: I9c9ede2bc958009c757384177cf06c081d984c98
---
test/map-client | 320 ++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 218 insertions(+), 102 deletions(-)
diff --git a/test/map-client b/test/map-client
index 9fb7a5e..c5c899a 100755
--- a/test/map-client
+++ b/test/map-client
@@ -4,10 +4,13 @@ from __future__ import absolute_import, print_function, unicode_literals
import gobject
+import cmd
+import shlex
import sys
import os
import dbus
import dbus.mainloop.glib
+import threading
from optparse import OptionParser
from pprint import pformat
@@ -31,49 +34,39 @@ def unwrap(x):
return tuple(map(unwrap, x))
if isinstance(x, dict):
- return dict([(unwrap(k), unwrap(v)) for k, v in x.iteritems()])
+ return dict([(unwrap(k), unwrap(v)) for k, v in x.items()])
- for t in [unicode, str, long, int, float, bool]:
+ if sys.version_info >= (3, 0):
+ coversion_types = [str, int, float, bool]
+ else:
+ coversion_types = [unicode, str, long, int, float, bool]
+
+ for t in coversion_types:
if isinstance(x, t):
return t(x)
return x
def parse_options():
+ parser.add_option("-s", "--source", dest="source",
+ help="Source / local address to use", metavar="SOURCE")
parser.add_option("-d", "--device", dest="device",
help="Device to connect", metavar="DEVICE")
- parser.add_option("-c", "--chdir", dest="new_dir",
- help="Change current directory to DIR", metavar="DIR")
- parser.add_option("-l", "--lsdir", action="store_true", dest="ls_dir",
- help="List folders in current directory")
- parser.add_option("-v", "--verbose", action="store_true", dest="verbose")
- parser.add_option("-L", "--lsmsg", action="store", dest="ls_msg",
- help="List messages in supplied CWD subdir")
- parser.add_option("-g", "--get", action="store", dest="get_msg",
- help="Get message contents")
- parser.add_option("--get-properties", action="store", dest="get_msg_properties",
- help="Get message properties")
- parser.add_option("--mark-read", action="store", dest="mark_msg_read",
- help="Marks the messages as read")
- parser.add_option("--mark-unread", action="store", dest="mark_msg_unread",
- help="Marks the messages as unread")
- parser.add_option("--mark-deleted", action="store", dest="mark_msg_deleted",
- help="Deletes the message from the folder")
- parser.add_option("--mark-undeleted", action="store", dest="mark_msg_undeleted",
- help="Undeletes the message")
- parser.add_option("-u", "--update-inbox", action="store_true", dest="update_inbox",
- help="Checks for new mails")
+ parser.add_option("-p", "--port", dest="port", default=0,
+ help="RFCOMM port to connect", metavar="PORT")
+ parser.add_option("-v", "--verbose", action="store_true",
+ dest="verbose")
return parser.parse_args()
-def set_folder(session, new_dir):
- session.SetFolder(new_dir)
-
-class MapClient:
+class MapClient(cmd.Cmd):
def __init__(self, session_path, verbose=False):
+ cmd.Cmd.__init__(self)
+ cmd.Cmd.prompt = "MCE> "
self.progress = 0
self.transfer_path = None
self.props = dict()
+ self.dir = dict()
self.verbose = verbose
self.path = session_path
bus = dbus.SessionBus()
@@ -85,8 +78,15 @@ class MapClient:
signal_name="PropertiesChanged",
path_keyword="path")
- def create_transfer_reply(self, reply):
- (path, properties) = reply
+ def create_transfer_reply_get(self, path, properties):
+ self.dir[path] = "in";
+ self.create_transfer_reply(path, properties)
+
+ def create_transfer_reply_put(self, path, properties):
+ self.dir[path] = "out";
+ self.create_transfer_reply(path, properties)
+
+ def create_transfer_reply(self, path, properties):
self.transfer_path = path
self.props[path] = properties
if self.verbose:
@@ -98,22 +98,25 @@ class MapClient:
print("Operation succeeded")
def error(self, err):
- print err
- mainloop.quit()
+ print(err)
def transfer_complete(self, path):
if self.verbose:
print("Transfer finished")
properties = self.props.get(path)
+ print(path)
+ print(self.dir)
if properties == None:
return
- f = open(properties["Filename"], "r")
- os.remove(properties["Filename"])
- print(f.readlines())
+ if self.dir.get(path) == "in":
+ f = open(properties["Filename"], "r")
+ os.remove(properties["Filename"])
+ print(f.readlines())
- def transfer_error(self, path):
- print("Transfer %s error" % path)
- mainloop.quit()
+ def transfer_error(self, code, message, path):
+ if path != self.transfer_path:
+ return
+ print("Transfer finished with error %s: %s" % (code, message))
def properties_changed(self, interface, properties, invalidated, path):
req = self.props.get(path)
@@ -128,46 +131,171 @@ class MapClient:
self.transfer_error(path)
return
- def set_folder(self, new_dir):
- self.map.SetFolder(new_dir)
-
- def list_folders(self):
- for i in self.map.ListFolders(dict()):
- print("%s/" % (i["Name"]))
-
- def list_messages(self, folder):
- ret = self.map.ListMessages(folder, dict())
- print(pformat(unwrap(ret)))
-
- def get_message(self, handle):
- self.map.ListMessages("", dict())
+ def emptyline(self):
+ pass
+
+ def do_EOF(self, args):
+ """ Quit """
+ return True
+
+ def do_exit(self, args):
+ """ Quit """
+ return True
+
+ # SetFolder
+ def do_SetFolder(self, new_dir):
+ """ Set working directory for current session """
+ try:
+ self.map.SetFolder(new_dir)
+ except dbus.exceptions.DBusException as e:
+ print("Failed:", e)
+
+ def do_cd(self, new_dir):
+ self.do_SetFolder(new_dir)
+
+ # ListFolders
+ list_folder_parms = {
+ 'MaxCount': lambda x: dbus.UInt16(x),
+ 'Offset': lambda x: dbus.UInt16(x)
+ }
+
+ def do_ListFolders(self, args):
+ """ List directories in current working directory """
+ parms={}
+ if args:
+ try:
+ for i in args.split(' '):
+ k,v = i.split('=')
+ parms[k] = self.list_folder_parms[k](v)
+ except:
+ print("Syntax error")
+ return
+
+ try:
+ for i in self.map.ListFolders(parms):
+ print("%s/" % (i["Name"]))
+ except dbus.exceptions.DBusException as e:
+ print("Failed:", e)
+
+ def complete_ListFolders(self, text, args, begidx, endidx):
+ if not text:
+ completions = list(self.list_folder_parms.keys())
+ else:
+ completions = [ f + "=" for f in
+ self.list_folder_parms.keys()
+ if f.startswith(text) ]
+ return completions
+
+ # ListFilterFields
+ def do_ListFilterFields(self, args):
+ """ List all available fields that can be used as filters """
+ for i in self.map.ListFilterFields():
+ print(i)
+
+ # ListMessages
+ list_msg_parms = { 'Folder': lambda x: x,
+ 'MaxCount': lambda x: dbus.UInt16(x),
+ 'Offset': lambda x: dbus.UInt16(x),
+ 'SubjectLength': lambda x: dbus.Byte(int(x)),
+ 'Fields': lambda x: x.split(','),
+ 'Types': lambda x: x.split(','),
+ 'PeriodBegin': lambda x: dbus.String(x),
+ 'PeriodEnd': lambda x: dbus.String(x),
+ 'Read': lambda x:
+ dbus.Boolean(x.lower() in
+ ("yes", "true", "1")),
+ 'Recipient': lambda x: dbus.String(x),
+ 'Sender': lambda x: dbus.String(x),
+ 'Priority': lambda x:
+ dbus.Boolean(x.lower() in
+ ("yes", "true", "1"))
+ }
+
+ def do_ListMessages(self, args):
+ """ List messages in current working directory """
+ parms={}
+ if args:
+ try:
+ for i in shlex.split(args):
+ k,v = i.split('=')
+ parms[k] = self.list_msg_parms[k](v)
+ except Exception as e:
+ print("Syntax error", e)
+ return
+
+ try:
+ ret = self.map.ListMessages(parms.pop('Folder', ''),
+ parms)
+ print(pformat(unwrap(ret)))
+ except dbus.exceptions.DBusException as e:
+ print("Failed:", e)
+
+ def complete_ListMessages(self, text, args, begidx, endidx):
+ if not text:
+ completions = list(self.list_msg_parms.keys())
+ else:
+ completions = [ f + "=" for f in
+ self.list_msg_parms.keys()
+ if f.startswith(text) ]
+ return completions
+
+ def do_ls(self, args):
+ print("Folders:")
+ self.do_ListFolders(args)
+ print("Messages:")
+ self.do_ListMessages(args)
+
+ # GetMessage
+ def do_GetMessage(self, handle):
+ """ Download message """
path = self.path + "/message" + handle
obj = bus.get_object(BUS_NAME, path)
msg = dbus.Interface(obj, MESSAGE_INTERFACE)
- msg.Get("", True, reply_handler=self.create_transfer_reply,
+ msg.Get("", True, reply_handler=self.create_transfer_reply_get,
error_handler=self.error)
- def get_message_properties(self, handle):
- self.map.ListMessages("", dict())
- path = self.path + "/message" + handle
- obj = bus.get_object(BUS_NAME, path)
- msg = dbus.Interface(obj, "org.freedesktop.DBus.Properties")
- ret = msg.GetAll(MESSAGE_INTERFACE)
- print(pformat(unwrap(ret)))
-
- def set_message_property(self, handle, prop, flag):
- self.map.ListMessages("", dict())
- path = self.path + "/message" + handle
- obj = bus.get_object(BUS_NAME, path)
- msg = dbus.Interface(obj, MESSAGE_INTERFACE)
- msg.SetProperty (prop, flag);
-
- def update_inbox(self):
- self.map.UpdateInbox()
-
+ # GetMessageProperties
+ def do_GetMessageProperties(self, handle):
+ """ Returns all properties for the message """
+ try:
+ path = self.path + "/message" + handle
+ obj = bus.get_object(BUS_NAME, path)
+ msg = dbus.Interface(obj,
+ "org.freedesktop.DBus.Properties")
+ ret = msg.GetAll(MESSAGE_INTERFACE)
+ print(pformat(unwrap(ret)))
+ except Exception as e:
+ print("Error", e)
+ return
-if __name__ == '__main__':
+ # SetMessageProperties
+ def do_SetMessageProperty(self, args):
+ """Sets value to the mentioned property (Read, Delete) """
+ try:
+ handle, parm_line = args.split(' ')
+ parm, value = parm_line.split('=')
+ except Exception as e:
+ print("Syntax error", e)
+ return
+ try:
+ path = self.path + "/message" + handle
+ obj = bus.get_object(BUS_NAME, path)
+ msg = dbus.Interface(obj, MESSAGE_INTERFACE)
+ msg.SetProperty(parm, value in ("yes", "true", "1"));
+ except dbus.exceptions.DBusException as e:
+ print("Failed:", e)
+
+ # UpdateInbox
+ def do_UpdateInbox(self, line):
+ """ Request remote to update its inbox """
+ try:
+ self.map.UpdateInbox()
+ except dbus.exceptions.DBusException as e:
+ print("Failed:", e)
+
+if __name__ == '__main__':
+ dbus.mainloop.glib.threads_init()
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
parser = OptionParser()
@@ -179,44 +307,32 @@ if __name__ == '__main__':
exit(0)
bus = dbus.SessionBus()
+ gobject.threads_init()
mainloop = gobject.MainLoop()
- client = dbus.Interface(bus.get_object(BUS_NAME, PATH),
- CLIENT_INTERFACE)
-
- print("Creating Session")
- path = client.CreateSession(options.device, { "Target": "map" })
+ mainloop_thread = threading.Thread(target=mainloop.run)
+ mainloop_thread.start()
- map_client = MapClient(path, options.verbose)
-
- if options.new_dir:
- map_client.set_folder(options.new_dir)
-
- if options.ls_dir:
- map_client.list_folders()
-
- if options.ls_msg is not None:
- map_client.list_messages(options.ls_msg)
-
- if options.get_msg is not None:
- map_client.get_message(options.get_msg)
-
- if options.get_msg_properties is not None:
- map_client.get_message_properties(options.get_msg_properties)
+ try:
+ client = dbus.Interface(bus.get_object(BUS_NAME, PATH),
+ CLIENT_INTERFACE)
- if options.mark_msg_read is not None:
- map_client.set_message_property(options.mark_msg_read, "Read", True)
+ print("Creating Session")
- if options.mark_msg_unread is not None:
- map_client.set_message_property(options.mark_msg_unread, "Read", False)
+ opts = { "Target": "map",
+ "Channel": dbus.Byte(int(options.port)) }
+ if options.source:
+ opts["Source"] = options.source
- if options.mark_msg_deleted is not None:
- map_client.set_message_property(options.mark_msg_deleted, "Deleted", True)
+ path = client.CreateSession(options.device, opts)
- if options.mark_msg_undeleted is not None:
- map_client.set_message_property(options.mark_msg_undeleted, "Deleted", False)
+ map_client = MapClient(path, options.verbose)
+ map_client.cmdloop()
- if options.update_inbox:
- map_client.update_inbox()
+ except (KeyboardInterrupt, SystemExit):
+ pass
+ except Exception as e:
+ print("Error", e)
- mainloop.run()
+ mainloop.quit()
+ mainloop_thread.join()
--
1.8.1
^ permalink raw reply related
* [PATCH 8/8] obexd: Remove transferred file only if the GET operation failed
From: Christian Fetzer @ 2013-01-11 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
In-Reply-To: <1357919757-10334-1-git-send-email-christian.fetzer@oss.bmw-carit.de>
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
Since 9606375649e12f1b9f302bbb5bb8f87957387ddd xfer_complete() sets the
transfer status rather than the size. Adapt obc_transfer_free to check
for the completed status to avoid deletion of completed transfers.
---
obexd/client/transfer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/obexd/client/transfer.c b/obexd/client/transfer.c
index 541f405..427eab7 100644
--- a/obexd/client/transfer.c
+++ b/obexd/client/transfer.c
@@ -327,7 +327,8 @@ static void obc_transfer_free(struct obc_transfer *transfer)
}
if (transfer->op == G_OBEX_OP_GET &&
- transfer->transferred != transfer->size)
+ transfer->status != TRANSFER_STATUS_COMPLETE &&
+ transfer->filename)
remove(transfer->filename);
if (transfer->fd > 0)
--
1.8.1
^ permalink raw reply related
* [PATCH 7/8] obexd: Change behavior of parse_filter_read
From: Christian Fetzer @ 2013-01-11 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
In-Reply-To: <1357919757-10334-1-git-send-email-christian.fetzer@oss.bmw-carit.de>
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
Calls to ListMessages with filter 'Read' set to true should
request the MSE to send read messages only.
The old code requests the MSE to send unread messages only.
This behavior is not matching the other filters.
---
obexd/client/map.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index 3e4cde9..99982c0 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -1179,9 +1179,9 @@ static GObexApparam *parse_filter_read(GObexApparam *apparam,
dbus_message_iter_get_basic(iter, &dbus_status);
if (dbus_status)
- status = FILTER_READ_STATUS_ONLY_UNREAD;
- else
status = FILTER_READ_STATUS_ONLY_READ;
+ else
+ status = FILTER_READ_STATUS_ONLY_UNREAD;
return g_obex_apparam_set_uint8(apparam, MAP_AP_FILTERREADSTATUS,
status);
--
1.8.1
^ permalink raw reply related
* [PATCH 6/8] obexd: Use defines for values in parse_filter_read parse_filter_priority
From: Christian Fetzer @ 2013-01-11 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
In-Reply-To: <1357919757-10334-1-git-send-email-christian.fetzer@oss.bmw-carit.de>
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
---
obexd/client/map.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index 57ce1e6..3e4cde9 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -77,6 +77,14 @@ static const char * const filter_list[] = {
#define FILTER_BIT_MAX 15
#define FILTER_ALL 0x0000FFFF
+#define FILTER_READ_STATUS_NONE 0
+#define FILTER_READ_STATUS_ONLY_UNREAD 1
+#define FILTER_READ_STATUS_ONLY_READ 2
+
+#define FILTER_PRIORITY_NONE 0
+#define FILTER_PRIORITY_ONLY_HIGH 1
+#define FILTER_PRIORITY_ONLY_NONHIGH 2
+
#define STATUS_READ 0
#define STATUS_DELETE 1
#define FILLER_BYTE 0x30
@@ -1162,7 +1170,7 @@ static GObexApparam *parse_period_end(GObexApparam *apparam,
static GObexApparam *parse_filter_read(GObexApparam *apparam,
DBusMessageIter *iter)
{
- guint8 status = 0;
+ guint8 status = FILTER_READ_STATUS_NONE;
dbus_bool_t dbus_status = FALSE;
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_BOOLEAN)
@@ -1170,7 +1178,10 @@ static GObexApparam *parse_filter_read(GObexApparam *apparam,
dbus_message_iter_get_basic(iter, &dbus_status);
- status = (dbus_status) ? 0x01 : 0x02;
+ if (dbus_status)
+ status = FILTER_READ_STATUS_ONLY_UNREAD;
+ else
+ status = FILTER_READ_STATUS_ONLY_READ;
return g_obex_apparam_set_uint8(apparam, MAP_AP_FILTERREADSTATUS,
status);
@@ -1207,7 +1218,7 @@ static GObexApparam *parse_filter_sender(GObexApparam *apparam,
static GObexApparam *parse_filter_priority(GObexApparam *apparam,
DBusMessageIter *iter)
{
- guint8 priority;
+ guint8 priority = FILTER_PRIORITY_NONE;
dbus_bool_t dbus_priority = FALSE;
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_BOOLEAN)
@@ -1215,7 +1226,10 @@ static GObexApparam *parse_filter_priority(GObexApparam *apparam,
dbus_message_iter_get_basic(iter, &dbus_priority);
- priority = (dbus_priority) ? 0x01 : 0x02;
+ if (dbus_priority)
+ priority = FILTER_PRIORITY_ONLY_HIGH;
+ else
+ priority = FILTER_PRIORITY_ONLY_NONHIGH;
return g_obex_apparam_set_uint8(apparam, MAP_AP_FILTERPRIORITY,
priority);
--
1.8.1
^ permalink raw reply related
* [PATCH 5/8] obexd: Fix segfault in parse_filter_read and parse_filter_priority
From: Christian Fetzer @ 2013-01-11 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
In-Reply-To: <1357919757-10334-1-git-send-email-christian.fetzer@oss.bmw-carit.de>
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
Calls to ListMessages with filter 'Read' or 'Priority' caused a segfault
in parse_filter_read / parse_filter_priority. The functions read
D-Bus boolean values (uint32) into uint8.
0 0x00007ffff730332d in ?? () from /usr/lib/libdbus-1.so.3
1 0x00007ffff7304219 in dbus_message_iter_next () from /usr/lib/libdbus-1.so.3
2 0x000000000043ef0f in parse_message_filters (
apparam=<error reading variable: Cannot access memory at address 0x7ffffeffff08>,
iter=<error reading variable: Cannot access memory at address 0x7ffffeffff00>)
at obexd/client/map.c:1246
---
obexd/client/map.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index cea9369..57ce1e6 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -1163,13 +1163,14 @@ static GObexApparam *parse_filter_read(GObexApparam *apparam,
DBusMessageIter *iter)
{
guint8 status = 0;
+ dbus_bool_t dbus_status = FALSE;
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_BOOLEAN)
return NULL;
- dbus_message_iter_get_basic(iter, &status);
+ dbus_message_iter_get_basic(iter, &dbus_status);
- status = (status) ? 0x01 : 0x02;
+ status = (dbus_status) ? 0x01 : 0x02;
return g_obex_apparam_set_uint8(apparam, MAP_AP_FILTERREADSTATUS,
status);
@@ -1207,13 +1208,14 @@ static GObexApparam *parse_filter_priority(GObexApparam *apparam,
DBusMessageIter *iter)
{
guint8 priority;
+ dbus_bool_t dbus_priority = FALSE;
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_BOOLEAN)
return NULL;
- dbus_message_iter_get_basic(iter, &priority);
+ dbus_message_iter_get_basic(iter, &dbus_priority);
- priority = (priority) ? 0x01 : 0x02;
+ priority = (dbus_priority) ? 0x01 : 0x02;
return g_obex_apparam_set_uint8(apparam, MAP_AP_FILTERPRIORITY,
priority);
--
1.8.1
^ permalink raw reply related
* [PATCH 4/8] obexd: Fix FILTER_ALL in MAP client to set 16 bit
From: Christian Fetzer @ 2013-01-11 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
In-Reply-To: <1357919757-10334-1-git-send-email-christian.fetzer@oss.bmw-carit.de>
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
The MAP specification defines ParameterMask as a bitmask of 32 bit / 4 bytes.
For the lower 16 bit the specification defines parameters, the higher 16 bit
remain reserved for future use. Therefore FILTER_ALL is set to 0x0000FFFF.
(Reserved bits have to be set to 0)
In addition this fixes the issue that ListFilterFields didn't show all fields.
---
obexd/client/map.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index afb5f9a..cea9369 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -75,7 +75,7 @@ static const char * const filter_list[] = {
};
#define FILTER_BIT_MAX 15
-#define FILTER_ALL 0xFF
+#define FILTER_ALL 0x0000FFFF
#define STATUS_READ 0
#define STATUS_DELETE 1
--
1.8.1
^ permalink raw reply related
* [PATCH 3/8] obexd: Fix infinite loop in ListMessages with filter "Types"
From: Christian Fetzer @ 2013-01-11 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
In-Reply-To: <1357919757-10334-1-git-send-email-christian.fetzer@oss.bmw-carit.de>
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
Calls to ListMessages with filter 'Types' make obexd hang in an infinite loop.
This is caused by a missing dbus_message_iter_next in parse_filter_type.
0 0x00007ffff7304ca7 in dbus_message_iter_get_basic ()
from /usr/lib/libdbus-1.so.3
1 0x0000000000434fba in parse_filter_type (iter=0x7fffffffd7d0, apparam=
0x6987f0) at obexd/client/map.c:1086
2 parse_message_filters (iter=0x7fffffffd730, apparam=0x6987f0)
at obexd/client/map.c:1222
3 map_list_messages (connection=<optimized out>, message=0x669ae0, user_data=
0x698a60) at obexd/client/map.c:1273
4 0x00000000004109a1 in process_message (connection=0x662b20,
message=<optimized out>, iface_user_data=<optimized out>,
method=<optimized out>, method=<optimized out>) at gdbus/object.c:285
5 0x00007ffff7308e15 in ?? () from /usr/lib/libdbus-1.so.3
6 0x00007ffff72fb070 in dbus_connection_dispatch ()
from /usr/lib/libdbus-1.so.3
7 0x000000000040e3d8 in message_dispatch (data=0x662b20)
at gdbus/mainloop.c:76
8 0x00007ffff703d3cb in ?? () from /usr/lib/libglib-2.0.so.0
9 0x00007ffff703c845 in g_main_context_dispatch ()
from /usr/lib/libglib-2.0.so.0
10 0x00007ffff703cb78 in ?? () from /usr/lib/libglib-2.0.so.0
11 0x00007ffff703cf72 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
12 0x000000000040df82 in main (argc=1, argv=0x7fffffffdd88)
at obexd/src/main.c:323
---
obexd/client/map.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index 635d951..afb5f9a 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -1123,6 +1123,8 @@ static GObexApparam *parse_filter_type(GObexApparam *apparam,
types |= 0x08; /* mms */
else
return NULL;
+
+ dbus_message_iter_next(&array);
}
return g_obex_apparam_set_uint8(apparam, MAP_AP_FILTERMESSAGETYPE,
--
1.8.1
^ permalink raw reply related
* [PATCH 2/8] obexd: Add property exist functions to map client
From: Christian Fetzer @ 2013-01-11 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
In-Reply-To: <1357919757-10334-1-git-send-email-christian.fetzer@oss.bmw-carit.de>
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
This fixes crashes in MAP client when the server does not send optional properties.
0 0x00007ffff6a792c5 in raise () from /usr/lib/libc.so.6
1 0x00007ffff6a7a748 in abort () from /usr/lib/libc.so.6
2 0x00007ffff731c145 in ?? () from /usr/lib/libdbus-1.so.3
3 0x00007ffff7312a25 in ?? () from /usr/lib/libdbus-1.so.3
4 0x00007ffff73050d6 in dbus_message_iter_append_basic () from /usr/lib/libdbus-1.so.3
5 0x0000000000433cc5 in get_replyto (property=<optimized out>, iter=<optimized out>,
data=<optimized out>) at obexd/client/map.c:484
6 0x00000000004103b6 in append_property (p=p@entry=0x6594c0 <map_msg_properties+192>,
dict=dict@entry=0x7fffffffd8e0, iface=0x6a3720) at gdbus/object.c:547
7 0x0000000000410472 in append_properties (data=data@entry=0x6a3720, iter=iter@entry=
0x7fffffffd960) at gdbus/object.c:576
8 0x00000000004104d1 in append_interface (data=0x6a3720, user_data=0x7fffffffda40)
at gdbus/object.c:591
9 0x00007ffff7058a4d in g_slist_foreach () from /usr/lib/libglib-2.0.so.0
10 0x0000000000411d05 in emit_interfaces_added (data=0x6a2ff0) at gdbus/object.c:623
11 process_changes (user_data=0x6a2ff0) at gdbus/object.c:1006
12 0x00007ffff703c845 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
13 0x00007ffff703cb78 in ?? () from /usr/lib/libglib-2.0.so.0
14 0x00007ffff703cf72 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
15 0x000000000040df82 in main (argc=1, argv=0x7fffffffdd88) at obexd/src/main.c:323
---
obexd/client/map.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 68 insertions(+), 8 deletions(-)
diff --git a/obexd/client/map.c b/obexd/client/map.c
index 08914a6..635d951 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -435,6 +435,13 @@ done:
msg->pending = 0;
}
+static gboolean subject_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct map_msg *msg = data;
+
+ return msg->subject != NULL;
+}
+
static gboolean get_subject(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
@@ -445,6 +452,13 @@ static gboolean get_subject(const GDBusPropertyTable *property,
return TRUE;
}
+static gboolean timestamp_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct map_msg *msg = data;
+
+ return msg->timestamp != NULL;
+}
+
static gboolean get_timestamp(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
@@ -455,6 +469,13 @@ static gboolean get_timestamp(const GDBusPropertyTable *property,
return TRUE;
}
+static gboolean sender_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct map_msg *msg = data;
+
+ return msg->sender != NULL;
+}
+
static gboolean get_sender(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
@@ -465,6 +486,14 @@ static gboolean get_sender(const GDBusPropertyTable *property,
return TRUE;
}
+static gboolean sender_address_exists(const GDBusPropertyTable *property,
+ void *data)
+{
+ struct map_msg *msg = data;
+
+ return msg->sender_address != NULL;
+}
+
static gboolean get_sender_address(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
@@ -476,6 +505,13 @@ static gboolean get_sender_address(const GDBusPropertyTable *property,
return TRUE;
}
+static gboolean replyto_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct map_msg *msg = data;
+
+ return msg->replyto != NULL;
+}
+
static gboolean get_replyto(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
@@ -486,6 +522,13 @@ static gboolean get_replyto(const GDBusPropertyTable *property,
return TRUE;
}
+static gboolean recipient_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct map_msg *msg = data;
+
+ return msg->recipient != NULL;
+}
+
static gboolean get_recipient(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
@@ -496,6 +539,14 @@ static gboolean get_recipient(const GDBusPropertyTable *property,
return TRUE;
}
+static gboolean recipient_address_exists(const GDBusPropertyTable *property,
+ void *data)
+{
+ struct map_msg *msg = data;
+
+ return msg->recipient_address != NULL;
+}
+
static gboolean get_recipient_address(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
@@ -507,6 +558,13 @@ static gboolean get_recipient_address(const GDBusPropertyTable *property,
return TRUE;
}
+static gboolean type_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct map_msg *msg = data;
+
+ return msg->type != NULL;
+}
+
static gboolean get_type(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
@@ -635,14 +693,16 @@ static const GDBusMethodTable map_msg_methods[] = {
};
static const GDBusPropertyTable map_msg_properties[] = {
- { "Subject", "s", get_subject },
- { "Timestamp", "s", get_timestamp },
- { "Sender", "s", get_sender },
- { "SenderAddress", "s", get_sender_address },
- { "ReplyTo", "s", get_replyto },
- { "Recipient", "s", get_recipient },
- { "RecipientAddress", "s", get_recipient_address },
- { "Type", "s", get_type },
+ { "Subject", "s", get_subject, NULL, subject_exists },
+ { "Timestamp", "s", get_timestamp, NULL, timestamp_exists },
+ { "Sender", "s", get_sender, NULL, sender_exists },
+ { "SenderAddress", "s", get_sender_address, NULL,
+ sender_address_exists },
+ { "ReplyTo", "s", get_replyto, NULL, replyto_exists },
+ { "Recipient", "s", get_recipient, NULL, recipient_exists },
+ { "RecipientAddress", "s", get_recipient_address, NULL,
+ recipient_address_exists },
+ { "Type", "s", get_type, NULL, type_exists },
{ "Size", "t", get_size },
{ "Priority", "b", get_priority },
{ "Read", "b", get_read, set_read },
--
1.8.1
^ permalink raw reply related
* [PATCH 1/8] obexd: Handle empty path name in SetPath
From: Christian Fetzer @ 2013-01-11 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
In-Reply-To: <1357919757-10334-1-git-send-email-christian.fetzer@oss.bmw-carit.de>
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
If the empty path is given, an empty name should be sent via OBEX.
Currently the name field is not set at all and later checks which
depend on data->index will access invalid memory regions as g_strsplit
returns NULL when an empty string is given.
0 0x000000000041a181 in g_obex_setpath (obex=obex@entry=0x662eb0, path=
0x20 <Address 0x20 out of bounds>, func=func@entry=0x42d300 <setpath_cb>,
user_data=user_data@entry=0x668f10, err=err@entry=0x7fffffffda08)
at gobex/gobex.c:1397
1 0x000000000042d395 in setpath_cb (obex=0x662eb0, err=0x0, rsp=<optimized out>,
user_data=0x668f10) at obexd/client/session.c:902
2 0x0000000000418e54 in handle_response (obex=obex@entry=0x662eb0, err=err@entry=0x0,
rsp=rsp@entry=0x668f40) at gobex/gobex.c:948
3 0x0000000000419d7a in incoming_data (io=<optimized out>, cond=<optimized out>,
user_data=0x662eb0) at gobex/gobex.c:1191
4 0x00007ffff703c845 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
5 0x00007ffff703cb78 in ?? () from /usr/lib/libglib-2.0.so.0
6 0x00007ffff703cf72 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
7 0x000000000040def2 in main (argc=1, argv=0x7fffffffdd88) at obexd/src/main.c:323
---
obexd/client/session.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/obexd/client/session.c b/obexd/client/session.c
index 9cc824e..db37a86 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
@@ -934,7 +934,7 @@ guint obc_session_setpath(struct obc_session *session, const char *path,
p = pending_request_new(session, NULL, setpath_complete, data);
/* Relative path */
- if (path[0] != '/') {
+ if (path[0] != '/' && path[0] != 0) {
first = data->remaining[data->index];
data->index++;
}
--
1.8.1
^ permalink raw reply related
* [PATCH 0/8] Obexd / MAP-client bug fixes
From: Christian Fetzer @ 2013-01-11 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Fetzer
From: Christian Fetzer <christian.fetzer@bmw-carit.de>
This patch set fixes a couple of small issues in the MAP-client implementation
and in the generic obexd client code.
Christian Fetzer (8):
obexd: Handle empty path name in SetPath
obexd: Add property exist functions to map client
obexd: Fix infinite loop in ListMessages with filter "Types"
obexd: Fix FILTER_ALL in MAP client to set 16 bit
obexd: Fix segfault in parse_filter_read and parse_filter_priority
obexd: Use defines for values in parse_filter_read parse_filter_priority
obexd: Change behavior of parse_filter_read
obexd: Remove transferred file only if the GET operation failed
obexd/client/map.c | 108 +++++++++++++++++++++++++++++++++++++++++-------
obexd/client/session.c | 2 +-
obexd/client/transfer.c | 3 +-
3 files changed, 96 insertions(+), 17 deletions(-)
--
1.8.1
^ permalink raw reply
* Re: [PATCH BlueZ] AVRCP: Fix crash when MediaPlayer1 is disabled
From: Johan Hedberg @ 2013-01-11 14:28 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
In-Reply-To: <1357913949-27785-1-git-send-email-luiz.dentz@gmail.com>
Hi Luiz,
On Fri, Jan 11, 2013, Luiz Augusto von Dentz wrote:
> When MediaPlayer1 is disabled we should not proceed with getting
> remote capabilities but switch back to 1.0 mode.
> ---
> profiles/audio/avrcp.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply
* [PATCH BlueZ] AVRCP: Fix crash when MediaPlayer1 is disabled
From: Luiz Augusto von Dentz @ 2013-01-11 14:19 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When MediaPlayer1 is disabled we should not proceed with getting
remote capabilities but switch back to 1.0 mode.
---
profiles/audio/avrcp.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index d0cc346..ef324b0 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -2178,11 +2178,12 @@ static void session_ct_init(struct avrcp *session)
path = device_get_path(session->dev->btd_dev);
mp = media_player_controller_create(path);
- if (mp != NULL) {
- media_player_set_callbacks(mp, &ct_cbs, player);
- player->user_data = mp;
- player->destroy = (GDestroyNotify) media_player_destroy;
- }
+ if (mp == NULL)
+ return;
+
+ media_player_set_callbacks(mp, &ct_cbs, player);
+ player->user_data = mp;
+ player->destroy = (GDestroyNotify) media_player_destroy;
if (session->version < 0x0103)
return;
--
1.8.0.1
^ permalink raw reply related
* [PATCH BlueZ 7/7] unit: Add gdbus/client_get_uint64_property
From: Luiz Augusto von Dentz @ 2013-01-11 11:50 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1357905018-23237-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
unit/test-gdbus-client.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/unit/test-gdbus-client.c b/unit/test-gdbus-client.c
index c3ae4b9..a777fe3 100644
--- a/unit/test-gdbus-client.c
+++ b/unit/test-gdbus-client.c
@@ -530,6 +530,69 @@ static void client_get_array_property(void)
destroy_context(context);
}
+static void proxy_get_uint64(GDBusProxy *proxy, void *user_data)
+{
+ struct context *context = user_data;
+ DBusMessageIter iter;
+ guint64 value;
+
+ if (g_test_verbose())
+ g_print("proxy %s found\n",
+ g_dbus_proxy_get_interface(proxy));
+
+ g_assert(g_dbus_proxy_get_property(proxy, "Number", &iter));
+ g_assert(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_UINT64);
+
+ dbus_message_iter_get_basic(&iter, &value);
+ g_assert(value == G_MAXUINT64);
+
+ g_dbus_client_unref(context->dbus_client);
+
+ g_main_loop_quit(context->main_loop);
+}
+
+static gboolean get_uint64(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ guint64 value = G_MAXUINT64;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT64, &value);
+
+ return TRUE;
+}
+
+static void client_get_uint64_property(void)
+{
+ struct context *context = create_context();
+ static const GDBusPropertyTable uint64_properties[] = {
+ { "Number", "t", get_uint64 },
+ { },
+ };
+
+ if (context == NULL)
+ return;
+
+ g_dbus_register_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME,
+ methods, signals, uint64_properties,
+ NULL, NULL);
+
+ context->dbus_client = g_dbus_client_new(context->dbus_conn,
+ SERVICE_NAME, SERVICE_PATH);
+
+ g_dbus_client_set_proxy_handlers(context->dbus_client,
+ proxy_get_uint64,
+ NULL, NULL,
+ context);
+
+ g_main_loop_run(context->main_loop);
+
+ g_dbus_unregister_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME);
+
+ destroy_context(context);
+}
+
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
@@ -545,6 +608,9 @@ int main(int argc, char *argv[])
g_test_add_func("/gdbus/client_get_boolean_property",
client_get_boolean_property);
+ g_test_add_func("/gdbus/client_get_uint64_property",
+ client_get_uint64_property);
+
g_test_add_func("/gdbus/client_get_array_property",
client_get_array_property);
--
1.8.0.1
^ permalink raw reply related
* [PATCH BlueZ 6/7] unit: Add gdbus/client_get_array_property
From: Luiz Augusto von Dentz @ 2013-01-11 11:50 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1357905018-23237-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
unit/test-gdbus-client.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
diff --git a/unit/test-gdbus-client.c b/unit/test-gdbus-client.c
index e26dd0c..c3ae4b9 100644
--- a/unit/test-gdbus-client.c
+++ b/unit/test-gdbus-client.c
@@ -453,6 +453,83 @@ static void client_get_boolean_property(void)
destroy_context(context);
}
+static void proxy_get_array(GDBusProxy *proxy, void *user_data)
+{
+ struct context *context = user_data;
+ DBusMessageIter iter, entry;
+ const char *value1, *value2;
+
+ if (g_test_verbose())
+ g_print("proxy %s found\n",
+ g_dbus_proxy_get_interface(proxy));
+
+ g_assert(g_dbus_proxy_get_property(proxy, "Array", &iter));
+ g_assert(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_ARRAY);
+
+ dbus_message_iter_recurse(&iter, &entry);
+ g_assert(dbus_message_iter_get_arg_type(&entry) == DBUS_TYPE_STRING);
+
+ dbus_message_iter_get_basic(&entry, &value1);
+ g_assert(g_strcmp0(value1, "value1") == 0);
+
+ dbus_message_iter_next(&entry);
+ g_assert(dbus_message_iter_get_arg_type(&entry) == DBUS_TYPE_STRING);
+
+ dbus_message_iter_get_basic(&entry, &value2);
+ g_assert(g_strcmp0(value2, "value2") == 0);
+
+ g_dbus_client_unref(context->dbus_client);
+
+ g_main_loop_quit(context->main_loop);
+}
+
+static gboolean get_array(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ const char *value[2] = { "value1", "value2" };
+ DBusMessageIter array;
+
+ dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, "s", &array);
+
+ dbus_message_iter_append_basic(&array, DBUS_TYPE_STRING, &value[0]);
+ dbus_message_iter_append_basic(&array, DBUS_TYPE_STRING, &value[1]);
+
+ dbus_message_iter_close_container(iter, &array);
+
+ return TRUE;
+}
+
+static void client_get_array_property(void)
+{
+ struct context *context = create_context();
+ static const GDBusPropertyTable array_properties[] = {
+ { "Array", "as", get_array },
+ { },
+ };
+
+ if (context == NULL)
+ return;
+
+ g_dbus_register_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME,
+ methods, signals, array_properties,
+ NULL, NULL);
+
+ context->dbus_client = g_dbus_client_new(context->dbus_conn,
+ SERVICE_NAME, SERVICE_PATH);
+
+ g_dbus_client_set_proxy_handlers(context->dbus_client, proxy_get_array,
+ NULL, NULL,
+ context);
+
+ g_main_loop_run(context->main_loop);
+
+ g_dbus_unregister_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME);
+
+ destroy_context(context);
+}
+
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
@@ -468,6 +545,9 @@ int main(int argc, char *argv[])
g_test_add_func("/gdbus/client_get_boolean_property",
client_get_boolean_property);
+ g_test_add_func("/gdbus/client_get_array_property",
+ client_get_array_property);
+
g_test_add_func("/gdbus/client_get_dict_property",
client_get_dict_property);
--
1.8.0.1
^ permalink raw reply related
* [PATCH BlueZ 5/7] unit: Add gdbus/client_get_boolean_property
From: Luiz Augusto von Dentz @ 2013-01-11 11:50 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1357905018-23237-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
unit/test-gdbus-client.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/unit/test-gdbus-client.c b/unit/test-gdbus-client.c
index bcdd811..e26dd0c 100644
--- a/unit/test-gdbus-client.c
+++ b/unit/test-gdbus-client.c
@@ -390,6 +390,69 @@ static void client_get_string_property(void)
destroy_context(context);
}
+static void proxy_get_boolean(GDBusProxy *proxy, void *user_data)
+{
+ struct context *context = user_data;
+ DBusMessageIter iter;
+ dbus_bool_t value;
+
+ if (g_test_verbose())
+ g_print("proxy %s found\n",
+ g_dbus_proxy_get_interface(proxy));
+
+ g_assert(g_dbus_proxy_get_property(proxy, "Boolean", &iter));
+ g_assert(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_BOOLEAN);
+
+ dbus_message_iter_get_basic(&iter, &value);
+ g_assert(value == TRUE);
+
+ g_dbus_client_unref(context->dbus_client);
+
+ g_main_loop_quit(context->main_loop);
+}
+
+static gboolean get_boolean(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ dbus_bool_t value = TRUE;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, &value);
+
+ return TRUE;
+}
+
+static void client_get_boolean_property(void)
+{
+ struct context *context = create_context();
+ static const GDBusPropertyTable boolean_properties[] = {
+ { "Boolean", "b", get_boolean },
+ { },
+ };
+
+ if (context == NULL)
+ return;
+
+ g_dbus_register_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME,
+ methods, signals, boolean_properties,
+ NULL, NULL);
+
+ context->dbus_client = g_dbus_client_new(context->dbus_conn,
+ SERVICE_NAME, SERVICE_PATH);
+
+ g_dbus_client_set_proxy_handlers(context->dbus_client,
+ proxy_get_boolean,
+ NULL, NULL,
+ context);
+
+ g_main_loop_run(context->main_loop);
+
+ g_dbus_unregister_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME);
+
+ destroy_context(context);
+}
+
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
@@ -402,6 +465,9 @@ int main(int argc, char *argv[])
g_test_add_func("/gdbus/client_get_string_property",
client_get_string_property);
+ g_test_add_func("/gdbus/client_get_boolean_property",
+ client_get_boolean_property);
+
g_test_add_func("/gdbus/client_get_dict_property",
client_get_dict_property);
--
1.8.0.1
^ permalink raw reply related
* [PATCH BlueZ 4/7] unit: Add gdbus/client_get_string_property
From: Luiz Augusto von Dentz @ 2013-01-11 11:50 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1357905018-23237-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
unit/test-gdbus-client.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/unit/test-gdbus-client.c b/unit/test-gdbus-client.c
index dac0cb5..bcdd811 100644
--- a/unit/test-gdbus-client.c
+++ b/unit/test-gdbus-client.c
@@ -328,6 +328,68 @@ static void client_get_dict_property(void)
destroy_context(context);
}
+static void proxy_get_string(GDBusProxy *proxy, void *user_data)
+{
+ struct context *context = user_data;
+ DBusMessageIter iter;
+ const char *string;
+
+ if (g_test_verbose())
+ g_print("proxy %s found\n",
+ g_dbus_proxy_get_interface(proxy));
+
+ g_assert(g_dbus_proxy_get_property(proxy, "String", &iter));
+ g_assert(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_STRING);
+
+ dbus_message_iter_get_basic(&iter, &string);
+ g_assert(g_strcmp0(string, "value") == 0);
+
+ g_dbus_client_unref(context->dbus_client);
+
+ g_main_loop_quit(context->main_loop);
+}
+
+static gboolean get_string(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ const char *string = "value";
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &string);
+
+ return TRUE;
+}
+
+static void client_get_string_property(void)
+{
+ struct context *context = create_context();
+ static const GDBusPropertyTable string_properties[] = {
+ { "String", "s", get_string },
+ { },
+ };
+
+ if (context == NULL)
+ return;
+
+ g_dbus_register_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME,
+ methods, signals, string_properties,
+ NULL, NULL);
+
+ context->dbus_client = g_dbus_client_new(context->dbus_conn,
+ SERVICE_NAME, SERVICE_PATH);
+
+ g_dbus_client_set_proxy_handlers(context->dbus_client, proxy_get_string,
+ NULL, NULL,
+ context);
+
+ g_main_loop_run(context->main_loop);
+
+ g_dbus_unregister_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME);
+
+ destroy_context(context);
+}
+
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
@@ -337,6 +399,9 @@ int main(int argc, char *argv[])
g_test_add_func("/gdbus/client_connect_disconnect",
client_connect_disconnect);
+ g_test_add_func("/gdbus/client_get_string_property",
+ client_get_string_property);
+
g_test_add_func("/gdbus/client_get_dict_property",
client_get_dict_property);
--
1.8.0.1
^ permalink raw reply related
* [PATCH BlueZ 3/7] unit: Add gdbus/client_get_dict_property
From: Luiz Augusto von Dentz @ 2013-01-11 11:50 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1357905018-23237-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
unit/test-gdbus-client.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 147 insertions(+)
diff --git a/unit/test-gdbus-client.c b/unit/test-gdbus-client.c
index 34c714e..dac0cb5 100644
--- a/unit/test-gdbus-client.c
+++ b/unit/test-gdbus-client.c
@@ -81,6 +81,8 @@ static struct context *create_context(void)
/* Avoid D-Bus library calling _exit() before next test finishes. */
dbus_connection_set_exit_on_disconnect(context->dbus_conn, FALSE);
+ g_dbus_attach_object_manager(context->dbus_conn);
+
return context;
}
@@ -184,6 +186,148 @@ static void client_connect_disconnect(void)
destroy_context(context);
}
+static void append_variant(DBusMessageIter *iter, int type, void *val)
+{
+ DBusMessageIter value;
+ char sig[2] = { type, '\0' };
+
+ dbus_message_iter_open_container(iter, DBUS_TYPE_VARIANT, sig, &value);
+
+ dbus_message_iter_append_basic(&value, type, val);
+
+ dbus_message_iter_close_container(iter, &value);
+}
+
+static void dict_append_entry(DBusMessageIter *dict, const char *key, int type,
+ void *val)
+{
+ DBusMessageIter entry;
+
+ if (type == DBUS_TYPE_STRING) {
+ const char *str = *((const char **) val);
+ if (str == NULL)
+ return;
+ }
+
+ dbus_message_iter_open_container(dict, DBUS_TYPE_DICT_ENTRY,
+ NULL, &entry);
+
+ dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &key);
+
+ append_variant(&entry, type, val);
+
+ dbus_message_iter_close_container(dict, &entry);
+}
+
+static gboolean get_dict(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ DBusMessageIter dict;
+ const char *string = "value";
+ dbus_bool_t boolean = TRUE;
+
+ dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY,
+ DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
+ DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
+ DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
+
+ dict_append_entry(&dict, "String", DBUS_TYPE_STRING, &string);
+ dict_append_entry(&dict, "Boolean", DBUS_TYPE_BOOLEAN, &boolean);
+
+ dbus_message_iter_close_container(iter, &dict);
+
+ return TRUE;
+}
+
+static void proxy_get_dict(GDBusProxy *proxy, void *user_data)
+{
+ struct context *context = user_data;
+ DBusMessageIter iter, dict, var1, var2, entry1, entry2;
+ const char *string;
+ dbus_bool_t boolean;
+
+ if (g_test_verbose())
+ g_print("proxy %s found\n",
+ g_dbus_proxy_get_interface(proxy));
+
+ g_assert(g_dbus_proxy_get_property(proxy, "Dict", &iter));
+ g_assert(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_ARRAY);
+
+ dbus_message_iter_recurse(&iter, &dict);
+ g_assert(dbus_message_iter_get_arg_type(&dict) ==
+ DBUS_TYPE_DICT_ENTRY);
+
+ dbus_message_iter_recurse(&dict, &entry1);
+ g_assert(dbus_message_iter_get_arg_type(&entry1) == DBUS_TYPE_STRING);
+
+ dbus_message_iter_get_basic(&entry1, &string);
+ g_assert(g_strcmp0(string, "String") == 0);
+
+ dbus_message_iter_next(&entry1);
+ g_assert(dbus_message_iter_get_arg_type(&entry1) == DBUS_TYPE_VARIANT);
+
+ dbus_message_iter_recurse(&entry1, &var1);
+ g_assert(dbus_message_iter_get_arg_type(&var1) == DBUS_TYPE_STRING);
+
+ dbus_message_iter_get_basic(&var1, &string);
+ g_assert(g_strcmp0(string, "value") == 0);
+
+ dbus_message_iter_next(&dict);
+ g_assert(dbus_message_iter_get_arg_type(&dict) ==
+ DBUS_TYPE_DICT_ENTRY);
+
+ dbus_message_iter_recurse(&dict, &entry2);
+ g_assert(dbus_message_iter_get_arg_type(&entry2) == DBUS_TYPE_STRING);
+
+ dbus_message_iter_get_basic(&entry2, &string);
+ g_assert(g_strcmp0(string, "Boolean") == 0);
+
+ dbus_message_iter_next(&entry2);
+ g_assert(dbus_message_iter_get_arg_type(&entry2) == DBUS_TYPE_VARIANT);
+
+ dbus_message_iter_recurse(&entry2, &var2);
+ g_assert(dbus_message_iter_get_arg_type(&var2) == DBUS_TYPE_BOOLEAN);
+
+ dbus_message_iter_get_basic(&var2, &boolean);
+ g_assert(boolean == TRUE);
+
+ dbus_message_iter_next(&dict);
+ g_assert(dbus_message_iter_get_arg_type(&dict) == DBUS_TYPE_INVALID);
+
+ g_main_loop_quit(context->main_loop);
+}
+
+static void client_get_dict_property(void)
+{
+ struct context *context = create_context();
+ static const GDBusPropertyTable dict_properties[] = {
+ { "Dict", "a{sv}", get_dict },
+ { },
+ };
+
+ if (context == NULL)
+ return;
+
+ g_dbus_register_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME,
+ methods, signals, dict_properties,
+ NULL, NULL);
+
+ context->dbus_client = g_dbus_client_new(context->dbus_conn,
+ SERVICE_NAME, SERVICE_PATH);
+
+ g_dbus_client_set_proxy_handlers(context->dbus_client, proxy_get_dict,
+ NULL, NULL,
+ context);
+
+ g_main_loop_run(context->main_loop);
+
+ g_dbus_unregister_interface(context->dbus_conn,
+ SERVICE_PATH, SERVICE_NAME);
+
+ destroy_context(context);
+}
+
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
@@ -193,5 +337,8 @@ int main(int argc, char *argv[])
g_test_add_func("/gdbus/client_connect_disconnect",
client_connect_disconnect);
+ g_test_add_func("/gdbus/client_get_dict_property",
+ client_get_dict_property);
+
return g_test_run();
}
--
1.8.0.1
^ permalink raw reply related
* [PATCH BlueZ 2/7] gdbus: Add g_dbus_proxy_get_client function
From: Luiz Augusto von Dentz @ 2013-01-11 11:50 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1357905018-23237-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This is convenient as some callbacks don't provide the client which
the proxy belongs.
---
gdbus/client.c | 8 ++++++++
gdbus/gdbus.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/gdbus/client.c b/gdbus/client.c
index ea56023..3c5784b 100644
--- a/gdbus/client.c
+++ b/gdbus/client.c
@@ -478,6 +478,14 @@ const char *g_dbus_proxy_get_interface(GDBusProxy *proxy)
return proxy->interface;
}
+GDBusClient *g_dbus_proxy_get_client(GDBusProxy *proxy)
+{
+ if (proxy == NULL)
+ return NULL;
+
+ return proxy->client;
+}
+
gboolean g_dbus_proxy_get_property(GDBusProxy *proxy, const char *name,
DBusMessageIter *iter)
{
diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index 77bd069..83e41c7 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -313,6 +313,7 @@ void g_dbus_proxy_unref(GDBusProxy *proxy);
const char *g_dbus_proxy_get_path(GDBusProxy *proxy);
const char *g_dbus_proxy_get_interface(GDBusProxy *proxy);
+GDBusClient *g_dbus_proxy_get_client(GDBusProxy *proxy);
gboolean g_dbus_proxy_get_property(GDBusProxy *proxy, const char *name,
DBusMessageIter *iter);
--
1.8.0.1
^ permalink raw reply related
* [PATCH BlueZ 1/7] gdbus: Add g_dbus_client_get_proxy
From: Luiz Augusto von Dentz @ 2013-01-11 11:50 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
g_dbus_client_get_proxy gives the possibilitity to just check if a
proxy exist for the given path and interface pair instead of using
g_dbus_proxy_new which end up creating a proxy if it doesn't exists
which is not always necessary.
---
gdbus/client.c | 8 ++++----
gdbus/gdbus.h | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/gdbus/client.c b/gdbus/client.c
index c03e3a4..ea56023 100644
--- a/gdbus/client.c
+++ b/gdbus/client.c
@@ -328,8 +328,8 @@ static void get_all_properties(GDBusProxy *proxy)
dbus_message_unref(msg);
}
-static GDBusProxy *proxy_lookup(GDBusClient *client, const char *path,
- const char *interface)
+GDBusProxy *g_dbus_client_get_proxy(GDBusClient *client, const char *path,
+ const char *interface)
{
GList *list;
@@ -423,7 +423,7 @@ GDBusProxy *g_dbus_proxy_new(GDBusClient *client, const char *path,
if (client == NULL)
return NULL;
- proxy = proxy_lookup(client, path, interface);
+ proxy = g_dbus_client_get_proxy(client, path, interface);
if (proxy)
return g_dbus_proxy_ref(proxy);
@@ -841,7 +841,7 @@ static void parse_properties(GDBusClient *client, const char *path,
if (g_str_equal(interface, DBUS_INTERFACE_PROPERTIES) == TRUE)
return;
- proxy = proxy_lookup(client, path, interface);
+ proxy = g_dbus_client_get_proxy(client, path, interface);
if (proxy) {
update_properties(proxy, iter);
return;
diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index 6f5a012..77bd069 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -360,6 +360,9 @@ gboolean g_dbus_client_set_proxy_handlers(GDBusClient *client,
GDBusPropertyFunction property_changed,
void *user_data);
+GDBusProxy *g_dbus_client_get_proxy(GDBusClient *client, const char *path,
+ const char *interface);
+
#ifdef __cplusplus
}
#endif
--
1.8.0.1
^ permalink raw reply related
* Obexd OPP filesend fails with Windows7 stack
From: Syam Sidhardhan @ 2013-01-11 8:32 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <alpine.DEB.2.02.1204250827200.20357@mathewm-linux>
Hi,
We are using the obexd 0.48 version and testing the obexd.
During testing OPP file send, we found one interoperability
issue with the Windows7 PC stack and some commercialized devices
available in the market.
The issue is: OBEXD file transfer is getting failed
once after the complete file content got transfferd. This is
because of, we do a direct RFCOMM disconection rather than
doing a proper OBEX disconection before.
Does someone can help me a with a fix for this?
hcidump logs:
< ACL data: handle 11 flags 0x00 dlen 15
L2CAP(d): cid 0x0041 len 11 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 2 pf 0 ilen 7 fcs 0x9a
OBEX: Connect cmd(f): len 7 version 1.0 flags 0 mtu 4096
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 11 packets 2
> ACL data: handle 11 flags 0x02 dlen 9
L2CAP(d): cid 0x0041 len 5 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 2 pf 1 ilen 0 fcs 0x5c credits 26
> ACL data: handle 11 flags 0x02 dlen 16
L2CAP(d): cid 0x0041 len 12 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 2 pf 1 ilen 7 fcs 0x5c credits 0
OBEX: Connect rsp(f): status 200 len 7 version 1.0 flags 0 mtu 4096
Status 200 = Success
< ACL data: handle 11 flags 0x00 dlen 65
L2CAP(d): cid 0x0041 len 61 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 2 pf 0 ilen 57 fcs 0x9a
OBEX: Put cmd(c): len 57
Name (0x01) = Unicode length 28
0000: 00 74 00 65 00 73 00 74 00 2d 00 74 00 65 00 78
.t.e.s.t.-.t.e.x
0010: 00 74 00 2e 00 74 00 78 00 74 00 00 .t...t.x.t..
Length (0xc3) = 15
Body (0x48) = Sequence length 15
0000: 54 65 73 74 20 44 6f 63 75 6d 65 6e 74 0d 0a Test
Document..
> ACL data: handle 11 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 2 pf 1 ilen 3 fcs 0x5c credits 1
OBEX: Put rsp(f): status 100 len 3
< ACL data: handle 11 flags 0x00 dlen 14
L2CAP(d): cid 0x0041 len 10 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 2 pf 0 ilen 6 fcs 0x9a
OBEX: Put cmd(f): len 6 (continue)
End of Body (0x49) = Sequence length 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 11 packets 2
> ACL data: handle 11 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 2 pf 1 ilen 3 fcs 0x5c credits 1
OBEX: Put rsp(f): status 200 len 3
< ACL data: handle 11 flags 0x00 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): DISC: cr 1 dlci 2 pf 1 ilen 0 fcs 0xb8
> ACL data: handle 11 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 2 pf 1 ilen 0 fcs 0x92
< ACL data: handle 11 flags 0x00 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd
< ACL data: handle 11 flags 0x00 dlen 12
L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 11 packets 2
> ACL data: handle 11 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
Thanks,
Syam.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox