maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   N900 Working Bluetooth Mouse (https://talk.maemo.org/showthread.php?t=57427)

azerty1 2010-06-29 20:33

N900 Working Bluetooth Mouse
 
1 Attachment(s)
I had been hoping to have this working properly (in an acceptable form) for a while, I know that once paired you can actually "move" the mouse arround if done very very slowly; supposedly, doing xorg.conf modifications would take care of the sensitivity problem but even though I tried I couldn't make it be any less sensitive, at the same time you can't click at anything, seemingly only the wheel generates click events. So since it hasn't worked for me I tried a different approach and here it is..., it's not 100% perfect, but still, much better than the joke that it was.

DISCLAIMER: THIS SOLUTION COMES AS IS, IT COMES WITH NO WARRANTIES WHATSOEVER EXPRESSED NOR IMPLIED, TRY IT AT YOUR OWN RISK, ALTERING YOUR DEVICE WILL DEFINETLY GIVE YOU SOME GRIEF. EVEN THOUGH I HAVEN'T EXPERIENCED PROBLEMS WITH THIS PARTICULAR SOLUTION, I HAVE HAD TO REFLASH MY DEVICES SEVERAL TIMES AFTER GETTING, FOR INSTANCE, REBOOT CYCLES WHILE TRYING CUSTOM KERNELS. YOU COULD END UP LOOSING ALL YOUR CUSTOMIZATIONS AND APPS OR WORSE, SO BE SURE TO BACKUP FIRST AND KEEP IN MIND THAT THERE'S DATA LOSS OR WHO KNOWS WHAT OTHER RISKS INVOLVED.

Requirements:
- WARNING! WARNING!: Make sure you have your Internet Connection set to automatically connect to WiFi and also make sure that you have installed and configured SSH server and also make sure that you can connect to your device using an SSH client prior to trying this. In the event of something going wrong (like loosing both touch and keyboard) this is the only known way to rescue your device without having to re-flash your rootfs. If you're doing this procedure manually make sure that you're doing this as 'root' and double check that the new 'evdev_drv.so' looks good inside '/usr/lib/xorg/modules/input' before rebooting.
- As pointed in post #29 (thanks jackspost!) it is best to unpack the tarball inside your /home/user directory in order to be able to execute 'xsetroot' and the other scripts; if unpacked inside MyDocs, the default mask is missing execution permissions (and you can't change them using chmod) so you would be getting "permission denied" errors.
- Root (Install rootsh from App. manager)
- Paired Bluetooth Mouse (You'll have to enable the HID profile, refer to http://wiki.maemo.org/Fremantle_Unsu...tooth_profiles)
- Tested with PR 1.2 stock kernel, no idea how it would behave under a different configuration

Attached you will find a new evdev_drv.so that should take care of properly handling your bluetooth mouse (hopefully most mice), you need to have root (rootsh) in order to replace the original file. You can use the provided "install.sh" script or here's how to do it manually (assuming you unpacked everything in /home/user/):

Code:

sudo gainroot
cd /usr/lib/xorg/modules/input
mv evdev_drv.so evdev_drv.so.orig
cp /home/user/N900-BluetoothMouseSupport/evdev_drv.so .

The following needs to be done in order to have mouse pointer visible in some places, namely text boxes, and it might be a requirement to have full cursor visibility (described later).

Code:

cd /usr/share/icons/default/cursors
mv transp trans.orig
cp /home/user/N900-BluetoothMouseSupport/arrow transp

Now reboot. Once your mouse connects to your device (move, click, your Bluetooth icon should turn blue) you should have a more consistent behavior, you won't see a pointer just yet, but trying moving your mouse all the way up and left, then try left clicking, you should get the dashboard or app. menu. Now, do you want to see the cursor? Open notes, it should be visible in the white text area, clicking doesn't work as expected here, this still needs some fixin'. Do you know where it works very nicely?, Easy Debian (thanks for your hard work here qole!), it's a nice experience I tell you, left-click, middle-click, right-click all of them work as they should, drag and drop works just fine too..., connect a bluetooth keyboard, plug to your TV and you've got yourself a truly portable Linux computer!

And last, but not least, Full Mouse Pointer Visibility.

Code:

apt-get install libxmuu1
cd /home/user/N900-BluetoothMouseSupport
./xsetroot -cursor_name arrow

You should now see the arrow anywhere you touch or anywhere you move your mouse pointer to ;-) Having this is just great, you can go in and out of your regular Maemo applications, for instance App. Manager, browse the list, just drag with left-click, or use the wheel..., click, click, and done, click dashboard, go to media player, start some song or video while your applications are being installed, click dashboard, click conversations, have a little chat..., etc. Very cool..., the only place where things just doesn't work is the Web Browser, it's definitely handling thigns differently here, click and right click work OK in the address bar, but they don't in the actual browser area, and it should be just a trick because I have had clicking working in there before I'm just not sure how, perhaps someone might find out.

When you'd like to hide the pointer just do this:

Code:

cd /home/user/N900-BluetoothMouseSupport
./xsetroot

NOTE: You can also use the provided 'showmouse'/'hidemouse'.

Known Issues:

- Sometimes (especially after the screen goes to sleep) the pointer is stuck in the left-top corner and it won't move from there, just click once and it'll move normally again.
- Scroll wheel doesn't work in the app. menu, hold left click and drag, it's apparently just not supported here.
- Under some circumstances while moving the pointer it might lag to catch up (i.e. keep doing circles at medium speed). Do sequential (not constant) moves and it won't bother you, will try to fix this soon. BTW, if you're in a heavy WiFi zone (lots of APs, or whatever that uses 2.4 GHz, microwave oven, cordless phones), this behavior might be related to interference as I have noticed.
- The cursor isn't visible while over the browser area (I guess their large, ugly cursor takes precedence?), still shows in address bar and the top bar. The following is workaround suggested by freemangordon (thanks!), post #24:

Code:

edit following line in /etc/X11/Xsession.d/04b_start_matchbox
/usr/bin/matchbox-window-manager -theme $THEME -use_dialog_mode static -use_cursor yes &

- It is not possible to click inside the browser either, even though you can click in the address bar and the buttons on the sides. The only thing that kinda works ATM inside the browser area is zooming in/out, by holding your left-click and doing circles clockwise/anti-clockwise. Trying to fix it..., but they really made it hard for the mouse to work here..., if the mouse just worked as well here as in maps..., why mess it up!? good grief...
- You don't want to use your laptop anymore :-)

See this working on YouTube: http://www.youtube.com/watch?v=PaNz4uM-29Q

UPDATE: Trying to improve/fix things, I'll create a poll with the items that are being taken care of, please vote for the ones you want to have done sooner.

I'm glad you guys are liking this, thanks for your support and the nice things you're saying! I do really appreciate it! I'm trying to reply to posts as much as I can..., hang in there!

akashbhavsar 2010-06-29 20:38

Re: N900 Working Bluetooth Mouse NOW!!!
 
Sounds great! I'm gonna try this... :)

antezz 2010-06-29 20:42

Re: N900 Working Bluetooth Mouse NOW!!!
 
May i kiss you? >: )

