All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID
@ 2005-04-04 15:16 Dimitry Andric
  2005-04-05  8:20 ` Johan Hedberg
  2005-04-05 15:27 ` Marcel Holtmann
  0 siblings, 2 replies; 8+ messages in thread
From: Dimitry Andric @ 2005-04-04 15:16 UTC (permalink / raw)
  To: BlueZ Mailing List

[-- 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;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-04-11 16:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-04 15:16 [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID Dimitry Andric
2005-04-05  8:20 ` 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

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.