Problem with ported ROM and bluetooth keyboard - Android General

Hi.
I've successfully ported a Marshmallow rom to an old tablet that was running Kitkat.
Almost everything works ok, but I can't pair a bluetooth keyboard I need to use.
The tablet can pair with other android devices, and can send and receive files.
Also, the keyboard works with any other device and with the tablet doing a downgrade.
When I try to connect the keyboard to the ported tablet it's detected and shows the pin alert, I type the pin on the keyboard and then nothing else happens.
I've dumped the bluetooth logs and I've seen that, in the ported tablet, the log stopped when waiting for the pin. In any other device the log continues showing the complete connection.
I've tried to replace any bluetooth library form stock to ported rom, individually and by sets, and can't get it better (ever worst)
So please, can anyone help me? Where should I look for making it work?
Thanks and best regards.
PS: I've attached the HCI log files: the one named huawei is for the well pairing device, and the other is the problematic pairing with the ported tablet.

Related

HID Bluetooth Device FIX for 2.3.5 and 2.3.6!!

NOTE TO MODERATORS: I have discovered a workaround solution to a bug that plagues many android devices running 2.3.5 and 2.3.6, however I cannot post in the development forum. If this thread is moved to the development forum please unlock my ability to post in that forum.
Like many of you I was extremely excited to learn that android now supports HID devices and immediately rushed out to purchase a HID-BT Keyboard. Getting home, I fired up the phone and keyboard, entered the 6 digit code to pair them and saw the device connecting and disconnecting in an infinite loop. I was crushed and disappointed.
What went wrong? As stated above this is merely a workaround. But the problem lies somewhere between the kernel and broadcom chipset. This fix will reset your bluetooth pairings. It has been tested on my Samsung Galaxy SII I727 but it should work with any other device.
-----------------------
The Fix (Workaround)
-----------------------
While this works for me it is not guaranteed to work for you, and while it is unlikely to brick your phone, you could be left with non-working bluetooth. So please make sure to backup all files, especially /system/bin/btld This tutorial assumes a certain level of knowledge about android, if this does not make sense to you PLEASE do not try this!!
1. Make sure that your bluetooth is turned off under settings
2. Download a file manager like ES File Explorer with root capabilities
b. Optionally you can push your files over adb, but I will not cover that in this tutorial.
3. Backup /system/bin/btld to a safe location on your device.
4. Backup /data/misc/bluetoothd/XX:XX:XX:XX:XX:XX/ (where XX:XX... is the MAC of your device)
5. Delete the folder titled with your MAC under /data/misc/bluetoothd/
6. Download the zip file contained as an attachment to this thread
7. Extract btld anywhere on your device.
8. Copy btld from the zip to /system/bin/btld (you must have root access)
9. Set btld permissions to 0755
10. Restart your device.
11. Go into bluetooth settings, pair the phone with your HID device.
b. You might get a prompt to enter a keycode on device 00:00:00:00:07:00; this is a ghost device, harmless but a bit annoying, just hit ok and ignore it
12. Your phone should pair and connect with your HID device.
b. If your phone does not connect, stop here and post back on the forum.
13. Turn off bluetooth DO NOT TURN IT BACK ON UNTIL COMPLETING THE FINAL STEPS OR YOU MIGHT HAVE TO START OVER
14. Open your file explorer, go to /data/misc/bluetoothd/XX:XX.../
b. You should see a file titled hidinfo, open it with a text editor
c. Delete the CONTENTS of this file and save the file
d. Set permissions to 0444 (read only) for hidinfo
15. Restart your device
Bluetooth should be working properly with your HID device. You might continue getting a prompt to pair with a ghost device, just hit ok and ignore it.
Reserved....
Working on Samsung Galaxy i8150
Confirmed working for my mouse on Galaxy Wonder I8150. Android 2.3.5. I do however see the ghost device, but that's not a problem.
Although it seems to be working for a single device at a time, I have trouble using a mouse together with a headse. The pairing process had to be done a number of times before succeeding. It requested the pairing pin code, but sometimes requests the pin code for a "" device. (the headset is a Phillips SHB6017 and supports a2dp audio profile + headset profile)
Sometimes both devices won't connect at all, sometimes the status is connected, but it doesn't actually work.
All in all to much trouble for me. I'm reverting back. Thanks for the effort so far.
Although I have not tried pairing multiple devices, I'll try with a headset and keyboard tomorrow, you can ignore pair requests from device "". I only paired my keyboard once and it just works, although I do get requests from "" whenever I turn on bt that I ignore.
I was in a situation where hid wasn't working at all though, so the trouble is worth it for me
I'll test with two devices tomorrow
Just want to report that I have no trouble connecting with my Blueant BT and Logitech for Android KB on my I727 Samsung SII LTE. I find that once I pair the devices they connect automatically most of the time once turned on. My BT didn't pair automatically once but I just power cycled it and hit the connect button and it worked.
If anyone else has tried this fix please report your results so others can learn from it
Glad it works for you. Here are the devices I used.
My mouse is a Logitech Laser Travel Mouse (blue). The Headset is a Phillips SBH6017.
I did try to power cycle and ignore the "" requests, and I eventually could get both devices paired and connected. But the sound will not play over the headset. Reconnecting didn't help much. When I reverted back it worked instantly(headset) but the mouse (as expected because of the HID bug) doesn't work after reverting back.
thank you so mutch... i bought an A4Tech Mouse BT-630 to use it whit Samsung GSII I9100, MHL and an LG LCD TV to watch videos on Youtube when my brother is at the PC and it would paire but not connect... i was so dissapointed thinking that the mouse is not good and i just wasted my money on it. I folowed your tutorial and i can confirm that it works! Thanks againe !!! PS: english is not my native language...
I was really excited when I saw this post. But it didn't seem to work. I got to step 4. There was no file showing up with my MAC address... no files at all in that directory.
I went ahead anyway. One thing to check: I set the permissions of the btld to:
user: read, write, execute
group: read, execute
other: read, execute
Is that right? There are no numbers in the choices.
Also should the btld file go directly into /system/bin/ folder? Or should there be another folder there: /system/bin/btld/btld
SPH-D700, Samsung Epic
2.3.6, EL30
SleeperRom
zeckwoy said:
I was really excited when I saw this post. But it didn't seem to work. I got to step 4. There was no file showing up with my MAC address... no files at all in that directory.
Click to expand...
Click to collapse
If you've used bluetooth on the device even once those files should be automatically generated by the bluetooth driver. Please confirm that you are in the root directory under /data/misc/bluetoothd/ It should be a folder with your MAC and files inside, this folder needs to be generated for the fix to work.
zeckwoy said:
I went ahead anyway. One thing to check: I set the permissions of the btld to:
user: read, write, execute
group: read, execute
other: read, execute
Click to expand...
Click to collapse
Those are the right permissions for btld, btld should go under /system/bin/ directly. You should backup the old file before doing this so that you can revert if needed.
jaapsen said:
Glad it works for you. Here are the devices I used.
My mouse is a Logitech Laser Travel Mouse (blue). The Headset is a Phillips SBH6017.
I did try to power cycle and ignore the "" requests, and I eventually could get both devices paired and connected. But the sound will not play over the headset. Reconnecting didn't help much. When I reverted back it worked instantly(headset) but the mouse (as expected because of the HID bug) doesn't work after reverting back.
Click to expand...
Click to collapse
Could you describe the order that you power on your devices when they don't work, or the order that you've found has worked? I do find that sometimes my BT headset won't connect automatically but if I go under settings/bluetooth and hit to pair with it it connects successfully and works.
The fix isn't overly complicated, all you're doing is really replacing the bluetooth stack with an older version. Did you delete the contents of hidinfo under data/misc/bluetoothd/XX:XX:XX../ and set permissions to read-only?
Sorry, it doesn't work for me. I get the same message as always:
"Sorry, but HID device is not supported on this phone."
I get that when I try to pair. I have two different keyboards, and both get the same response.
The one keyboard did work when I was running ICS Cyanogen Mod (without your fix), but doesn't work when I run Sleeper Gingerbread (with your fix.)
Thanks anyway. Wish it worked!
Hello,
i have a same problem with my 2.3.6 on my Galaxy note N7000
my HID bluetooth device Also Samsung .. after upgrade to the new 2.3.6 version
my Headset cannot pair ..
please i think i need your BTFIX file .. but it seems i'm not be able to use it .. it said " CRC error " the file was corrupt ..
please i need your new file ..
Worked
Awesome, thanks! (galaxy note 2.3.6)
Did not help me on Galaxy W
This did not help me on Black Notes Hybrid 2 nor Bionic Cow 2. Interestingly - Bluetooth works great on stock ROM.
Re: Did not help me on Galaxy W
dushino said:
This did not help me on Black Notes Hybrid 2 nor Bionic Cow 2. Interestingly - Bluetooth works great on stock ROM.
Click to expand...
Click to collapse
Update from me: After some experiments I found that the problem was in kernel! (Samsung Galaxy W, Bionic COW ROM or Black Notes Hybrid 2) When I installed
stock kernel, Bluetooth started to work without modififying any configuration files or replacing a single binary.
Please note that there is a lot things what can go wrong when something does not work. It means that I am not saying kernel replacement solves it all - receipt mentioned here still might work for you.
Galaxy Exhibit
I have an Exhibit II, now called Galaxy Exhibit in its new 2.3.6 firmware. The 2.3.5 firmware actually worked well with my Logitech Android Tablet Keyboard but 2.3.6 didn't. Following the lead of this post I replaced btld with the version from the previous firmware and that worked -- once. Now that I have also made the changes to hidinfo.txt it seems to be working better -- EXCEPT that I am getting the Settings app crashing nearly every time Bluetooth is turned on or off.
Also I think the Home button on the keyboard was working that first time, but it isn't working now... and the keyboard is not listed under paired devices.
it woked for me.thank u very very much genius.
I can't overwrite btld... How do i overwrite it?
Close, but no cigar ... (SGT P1000 running 2.3.6)
tommystery said:
NOTE TO MODERATORS: I have discovered a workaround solution to a bug that plagues many android devices running 2.3.5 and 2.3.6, however I cannot post in the development forum. If this thread is moved to the development forum please unlock my ability to post in that forum.
Like many of you I was extremely excited to learn that android now supports HID devices and immediately rushed out to purchase a HID-BT Keyboard. Getting home, I fired up the phone and keyboard, entered the 6 digit code to pair them and saw the device connecting and disconnecting in an infinite loop. I was crushed and disappointed.
What went wrong? As stated above this is merely a workaround. But the problem lies somewhere between the kernel and broadcom chipset. This fix will reset your bluetooth pairings. It has been tested on my Samsung Galaxy SII I727 but it should work with any other device.
-----------------------
The Fix (Workaround)
-----------------------
While this works for me it is not guaranteed to work for you, and while it is unlikely to brick your phone, you could be left with non-working bluetooth. So please make sure to backup all files, especially /system/bin/btld This tutorial assumes a certain level of knowledge about android, if this does not make sense to you PLEASE do not try this!!
1. Make sure that your bluetooth is turned off under settings
2. Download a file manager like ES File Explorer with root capabilities
b. Optionally you can push your files over adb, but I will not cover that in this tutorial.
3. Backup /system/bin/btld to a safe location on your device.
4. Backup /data/misc/bluetoothd/XX:XX:XX:XX:XX:XX/ (where XX:XX... is the MAC of your device)
5. Delete the folder titled with your MAC under /data/misc/bluetoothd/
6. Download the zip file contained as an attachment to this thread
7. Extract btld anywhere on your device.
8. Copy btld from the zip to /system/bin/btld (you must have root access)
9. Set btld permissions to 0755
10. Restart your device.
11. Go into bluetooth settings, pair the phone with your HID device.
b. You might get a prompt to enter a keycode on device 00:00:00:00:07:00; this is a ghost device, harmless but a bit annoying, just hit ok and ignore it
12. Your phone should pair and connect with your HID device.
b. If your phone does not connect, stop here and post back on the forum.
13. Turn off bluetooth DO NOT TURN IT BACK ON UNTIL COMPLETING THE FINAL STEPS OR YOU MIGHT HAVE TO START OVER
14. Open your file explorer, go to /data/misc/bluetoothd/XX:XX.../
b. You should see a file titled hidinfo, open it with a text editor
c. Delete the CONTENTS of this file and save the file
d. Set permissions to 0444 (read only) for hidinfo
15. Restart your device
Bluetooth should be working properly with your HID device. You might continue getting a prompt to pair with a ghost device, just hit ok and ignore it.
Click to expand...
Click to collapse
Sadly, no luck on my SGT P1000 running Overcome(4.1.0) GB 2.3.6. Most of the steps work fine, but at the moment of connection the tablet reboots and I must start over. I really was hoping this workaround would work as I am very happy with my current configuration, and perfection would be being able to connect to my HID keyboard. Thanks anyway for the post! :good:
Getting same type of problem
I have a Galaxy Nexus and I CAN pair with a Dell BT mouse but I don't get a pointer. Would this fix work on my phone or is there another problem. I looked all over for a fix and I seem to be the only one with a GNex having this issue. Mouse tested and works on Thunderbolt. My Bluetooth works with BT headphones. Any help is greatly appreciated.
Samsung Galaxy Nexus
android version: 4.1.1
Base Version : FF02/FG02
Kernal Version : 3.0.42-Air_kernal_stable_G512mhz_for_JBN
AOKP version : AOKP_toro_jb-build-1
build number : JRO03H

