From: Dimitry Andric <dimitry@andric.com>
To: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID
Date: Mon, 4 Apr 2005 17:16:56 +0200 [thread overview]
Message-ID: <381006269.20050404171656@andric.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
Some phones (e.g. Samsung D500, Motorola MPx220, and possibly some
other Windows Mobile models) don't return any services if you ask them
for the public browse group. You notice this, when "sdptool browse
xx:xx:xx:xx:xx:xx" returns immediately, without any output.
It turns out that the Windows XP Bluetooth browser asks for
L2CAP_UUID, which *does* work for all the phones I've tested.
So I've made this simple patch, that adds a `-l' or `--l2cap' command
line option to sdptool, to use the L2CAP_UUID for browsing, instead of
PUBLIC_BROWSE_GROUP.
[-- Attachment #2: bluez-utils-2.15-sdpbrowse-l2cap.patch --]
[-- Type: text/plain, Size: 1423 bytes --]
# bluez-utils-2.15-sdpbrowse-l2cap.patch
#
# Some phones don't return any services if you ask them for the public
# browse group. It turns out that the Windows XP Bluetooth browser
# asks for L2CAP_UUID, which seems to work for all phones.
#
# This patch adds a `-l' or `--l2cap' command line option to sdptool,
# to use the L2CAP_UUID for browsing, instead of PUBLIC_BROWSE_GROUP.
#
# Dimitry Andric <dimitry@andric.com>, 2005-04-04 16:39:33
diff -urNd a/utils/tools/sdptool.c b/utils/tools/sdptool.c
--- a/utils/tools/sdptool.c 2004-12-25 19:06:02.000000000 +0100
+++ b/utils/tools/sdptool.c 2005-04-04 16:35:01.000000000 +0200
@@ -2016,12 +2033,13 @@
static struct option browse_options[] = {
{ "help", 0,0, 'h' },
{ "tree", 0,0, 't' },
+ { "l2cap", 0,0, 'l' },
{ 0, 0, 0, 0 }
};
static char *browse_help =
"Usage:\n"
- "\tbrowse [--tree] [bdaddr]\n";
+ "\tbrowse [--tree] [--l2cap] [bdaddr]\n";
/*
* Browse the full SDP database (i.e. list all services starting from the
@@ -2042,6 +2060,13 @@
case 't':
context.tree = 1;
break;
+ case 'l':
+ /* Some phones don't return any services if you ask them for the
+ * public browse group. It turns out that the Windows XP Bluetooth
+ * browser asks for L2CAP_UUID, which seems to work for all phones.
+ */
+ sdp_uuid16_create(&(context.group), L2CAP_UUID);
+ break;
default:
printf(browse_help);
return -1;
next reply other threads:[~2005-04-04 15:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-04 15:16 Dimitry Andric [this message]
2005-04-05 8:20 ` [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID Johan Hedberg
2005-04-05 8:40 ` Peter Wippich
2005-04-05 15:27 ` Marcel Holtmann
2005-04-07 12:08 ` Dimitry Andric
2005-04-07 13:44 ` Marcel Holtmann
2005-04-07 19:19 ` Dimitry Andric
2005-04-11 16:22 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=381006269.20050404171656@andric.com \
--to=dimitry@andric.com \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.