[THINKTANK] Enabling Mouse Cursor - Nexus One Android Development

Using hidd, a bluetooth keyboard can be connected to the nexus one, and it works quite well. How about a mouse? My bluetooth mouse connected. But all i can do is kinda of move the mouse to scroll around. So im starting this thread to try to make this happen.
Why it may be possible possible:
The folks at android x86 have made a mouse patch to enable the cursor. They are also open source.
Why it may not be possible:
Their code is probably for a built in pointer device, not bluetooth. Also, they are using android 1.6 at the moment.
hidd connect how to: http://i-miss-erin.blogspot.com/2009/09/connect-bluetooth-keyboard-in-android.html
android x86: http://www.androidx86.org/
(screenshots and source)
interesting reads:
http://groups.google.com/group/android-x86/browse_thread/thread/f8c34f6ef9b3c24d?pli=1
Oh yeah, um, why we want better mouse support? to play quake 3 of course...

Hi, I'm the developer of android-x86.
Yes, of course it is possible to apply our mouse patch to N1. It's cool!
And we already have the patch for eclair (check eclair-x86 branch).
I'll begin to work on Froyo soon.
BTW, you may take a look at the 0xdroid project.
They just implemented the Bluetooth HID profile.
(it means, you can connect bt keyboard & mouse via GUI setting)
Regards,
Chih-Wei

I've seen a mouse cursor when you select text, looks nice

Related

[Q] Can any bluetooth keyboard snyc with gtab?