Smart Connect is not functioning properly on THL W3 Android 4.0.4

Hi,
I bought the SmartWatch 2 (SW2) and it arrived a week ago.
I have a THL w3 device, with Android 4.0.4 on it(built in; not a custom rom) and rooted.
When it first arrived about a week ago, I tried to connect it again and again and the SW kept displaying the SW->Smart Connect screen. the Smart Connect didn't show that popup window with a link to install the SmartWatch2 app, and even when I installed in manually there was no "edit settings" row in the Smart Connect app.
I tried to connect it to my friend's Motorola Atrix (Jelly Bean, not sure which one) and it worked, and then when I tried again on my phone it seemed to work. I was able to install some applications and even though whenever I turned the SW off and on or the Bluetooth off and on I had to unpair and pair the SW in order to connect it, not to mention that 90% of the times when I paired them there was no pairing request, the phone said it's paired, the SW got stuck on the screen "SW V phone"(connected) but they weren't actually connected.
A few days later, yesterday, I noticed that what i just described only happends when the phone is completely on and ready to use, because if I rebooted my phone and then when it turned on I emiddiatly paired them, it worked and there was a pairing request and everything. but only if I paired them before all the apps were ready, which meant that there was an app that caused the pairing to fail when that app is ready.
I used "Disable Manager"(from the Play store) to disable the Smart Connect app and then I was ablt to pair the phone and the SW properly, only now because the Smart Connect app is disabled I can't use the watch...
I hope I described what happened even though English is not my strongest language...
Summury:
My phone is not fully compatible ith the SW, and the fault is Smart Connect's.
The Motorola Atrix works perfectly with the watch. Is it because of the android version?
If you have any ideas please let me know.
-Reuven
Having trouble understanding, but if the problem is your device's stock rom you could look into trying a custom AOSP rom. Might aswell get something more recent than icecream sandwich. Get on kitkat. Get cyanogenmod 11 and use Gravity box with xposed modules.
Are there any custom mods for my device?
The problem is I couldn't find any custom roms for THL W3. it's not a popular device, and even though I really want a newer version(at least Jelly Bean...) I searched a bit and I didn't find anything.
Is cyanogenmod compatible with every phone? Are you sure that's the problem?

