How to disable internal Bluetooth antenna to only use external adapter

  • I'm running LibreELEC on an Amlogic S905X box with built-in Wi-Fi and Bluetooth. The Wi-Fi and Bluetooth share a chipset (rtl8723bs) and I believe they share the antenna as well. When using both Bluetooth and Wi-Fi at the same time this is causing issues (both Wi-Fi and Bluetooth connections drop to unworkable low bitrates). Also the Bluetooth connection is quite bad in general (streaming music is quite choppy), especially when you get a little farther away from the TV box. To fix this I got an external USB Bluetooth dongle which performs great. Music streams perfectly, even at longer distances.

    However this causes an issue as every Bluetooth device found is listed twice in LibreELEC as each Bluetooth controller is picking them up. As a result I have no way of identifying which one to connect with. Therefore I wish to disable the internal Bluetooth controller so that one won't pick up any Bluetooth devices. I tried disabling it with:
    hciconfig hci1 down
    (hci1 is the internal Bluetooth controller)

    This appears to be working fine, however this is only temporary. After a reboot or manually disabling and enabling the Bluetooth service the internal Bluetooth controller is up again.

    So basically I'm looking for a way to completely disable the internal Bluetooth controller (hci1) while keeping the Wi-Fi on the same chipset enabled. Is "hciconfig hci1 down" the best way to do this? And is there a way to make this permanent?

  • How about autostart.sh?

    Anyway how do you identify your internal bluetooth module in the first place? (I'm thinking to do the same thing.)

    Sent from my X900+ using Tapatalk

  • Yeah, I got a working solution via autostart.sh now:

    Code
    (
        sleep 5 # wait for the Bluetooth service to run at boot
        hciconfig hci1 down # disable the internal Bluetooth controller
    ) &


    Be sure to enable the Bluetooth service in the settings to the service runs on boot. I run it in the background because I don't want to add 5 seconds to the boot time.

    I guess this works but the downside to this approach is that disabling and enabling the Bluetooth service will cause the internal Bluetooth controller to be up again. But this can be solved by rebooting I guess.

    To identify your internal Bluetooth controller just run hciconfig and check the MAC address, then connect the external Bluetooth adapter and run hciconfig again. Then reboot your device with the external adapter connected because the order could change and hci0 and hci1 could be reversed.

    Edited once, last by jant90 (December 29, 2016 at 2:16 AM).