yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] GregórioAxiaMagno:
So you buy a bluetooth mouse but your ginger won't connect it?

Or you have an bluetooth keyboard and can't write at your ice cream?

I made two apps to help users with bluetooth HID devices. They are quite simple apps, and can be very helpful.

You will need:

* root

* busybox

* the xbin folder

* Android 2.1 or higher

=============================

MyBluCon:

It is an app inspirated by Bluetooth Keyboard Easy Connect (thanks Mike! - Mike's app: here). It have the same function to connect bluetooth devices, but not only HID devices, and isn't a service, is like an extension. You pair the device, and if the device don't connect, you open MyBluCon and select the device to connect and tap connect. Simple!

0 - Turn on Bluetooth on your Android;

1 - Pair your device with your Android;

2 - Open the application MyBluCon;

3 - If your Android does not have the necessary system files, the app will install, just wait - is needed allow superuser (aka root) and have Busybox installed;

4 - Your device once paired are listed on the screen, see its name and its index ([1], for example);

5 - In the edit box, type the index number of the device you want to connect (1, for example);

6 - Click "Connect my device";

7 - Wait and done!;

8 - When you are finished using the device you can disconnect it from the app, for some button on the device itself or simply turn off Bluetooth.

OBS.: On your system, even with the device connected you will see "paired but not connected", because this app don't update the status on labels.

=============================

MyBluIME:

It is an app used to patch the Android issue what, even connected, the bluetooth keyboard don't writes.... So this app bring to you an solution to use your bluetooth keyboard connected at the Android, the keyboard don't get connected at the app like the market apps, so it don't lost connection (I'm assuming what you won't run away from the device). Is just install, and set as your IME.

0 - Turn on Bluetooth on your Android;

1 - Pair your keyboard with your Android and connect it;

2 - Open the menu and go to input options, enable MyBluIME and select to use;

3 - If your Android does not have the necessary system files, the app will install, just wait - is needed allow superuser (aka root) and have Busybox installed;

4 - Try to write at an notepad.

=============================

Use it by your own risk. But is safe. Make your back up, just to ensure..

I hope you enjoy.

If won't work, copy the bluetooth.zip content into your xbin folder, and give permissions to execute the binaries.

Ensure that you have busybox and root.

This was tested at ST15i GB and ICS rooted and with busybox, using a BT mouse from Multilaser and a generic, Apple like, keyboard from Clone.

PS: The bluetooth.zip content isn't by me, is just an collection of recompiled tools, to manage bluetooth stack for linux, what work at android.

_________________________________
[Android Apps and Games] GregórioAxiaMagno:
:: Updates ::

26/08/2012 - Trying to fix "activity not found" issue from MyBluIME - thanks jsmith07611

28/08/2012 - Added short video about MyBluIME

29/09/2012 - Publishing source code

:: Know issues ::

- MyBluIME : Bluetooth keyboard have a delay when using bluetooth headphones

- MyBluIME : Bluetooth mouse can write when moved (hahaha)

:: Compatible mobiles / devices ::

Xperia Mini with GB or ICS / Clone keyboard, Multilaser mouse - tested by me

HP Touchpad with CM9 Nightlies - tested by graffix31

Motorola Flipout with Eclair / ThinkOutside keyboard - tested by jsmith07611

Touchpad from Amazon with CM9 / Apple keyboard - tested by YzRacer

CM9 Touchpad / Generic iPad BT keyboard - tested by Big Smooth

:: FAQ ::

*todo*
[Android Apps and Games] serajr:
That´s my friend !!!!

Amazing work... as allways !! Keep your outstanding work on... :good:
[Android Apps and Games] GregórioAxiaMagno:
Hahaha thanks bro. I must express my grateful for this community with something useful!

I envy you and the kernel developers :cool:, the hackers developers :cowboy:, and the android developers :victory:.

But this is just a beta for now hahaha :cyclops:.
[Android Apps and Games] GregórioAxiaMagno:
Feel free to leave a feed back, I see the 'thanks', what is rewarding, but I need to know what scenario it works or not. This app isn't at market yet, so you can tell me if work or not here.

EDIT:

LOL I'm a forever alone developer hahahahaha
[Android Apps and Games] GregórioAxiaMagno:
jsmith07611

Thanks buddy!! Glad to hear that. Well if the keyboard writes, you don't need the MyBluIME, but download again and install MyBluIME to see if happens again. If the problen don't get solved, would be helpful send me logs from the logcat, using this https://play.google.com/store/apps/details?id=org.jtb.alogcat&hl=en.

About MyBluCon, this app only deal with the connection, once the device paired at your system.

I mean, even at ICS with support for my bluetooth mouse I have this same behavior. Our bluetooth devices (such keyboards or mouses) are paired, but the device need to be at discovery mode next time, while we triggers the connection by our system, when we turn the device on and wish connect it again. Is how actually the Android system connect with HID devices, once paired, for correct use, you need to put your device (the keyb in this case) in discovery mode and trigger the conection.

The bluetooth connection can be reset because, in case of a keyboard, you maybe use an PIN code to safe conection, so the next time you turn on your keyb this code can be reseted and Android disconnect and reset the conection to you be able to pair again with a new code. In ICS with my bluetooth keyboard this happens also.

Just to sample, I only use MyBluIME because the ICS can handle the connections even with these annoying behaviors.

You can find some tips in the peripheral manual.

BTW you always can send me logs. Thanks again!
[Android Apps and Games] GregórioAxiaMagno:
For app logs and for contact or more for people at XDA and outside, I offer this e-mail gregorioaxiamagno@gmail.com.
[Android Apps and Games] rm.import:
problem getting keyboard linked to lg optimus 2x

Hi man love your work but im having problems with getting a bluetooth keyboard to work on my lg optimus 2x, i have done all the suggested above options but not having any luck, says the myblucon has been granted super user priviledges and i can see the keyboard and the mac address listed however when i try to connect to it, it gives the message of "device busy, off or out of range." and that is where i am stuck, i even tried with the mybluime but no luck, Any suggestions? i am running 2.3 version and rooted the phone.
[Android Apps and Games] GregórioAxiaMagno:
Thanks man!

Well, lets investigate! Try reboot the phone and turn off the keyboard, now turn on your bluetooth and with your keyboard already paired, turn on your kb, the state at the system must be the "paired but not connected", try to connect with myblucon, if the message "device busy, off or out of range" happens again, try to hit once the button about connection at your kb (I think any bluetooth device have a button to connect) and connect with myblucon again, if even this don't work, hit and hold for 5 seconds or more the button of connect at your keyboard and try to connect again with myblucon... so if you read until here and your keyboard don't get connected, send me the log of the logcat to my e-mail and take a look in the manual of the keyboard maybe you can find some tip.

I will use the log information only for fix the app, and I won't use for another purpose. I need the logcat because I need see the entire system behavior about bluetooth.

Keep tuned :fingers-crossed:
[Android Apps and Games] rm.import:
any ideas

Ok so i did further testing with another phone and seems like my phone is the issue, doesnt matter what bluetooth keyboard i connect (tested 3 of them) they all sit on paired but not connected. my bluetooth headset works fine though on the phone, i am starting to think that its my actual phone that might be having a problem, as i tested the same bluetooth keyboard on a motorola device and it connected by the default bluetooth connection and i was away typing but my rooted lg optimus 2x 2.3 gingerbread is not working, i have been trawling through other places to see maybe i need to place files somewhere in the directory structure but have had no luck,

like this link states where the bluetooth files should be but i dont have file structure after data shows as 0 items in it. Any ideas? this is the statement someone else said but i dont have that structure.

""Deleting the content, not the files, just the content of the following files did the trick, much to my relief.

here's what you do:

(SU rights required)

edit the file:

/data/misc/bluetoothd/{some number}/names

and delete all data in it

save it

edit the file:

/data/misc/bluetoothd/(some number}/linkkeys

and delete all data in it

save it

""
[Android Apps and Games] GregórioAxiaMagno:
Yeah, I made this app to try patch this issue, because many androids, mainly old versions have this bad bluetooth support, even my phone.

So I searched about your quote, then I found THIS.

Well, I was looking here, at my phone the structure to this files are

/data/misc/bluetoothd/<A BLUETOOTH ADDRES>

and here I found the "linkkeys" and the "names" files. I will try this tip after, because I'm at my work now.

BTW, this is the first time I read this tip, so I don't have ideas xD, and my "names" file is empty also.

And even the Xperia P, for example, have the same issue of the bluetooth connection...

Is strange that you don't have subfolders in data folder.... maybe your explorer can't show?

So let's investigate, me gusta :silly:. Thanks for the reply.
[Android Apps and Games] rm.import:
this is what i see using a root explorer

Ideally if i could if i can get a copy of the bluetooth files id just copy them into the specific locations.

do you have an email i can email my screenshots to? or should i just load them online by the image shack or something?
[Android Apps and Games] GregórioAxiaMagno:
Fell free to use the e-mail to send screenshots. I will send my files to you try also.

BTW you can post imagens here without use services like image shack or something.
[Android Apps and Games] rm.import:
Pictures

Here is the screenshots of the Root Explorer showing nothing under my data folder, so there must be a place where bluetooth keeps its information, I have searched for those files you stated like names and linkkeys and they dont exist :S so what i was thinking is trying to build them manually and import those files from someone elses structure into my phone to see if that resolves it? what you think?:o
[Android Apps and Games] GregórioAxiaMagno:
I'm starting to thinking what you have that structure, but aren't listed because de folder name with numbers are a bluetooth address like B0:B1:C2..... and the explorer have problems with ":".

But i'm posting now my files, I have problems to copy due the fact of the ":" stuck the root explorer copy, so in the folder "00 00 00 00....." put your bluetooth address, rename to 00:00:00... via command line, after you paste under data folder.

BTW, I can see all the content of each file using the Notepad++, but my root explorer don't show the same.

The problem is the explorer, but I found something new to dig.... :silly:

EDIT: About your tip, I found some descriptions about the files... not sure if are exactly the same files, look here
[Android Apps and Games] GregórioAxiaMagno:
I've posted the source codes of the two apps, enjoy.
[Android Apps and Games] GregórioAxiaMagno:
So... more than 2k views, around 5 downloads of the source, almost 100 downloads of the apps and nobody find more issues, nor send logs, even nor complaint?

My hope is who downloaded the source, will make an better app, and who downloaded the app will send me feedbaks. I'm certainly what we all need/wish a fully functional app to improve the android bluetooth stack.

What a thing :rolleyes:
[Android Apps and Games] graffix31:
thank you so much for this. i am typing on my cm9 touchpad right now because of this. had been trying to use easy bluetooth connect but was constantly having issues with losing connection and not being able to get it back. this connected right away. i will report back any issues i run int. the only thing i am running into no is that even though i am typing it must not be recognizing any input because the screen is stilll timing out as if i am not touching it. do you think there is anything that can be done about that other than setting the screen time out later. again thanks for this.

edit- ok i am a little confused about these two apps. i was running into a situation where it would pair but would not show up as an input device and no type. so i was using bluetooth keyboard easy connect. as i said it was just not consistent. so i downloaded both of these. i did mybluecon and then blue im eveything was working fine except the screen would time out. now after a reboot i could not get the keyboard to connect. even with blue ime in use. so i disabled it and reconnected using mybluecon and i am back up and running again even though my normal android keyboard is selected and not blue ime. do i need both? if not based on my situation which one shoud i use? again thanks for these and appreciate any help you can provide.

Thanks. oh and it seems that the way i am doing things now the screen has not timed out. that is with not using blueime.

thanks
[Android Apps and Games] GregórioAxiaMagno:
Thanks buddy!

Nice dude! In your case you will only need the MyBluCon, because you can type normally just connecting the keyboard.

Since your keyboard is working without MyBluIme, take an nice IME, take a look:

SwiftKey 3 - see the free version

External Keyboard Helper Pro - see the free version

Null Keyboard

The MyBluIME is for androids what even connected, the bluetooth keyboard won't type. When the Android natively recognize an keyboard, you can type with or without IMEs, and each IME have an behavior to deal with native keyboards, such layouts, no screen keyboards, etc etc.
[Android Apps and Games] graffix31:
thanks man. yeah it does work without an ime. right now i am typing but my input is android keyboad. my biggest issue is having to reconnect all the time to get it to work. even just having the screen go to sleep for more than a few minutes and when i turn it back on i have to go back into mybluecon and connect again.. sometimes dissconnect and then reconnect is the only way. this is there is anything i can do? if not i guess i can live, just a bummer. mybluecon seems to be my best bet all by itself and the most reliable to work.

thanks again man
[Android Apps and Games] GregórioAxiaMagno:
Really appreciate your joy!

Unfortunately this behavior exists with some working devices also, like my bluetooth mouse. My xperia got mouse working but always is needed reconnect. And I use only the native support.
[Android Apps and Games] DyingSlow:
hi when i use the MyBluCon after successfully pairing my BT keyboard,i see my keyboard in option 2,i type 2 but it says device busy,off or out of range...could you please help me?and please be specific in the steps i need to do as i m really newish in all this

cheers
[Android Apps and Games] GregórioAxiaMagno:
Hi mate! Hummm... of course I can.

LOL if the steps aren't specific enough, so my app have a big problem xP, he must be "simple" at all.

When you say "more specific", I will assume you don't understand something or everything. What is your doubt about the steps?

Don't be afraid, even for old users, some bluetooth functions are boring to deal.

Can you say to me how you did my steps?

Also, you can send me a log by aLogcat (see on Play).

Do you put the bluetooth.zip content into your xbin folder?
[Android Apps and Games] DyingSlow:
cheers for your answer

what i mean by specific is I really need the step by step

but first before ICS my keyboard was working excellent with just "bluetooth keyboard easyconnect"app available in google play...but since ICs that app doesn t work,neither (sadly to say )yours.. i have an LG optimus lte (nitro in the US)

and the steps I need (i f you don t mind)is the work arround after the :"device busy,off or out of range", you talk about copying a zip somwhere

so really what i need is what to do after...for example your question "Do you put the bluetooth.zip content into your xbin folder?" is not that far from chinese to me :confused::o

but you seem to be a helpful lad so i'm going to take advantage :)

cheers again
[Android Apps and Games] GregórioAxiaMagno:
Cheers!

hehehehe ok!

The cause for this issue can be "many"

Install the aLogcat app from Play

Run my app and try to connect

After the issue occur, go to aLogcat and save the log

Then send to me

The log have the details I need to see the problem

The xbin folder is a folder under system, system/xbin, where you can put "executable" files, called binaries... this files have specifc functions for example, if you write "su" the su binary will be called and grant superuser acces, assuming you have root and the su binary at your xbin folder, what is plenty normal for any Android. But in some devices my app can't copy the files, so you will need to copy manually.

I'm a beginner like many developers were, and yes I need some help on this sometimes hehehe, and you will help with your log xP
[Android Apps and Games] swenpro:
Gregorio! I need help!!

I have an HTC Droid Incredible 2 running rooted 2.3.3 gingerbread

I have the popular ThinkOutside XTBT01 bluetooth keyboard (Dell branded)

I have installed the MyBlueCon apk

I have installed BusyBox Free, normal installation, from Google Play

I have unzipped the folder bluetooth.zip and put the folder, "bluetooth" in my /system/xbin. So /system/xbin/bluetooth/ now contains 4 files

When I launch MyBlueCon app, it says "This application needs root permissions and BusyBox!". At first I thought this meant that it did not recognize that I have root and BusyBox. But maybe it's okay.

With keyboard turned on, 2 devices show up in the list, [1] Think Outside Keyboard, [2] 1xxPlantronics (bluetooth headset)

I enter number "1" and press "Connect". First message says "MyBluCon has been granted Superuser permissions", immediately followed by another message, "Device busy, off or out of range".

What can I do?? I have tried all other apps I could find, including Mike's "Easy Connect", and none have worked.

As I stated, I currently have a folder called "bluetooth" containing 4 files placed in the xbin. I'm not sure what you meant by "give permissions to execute the binaries", so I have not done that.

Thanks!

EDIT: Just to be sure it didn't make a difference, I tried putting the 4 files directly in /system/xbin/ instead of /system/xbin/bluetooth/. Still does not work. I will send you a log via PM.
[Android Apps and Games] GregórioAxiaMagno:
Directly in /system/xbin/ is right.

Check the battery of your bluetooth device.

Remove the pair, and re-pair.

After successful paired, but not connected, put your device in discovery mode again, and try to connect again.

See if you can find any tip in the bluetooth device manual, and contact me again buddy! It seems the app are trying to connect but for some reason your bluetooth device isn't accepting. Not like a bug, but about the communication, not a problem also, just a behavior of your bluetooth keyboard.

The permissions you can see below, I'm using root explorer.
[Android Apps and Games] GregórioAxiaMagno:
Guys, to check if the binaries are working fine, install this https://play.google.com/store/apps/details?id=jackpal.androidterm and run the commands

su (allow superuser permission)

hciconfig (for example, to execute this binary, make the same for each file)

If it work, you will see the manual page or something, otherwise you will see a error.

EDIT: Any developer can help me making a flashable cwm zip and a script to test the binaries? xD
[Android Apps and Games] swenpro:
Thanks for the reply.

I used Root Browser to enable Read, Write, and Execute permissions for Owner on each of the files. My files also had the "Write" permission for "Group" checked, which I did not change. I then restarted the phone.

I have ADB so I did the following in the command prompt on my computer:

C:\>adb shell
$ su
su
# hciconfig
hciconfig
# hcidump
hcidump
HCI sniffer - Bluetooth packet analyzer ver 1.41
Can't open device: No such device
# hcitool
hcitool
hcitool - HCI Tool ver 3.36
Usage:
hcitool [options] <command> [command parameters]
Options:
--help Display help
-i dev HCI device
Commands:
dev Display local devices
inq Inquire remote devices
scan Scan for remote devices
name Get name from remote device
info Get information from remote device
spinq Start periodic inquiry
epinq Exit periodic inquiry
cmd Submit arbitrary HCI commands
con Display active connections
cc Create connection to remote device
dc Disconnect from remote device
sr Switch master/slave role
cpt Change connection packet type
rssi Display connection RSSI
lq Display link quality
tpl Display transmit power level
afh Display AFH channel map
lp Set/display link policy settings
lst Set/display link supervision timeout
auth Request authentication
enc Set connection encryption
key Change connection link key
clkoff Read clock offset
clock Read local or remote clock

For more information on the usage of each command use:
hcitool <command> --help
# hidd
hidd
Can't open HIDP control socket: Protocol not supported
#

I have no trouble getting my keyboard to be "Paired but not connected". I went to Bluetooth settings, unpaired, disabled bluetooth, reenabled bluetooth, set keyboard to discovery, scanned for devices, entered code and OK on phone, entered code and OK on keyboard, and they are again "Paired but not connected".

I open MyBluCon, enter "1" for the keyboard device, "Connect", Superuser permissions show granted, then "Device busy, off, or out of range". :(

These ThinkOutside keyboards used to work GREAT with the old Windows Mobile PDAs, but seems very few people have got them working with Android!
[Android Apps and Games] GregórioAxiaMagno:
Oh right.

Yeah at some android is really hard.

Before you try to connect, do you put the keyboard in discovery mode again? Just to confirm.
[Android Apps and Games] swenpro:
I have tried both ways. Neither worked. I have been trying various apps and setting tweaks and finally my phone starting force-closing.

I only rooted my phone for the purpose of getting this keyboard to work, and I'm sorry but I've given up on that. I need my phone to be in reliable, working condition so it is not worth the risk for me. I also learned that HTC left some parts of bluetooth out of their Gingerbread phones, which makes it seem even less likely that my Incredible 2 would start working with the ThinkOutside keyboard.

Thanks anyway for your efforts to help!
[Android Apps and Games] GregórioAxiaMagno:
I hope enhance my app until be easy to use and with high compatibility, thanks for your participation and tests!
[Android Apps and Games] YzRacer:
Thanks for the apps! I got the cheap apple keyboard case for my Touchpad from Amazon. I am running CM9 and I could get it to pair but no typing. I installed only the BlueIME and selected that for my keyboard and now it's working!
[Android Apps and Games] GregórioAxiaMagno:
Yeeeppiiii :victory:

Thanks
[Android Apps and Games] Big Smooth:
Thanks very much for your effort. I was also having an issue using a generic iPad BT keyboard with my CM9 Touchpad. I got it paired and listed as an input device with no problem but it did not show up as a keyboard choice so I couldn't type with it.

MyBluIME was the only solution that has worked for me. Really appreciate it!
[Android Apps and Games] GregórioAxiaMagno:
:highfive:

Thanks! I'm really glad to see that helped you!!

BTW, I wish someone would continue this project. I have a lack of resources to keep it (time, skills, etc.). If someone want, I will show what is the current issues of the apps.
[Android Apps and Games] TheArkive:
I wish it worked, but alas.... I had to go back to CM v7.2.0 to get my Bluetooth keyboard (HID) working.