Logitech k810 Bluetooth keyboard (updated 5/11/2014)

Hi. Yesterday I bought a new Logitech keyboard (k810). This keyboard uses a Bluetooth connection. Today I tried to make it work with no success. At this moment I added these lines:
/etc/rc.conf
Code:
hcsecd_enable="YES"
sdpd_enable="YES"
/boot/loader.conf
Code:
ng_ubt_load="YES"
ng_l2cap_load="YES"

In /dev no ubt0 is showing.

Reading the Handbook, after loading the kernel I must run service bluetooth start ubt0 but I get
Code:
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0

Finally hccontrol -n ubt0hci inquiry returns me no device, but the Logitech is on.

How to make it connect?
My Bluetooth adapter is F8T016 - Mini Bluetooth Adapter

Any help here?

Also I forgot to mention that the Belkin mini USB Bluetooth adapter uses the BCM20702A0 chipset which is supported by FreeBSD.
 
It's been a while since I played with Bluetooth on FreeBSD. But I can remember the device needs to be paired first.

32.4.6 Pairing of Devices

Most likely the keyboard will use a PIN of 0000.
 
But how can I find btaddr?

Οk. Ι am out. If you will not help me to do it, I will never made it. I tried everything.
 
I never used Bluetooth at all, however, I have really good feedback to give from my experiences with the various mailing lists. Just recently one of the developers gave me a patch that restores my webcam support (one of the revisions in 9.1-STABLE this week broke it), so if you feel like you've tried everything, and you don't know where else to turn to, consider asking on freebsd-bluetooth@freebsd.org. Asking won't harm anyone ;)

By the way, what is the output of # dmesg | tail after you "plug in" the device?
 
Ι am going to try it but first I want to see if anyone here will help me. I have some months to login but in my almost 2,5 years here always was people that helped me in gazillion problems
 
OK :)

Well, I'm no expert, but like I said before, I'd check what # dmesg | tail -20 gives, just to see if there are problems with modules and if your keyboard is being recognized by the system.
 
Returns me:
Code:
linux: pid 4665 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4684 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4697 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4716 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4746 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4763 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4833 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4846 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4874 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4887 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4905 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4933 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4952 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4968 (npviewer.bin): syscall pipe2 not implemented
linux: pid 4999 (npviewer.bin): syscall pipe2 not implemented
linux: pid 5028 (npviewer.bin): syscall pipe2 not implemented
linux: pid 5048 (npviewer.bin): syscall pipe2 not implemented
linux: pid 25258 (npviewer.bin): syscall pipe2 not implemented
linux: pid 25359 (npviewer.bin): syscall pipe2 not implemented
linux: pid 25640 (npviewer.bin): syscall pipe2 not implemented

And my complete dmesg

http://pastie.org/7924004
 
OK, this doesn't seem normal. Do you have any special configuration in your /etc/src.conf or in your kernel config?

I am asking, because your complete [cmd=""]dmesg[/cmd], line 241, suggests you don't have either Bluetooth in your world or in your kernel, or, you don't have netgraph in either your world or kernel.

EDIT:
If you're using a custom kernel with a full world, try enabling

Code:
device         udbp

in your kernel.
 
But how is this possible? I use GENERIC kernel. I have my kernel configurstion but didn't build yet. Also on boot I load the Bluetooth module. In /etc I have no file named src.conf.

kldstat returns:
Code:
Id Refs Address            Size     Name
 1   48 0xffffffff80200000 1323408  kernel
 2    1 0xffffffff81524000 29e0     coretemp.ko
 3    1 0xffffffff81527000 70b8     acpi_video.ko
 4    1 0xffffffff8152f000 c824e0   nvidia.ko
 5    3 0xffffffff821b2000 484f8    linux.ko
 6    3 0xffffffff821fb000 59a80    vboxdrv.ko
 7    1 0xffffffff82255000 6668     sem.ko
 8    1 0xffffffff8225c000 8518     ng_ubt.ko
 9    7 0xffffffff82265000 15330    netgraph.ko
10    2 0xffffffff8227b000 13278    ng_hci.ko
11    4 0xffffffff8228f000 2f98     ng_bluetooth.ko
12    1 0xffffffff82292000 16538    ng_l2cap.ko
13    1 0xffffffff82412000 3dff     linprocfs.ko
14    1 0xffffffff82416000 697e     if_lagg.ko
15    2 0xffffffff8241d000 2951     vboxnetflt.ko
16    1 0xffffffff82420000 1579     ng_ether.ko
17    1 0xffffffff82422000 3fea     vboxnetadp.ko
18    1 0xffffffff82426000 1695e    ng_btsocket.ko
19    1 0xffffffff8243d000 a9bb     fuse.ko
According kldstat all the appropriate modules are loaded.

