Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jan 2011 11:02:42 -0800
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        David Demelier <demelier.david@gmail.com>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: Bluetooth mouse does not connect after reboot
Message-ID:  <AANLkTi=SV_SaBtEk5hE6wYmoYS=-kaX=2eZZO1Btj025@mail.gmail.com>
In-Reply-To: <4D3729C4.8070709@gmail.com>
References:  <4D36ED39.7070807@gmail.com> <AANLkTi=UY_=bK%2BkkbsETJmXexgVhoVpU9QLii8r8H-X=@mail.gmail.com> <4D3729C4.8070709@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 19, 2011 at 10:13 AM, David Demelier
<demelier.david@gmail.com> wrote:
> 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 ~ $

that is ok. it means that the mouse did not insists on pairing :)

>>> 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.

oh, yes. you should only press 'connect' button once, i.e. when you
set up you mouse for the very first time. in fact, every time you
press 'connect' button on your mouse, you should also make bthidd(8)
'forget' your mouse (as you have discovered :)

once you have set up your mouse there is no need to press 'connect'
button anymore. just move it, or, press mouse button (again NOT
'connect' button) to wake mouse up.

thanks,
max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=SV_SaBtEk5hE6wYmoYS=-kaX=2eZZO1Btj025>