TP-Link UB500 Bluetooth adapter - missing firmware

FreeBSD 15.1 wasn't recognizing this nano-sized TP-Link generic BT adapter.

The USB VID and PID appears in the device list of the ng_ubt_rtl.c driver. There's also a devd rule to install the firmware.
Code:
notify 100 {
        match "system"          "USB";
        match "subsystem"       "DEVICE";
        match "type"            "ATTACH";
        match "vendor"          "0x2357";
        match "product"         "0x0604";
        action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
};

I tried running the devd rule's action manually in hopes of finding an error.

/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware

I get the following error:
Code:
rtlbtfw: rtlbt_fw_read: open: /usr/local/share/rtlbt-firmware/rtl8761bu_fw.bin: No such file or directory
Uh oh. /usr/local/share suggests I'm missing a port. A quick search on freshports.net located this for Realtek chipsets (and also this for Intel chipsets and this for Broadcom chipsets).

Installed the package. Now the firmware loads. Great.

Let's see what other trouble this gets me.
 
This command ...
service bluetooth start ubt0
... returns an error:
Code:
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
Re-running the command gives me this.
Code:
/etc/rc.d/bluetooth: WARNING: Reset failed, retrying.
I've seen an open bug describing the need to re-run the command. Moving on, I check that hcsecd is also running with ...
mdo service hcsecd status
... and see that it is ...
Code:
hcsecd is running as pid 2853.
This command ...
mdo hccontrol -n ubt0hci inquiry
... gives me this result ...
Code:
Inquiry complete. Status: No error [00]
I can't tell if this is good or bad.

This command ...
ngctl ls
... shows all of my BT netgraph related devices:
Code:
There are 8 total nodes:
  Name: ngctl3338       Type: socket          ID: 00000020   Num hooks: 0
  Name: ubt0            Type: ubt             ID: 00000001   Num hooks: 1
  Name: btsock_l2c      Type: btsock_l2c      ID: 00000002   Num hooks: 1
  Name: btsock_l2c_raw  Type: btsock_l2c_raw  ID: 00000003   Num hooks: 1
  Name: btsock_hci_raw  Type: btsock_hci_raw  ID: 00000004   Num hooks: 1
  Name: btsock_sco      Type: btsock_sco      ID: 00000005   Num hooks: 0
  Name: ubt0hci         Type: hci             ID: 00000016   Num hooks: 3
  Name: ubt0l2cap       Type: l2cap           ID: 0000001a   Num hooks: 3

... and that's as far as I can get for now. Soliciting hints and suggestions.
 
Last edited:
A tiny bit of progress ...

bluetooth-config scan

... found a BT mouse. It failed to set up the mouse but this is a start.

Code:
Scanning for new Bluetooth devices (Attempt 1 of 5) ... done.
Found 1 new bluetooth device (now scanning for names):
[ 1] xx:xx:xx:xx:xx:xx  "Bluetooth Mouse XYZ" ()
 
Code:
This device provides human interface device services.
Set it up? [yes]:
syntax error in line 1
Writing HID descriptor block to /etc/bluetooth/bthidd.conf ... failed.
Not sure what's going on but the BT mouse is working. Now to make sure it survives a reboot ...
 
Back
Top