From owner-freebsd-bluetooth@FreeBSD.ORG Thu Nov 17 19:42:04 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CFF816A41F for ; Thu, 17 Nov 2005 19:42:04 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6C1843D45 for ; Thu, 17 Nov 2005 19:42:03 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id jAHJfUJ25085; Thu, 17 Nov 2005 14:41:30 -0500 Message-ID: <437CDCE8.4060605@savvis.net> Date: Thu, 17 Nov 2005 11:41:28 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Aniruddha Bohra References: <437CC18A.5040804@savvis.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Cannot pair with Audiovox SMT5600 Bluetooth 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: Thu, 17 Nov 2005 19:42:04 -0000 Aniruddha, >> well, from what i can see everything is working as expected. your >> phone requests pin code and we send it back. the next event shows >> that link key is generated and stored. so, "pairing" procedure is >> completed. >> >>> BTW, I tried with both : hccontrol -n ubt0hci >>> write_node_role_switch 0 and without it with the same result. >> >> no, that is not your problem. most likely the phone is trying to do >> something else after it has opened baseband connection. >> >> please install hcidump port from comms/hcidump and run as root >> >> # hcidump -w dump.file > > The file is attached. Actually the problem is only with pairing I > feel. The GPRS connection (through DUN) goes through, even if the > phone says there was an error. nope. the "paring" works as expected. the "pairing" is a authentication procedure, during which, both devices agree on "link key". "link key" can be programmed directly or auto generated from the "pin code". next time the devices talk to each other they will use the same link key. if any of the devices lost the "link key" or "link keys" do not match the connection is rejected. the fact that "dun/gprs" works means that your phone is accepting the connection from freebsd. by default most phones will try to authenticate this type of connection (with link key), so you need "pairing" done. in your particular scenario both freebsd and your phone are agreed on the link key and baseband connection was established. you get the error on the phone because phone is trying to query services available on freebsd. it is a mastery to me why some manufacturers assume that remote device will always answer service discovery query. if you only plan to use freebsd as a bluetooth client you never should be required to answer service discovery queries. in fact to do the pairing you only have anyway, to get rig of the error all you need to do is to run sdpd(8) daemon. just have it running all the time (similar to hcsecd(8)). you only need to kldload bg_btsocket(4) (from loader.conf) before you can start sdpd(8). there is no need to restart both hcsecd(8) and sdpd(8) even if you detach/re-attach the device. thanks, max