2

I am trying to get my MPOW BH519A Bluetooth adapter to work. There are similar posts, including one on this adapter. Unfortunately, I tried them all and nothing helped. I have already tested some commands like:
  • sudo apt install blueman
  • sudo make install INTERFACE=all (MPOW Linux Driver download, inside of the folder ran this command)
  • sudo mv -v ~/Downloads/rtl8761b_config /usr/lib/firmware/rtl_bt/rtl8761b_config.bin
  • snap install bluez4
  • snap install bluez
  • sudo apt install bluez bluez-obexd
  • sudo apt-get install bluez-utils libopemnobex1
  • sudo apt reinstall bluez
  • sudo blueman-manager

Im not even able to make the led run. I managed to set the control to on, but it says "no bluetooth adapter found". After several attempts with different commands, I was not even able to set the control to on.


I have the feeling that I may have duplications or simply overlook something essential since I am a complete Ubuntu beginner.

Here are a number of ouputs. Unfortunately I don't know in detail which information is helpful for you.

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

~$ dmesg | grep -i bluetooth
[ 2.308927] usb 3-2: Product: Bluetooth Radio
[ 18.340266] Bluetooth: Core ver 2.22
[ 18.340297] Bluetooth: HCI device and connection manager initialized
[ 18.340301] Bluetooth: HCI socket layer initialized
[ 18.340303] Bluetooth: L2CAP socket layer initialized
[ 18.340306] Bluetooth: SCO socket layer initialized
[ 55.439177] audit: type=1400 audit(1627551927.132:64): apparmor="DENIED" operation="create" profile="snap.bluetooth-autostart.autostart-bluetooth" pid=883 comm="hciconfig" family="bluetooth" sock_type="raw" protocol=1 requested_mask="create" denied_mask="create"

[ 65.993297] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 65.993300] Bluetooth: BNEP filters: protocol multicast
[ 65.993305] Bluetooth: BNEP socket layer initialized

~$ echo "options btusb enable_autosuspend=0" | sudo tee -a /etc/modprobe.d/btusb.conf
options btusb enable_autosuspend=0

~$ systemctl | grep -i blue
run-snapd-ns-bluetooth\x2dautostart.mnt.mount loaded active mounted /run/snapd/ns/bluetooth-autostart.mnt

snap-bluetooth\x2dautostart-10.mount loaded active mounted Mount unit for bluetooth-autostart, revision 10

bluetooth.service loaded active running Bluetooth service

● snap.bluetooth-autostart.autostart-bluetooth.service loaded failed failed Service for snap application bluetooth-autostart.autostart-bluetooth

~$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 2357:0109 TP-Link TL WN823N RTL8192EU
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 003 Device 003: ID 0bda:2550 Realtek Semiconductor Corp. Bluetooth Radio
Bus 003 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

rfkill list all
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no

I appreciate every answer.

[EDIT]

20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/uart/bluetooth_uart_driver/hci_ldisc.c:1086:22: error: assignment to ‘ssize_t (*)(struct tty_struct *, struct file *, unsigned char , size_t, void **, long unsigned int)’ {aka ‘long int ()(struct tty_struct *, struct file *, unsigned char , long unsigned int, void **, long unsigned int)’} from incompatible pointer type ‘ssize_t ()(struct tty_struct *, struct file *, unsigned char , size_t)’ {aka ‘long int ()(struct tty_struct *, struct file *, unsigned char *, long unsigned int)’} [-Werror=incompatible-pointer-types] 1086 | hci_uart_ldisc.read = hci_uart_tty_read; | ^ cc1: some warnings being treated as errors

Here the code of the hci_ldisc.c file:

/*
 * We don't provide read/write/poll interface for user space.
 */
static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file,
                 unsigned char __user * buf, size_t nr)
{
    return 0;
}

static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file,
                  const unsigned char *data, size_t count)
{
    return 0;
}

static unsigned int hci_uart_tty_poll(struct tty_struct *tty,
                      struct file *filp, poll_table * wait)
{
    return 0;
}