Ok. Now I build my kernel which I use always and to be sure kldstat returns me the same results. Ok. I am going to build it with this option.
 
Oh, right, your # dmesg stated you have 9.1-RELEASE and are running GENERIC. I don't think rebuilding the kernel will help much, since GENERIC has these things working. Your Logitech is recognized, so that's OK too, and those `pipe 2' messages are from Flash.

So it's not the world/kernel, but the configuration.
 
Which I have no idea how to configure it and handbook really not helping. But to be more sure I enable
Code:
device udbp
in my custom kernel. Nothing to lose.

Ok. Compiling my custom kernel with device udbp I get compile error.

Code:
udbp.o: In function `udbp_bulk_read_complete':
/usr/src/sys/dev/usb/misc/udbp.c:496: undefined reference to `ng_package_data'
/usr/src/sys/dev/usb/misc/udbp.c:496: undefined reference to `ng_address_hook'
/usr/src/sys/dev/usb/misc/udbp.c:496: undefined reference to `ng_snd_item'
udbp.o: In function `ng_udbp_rmnode':
/usr/src/sys/dev/usb/misc/udbp.c:755: undefined reference to `ng_unref_node'
/usr/src/sys/dev/usb/misc/udbp.c:761: undefined reference to `ng_make_node_common'
/usr/src/sys/dev/usb/misc/udbp.c:768: undefined reference to `ng_name_node'
/usr/src/sys/dev/usb/misc/udbp.c:771: undefined reference to `ng_unref_node'
udbp.o: In function `ng_udbp_rcvdata':
/usr/src/sys/dev/usb/misc/udbp.c:706: undefined reference to `ng_free_item'
/usr/src/sys/dev/usb/misc/udbp.c:710: undefined reference to `ng_free_item'
udbp.o: In function `ng_udbp_rcvmsg':
/usr/src/sys/dev/usb/misc/udbp.c:688: undefined reference to `ng_free_item'
/usr/src/sys/dev/usb/misc/udbp.c:689: undefined reference to `M_NETGRAPH_MSG'
/usr/src/sys/dev/usb/misc/udbp.c:657: undefined reference to `M_NETGRAPH_MSG'
/usr/src/sys/dev/usb/misc/udbp.c:688: undefined reference to `ng_address_ID'
/usr/src/sys/dev/usb/misc/udbp.c:688: undefined reference to `ng_snd_item'
udbp.o: In function `udbp_modload':
/usr/src/sys/dev/usb/misc/udbp.c:281: undefined reference to `ng_rmtype'
udbp.o:(.rodata+0x1d0): undefined reference to `ng_parse_int32_type'
udbp.o:(.rodata+0x200): undefined reference to `ng_parse_struct_type'
udbp.o:(.rodata+0x248): undefined reference to `ng_parse_int32_type'
udbp.o:(.rodata+0x260): undefined reference to `ng_parse_int32_type'
*** [kernel.debug] Error code 1

Stop in /usr/obj/usr/src/sys/MYKERNEL.
*** [buildkernel] Error code 1

Stop in /usr/src.
*** [buildkernel] Error code 1

Stop in /usr/src.

Is this option really necessary? If yes, why does it fail to build?
 
Enabling [cmd=""]device udbp[/cmd] was a guess. In my opinion it's not the kernel, but the configuration of your Bluetooth device, that needs fixing.

Look what I found:
http://lists.freebsd.org/pipermail/freebsd-wireless/2012-December/002695.html,
http://freebsd.1045724.n5.nabble.com/problem-with-bluetooth-dongle-td4058134.html

Like the second link suggested, try to find your device not as the /dev/ubt0, but try if it has a node in the netgraph(4) with # ngctl list. So, if the device node is there, I don't really know where to go from there. See ngctl(8), or nghook(8). With these two you should be able to make some sort of "physical" entry in the /dev, I hope.

EDIT: I would try to do that with nghook(8).
 
Reading this and all you send:
In this how-to, I am using ubt0 as the name of your bluetooth device. Change that part if it something else (ubt1 for example). I am also using 00:0d:93:1b:89:75 as the device address. Change that to your own device(s). Note: I have only tested this with FreeBSD 7.0-stable.

