From owner-freebsd-bluetooth@FreeBSD.ORG Tue Oct 21 17:15:29 2008 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B5471065680 for ; Tue, 21 Oct 2008 17:15:29 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.freebsd.org (Postfix) with ESMTP id 7EA9B8FC0C for ; Tue, 21 Oct 2008 17:15:25 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so959080uge.39 for ; Tue, 21 Oct 2008 10:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Dqk0AemijAU3b/zM59vUR6mMBKC3TULdWJFOVbdADe4=; b=WgWXmdgyBPa/VLU7wgwgYCKQhxxk38+IZpFm53IWg37gVXZ8I+ICYnZ6BtIstpZTcc N84590e0OgyPl3VXuLTwMnjoF7G5PhOfXThOSztChyhZbbExODRdo/OdjlaHQBWOAeAp CjOqRTBw6p5ZbMcnELJQAprVvujKK222t8ve8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=rCmAOUr7dw5atTy++CEh1LLSyUrsfgPctExOhEoJCjLQCWstufbW8zSK2leyuvvDqY I9wR6sIyLAgzn3B0hHP/X3Yz6UnuBu3sgQhSz9DplYkEdQp2W2pPV0WVKhRJsJd5Zh7j TakMiOOiXx6oXwa9jq+Iq4Pam1NpHszmgjhHE= Received: by 10.86.84.18 with SMTP id h18mr8241203fgb.5.1224609323274; Tue, 21 Oct 2008 10:15:23 -0700 (PDT) Received: by 10.86.84.4 with HTTP; Tue, 21 Oct 2008 10:15:23 -0700 (PDT) Message-ID: Date: Tue, 21 Oct 2008 10:15:23 -0700 From: "Maksim Yevmenkin" To: "Guido Falsi" In-Reply-To: <20081021084239.GA80573@megatron.madpilot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081021084239.GA80573@megatron.madpilot.net> Cc: freebsd-bluetooth@freebsd.org Subject: Re: Need help with SDP interface X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2008 17:15:29 -0000 On 10/21/08, Guido Falsi wrote: > Hello, I'm the maintainer of the gnokii port. > > With the new version the author added some code to automatically find > the rfcomm channel to talk with mobiles using AT commands. is it looking for serial port service? if so, you can use rfcomm_sppd(1) source code as an example on how to find rfcomm channel number. you can also use sdpcontrol(8) source code to see how it searches/parses sdp record attributes > This function is very BlueZ specific and I'm trying to rewrite it to > work with FreeBSD's bluetooth stack. > > I can't really find some documentation I need about bluetooth, so I > thought I could ask for help here. > > The function as written by Powell Kot (gnokii author) reads out the > SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET > attribute of all the RFCOMM enabed profiles, discards some based on this > descriptive name and select the first one not being discarded, > exctracting the channel attribute. > > What I can't find is the data structure of the NAME attribute, and hot > to read it using the SDP_DATA_* functions. the data structures for sdp described in the particular bluetooth profile document. > Anyone is willing to help, I think I just need the the pdf or links > to documentation. > > I've checked through the sdpcontrol functions, and got some idea of how > things work. good ;) > I'm also doing a little cut & paste of code, so I wil need permission > from Maksim before submitting the code to the gnokii project. do not need to ;) my code is under bsd license, so everything should be fine as long as you comply with the term of the license thanks, max