# [bluetooth] hcc not listing any device



## h0m3 (Jun 6, 2019)

Hello,

I*'*m new to FreeBSD and I*'*m trying to install my bluetooth mice.

Following the FreeBSD Handbook I run `hccontrol -n ubt0hci inquiry` and got only `Inquiry complete. Status: No error [00]` but no device is listed. I*'*ve double checked and my mouse is visible on my phone.

When running `service blouetooth restart ubt0` sometimes I get `/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0` and sometimes I got no error, like a successful restart.

My `ngctl status ubt0` return `ngctl: send msg: No such file or directory`.

I*'*m running FreeBSD 12.0-RELEASE.

My `ngctl li` has:


```
There are 6 total nodes:
  Name: ngctl1549       Type: socket          ID: 00000040   Num hooks: 0
  Name: ubt0            Type: ubt             ID: 00000001   Num hooks: 0
  Name: btsock_hci_raw  Type: btsock_hci_raw  ID: 00000002   Num hooks: 0
  Name: btsock_l2c_raw  Type: btsock_l2c_raw  ID: 00000003   Num hooks: 0
  Name: btsock_l2c      Type: btsock_l2c      ID: 00000004   Num hooks: 0
  Name: btsock_sco      Type: btsock_sco      ID: 00000005   Num hooks: 0
```

and my `ngctl types` has:


```
There are 8 total types:
      Type name   Number of living nodes
      ---------   ----------------------
         socket       1
     btsock_sco       1
     btsock_l2c       1
 btsock_l2c_raw       1
 btsock_hci_raw       1
          l2cap       0
            hci       0
            ubt       1
```

I*'*ve got some errors (I guess) on my /var/log/messages:

```
Jun  6 18:38:06 r3tr0 kernel: ubt0 on uhub0
Jun  6 18:38:06 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 18:40:08 r3tr0 kernel: ubt0: detached
Jun  6 18:40:08 r3tr0 kernel: ubt0 on uhub0
Jun  6 18:40:08 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 18:47:21 r3tr0 kernel: ubt0: detached
Jun  6 18:47:21 r3tr0 kernel: ubt0 on uhub0
Jun  6 18:47:21 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 19:47:04 r3tr0 kernel: ubt0: detached
Jun  6 19:47:04 r3tr0 kernel: ubt0 on uhub0
Jun  6 19:47:04 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 19:59:10 r3tr0 kernel: ubt0: detached
Jun  6 19:59:10 r3tr0 kernel: ubt0 on uhub0
Jun  6 19:59:10 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 20:07:56 r3tr0 kernel: ubt0: detached
Jun  6 20:07:56 r3tr0 kernel: ubt0 on uhub0
Jun  6 20:07:56 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 20:10:51 r3tr0 kernel: ubt0: detached
Jun  6 20:10:51 r3tr0 kernel: ubt0 on uhub0
Jun  6 20:10:51 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 20:16:23 r3tr0 kernel: ubt0: detached
Jun  6 20:16:23 r3tr0 kernel: ubt0 on uhub0
Jun  6 20:16:23 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 20:17:56 r3tr0 kernel: ubt0: detached
Jun  6 20:17:56 r3tr0 kernel: ubt0 on uhub0
Jun  6 20:17:56 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 20:25:34 r3tr0 kernel: ubt0: detached
Jun  6 20:25:34 r3tr0 kernel: ubt0 on uhub0
Jun  6 20:25:34 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 20:49:13 r3tr0 kernel: ubt0: detached
Jun  6 20:49:13 r3tr0 kernel: ubt0 on uhub0
Jun  6 20:49:13 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 21:01:25 r3tr0 kernel: ubt0: detached
Jun  6 21:01:25 r3tr0 kernel: ubt0 on uhub0
Jun  6 21:01:25 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 21:05:58 r3tr0 kernel: ubt0: detached
Jun  6 21:05:58 r3tr0 kernel: ubt0 on uhub0
Jun  6 21:05:58 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 21:19:29 r3tr0 kernel: ubt0: detached
Jun  6 21:19:29 r3tr0 kernel: ubt0 on uhub0
Jun  6 21:19:29 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 21:28:34 r3tr0 artur[1586]: /etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
Jun  6 21:29:34 r3tr0 kernel: ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
Jun  6 21:29:35 r3tr0 artur[1624]: /etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
Jun  6 21:32:13 r3tr0 kernel: ubt0: detached
Jun  6 21:32:13 r3tr0 kernel: ubt0 on uhub0
Jun  6 21:32:13 r3tr0 kernel: ubt0: <vendor 0x0cf3 product 0xe007, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Jun  6 21:33:44 r3tr0 kernel: ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
Jun  6 21:33:45 r3tr0 root[1320]: /etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
```

I think that this is somehow related to the fact that my wifi card is not supported. For what *I'*ve read the bluetooth and wifi modules are independent (it*'*s a laptop) but *I* don*'*t know if there is any bluetooth driver for my card. My card is a Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter as from `pciconf -lv`.


----------



## h0m3 (Jun 8, 2019)

Update on the topic.

For some reason I can see my smartphone using `hccontrol -n ubt0hci inquiry` but both my bluetooth mices don't show. I have a Dell bluetooth and a Logitech G603 bluetooth. This phone can see and pair with both mouses. I've tryied some pair combinations, both mouses are on discovery mode and nothing.

Also, my /boot/loader.conf:


```
netgraph_load="YES"
ng_ubt_load="YES"
vkbd_load="YES"
snd_hda_load="YES"
cpu_microcode_load="YES"
cpu_microcode_name="/boot/firmware/intel-ucode.bin"
```

and my /etc/rc.conf

```
kld_list="/boot/modules/i915kms.ko"
clear_tmp_enable="YES"
syslogd_flags="-ss"
sendmail_enable="NONE"
hostname="r3tr0"
keymap="br.kbd"
ifconfig_re0="DHCP"
local_unbound_enable="YES"
sshd_enable="YES"
moused_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dbus_enable="YES"
hald_enable="YES"
dnsmasq_enable="YES"
libvirt_enable="YES"
sddm_enable="YES"
smartd_enable="YES"
linux_enable="YES"
hcsecd_enable="YES"
sdpd_enable="YES"
bthidd_enable="YES"
uhidd_flags="-kmohs"
uhidd_enable="YES"
```


----------

