From owner-freebsd-bluetooth@FreeBSD.ORG Wed Jan 19 18:13:54 2011 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 83FD3106566B for ; Wed, 19 Jan 2011 18:13:54 +0000 (UTC) (envelope-from demelier.david@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 129F78FC0C for ; Wed, 19 Jan 2011 18:13:53 +0000 (UTC) Received: by fxm16 with SMTP id 16so1171662fxm.13 for ; Wed, 19 Jan 2011 10:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=7InFb3ku9/2JDgW4m1lDB14Q/qRVhtY7yWGFkDrAHV0=; b=sM4oOlRWinElxQIDm48E1TgNfy/BhsH604gATmam4lOCoBazgp4mPVah3nhEenB0Ko Rxsgv15rBdKYT0O/QSbUNRNpWLmkB4XfjBxjhwBPIwkaLlQsWxmjRGUaNkB3yO05bxaY iTq0Lno+x5k8btcq+GKB93DGoxidZmw5v0rPY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=wBKzxKtElPu0vMb7xdXzscbEPGdCQvjgD7sbrS1IQTHqFdR0WmyGvybj7pnRBbTi+O pipF5BpewQ9QZ6Dn1cDdHaOyQ4/lKYqLtuMcTodplrYtN2KtUa2obzmfr30hU0FOumSA 0lcCP0+KXw+BbQ96/J1rG+TCPsr9Ewj5DLR6k= Received: by 10.223.96.66 with SMTP id g2mr1020845fan.61.1295460832969; Wed, 19 Jan 2011 10:13:52 -0800 (PST) Received: from Melon.malikania.fr (65.21.102-84.rev.gaoland.net [84.102.21.65]) by mx.google.com with ESMTPS id n2sm2720842fam.28.2011.01.19.10.13.50 (version=SSLv3 cipher=RC4-MD5); Wed, 19 Jan 2011 10:13:51 -0800 (PST) Message-ID: <4D3729C4.8070709@gmail.com> Date: Wed, 19 Jan 2011 19:13:24 +0100 From: David Demelier User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20110111 Thunderbird/3.1.7 MIME-Version: 1.0 To: Maksim Yevmenkin References: <4D36ED39.7070807@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth mouse does not connect after reboot 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: Wed, 19 Jan 2011 18:13:54 -0000 On 01/19/11 18:29, Maksim Yevmenkin wrote: > David, > >> I've successfully setup a Logitech v470 mouse using bthidd / hcsecd. The >> problem is each time /var/db/bthidd.hids is created the mouse does not >> connect anymore and if I remove this file and restart bthidd it works, thing >> which is quite boring. > > few things: > > -- could you please let us know which freebsd version you are running on? > > -- i assume you have (at least) > > hcsecd_enable="YES" > bthidd_enable="YES" > > in you /etc/rc.conf, right? just checking :) > > -- i also assume that you have successfully paired your mouse, and, > link key was properly generated. please check /var/db/hcsecd.keys > >> In hcsecd.conf I have : >> >> device { >> bdaddr 00:1f:20:0f:62:31; >> name "Logitech V470"; >> key nokey; >> pin "0000"; >> } > > this looks fine to me. i would just check and make sure that link key > was generated and being used. > Hello, I didn't know this one ! It seems that /var/db/hcsecd.keys is empty ! markand@Melon ~ $ sudo cat /var/db/hcsecd.keys markand@Melon ~ $ >> and in bthidd.conf : >> >> device { >> bdaddr 00:1f:20:0f:62:31; >> control_psm 0x11; >> interrupt_psm 0x13; >> reconnect_initiate true; >> battery_power true; >> normally_connectable false; > > [...] > > this looks fine to me. one thing is that your mouse claims > "reconnect_initiate true;". it means that as soon as device is "known" > to bthidd(8), connection should be originated from the device's (i.e. > mouse) side. so, when you reboot/restart bthidd(8), and, device is > mentioned in the /var/db/bthidd.hids (meaning its not the first time > we heard about this device), bthidd(8) will wait for the device to > initiate the connection. usually moving the mouse or pressing a button > will wake mouse and make it initiate the connection. > > i guess there are two possible cases here > > 1) after reboot (or bthidd(8) restart) your mouse is not attempting to > initiate connection as it claims to; > > or > > 2) after reboot (or bthidd(8) restart) your mouse is trying to > initiate connection, but, its failing for some reason; > >> If you have any clue how to fix this. Thanks. > > could you please install hcidump from ports (comms/hcidump) and try to > see what it going on. basically > > 1) reboot (or restart bthidd(8)) > > 2) run hcidump > > 3) try to wiggle your mouse and/or pressing a button to see if mouse > is trying to open a connection; There is some input when I move the mouse yes. Let's try after the reboot if it will works too. In fact I was trying to connect my mouse (pressing the connect button) maybe I should only move it instead of pressing this button. > > if mouse IS trying to open then please create binary hcidump (with -w > option) and send it to me. > > if mouse is NOT trying to open a connection, then you can try to edit > you bthidd.conf and change "reconnect_initiate" to "false"'. that > should make bthidd(8) to open connection. > > thanks, > max Thanks for your answer -- David Demelier