Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2008 16:19:37 -0700
From:      "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com>
To:        "Alexander Leidinger" <Alexander@leidinger.net>
Cc:        bluetooth@freebsd.org
Subject:   Re: Fun with Logitech bluetooth keyboard (diNovo Edge)...
Message-ID:  <bb4a86c70805071619p367ce4ecv610a392995e66334@mail.gmail.com>
In-Reply-To: <20080508010746.0388b146@deskjail>
References:  <20080507192434.32afce8b@deskjail> <bb4a86c70805071305l7d34a988t989cfae3ed4c8d46@mail.gmail.com> <20080508010746.0388b146@deskjail>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 7, 2008 at 4:07 PM, Alexander Leidinger
<Alexander@leidinger.net> wrote:
> Quoting "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com> (Wed, 7 May 2008 13:05:02 -0700):
>
>> On Wed, May 7, 2008 at 10:24 AM, Alexander Leidinger
>> <Alexander@leidinger.net> wrote:
>> > Hi,
>> >
>> >  I bought a keyboard with an integrated touchpad from logitech. Just
>> >  plugging in the BT-dongle gives an usb hub with ums and ukbd.
>> >  Unfortunately the ums doesn't work for me yet (problem in a separate
>> >  mail to usb@).
>> >
>> >  I googled a litte bit around and found a posting here
>> >  (http://lists.freebsd.org/mailman/htdig/freebsd-bluetooth/2006-December/000824.html)
>> >  which contains a program which puts the device into hci mode (by
>> >  accessing /dev/uhidX), so that I can use the HID devices with the
>> >  FreeBSD bluetooth stack directly. I haven't tried this yet (I would
>> >  have to remove ukbd and ums from the kernel...).
>> >
>> >  Is there the possibility to get this hid2hci feature in our userland
>> >  (or into the kernel controllable via a sysctl)? I would would be good
>> >  to have this functionality at boot (in the kernel it would would allow
>> >  to have ukbd available while still being able to put the device into
>> >  hci mode).
>>
>> well, someone already ported hid2hci.
>>
>> http://lists.freebsd.org/pipermail/freebsd-bluetooth/2007-July/000989.html
>>
>> is a good starting point. i do not think that using sysctl is good
>
> It doesn't make sense to have something like this in the base system?

yes, it does. however, one should be careful. original tool is under
gpl. there is a lot of code that looks very similar (if not identical)
to gpl version. also, at least for csr chips, the utility contain some
information about csr chips that they may or may not want be released.
i realize that this information is already public (due to gpl tool)
but you never know...  i think port would be better solution for now.

>> solution for this. last time i looked this stuff was implemented on
>> csr chips using so-called "boot mode" feature. basically, the device
>> has a split personality - in one mode it pretends to be an usb hub
>> with keyboard and mouse attached (hid) to it and in another -
>> bluetooth dongle (hci). to switch between the modes one must set a
>> so-called ps key and perform warm reset.
>>
>> the problems are
>>
>> 1) this is highly device specific
>>
>> 2) there is no  good way to know if device can be switched between hid
>> and hci. it is basically left to user to know that.
>
> There's no way to know this based upon some vendor/product IDs?

well, yes, that is the only way to know. the thing is that someone has
to keep this list up-to-date.

>> 3) usually hid mode is made default, so device has to be switched into
>> hci mode every time it is attached.
>>
>> the hid mode is really for user's advantage. its makes it possible to
>> use wireless keyboards in bios screens etc. os does not need to know
>
> Yes, I understand that, the problem is: the ums part does not work for
> me (8-current from March).
>
>> anything about bluetooth. all that is required from the os is usb
>> support. while i do not object to hid2hci utility, personally, i would
>> get a separate bluetooth dongle for another $20 or less.
>
> I have a separate dongle, but having a second one (the logitech one)
> would not be bad. We just need a way to say "I want this to be a hci
> device when I plug it in automatically".

devd(8) could be used to run hid2hci automatically when device is
plugged. devd.conf entry will contain device name, vendor id/device id
pair to match againts. after device warm resets itself it will be
recognized (hopefully) as bluetooth dongle.

thanks,
max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70805071619p367ce4ecv610a392995e66334>