android-x86.github.io icon indicating copy to clipboard operation
android-x86.github.io copied to clipboard

Bluetooth issue

Open alan-bc opened this issue 5 years ago • 4 comments

I have just booted (from USB stick) 8.1.0 on a Panasonic FZ-G1 Toughpad.

Everything has been working wonderfully!

Everything except Bluetooth, which is half working (or maybe one quarter working).

With Bluetooth enabled, I see the Toughpad under the name Android-x86 on my desktop (Windows 7 PC with a USB Bluetooth adaptor).

But the Toughpad does not see the PC. Selecting "Pair new device", I am told "No nearby Bluetooth devices were found" even though there are 3 or 4 devices within range of the Panasonic.

When I try it the other way 'round, connecting from the Windows box to the "Android-x86 Bluetooth Phone", I am told (after 10 seconds or so) that "It took too long to add this device" and instructed to try again. Of course that fails as well.

So, I am rather at a loss.

Am I doing something wrong?

Thanks for any thoughts.

alan-bc avatar May 12 '19 03:05 alan-bc

As an additional FYI, I booted ubuntu 19.0.x and Bluetooth worked as expected ...

alan-bc avatar May 12 '19 17:05 alan-bc

Hmmm, tried the same USB stick on an original Microsoft Surface and Bluetooth worked fine. Must be something in the Panasonic ...

alan-bc avatar May 12 '19 23:05 alan-bc

I got a problem with bluetooth keep stopping on android 86 r2 9 on pc

oliverchapple avatar Feb 10 '20 23:02 oliverchapple

I have had issues in Android X-86 and BlissOS. This is what I have found to fix my specific issue after toying with different commands. You may be able to automate this process on boot following a process similar to https://android.stackexchange.com/a/6560/342111

Also note that I am on Mac and had to get a bluetooth USB adapter since MacOS does not allow you to use the built in bluetooth.

I also had to force Mac to not auto-capture my bluetooth USB dongle, but to let VirtualBox take it over. The command was sudo nvram bluetoothHostControllerSwitchBehavior=never

As to why this is needed, I don't know, but hopefully Bluetooth is more stable in future versions of Android X-86.

Command Chain (w/Sleep delays):

hciconfig && gsudo hciconfig hci0 down && sleep 10 && gsudo pm disable com.android.bluetooth && sleep 10 && gsudo pm enable com.android.bluetooth && sleep 10 && gsudo service call bluetooth_manager 6 && sleep 10 && gsudo hciconfig hci0 up

Commands to Enter and Leave Terminal:

Enter terminal: Alt + F1

Leave terminal: Alt + F7

Ordered Steps Explanation:

  • hciconfig
    • Shows the status of any bluetooth devices
  • gsudo hciconfig hci0 down
    • Puts the bluetooth receiver into an “off” mode.
    • Change hci0 to the ID of your bluetooth receiver if different
  • gsudo pm disable com.android.bluetooth
    • Stops the bluetooth Android package
  • gsudo pm enable com.android.bluetooth
    • Starts the bluetooth Android package
  • gsudo service call bluetooth_manager 6
    • Terminal call to enable bluetooth on the device. It is possible this could be done through the Android UI as well.
  • gsudo hciconfig hci0 up
    • Tells the bluetooth receiver to turn “on” and start transmissions as needed

Extra Commands:

  • gsudo service call bluetooth_manager 9
    • Disables bluetooth setting through terminal. This may be done manually as well, and this command might not be needed at all.

Notes:

  • gsudo is what the sudo command is in BlissOS. It may be the same in Android X-86 as well. gsudo may not be needed in the commands above, but I used it for good measure.

Jikodis avatar Dec 07 '21 01:12 Jikodis