From owner-freebsd-bluetooth@FreeBSD.ORG Tue Oct 21 20:08:45 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 E49AB1065672 for ; Tue, 21 Oct 2008 20:08:45 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from post.rya-online.net (post.rya-online.net [195.26.225.220]) by mx1.freebsd.org (Postfix) with ESMTP id AD7DF8FC18 for ; Tue, 21 Oct 2008 20:08:45 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from rya-online.net (post.rya-online.net [127.0.0.1]) by post.rya-online.net (Postfix) with SMTP id 635721D416D; Tue, 21 Oct 2008 20:34:05 +0100 (BST) Sender: plunky@rya-online.net From: "Iain Hibbert" To: Guido Falsi X-Mailer: Quality Web Email v3.1b, http://netwinsite.com/refw.htm Date: Tue, 21 Oct 2008 19:34:03 GMT Message-id: <48fe2eab.261.35fd.334498095@rya-online.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 Reply-To: plunky@rya-online.net 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 20:08:46 -0000 On Tue, 21 Oct 2008, Guido Falsi wrote: > With the new version the author added some code to automatically find > the rfcomm channel to talk with mobiles using AT commands. > > 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. all (most :) documents are at www.bluetooth.com > 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 is it looking for (or discarding)? I'm not sure this is the right way to do it.. normally you look for a service class which is a specified number (look for some of these defined in /usr/include/sdp.h) I think you may be looking for 'Serial Port' profile. > What I can't find is the data structure of the NAME attribute, and hot > to read it using the SDP_DATA_* functions. I think it is just a SDP_STRING that you have to parse for that? iain