register HID with SDP error

Waitman Gobble gobble.wa at gmail.com
Wed Mar 25 15:46:43 UTC 2015


On Wed, Mar 25, 2015 at 8:16 AM, Maksim Yevmenkin
<maksim.yevmenkin at gmail.com> wrote:
> Hello,
>
> sorry for the delay...
>
>> Through trial and error I found that this code is preventing the
>> response to the  0x0100 (L2CAP) query.
>>
>> in sdpd/ssar.c around line 230 or so.
>>
>> if (memcmp(&uuid, &puuid, sizeof(uuid)) != 0 &&
>>    memcmp(&uuid, &uuid_public_browse_group, sizeof(uuid)) != 0)
>> continue;
>
> right. this is to match uuid from the request with the uuid of
> registered services, or, special case, uuid for public browse group
> that is expected to return everything that is public.
>
>> When I comment that code out then it responds to the request with the
>> list of registered and advertised services and my clients then
>> magically connect.
>
> well, that's plain just wrong. you completely disabled any filtering.
> basically request for any uuid will return everything. including
> things that client has not asked for. the correct way is to add a list
> of addition uuid's (such as l2cap uuid) to every profile that should
> be checked as well. when client makes request for l2cap uuid it
> effectively asking to give back everything that "runs over l2cap".
>
>> Can you please explain the purpose of that code so I can fully
>> understand what I'm commenting out of the provider lookup loop in
>> sdpd/ssar.c ?
>
> please read above. also please read SDP spec, particularly part that
> talks about Service Search Request and Service Search Attribute
> Request.
>
> thanks
> max

Thanks Max, I appreciate your reply and helpful information.
I will experiment and see if I can get this right.

-- 
Waitman Gobble
Los Altos California USA
510-830-7975


More information about the freebsd-bluetooth mailing list