From owner-freebsd-bluetooth@FreeBSD.ORG Wed Jan 19 17:52:02 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 4FF5B10656A3 for ; Wed, 19 Jan 2011 17:52:02 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 196E68FC1F for ; Wed, 19 Jan 2011 17:52:01 +0000 (UTC) Received: by iwn39 with SMTP id 39so1077125iwn.13 for ; Wed, 19 Jan 2011 09:52:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=tCW/BxRCy6XyDMorjWeHBttai++XruWOOOvP49j+hpE=; b=qNjpuWwksKFuh2HKddEBh2bD82gf6cZDfMrCA0429XmwYFw7fwmTPHCuXrllqGoH7e +zJfRdPmw6ggWsZh1TnJA6lVMRRlO3Z4EI9DTRrJUQT6+yArF6j9mcqrxs7VGIaCk1Dm 3ka7bw+NUggx5w7hD0WYjZRH+Ljhkd7XzBTSw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QapoF2+dHvZ/lbi2Bv66bfu0p79SKiO1ev8JfW7vWUPt+YU37HlZq6JLcrwhzxk0pp MPETwI0R/dxQtMrUC+wn5BcBG2ulCVf3kOFT0WY85J8gtaSGPxPCO+INO2FXk3qRFVgh xUqggVbtJu4NXPOnCVL8dOi161Y899upeGBhc= MIME-Version: 1.0 Received: by 10.231.32.141 with SMTP id c13mr1161783ibd.101.1295458155416; Wed, 19 Jan 2011 09:29:15 -0800 (PST) Received: by 10.231.206.5 with HTTP; Wed, 19 Jan 2011 09:29:15 -0800 (PST) In-Reply-To: <4D36ED39.7070807@gmail.com> References: <4D36ED39.7070807@gmail.com> Date: Wed, 19 Jan 2011 09:29:15 -0800 Message-ID: From: Maksim Yevmenkin To: David Demelier Content-Type: text/plain; charset=ISO-8859-1 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 17:52:02 -0000 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. > 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; 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