Date: Wed, 25 Mar 2015 08:16:29 -0700 From: Maksim Yevmenkin <maksim.yevmenkin@gmail.com> To: Waitman Gobble <gobble.wa@gmail.com> Cc: "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org>, Iain Hibbert <plunky@ogmig.net> Subject: Re: register HID with SDP error Message-ID: <CAFPOs6rJJW2BC3rru%2Bvb5dAE0yaHGvr=0s8K9FZ1ee0rf-ML-w@mail.gmail.com> In-Reply-To: <CAFuo_fwBcBQOZzFNntBSP0AwyAkGq=s-eeKJ1CCgjPp5tWdG=A@mail.gmail.com> References: <CAFuo_fy9xRU2T3GUPY8116yZCUd8sL9pBQ9ixXnMwO56niJFog@mail.gmail.com> <CAFuo_fzdmB79qdoH8P5EcO_ZZoa=_id6h=eqFBXvP_a%2B3WMkLw@mail.gmail.com> <CAFuo_fzB3A5L3vivH7Z80OEoBtVEHftEYE4LUkhnrkguzL5GDA@mail.gmail.com> <CAFuo_fzrk%2BWLXivZrnTsGQD%2BS7mq%2BUSXB7Mn6%2BJT=y64JakGSw@mail.gmail.com> <CAFPOs6q3iVcNthF=S--UgTm=5wA0HM6coqB7AcmCKb=55OWdTQ@mail.gmail.com> <CAFuo_fxgBVKxmzbJs%2B-XDz%2Bu4tb2_i3eYXSa-oiOoU%2BQD6ApwQ@mail.gmail.com> <CAFPOs6r_D7bcGCMP_bP%2BQtZgKt7Oj5jRJ2v872RODekn%2B6xv1Q@mail.gmail.com> <CAFuo_fwPuaD4bYwfZou0RBswZsTmdtVZA1B2GqUdo3ZJJiWRQg@mail.gmail.com> <0AD7A2F7-37BE-4F6A-9FD6-F6C81B2CAF36@gmail.com> <CAFuo_fye5RWNtjsutHa%2BbXL0AYHYRpJxW-b=48o0iMwX227wdA@mail.gmail.com> <alpine.NEB.2.11.1503170658130.4414@galant.ogmig.net> <CAFuo_fx47uRC-eKD_KtsSsrMCQZauyHyCOgRxGbtp_WEZ49o_Q@mail.gmail.com> <alpine.NEB.2.11.1503171759510.4792@galant.ogmig.net> <CAFPOs6omaOOOumNk2Zg=YBgK9cy7JumOZ6k-89oTbVw-3PgAvg@mail.gmail.com> <CAFuo_fy%2BdmpcswwLMV3LaGGkN6VyQ%2B=ieEzYUT=omSLkhS8=EA@mail.gmail.com> <CAFuo_fwBcBQOZzFNntBSP0AwyAkGq=s-eeKJ1CCgjPp5tWdG=A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFPOs6rJJW2BC3rru%2Bvb5dAE0yaHGvr=0s8K9FZ1ee0rf-ML-w>