mohannad 2010-06-29 20:44

Re: N900 Working Bluetooth Mouse NOW!!!
 
Welcome to the forum and thank you for this amazing effort!

rajil.s 2010-06-29 21:07

Re: N900 Working Bluetooth Mouse NOW!!!
 
What brand of bluetooth mouse are you using?

quipper8 2010-06-29 21:12

Re: N900 Working Bluetooth Mouse NOW!!!
 
amazing work. thanks so much

quipper8 2010-06-29 21:16

Re: N900 Working Bluetooth Mouse NOW!!!
 
For an extra 2 or 300 dollars, every single new TV out there should have something like this integrated into it

here comes meego....

ZogG 2010-06-29 21:24

Re: N900 Working Bluetooth Mouse NOW!!!
 
that's the way we all should write the first post. thank you.

Tinnet 2010-06-29 23:56

Re: N900 Working Bluetooth Mouse NOW!!!
 
This somehow made it impossible to use the touchscreen. and since bluetooth and wifi arent turned on automatically I am left without a solution to revert back to defaults. hmm :/

azerty1 2010-06-30 01:35

Re: N900 Working Bluetooth Mouse NOW!!!
 
Quote:

Originally Posted by Tinnet (Post 734791)
This somehow made it impossible to use the touchscreen. and since bluetooth and wifi arent turned on automatically I am left without a solution to revert back to defaults. hmm :/

Sorry to hear about your problem, but this solution shouldn't interfere with the touchscreen at all, I have been testing this for days and haven't had any issues, I'm using stock kernel, so if you're using something different, although unlikely, it might be the problem.

As for a possible solution to your situation, at first, when I was experimenting with several approaches I lost touch input several times, and my WiFi connection was also set to "Always ask" and bluetooth off or useless..., workaround? press Ctrl-Shift-x on your N900 and you should get a terminal, revert to your old driver and try to find out what might be wrong...

Now, if you did the changes manually and the evdev_drv.so file was named differently, your keyboard might not work either, in this case the only solution I know is to reflash rootfs, if someone knows how to get access to rootfs on a device in this condition (or even better, when it waiting to be flashed) it would be great to know.

Perhaps you could try putting it in R&D mode, it does some wonders from time to time with its "oh so cool" black magic.


All times are GMT. The time now is 22:56.

vBulletin® Version 3.8.8