you need to have the driver for the bluetooth hardware loaded. In my case, it is a usb-based bluetooth adapter, so I need to load the ng_ubt driver. Putting ng_ubt_load="YES" in /boot/loader.conf fixes that.
Use hccontrol -n ubt0hci inquiry to list all the devices available
Then you can use hccontrol -n ubt0hci remote_name_request 00:0d:93:1b:89:75 to get the name of any found devices. Use the actual device address, not 00:0d:93:1b:89:75.
Add your keyboard device to /etc/bluetooth/hcsecd.conf. Use one of the existing device entroes as an example. Please remember the PIN, you will need it when pairing the device.
Add the output of bthidcontrol -a 00:0d:93:1b:89:75 Query to /etc/buetooth/bthidd.conf
Make sure that the vkbd module is loaded. If it isn't loaded, load it with kldload vkbd
Add hcsecd_enable="YES" to /etc/rc.conf, then start hcsecd with /etc/rc.d/hcsecd start
Add bthidd_enable="YES" to /etc/rc.conf, then start bthidd with /etc/rc.d/bthidd start
Turn on your keyboard (if needed), wait a couple of seconds and enter the PIN, then press enter. If it doesn't work the first time, try again.

Everywhere I'm stuck in the second step. Even with the Handbook

Code:
[ember@Unix ~]$ hccontrol inquiry
hccontrol: Could not find HCI nodes
[ember@Unix ~]$ hccontrol -n ubt0hci inquiry
hccontrol: Could not find HCI nodes
[ember@Unix ~]$ hccontrol read_node_list    
hccontrol: Could not find HCI nodes

Just refuses to get the list of the devices. In this case to see the keyboard. If I don't get the address of the keyboard I can't do the next step.
 
I just checked some specs for your keyboard, and I must say, it looks really awesome in both looks and specifications! The keyboard uses bluetooth v3, while FreeBSD ng_ubt(4)() (also in handbook) supports v1.1. I think Bluetooth v3 should be backwards compatible with v1.1, but there has to be some trick behind it.

I'm sorry I couldn't be more helpful :(. Maybe someone else will be able to help you more.

Good luck!
 
sk8harddiefast said:
According this I must patch netgraph/bluetooth/drivers/ubt/ng_ubt.c
Right? How to do that?

Do the following:
Code:
# cd /usr/src/sys/netgraph/bluetooth/drivers/ubt/
# fetch -o ng_ubt-bcm-entries.diff 'http://www.freebsd.org/cgi/query-pr.cgi?pr=174707;cat=&getpatch=1'
# patch -p0 < ng_ubt-bcm-entries.diff
# make
# make install clean
# kldload ng_ubt
 
Code:
cd /usr/src/sys/modules/netgraph/bluetooth/ubt && make && make install clean
I can't make
Code:
No target to make

Ok. ubt shown on dmesg. Thanks bro!
 
Now I am going to try the rest of the steps.

cp /etc/defaults/bluetooth.device.conf /etc/bluetooth/ubt0.conf and sudo service bluetooth start ubt0. Now just run. But now hccontrol -n ubt0hci inquiry returns
Code:
Inquiry complete. Status: No error [00]

My keyboard is open. Scans but does not find it.
 
I have added this lines to /etc/rc.conf
Code:
hcsecd_enable="YES" 
sdpd_enable="YES"

Also
Code:
device  atkbdc
is enabled in my kernel.. Returns the same result. I tried a lot and followed exactly that the handbook says. Just the commands return the wrong results.

Ok. Next step, I add in /etc/rc.conf
Code:
bthidd_enable="YES"
and I copied the configuration file, cp /usr/src/usr.sbin/bluetooth/bthidd/bthidd.conf.sample /etc/bluetooth/bthidd.conf.

And now on boot I get
Code:
May 18 18:51:52 Unix bthidd[2565]: Could not connect to 00:50:f2:e3:fb:e1. Host is down (64)
May 18 18:52:02 Unix bthidd[2565]: Could not connect to 00:50:f2:e5:68:84. Host is down (64)
kbd3 at vkbd1
May 18 18:52:22 Unix bthidd[2565]: Could not connect to 00:50:f2:e3:fb:e1. Host is down (64)
What?
 
Show both outputs # service bluetooth start ubt0 and % hccontrol -n ubt0hci inquiry

*Note that your keyboard should be turned ON.
 
Back
Top