2005-04-04 15:16:56

by Dimitry Andric

[permalink] [raw]
Subject: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID

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.


Attachments:
bluez-utils-2.15-sdpbrowse-l2cap.patch (1.39 kB)

2005-04-11 16:22:36

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID

Hi Dimitry,

> > Maybe we should add somekind of short name to UUID translation function,
> > because the numeric values are hard to remember.
>
> Here's an easy hack: I reused the existing uuid16_names array for
> looking up (partial) matches. You can also get a list of recognized
> names. If you think it would be nicer to add a separate name list
> (i.e. made from the names in sdp.h), let me know.

this is really a hack ;)

I think that we need a special table for this, where we add short names
(and I mean short) for some UUIDs. Maybe it is enough to look up the
core protocol names like L2CAP, RFCOMM and OBEX. This would then also
make the --l2cap option obsolete. You can use "--uuid l2cap" for it.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-04-07 19:19:22

by Dimitry Andric

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID

On 2005-04-07 at 15:44:50 Marcel Holtmann wrote:

> Maybe we should add somekind of short name to UUID translation function,
> because the numeric values are hard to remember.

Here's an easy hack: I reused the existing uuid16_names array for
looking up (partial) matches. You can also get a list of recognized
names. If you think it would be nicer to add a separate name list
(i.e. made from the names in sdp.h), let me know.


Attachments:
bluez-utils-2.15-sdpbrowse-uuid2.patch (2.33 kB)

2005-04-07 13:44:50

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID

Hi Dimitry,

> > the patch is applied to the CVS. Maybe we should add another one to
> > browse any UUID in general. Something like "--uuid 0x0003" for example.
>
> Here is a patch that adds such an option. It will be interesting to
> see what browse info is returned with various weird uuid's. :)

patch is applied.

Maybe we should add somekind of short name to UUID translation function,
because the numeric values are hard to remember.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-04-07 12:08:38

by Dimitry Andric

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID

On 2005-04-05 at 17:27:17 Marcel Holtmann wrote:

> the patch is applied to the CVS. Maybe we should add another one to
> browse any UUID in general. Something like "--uuid 0x0003" for example.

Here is a patch that adds such an option. It will be interesting to
see what browse info is returned with various weird uuid's. :)


Attachments:
bluez-utils-2.15-sdpbrowse-uuid.patch (1.51 kB)

2005-04-05 15:27:17

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID

Hi Dimitry,

> 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.

the patch is applied to the CVS. Maybe we should add another one to
browse any UUID in general. Something like "--uuid 0x0003" for example.

A small nitpick about the coding style. The braces around context.group
are not needed and normally we don't use them.

sdp_uuid16_create(&(context.group), L2CAP_UUID);

I also realized that you only followed the example above that creates
the public browse group context (which I fixed now). So please keep that
in mind the next time.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-04-05 08:40:21

by Peter Wippich

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID


Hi,

I'm aware of many devices which do not have a public browse group tag in
their SDP records. Searching for all services with L2CAP is one solution.
Another is to do a search for a range of well known service UUIDs. And
another solution (as imlemented by Widcom) is to do a search for the whole
range of service UUIDs (0..0xffff).
However, the last method wil crash some embedded devices with a dump
local data base search implementation. Actually they will not realy crash
but you may get a connection timeout.....

Ciao,

Peter

On Tue, 5 Apr 2005, Johan Hedberg wrote:

> On Mon, Apr 04, 2005, Dimitry Andric wrote:
> > 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.
>
> I can confirm this behaviour also on a Motorola A760. However, it is
> also the only phone I have encountered this.
>
> Johan
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
| D-13355 Berlin / Germany |




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-04-05 08:20:54

by Johan Hedberg

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID

On Mon, Apr 04, 2005, Dimitry Andric wrote:
> 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.

I can confirm this behaviour also on a Motorola A760. However, it is
also the only phone I have encountered this.

Johan


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel