From owner-freebsd-bluetooth@FreeBSD.ORG Fri Jul 2 09:25:06 2004 Return-Path: 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 7D5E816A4CE for ; Fri, 2 Jul 2004 09:25:06 +0000 (GMT) Received: from gvr.gvr.org (gvr-gw.gvr.org [80.126.103.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF28943D31 for ; Fri, 2 Jul 2004 09:25:05 +0000 (GMT) (envelope-from guido@gvr.org) Received: by gvr.gvr.org (Postfix, from userid 657) id 09FA150; Fri, 2 Jul 2004 11:23:50 +0200 (CEST) Date: Fri, 2 Jul 2004 11:23:49 +0200 From: Guido van Rooij To: Maksim Yevmenkin Message-ID: <20040702092349.GA70090@gvr.gvr.org> References: <40E451EE.7090601@cw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: freebsd-bluetooth@freebsd.org Subject: Re: problem pairing with a Sony-Ericsson T610 X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2004 09:25:06 -0000 On Thu, Jul 01, 2004 at 11:21:36AM -0700, Maksim Yevmenkin wrote: > > > During the pairing attempt, hcidump shows: > > > HCI Event: Connect Request(0x04) plen 10 > > < HCI Command: Accept Connection Request(0x01|0x0009) plen 7 > > > HCI Event: Command Status(0x0f) plen 4 > > > HCI Event: Connect Complete(0x03) plen 11 > > hcidump -x would be more useful :) but it looks like you are trying to > initiate connection from > the phone, right? by default freebsd will accept any connection Yep. > without authentication. if you > really want to make freebsd authenticate incoming connections then you need to > > # hccontrol -n ubt0hci write_authentication_enable 1 Before issuing this command I got: beck# ./hcidump -x HCIDump - HCI packet analyzer ver 1.5 device: any snap_len: 65535 filter: 0xffffffff > HCI Event: Connect Request(0x04) plen 10 C4 B5 46 07 0E 00 04 02 52 01 < HCI Command: Accept Connection Request(0x01|0x0009) plen 7 C4 B5 46 07 0E 00 00 > HCI Event: Command Status(0x0f) plen 4 00 01 09 04 > HCI Event: Connect Complete(0x03) plen 11 1A 29 00 C4 B5 46 07 0E 00 01 00 then: < HCI Command: Write Authentication Enable(0x03|0x0020) plen 1 01 > HCI Event: Command Complete(0x0e) plen 4 01 20 0C 00 and after a new attempt: > HCI Event: Connect Request(0x04) plen 10 C4 B5 46 07 0E 00 04 02 52 01 < HCI Command: Accept Connection Request(0x01|0x0009) plen 7 C4 B5 46 07 0E 00 00 > HCI Event: Command Status(0x0f) plen 4 00 01 09 04 > HCI Event: Connect Complete(0x03) plen 11 1A 29 00 C4 B5 46 07 0E 00 01 00 > > on the other hand you might pair devices by initiating connection to > the phone, i.e. for example try to use obexapp(1) to get phone book. > the very first time phone asks if you want to add device to the > trusted list. that is how i do it on my t68i. and if i need to push > data from my phone to pc i just push it. i do not need to pair devices > because freebsd does not ask for it. I am trying to create a situation where my FreeBSD systems starts executing certain commands when the mobile is in range. I think it is more handy that the mobile initiates the connection. > > > and then the mobile phone says that the connection failed. > > well, it is hard to say its really "failed" because i can not tell > what status was returned in "Connect Complete" event. next time please > use 'hcidump -x'. > > you also might need to > > # hccontrol -n ubt0hci write_node_role_switch 0 > > if your phone does not support role switch, see "troubleshooting" section at > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-bluetooth.html Bingo! That's it! Thanks a lot! -Guido