static int __init hci_uart_init(void)
{
    static struct tty_ldisc_ops hci_uart_ldisc;
    int err;

    BT_INFO("HCI UART driver ver %s", VERSION);

    /* Register the tty discipline */

    memset(&hci_uart_ldisc, 0, sizeof(hci_uart_ldisc));
    hci_uart_ldisc.magic = TTY_LDISC_MAGIC;
    hci_uart_ldisc.name = "n_hci";
    hci_uart_ldisc.open = hci_uart_tty_open;
    hci_uart_ldisc.close = hci_uart_tty_close;
    hci_uart_ldisc.read = hci_uart_tty_read;
    hci_uart_ldisc.write = hci_uart_tty_write;
    hci_uart_ldisc.ioctl = hci_uart_tty_ioctl;
    hci_uart_ldisc.poll = hci_uart_tty_poll;
    hci_uart_ldisc.receive_buf = hci_uart_tty_receive;
    hci_uart_ldisc.write_wakeup = hci_uart_tty_wakeup;
    hci_uart_ldisc.owner = THIS_MODULE;

[EDIT] When running "sudo make install INTERFACE=usb"

mkdir -p /lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth
Start Realtek Bluetooth USB driver installation
mkdir -p /lib/firmware
Copy rtkbt-firmware/lib/firmware/rtl*_fw to /lib/firmware
cp -a rtkbt-firmware/lib/firmware/rtl*_fw /lib/firmware
Copy rtkbt-firmware/lib/firmware/rtl*_config /lib/firmware
cp -a rtkbt-firmware/lib/firmware/rtl*_config /lib/firmware
make -C usb install
make[1]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb“ wird betreten
rmmod btusb
rmmod: ERROR: Module btusb is not currently loaded
make[1]: [Makefile:7: install] Fehler 1 (ignoriert)
mv /lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth/btusb.ko /lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth/btusb_bak
mv: Aufruf von stat für '/lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth/btusb.ko' nicht möglich: Datei oder Verzeichnis nicht gefunden
make[1]: [Makefile:8: install] Fehler 1 (ignoriert)
rmmod rtk_btusb
rmmod: ERROR: Module rtk_btusb is not currently loaded
make[1]: [Makefile:9: install] Fehler 1 (ignoriert)
make -C ./bluetooth_usb_driver
make[2]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver“ wird betreten
make -C /lib/modules/5.11.0-27-generic/build M=/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver modules
make[3]: Verzeichnis „/usr/src/linux-headers-5.11.0-27-generic“ wird betreten
make[3]: Verzeichnis „/usr/src/linux-headers-5.11.0-27-generic“ wird verlassen
make[2]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver“ wird verlassen
cp -f ./bluetooth_usb_driver/rtk_btusb.ko /lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth/rtk_btusb.ko
depmod -a 5.11.0-27-generic
make -C ./bluetooth_usb_driver clean
make[2]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver“ wird betreten
rm -rf *.o *.mod.c *.mod.o *.ko *.symvers *.order *.a
make[2]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver“ wird verlassen
echo "install rtk_btusb success!"
install rtk_btusb success!
make[1]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb“ wird verlassen

[Edit] lsusb

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 2357:0109 TP-Link TL WN823N RTL8192EU
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 003 Device 005: ID 0bda:2550 Realtek Semiconductor Corp. Bluetooth Radio
Bus 003 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[Edit] dmesg | grep -i bluetooth

[    2.334631] usb 3-2: Product: Bluetooth Radio
[   10.740679] Bluetooth: Core ver 2.22
[   10.740735] Bluetooth: HCI device and connection manager initialized
[   10.740743] Bluetooth: HCI socket layer initialized
[   10.740748] Bluetooth: L2CAP socket layer initialized
[   10.740758] Bluetooth: SCO socket layer initialized
[   10.989363] Bluetooth: HCI UART driver ver 2.3
[   10.989373] Bluetooth: HCI UART protocol H4 registered
[   10.989376] Bluetooth: HCI UART protocol BCSP registered
[   10.989416] Bluetooth: HCI UART protocol LL registered
[   10.989419] Bluetooth: HCI UART protocol ATH3K registered
[   10.989439] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   10.989480] Bluetooth: HCI UART protocol Intel registered
[   10.989537] Bluetooth: HCI UART protocol Broadcom registered
[   10.989557] Bluetooth: HCI UART protocol QCA registered
[   10.989560] Bluetooth: HCI UART protocol AG6XX registered
[   10.989581] Bluetooth: HCI UART protocol Marvell registered
[   65.224399] audit: type=1400 audit(1630557966.917:64): apparmor="DENIED" operation="create" profile="snap.bluetooth-autostart.autostart-bluetooth" pid=902 comm="hciconfig" family="bluetooth" sock_type="raw" protocol=1 requested_mask="create" denied_mask="create"
[  786.789070] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[  786.789077] Bluetooth: BNEP filters: protocol multicast
[  786.789084] Bluetooth: BNEP socket layer initialized
[ 1005.431927] usb 3-2: Product: Bluetooth Radio
1
  • Welcome to the site. Please take a look at the editing help to add more formatting to make the post easeir to read. In particular, use code block formatting for verbatim console I/O and file content
    – AdminBee
    Jul 30 at 15:40
3

I had a similar issue with the same adapter - not getting recognized. Apparently, its USB pid is missing in the rtk_misc.c in the driver source package downloaded from MPOW.

Here's the fix that worked for me:

  1. Edit the file rtk_misc.c in the folder usb/bluetooth_usb_driver that you extract from the driver package downloaded from MPOW. Mine is the package named 20201202_LINUX_BT_DRIVER
  2. Copy and paste line 311 to add with the missing pid, e.g.
    {0x2550, 0x8761, "mp_rtl8761b_fw", "rtl8761bu_fw", "rtl8761bu_config", NULL, 0}, /* MPOW BH519AB RTL8761BU only */
    
  3. Search for the line reading (originally line 939):
    patch->chip_type = RTL8761BU;
    
  4. add the highlighted case statement above it,
     case 0x8771:  
     case 0xa725:  
     case 0xa72A:  
     case 0x2550:
     
  5. save and repeat the make install to build and install the driver and try the adapter
9
  • Thank you a lot for your help :D Is the pid you set here correct? If not, how can i know which i need?
    – Rakowu
    Aug 19 at 10:45
  • I posted above the error it gives me when running the make command :)
    – Rakowu
    Aug 19 at 10:52
  • Ok after testing a lot i guess it does not work due to missing btusb module : modprobe: FATAL: Module btusb not found in directory /lib/modules/5.11.0-27-generic
    – Rakowu
    Aug 19 at 13:04
  • From your lsusb output "Bus 003 Device 003: ID 0bda:2550 Realtek Semiconductor Corp. Bluetooth Radio" it appears you have a USB dongle so try to build only the USB driver using: "sudo make install INTERFACE=usb"
    – user487538
    Aug 20 at 22:15
  • Hi, thanks for your reply :) I edit my answer. Still not turning on the device :S
    – Rakowu
    Aug 25 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.