From owner-freebsd-bluetooth@FreeBSD.ORG Mon Mar 30 14:58:18 2015 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A69FA40 for ; Mon, 30 Mar 2015 14:58:18 +0000 (UTC) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4BEBDC9 for ; Mon, 30 Mar 2015 14:58:17 +0000 (UTC) Received: by wiaa2 with SMTP id a2so133700825wia.0 for ; Mon, 30 Mar 2015 07:58:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=S/2uuOHIKEsZ8oQuRgEK10XXGSd+EzA1gukrSeCkkwA=; b=xPCnyoEH696nBioA1mFruhFS+zOLuWnLcSVeTlUGO1N2DZCGuUUnsrcmHjSgdwWniO KKW1D6kvH96dulPDU6gPQVSnCzRRnyBbdkxa4BGAKJzO/UXdHaOuIejtsIOSV/eeueJB CeNds5W5s03VdAhQ71+v9Xx0zuhoci6SjsedCEQvfGkXBj2eW4yiG0MUxHMMtDeK4ZMI o9zrzM0WCmjoAmnIFOTo47klnNRicxzSRsvA06sOvYhgqkgwSE3LnuFAq8Rj9I4FCBsg tqmp99a+uA/dRZbAfsWBPzawMT1M+pW6oaQ0wP6pAWgr2vyF4IscCOfSXWJEu+4B9ihU UJQA== MIME-Version: 1.0 X-Received: by 10.180.104.35 with SMTP id gb3mr23380176wib.60.1427727463666; Mon, 30 Mar 2015 07:57:43 -0700 (PDT) Received: by 10.27.91.75 with HTTP; Mon, 30 Mar 2015 07:57:43 -0700 (PDT) In-Reply-To: References: <0AD7A2F7-37BE-4F6A-9FD6-F6C81B2CAF36@gmail.com> Date: Mon, 30 Mar 2015 07:57:43 -0700 Message-ID: Subject: Re: register HID with SDP error From: Waitman Gobble To: Iain Hibbert Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-bluetooth@freebsd.org" X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2015 14:58:18 -0000 On Mon, Mar 30, 2015 at 7:35 AM, Iain Hibbert wrote: > On Sun, 29 Mar 2015, Waitman Gobble wrote: > >> I'm not sure I'm getting it right.. >> >> in ssar.c, if the uuid query is L2CAP 0x0100 i set dol2capquery = 1; > > probably not, if you do it like that :) > >> if (memcmp(&uuid, &puuid, sizeof(uuid)) != 0 && >> memcmp(&uuid, &uuid_public_browse_group, sizeof(uuid)) != 0) > > my advice is to change this match (in ssr.c and ssar.c), to use an array > of profile UUIDs, so that you can add all the UUIDs for the indivudal > profiles. > >> My client is still connecting to PSM channels, but I'm seeing syntax errors >> >> https://gist.github.com/waitman/811e4dde41bfefd32054 >> >> So I'm wondering if i'm supposed to send the whole record or maybe >> just matching aids... > > you are only supposed to send requested AIDs Iain - Thanks so much for your help on this, ok, so in this loop (sar.c) int32_t server_prepare_attr_list(....) { for (; lo <= hi; lo ++) { len = server_prepare_attr_value_pair(provider, lo, ptr, rsp_end); } } it's going through all the specified aid's. ie, "aid(s) 0x0000 - 0xffff" in the query request: SDP SSA Req: tid 0x0 len 0xf pat uuid-16 0x0100 (L2CAP) max 0xf0 aid(s) 0x0000 - 0xffff cont 00 lo = 0x0000 hi = 0xffff So.. I only want to generate 'server_prepare_attr_value_pair()' based on the query parameters? > > but I don't think your syntax error is that.. perhaps you got the length > of the string wrong, or the sequence? Without the raw data its difficult > to tell.. > > regards, > iain > _______________________________________________ > freebsd-bluetooth@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth > To unsubscribe, send any mail to "freebsd-bluetooth-unsubscribe@freebsd.org" -- Waitman Gobble Los Altos California USA 510-830-7975