[Q] Trouble with bluetooth input devices N8000 on official 4.4.2 update

I have applied the official 4.4.2 update to my Note 10.1 (N8000) using heimdall (as I did not have the over the air update yet). The software updated flawlessly and I do not seem to have any problems in that regards.
I am having trouble with bluetooth input devices. I have tried two keyboards (one unbranded and one Kensington) and a Penclic bluetooth pen mouse. All devices pair and are marked as connected, however the input is never accepted. In case of attaching the keyboard, it even is the case that the on screen keyboard won't pop up anymore. Also in the logcat I see that the devices are connected and recognized as input devices.
Some googling revealed that in general there are complaints about input devices with android > 4.2, however I am hoping that somebody has some idea or pointers on how to solve this (or where to look) specifically on this device.

Multiple Bluetooth devices at once?

I'm currently on a ROM based on 8.1 that doesn't appear to support multiple Bluetooth devices (Havoc ROM) For instance, I'm looking to connect my Gear S3 and car Bluetooth at the same time and it simply does not let me.
Rather than flashing back to stock to find out and being forced to redownload everything, can someone tell me if the latest release for OP6's stock ROM supports multiple devices being connected at the same time?
I know Android P will cure this, but I am curious if it can be done now.
Thank you guys! Loving this phone so far
no

I can't use a bluetooth keyboard in Galaxy Tab 3 10'

I have a bluetooth keyboard and when I connect it to my tablet it detects it but does not react, it detects that it is a keyboard but it does not come out as a writing method. I have tried in custom roms like lineage and cyanogenmod, in the official rom if it works, but I would like to use it in custom rom
try connecting it to a pc see if it works if so check the keyboard manual bcs normally there would be a pairing guide on pairing it with android/ios etc
The pc detects it, I tested it with other tablets and mobiles and it works, even with the same tablet but the original ROM

Categories

Resources