From owner-freebsd-bluetooth@FreeBSD.ORG Tue Oct 21 22:00:13 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 F3C761065683 for ; Tue, 21 Oct 2008 22:00:12 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from megatron.madpilot.net (megatron.madpilot.net [88.149.173.206]) by mx1.freebsd.org (Postfix) with ESMTP id 99E898FC1F for ; Tue, 21 Oct 2008 22:00:12 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from localhost (localhost [127.0.0.1]) by megatron.madpilot.net (Postfix) with ESMTP id 41175130C08; Wed, 22 Oct 2008 00:00:11 +0200 (CEST) X-Virus-Scanned: amavisd-new at madpilot.net Received: from megatron.madpilot.net ([127.0.0.1]) by localhost (megatron.madpilot.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mr8fKHwNYsXR; Wed, 22 Oct 2008 00:00:09 +0200 (CEST) Received: from anakin.madpilot.net (anakin.madpilot.net [172.24.42.10]) by megatron.madpilot.net (Postfix) with ESMTP; Wed, 22 Oct 2008 00:00:09 +0200 (CEST) Message-ID: <48FE50E8.7010701@madpilot.net> Date: Wed, 22 Oct 2008 00:00:08 +0200 From: Guido Falsi User-Agent: Thunderbird 2.0.0.17 (X11/20080927) MIME-Version: 1.0 To: plunky@rya-online.net References: <48fe2eab.261.35fd.334498095@rya-online.net> In-Reply-To: <48fe2eab.261.35fd.334498095@rya-online.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 22:00:13 -0000 Iain Hibbert wrote: > all (most :) documents are at www.bluetooth.com > The site is quite messy, and I get annoyed easily by that kind of website design, so it took a few days worth of tries to get to the docs :P Now I have the relevant PDF, I'll try to make something worth of it. > > 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 don't like the idea too much either, the problem is that most mobile phones expose a mlot of services, most marked as RFCOMM, some of which are not working in any way or are just used for some proprietary protocoll, so the code discards that kind of crap. For example it is discarding: "Nokia PC Suite" "Bluetooth Serial Port" "m-Router Connectivity" all of which, if present, are marked as rfcomm, but don't take at commands(which the software uses to talk to the phone). I think some better way exists, but I thought it would be easier to clone the existing logic and then refine it, than reinvent it right away. I'd also like to ha ve feedback from the gnokii developer, if my code is ok he could include it in his project too. > > 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? Yes, the original code is using strstr() to check them. -- Guido Falsi