Can any Bluetooth keyboard and mouse be synced with the g tablet? I was
planning on getting a Logitech or Microsoft Bluetooth keyboard and mouse
setup. Which one would work better? If both are bad, what brand do you
use on your g tablets?
Bluetooth keyboard
For whatever it worth, I have a Bluetooth Apple keyboard that was used on my old iMac. I fiddled with settings for an hour, to no avail. This stock gTablet, updated with the latest Viewsonic updates, could not "see" any signal. (I haven't tried any tablet mods yet.)
- Tom
I think from what has been posted on here, USB and BT keyboards work out of the box, but mice do not (unless you are running CM6)... the TnT-based firmwares are lacking any kind of mouse services.
Found Bluetooth keyboard that works great with G Tablet
I found it on amazon search for the following "Bluetooth HID Wireless Keyboard Mouse Control for PC, Mac, iPad, iPhone 4, PDAs" and you will find it since I can't post the link yet. It is sold and branded by CE Compass for about $38.95 shipped.
It comes with a usb bluetooth receiver you can use with Windows 7 pc's.
In order to get it working you will need to get a hold of an android application Bluetooth Keyboard Easy Connect written by a XDA forum member Mike. It works awesome but the mouse features do not work with Android.
When you boot your G Tab you set the keyboard to bluetooth discover mode and the Program Bluetooth Keyboard Easy Connect does all the heavy lifting and magically makes it work.
Viewsonic G Tablet BT keyboard experience
Short answer is yes, BT keyboards work with the GTab...but be aware that some work goes into making that work with any degree of reliability. see below
I did not make an attempt tp connect a BTKB (bluetooth keyboard) until i flashed a custom rom on my gtab, so i can not speak to whether it will see/pair/connect to a BTKB out of the box.
I am running TNT lite v4.4.0 with a Clemsyn froyo kernel, this setup runs so good it gives me chills. I am using a Motorola XOOM/ATRIX keyboard at the moment, awesome BTKB by the way.
You can use a terminal emulator and root explorer to connect your keyboard once it's in discovery mode (blinking usually), make sure you have root access. You will need hcitool, hciconfig, and hidd; get them here: bluetooth_tools.zip. I had the first two, but had to manually move hidd into /system/xbin using root explorer.
from root type: hcitool scan this will scan for any bluetooth device transmitting, and display the MAC address and name of said device. once you have that MAC addy, type: hidd --connect 00:00:00:00:00:00 replace the zeros with the MAC address you just got in the previous step. your keyboard should now be connected.
unfortunately your keyboard isnt permanently connected. When you power down the device, turn off the BT, or if it glitches up; you would have to do all that again. as I am a energy efficient type, I don't like this. So for me, the answer was to install bluetooth keyboard easyconnect and bluez IME from the android market, and when I power on my G Tablet, i go open the bluetooth keyboard easyconnect app, and BOOM, I have a connected bluetooth keyboard, yay
flexing your commandlinefu can be gratifying, but alot of times there is a much simpler solution just a few searches away.
I have this same problem - I can connect from Terminal but it's tedious and every few hours or so I have to reconnect.
I installed both of these apps but they arent seeming to help - what options are you using in Bluez IME? i.e. which device driver? I have the same XOOM keyboard.
Just tried the new Logitech Tablet Keyboard (for Android 3.0, according to the box), and it paired with my CM7 rom on the G-tablet.
I haven't tried other roms so I don't know if it is this simple, but I've tried turning everything off and on again to make sure it is permanently connected- even a soft reset, still turn on BT, turn on KB, wait about 10 seconds, and its connected. Awesomesauce.
Only thing that irks me is that the function keys don't do what they say ("home" and "search" are actually "menu", and "menu" key seems to do nothing). But as a KB, this is pretty perfect.
KnightCrusader said:
I think from what has been posted on here, USB and BT keyboards work out of the box, but mice do not (unless you are running CM6)... the TnT-based firmwares are lacking any kind of mouse services.
Click to expand...
Click to collapse
Actually, not all TnT based firmware has problems. On stock TnT .4349, I've used both wired & wireless usb mice & keyboards. (wired Logitech & Dell) and a wireless USB keyboard by Gyration
Motorola Full Size Wireless Keyboard with BT works with GtabComb3.2 right out of the box. Function keys e.g. volume keys, email work as described. Navigation arrow keys function almost like a mouse.
miguelblaze23 said:
Short answer is yes, BT keyboards work with the GTab...but be aware that some work goes into making that work with any degree of reliability. see below
I did not make an attempt tp connect a BTKB (bluetooth keyboard) until i flashed a custom rom on my gtab, so i can not speak to whether it will see/pair/connect to a BTKB out of the box.
I am running TNT lite v4.4.0 with a Clemsyn froyo kernel, this setup runs so good it gives me chills. I am using a Motorola XOOM/ATRIX keyboard at the moment, awesome BTKB by the way.
You can use a terminal emulator and root explorer to connect your keyboard once it's in discovery mode (blinking usually), make sure you have root access. You will need hcitool, hciconfig, and hidd; get them here: bluetooth_tools.zip. I had the first two, but had to manually move hidd into /system/xbin using root explorer.
from root type: hcitool scan this will scan for any bluetooth device transmitting, and display the MAC address and name of said device. once you have that MAC addy, type: hidd --connect 00:00:00:00:00:00 replace the zeros with the MAC address you just got in the previous step. your keyboard should now be connected.
unfortunately your keyboard isnt permanently connected. When you power down the device, turn off the BT, or if it glitches up; you would have to do all that again. as I am a energy efficient type, I don't like this. So for me, the answer was to install bluetooth keyboard easyconnect and bluez IME from the android market, and when I power on my G Tablet, i go open the bluetooth keyboard easyconnect app, and BOOM, I have a connected bluetooth keyboard, yay
flexing your commandlinefu can be gratifying, but alot of times there is a much simpler solution just a few searches away.
Click to expand...
Click to collapse
I added the hidd --connect command to a gscript (available in the market) script and can run it with one tap. If you get the pro versionof gscript you can put a shortcut on the desktop.

Bluetooth Keyboard and Mouse

Greetings everyone,
I have been able to hook up a Bluetooth Keyboard and Mouse to my EVO 3D.
The keyboard works great. I have been able to type perfectly in my applications as well as configure the keyboard to work in my emulators.
The mouse I am having an issue with the "right" mouse button not working as the "go back" function in Android. Has anyone else had this issue? According to all the research I have done this is supposed to work.
I have also noticed in the CyanogenMod 6.X ROM videos on Youtube, that the people using a mouse also get a mouse cursor on their screens as well as being able to right click to "go back" and then using their middle mouse button as a "home" function in android. I did a search through 16 pages of posts on this and could not find an answer. Maybe someone reading this who is smarter than I am can shed some light on the issue.
This is what I am currently using.
Mouse: Microsoft Bluetooth Notebook Mouse 5000
Keyboard: Logitech MX5500 Keyboard.
If anyone else is using a mouse and is not having issues could you tell me the brand/model please? Maybe it is just an issue with this Microsoft Mouse.
Well it looks like the fancy mouse support with a cursor and button functionality was something that was included in CyanogenMod 6.X then removed on CyanogenMod 7.
They then added a patch for version 7. But now apparently it is being included in his latest CyanogenMod.
Regardless, it appears you need root access
**taps desk until HTC removed encryption from bootloader**
Yeah, but on the bright side, this is the first time I've seen HTC add in HID support for BT keyboards!!!!!!
HUGE gain!

Sixaxis controller doesn't quite work!

Hello!
I recently bought a playstation 3 controller to use with my PC and emulators on my Tablet. I discovered that without root i wasn't able to fully utilize the controller on my tablet.
I got to work and rooted my tablet, bought sixaxis controller and set it up. I am now able to connect with the app and bind keys in the emulator with the app. However when i exit the key-binding menu and begin to play a game the emulator suddenly doesn't recognize any of my button presses made with the app.
I made a touch profile so that i could play but i really want to be able to play without this touch profile.
I've googled with no results for days and i now ask you, what do you think is wrong? And how can i fix it?
Which emulators are you using this with? With some of them you have to set up the bindings in the emulator app.
If you bought a cheap ps3 controller on ebay it will not work. If you buy a legit PS3 controller it will work. Common problem, aftermarket controllers have a slightly different bluetooth profile that its kind of goofy...
If you have a legit controller then it must be other settings!
Lets start from the beginning.
FIRST TIME! If its your first time pairing the controller to the tablet you need to get a USB cable and plug it into the dock.
Start up the app
press the "pair controller" button. This tells the controller which address to connect to. If you dont do this then the controller is looking for a PS3 which your tablet obviously is not.
If it is NOT your first time, or you have used the PC utility to manually change the bluetooth address on the controller
Start up the app
Press Start
Turn on the controller
Remember, you must change the IME (input) from whatever keyboard you have to sixaxis.
Once you see the message in the window say you are paired press the up down left right buttons on the ps3 controller, you SHOULD see things happen on the screen. If not you did something wrong.
If you want to use touch profiles select it from the box
If the above does not work check with the PC utility that your controller is trying to pair to the correct bluetooth address. Note sometimes the sequence is reversed - 12:23:34:45:56:67 can sometimes be 67:56:45:34:32:12. Different applications on the PC work differently.
Make sure you are using the latest LEGIT copy. If you are pirating this software it likely wont work. Check on the market you are updated to the latest version.
If all else fails, contact the developer or check the developers website. I know it works with the prime im running it on mine, works great!
Good luck!
EDIT
Re-reading OP i'd say it sounds like you forgot to change the IME. Maybe check that first
pileot said:
If you bought a cheap ps3 controller on ebay it will not work. If you buy a legit PS3 controller it will work. Common problem, aftermarket controllers have a slightly different bluetooth profile that its kind of goofy...
If you have a legit controller then it must be other settings!
Lets start from the beginning.
FIRST TIME! If its your first time pairing the controller to the tablet you need to get a USB cable and plug it into the dock.
Start up the app
press the "pair controller" button. This tells the controller which address to connect to. If you dont do this then the controller is looking for a PS3 which your tablet obviously is not.
If it is NOT your first time, or you have used the PC utility to manually change the bluetooth address on the controller
Start up the app
Press Start
Turn on the controller
Remember, you must change the IME (input) from whatever keyboard you have to sixaxis.
Once you see the message in the window say you are paired press the up down left right buttons on the ps3 controller, you SHOULD see things happen on the screen. If not you did something wrong.
If you want to use touch profiles select it from the box
If the above does not work check with the PC utility that your controller is trying to pair to the correct bluetooth address. Note sometimes the sequence is reversed - 12:23:34:45:56:67 can sometimes be 67:56:45:34:32:12. Different applications on the PC work differently.
Make sure you are using the latest LEGIT copy. If you are pirating this software it likely wont work. Check on the market you are updated to the latest version.
If all else fails, contact the developer or check the developers website. I know it works with the prime im running it on mine, works great!
Good luck!
EDIT
Re-reading OP i'd say it sounds like you forgot to change the IME. Maybe check that first
Click to expand...
Click to collapse
It's a real controller and i did change the IME.
I am primarily using the N64 emulator. When i map the keys without sexaxis controller installed most of the keys are named <unknow>. When i start sixaxis controller i get "DPAD_START" or something similar when i map the keys. (after enabeling the IME).
So the connecting and mapping goes perfect. But somehow when i exit the settings and start to play it wont detect the keys anymore.
It's quite late now, i will test everything again tomorrow to make sure the problem is still there. But i truly don't know what to do.
I don't know about the emulator you're using, but in NESoid, and SNESoid etc to use sixaxis with it, theres an option in menu>settings>Other settings>"Use Input Method" Enable special input device eg bluetooth gamepad - This needs checked for the controller to work see if this is enabled on yours
NeoMagus said:
I don't know about the emulator you're using, but in NESoid, and SNESoid etc to use sixaxis with it, theres an option in menu>settings>Other settings>"Use Input Method" Enable special input device eg bluetooth gamepad - This needs checked for the controller to work see if this is enabled on yours
Click to expand...
Click to collapse
THANK YOU!
In "other settings" i just had to click that. ****ing awesome m8 Thanks
No prob man I figured thats what it might be frustrated the hell out of me too
Sent from my SCH-I535 using XDA
Ya its kind of annoying because with sixaxis you can have it set for controller input, emulate keyboard, or sort of a hybrid (like the experia play does with its keys), different apps deal with these things differently, its just a matter of finding a method that works best for the app your using.
Glad to hear you got it working!
Thank you
I only rooted to use the controller, I was getting frustrated
Sent from my GT-I9300 using xda premium

/dev/uinput Mouse/TouchScreen Controls

I am working on a native library that creates 2 virtual input devices with /dev/uinput. 1 is a keyboard and the other is mouse. I have the keyboard working perfectly, but I am having a hard time with the mouse.
The library is a part of a remote control application I am working on that has a firewall punch through (for devices like android sticks or Google TV's that sit behind a firewall so you don't have to do any port forwarding).
I have the mouse clicking working just fine, but I am struggling setting the mouse pointers position. I can't get the mouse to go to where I want it.
My mouse creation and control code can be found here:
pastebin.com/ifNYF5BC
I am not sure what I am doing wrong. I have read some people saying it's not possible while other similar apps I have seen are doing what I want (in appearance at least).

[Q] how to make appear android cursor mouse?

Hi all
I am asking how to make appear android mouse cursor without connect a Bluetooth mouse so I think it's like make a android service that emulate a Bluetooth mouse (HID Bluetooth mouse in android ) in order to show the android pointer.
secondly after succeeded in showing the android mouse cursor I need to control that pointer and move it using like motionEvent for instance make click event move to specific x,y position, etc
I got an idea using HID but actually I am not sure if it can be programmed or its impossible.
Can anyone please to help me in this​

Categories

Resources