maemo.org - Talk

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

qole 2010-08-28 05:20

Re: N900 Bluetooth Keyboard + Mouse scripts
 
OK I just received the nifty little folding BT keyboard from DealExtreme, because my Dell Stowaway had a bunch of dead keys. It works well, although it needs the scripts, for sure. Now I've got a working keyboard and mouse, I'll get back to work on these scripts.

Sorry I've been so neglectful of this thread.

qole 2010-09-01 04:56

Re: N900 Bluetooth Keyboard + Mouse scripts
 
New version makes a new icon for the "watcher".

So the procedure now is:
1. Pair your devices with the N900 via the Bluetooth menu.
2. Use the "BT HID Connect" icon to connect your devices properly (this will make the BT logo stay blue, the mouse and keyboard will work, incompletely)
3. Make sure your devices are disconnected, then start the "BT HID Watcher" icon to auto-configure your N900 when the devices connect.
4. Turn on your device, press a key or whatever you need to do, and then watch for the yellow banner on the N900 saying that you're connected. The mouse pointer should become visible for a mouse, and the keyboard should have numbers and special characters properly mapped.

Note that you may need to open the N900 keyboard and press a key to get the external keyboard working properly.

WhiteWolf 2010-09-01 13:47

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I have a bluetooth mouse "Trust" model "ComfortLine Bluetooth Mini Mouse" is detected but not working properly. Only occasionally the mouse pointer reacts to mouse movement. I tried to change the accuracy of performance but no appreciable difference.

Anybody can help me?

Mouse Link
http://www.trust.com/products/product.aspx?artnr=16341

liamlain 2010-09-01 15:10

Re: N900 Bluetooth Keyboard + Mouse scripts
 
hi the microb browser still cant support bluetooth mouse?

sb10ck 2010-09-01 15:35

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by liamlain (Post 804304)
hi the microb browser still cant support bluetooth mouse?

Read known issues here: http://talk.maemo.org/showpost.php?p=734576&postcount=1

smoss 2010-09-01 19:01

Re: N900 Bluetooth Keyboard + Mouse scripts
 
thanks heaps man! works great with a shortcut on the desktop ready to go, no type'n just press and switch on mouse and/or keyboard. love your work!!! cheers

thunderfest 2010-09-01 20:14

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I just received my freedom pro keyboard today. Your new version got me setup quickly and seems to be working well. Great work and thanks!

Nokia349 2010-09-01 20:36

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Qole,

On my Dell OEM Bluetooth Keyboard, I was never able to get numbers working. The setkbdmap command was simply being ignored. After many experiments I finally got a line that does work. I plugged it into your connection manager script and now it works automagically. THis is the line that my keyboard needed:

setxkbmap -device $EXTKBDID -I -I/usr/share/X11/xkb-chinook -rules $KBDRULES -model $KBDMODEL -layout $KBDLAYOUT -print|xkbcomp -i 4 - $DISPLAY

piping through xkbcomp was the only thing that worked for me. Oddly enough, it works without having to hit a key on the internal keyboard first.

As far as autostart, it looks like you tried the same init.d style script that blueklase did, but your's isnt running and his does. Anyway to fix that so that your script will autorun at boot without launching the watcher? His script doesnt handle the mouse, so I'd prefer to wait for your's.

Thanks, and I hope this helps some of the others that have had zero luck getting numbers going.

jakoleh 2010-09-01 20:43

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by Nokia349 (Post 804565)
As far as autostart, it looks like you tried the same init.d style script that blueklase did, but your's isnt running and his does. Anyway to fix that so that your script will autorun at boot without launching the watcher? His script doesnt handle the mouse, so I'd prefer to wait for your's.

In fact I'm not starting blueklase using init.d style. I have added bluetooth-keyboard file to /etc/event.d which is below

Code:

#startup script for /etc/event.d
       
start on started hildon-desktop
stop on starting shutdown
       
script
        exec run-standalone.sh su user -c "exec /usr/bin/BlueKlase &"
end script


Nokia349 2010-09-01 20:50

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by jakoleh (Post 804574)
In fact I'm not starting blueklase using init.d style. I have added bluetooth-keyboard file to /etc/event.d which is below

Code:

#startup script for /etc/event.d
       
start on started hildon-desktop
stop on starting shutdown
       
script
        exec run-standalone.sh su user -c "exec /usr/bin/BlueKlase &"
end script


Awesome, thanks. I was going off of outdated info then. I will try adding that code and launching qole's connection manager with it. Great to be this close to a full solution after so long. Thanks for everyone's help!

Ohh, one thing, is there any way to get the shift key to work normally? Right now if I hold down Shift and hit a key, I still get lower case. I have to tap and release Shift and then hit a key to get caps or a symbol. Any idea on what causes that?

Thanks again!

jakoleh 2010-09-01 20:56

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by Nokia349 (Post 804583)
Ohh, one thing, is there any way to get the shift key to work normally? Right now if I hold down Shift and hit a key, I still get lower case. I have to tap and release Shift and then hit a key to get caps or a symbol. Any idea on what causes that?

Thanks again!

Does this happens both internal keyboard open and closed? Virtual kb works also so that you press down shift and then you get caps (kind of like caps lock)

Nokia349 2010-09-01 21:15

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by jakoleh (Post 804598)
Does this happens both internal keyboard open and closed? Virtual kb works also so that you press down shift and then you get caps (kind of like caps lock)

Yep, just tested it and it is the same with the internal keybaord open or closed. On a side note, the fix I posted does mess up the internal keybaord so that the blue symbol key no longer works :/ I guess I will try the same fix on the setxkbmap command for the internal keyboard and see if that works. Maybe on my setup both need that.

qole 2010-09-03 07:07

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I will be ecstatic if someone figures out how to make the watcher script launch at boot!

attila77 2010-09-04 17:44

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Just put the script under upstart ? Or was producing the upstart script the question ? :)

qole 2010-09-04 23:01

Re: N900 Bluetooth Keyboard + Mouse scripts
 
attila77: the script crashes when put in upstart. Python can't seem to start -- not finding its libraries. Maybe I'm starting the script too early, before Python is configured?

I explain the problem in more details earlier in this thread.

Sorry I am not so verbose; my Internet is extremely limited at the moment.

qole 2010-09-04 23:16

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I can confirm that Nokia349's method works fine for my keyboard, and it also works well for Easy Debian's LXDE on DISPLAY :1 so I will include it in the next version.

I want to wait a bit before releasing the next version, and see if Attila can figure out why the watcher script isn't working. If anyone can figure it out, it would be him!

I'm using my keyboard right now, and boy I wish MicroB worked with the mouse...

attila77 2010-09-05 07:38

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by qole (Post 807479)
attila77: the script crashes when put in upstart. Python can't seem to start -- not finding its libraries. Maybe I'm starting the script too early, before Python is configured?

I explain the problem in more details earlier in this thread.

Sorry, am kind of on-off in this thread. I could never get it to work with my Apple Wireless kbd properly so I lurk occasionally to see whether a solution pops up... Will read back, probably, as you say, you're getting called before the python binds are up.

Quote:

Sorry I am not so verbose; my Internet is extremely limited at the moment.
... and this is one of the reasons I'm slightly reluctant to experiment, as my trusty N900 is my only link to the world and I have no way of flashing it should anything go awry (and if I loose access to google translate or Ovi maps, I'm done for :) ). Should have a proper linux box and internet soonish, and then hacking can resume :)

liamlain 2010-09-05 08:59

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by qole (Post 807488)
I can confirm that Nokia349's method works fine for my keyboard, and it also works well for Easy Debian's LXDE on DISPLAY :1 so I will include it in the next version.

I want to wait a bit before releasing the next version, and see if Attila can figure out why the watcher script isn't working. If anyone can figure it out, it would be him!

I'm using my keyboard right now, and boy I wish MicroB worked with the mouse...

ya wish microb will worked with mouse

WhiteWolf 2010-09-05 09:29

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Does anyone know why mice which some of us do not work properly with these scripts and the N900?

freemangordon 2010-09-05 09:42

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by WhiteWolf (Post 807712)
Does anyone know why mice which some of us do not work properly with these scripts and the N900?

Most probably you need fixed bluetooth driver, search this thread and also look here

WhiteWolf 2010-09-05 11:08

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by freemangordon (Post 807717)
Most probably you need fixed bluetooth driver, search this thread and also look here

Now ...

Thank you very much.

This community is wonderful.

qole 2010-09-05 17:24

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Attila: here is the post where I post my log. A couple of posts later I told smoku, "The errors that I posted are after setting PYTHONHOME and PYTHONPATH. It was even worse before I did that."

It sounds like you and I are in a very similar situation. Hopefully I get "real" Internet next week.

I highly recommend my BT keyboard from DealExtreme. The funny thing is that I bought it from Hong Kong and it says, "Designed in Canada"! It isn't quite as nice a layout as my old Stowaway, since it doesn't even have a number row, but it is very very small.

attila77 2010-09-06 05:29

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by attila77 (Post 807665)
(and if I loose access to google translate or Ovi maps, I'm done for :) ).

Quote:

Originally Posted by qole (Post 807996)
It sounds like you and I are in a very similar situation. Hopefully I get "real" Internet next week.

I understand there are some differences between Canadian English and the 'other' variants, but has it gotten so bad recently that you actually need google translate ? :D

Quote:

I highly recommend my BT keyboard from DealExtreme. The funny thing is that I bought it from Hong Kong and it says, "Designed in Canada"! It isn't quite as nice a layout as my old Stowaway, since it doesn't even have a number row, but it is very very small.
IIRC the Apple one states Designed in California (not sure what kind of emotions that should instill, but that might be some cultural gap thing).

Netweaver 2010-09-07 07:55

Re: N900 Bluetooth Keyboard + Mouse scripts
 
@qole
Exactly which BT keyboard do you use ? Dealextreme has about 30 of them. And my previous buy from them, a BT mouse, is not really successful on my N900. So I rather go for a fully working combo now.

qole 2010-09-08 01:28

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Netweaver, I linked to the page for the keyboard.

Netweaver 2010-09-08 08:08

Re: N900 Bluetooth Keyboard + Mouse scripts
 
yep, sorry, trying to follow too many threads at the same time made me miss some, I guess.
I bought the same combo now, I hope to be a happy user as well.

Thanks for all the work getting the whole solution as smooth as possible.

WhiteWolf 2010-09-17 08:03

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I have my BT Apple Keyboard and my mouse working.

I have the problem that a colleague has a Zaapa Keyboard with SPP profile. I have the drivers and uses kbdd btfolder, but has the following problem: your keyboard connects and disconnects the second, while kbdd set.

Can you guide me to help?

Thank you all.

WhiteWolf 2010-09-17 08:05

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Another question ...

Has anyone managed to bring their laptop keyboards can use another language for the layer that is not "us"? It's just that I always fails.

marathondon 2010-09-18 00:15

Re: N900 Bluetooth Keyboard + Mouse scripts
 
1 Attachment(s)
Quote:

Originally Posted by qole (Post 748454)
Hi all,

THIS IS ALPHA QUALITY ONLY! IT ISN'T SAFE! BACK UP BEFORE INSTALLING! DISABLE EXTRAS-DEVEL AFTER INSTALLING!

I have taken stuff from the How to get bluetooth pc105 keyboards to work with N900 and N900 Working Bluetooth Mouse and I have made a package that gets Bluetooth keyboards and mice (Human Input Devices or "HID") working with the N900.

You need to enable Extras-devel (Dangerous and advanced! Be careful with this!) You can install it from the System category in the App Manager, or as bt-hid-scripts from apt-get.

UPDATE Version 0.8:

So the procedure now is:

1. Pair your devices with the N900 via the Bluetooth menu.
2. Use the "BT HID Connect" icon to connect your devices properly (this will make the BT logo stay blue, the mouse and keyboard will work, incompletely)
3. Make sure your devices are disconnected, then start the "BT HID Watcher" icon to auto-configure your N900 when the devices connect.
4. Turn on your device, press a key on the keyboard, wiggle the mouse, or whatever you need to do to initiate connection, and then watch for the yellow banner on the N900 saying that you're connected. The mouse pointer should become visible for a mouse, and the keyboard should have numbers and special characters properly mapped.

Note that you may need to open the N900 keyboard and press a key to get the external keyboard working properly, and the mouse pointer is not properly visible or operational in the browser.

These scripts work very well with the Microsoft Bluetooth Notebook Mouse 5000 and the Micro Innovations folding BT keyboard (MP-0118) from DealExtreme.

Older Versions:

The main script at the moment is the BT HID Connect script (bt-dbus-connect) and icon. This script connects BT devices that seem to pair (the N900 claims the device is paired) but then don't actually connect (the BT icon on the N900 stays white). This worked to connect both my Think Outside Stowaway Keyboard and Microsoft Bluetooth Notebook Mouse 5000. You have to pair the device first and then click on the BT HID Connect icon. Choose your device from the list and it should start connecting after that.

I have another script, set-bt-input, run as root, which can turn the BT input profile on or off. It is turned on upon install.

I have also most of the pieces to make BT keyboards and mice actually work once they are connected.

Keyboard

I have included qobi's xkb-chinook hack to remap external keyboards so the numbers and special characters work. Run the bt-kbd-remap script to make the keyboard work properly with both Maemo and Easy Debian LXDE.

To set your keyboard layout, create or edit a file in your home directory (it will be created for you the first time you run bt-kbd-remap):

/home/user/.btkeyboard
Code:

KBDRULES=base
KBDMODEL=pc105
KBDLAYOUT=us

Change those three lines to match your keyboard.

The script needs to be run every time the keyboard reconnects, even after waking up from sleep. I still need to get a script set up to check for keyboard connection and run the remap script when it connects.

Mouse

I have included azerty1's fixed mouse driver (evdev_drv.so) so if your mouse can connect, it will probably work. It should just work with Easy Debian LXDE (where it is most useful).

If you want to try the mouse with Maemo, I've included azerty1's showmouse and hidemouse scripts for making the mouse pointer visible in Maemo. You have to run them from the terminal or make your own icons for those.

TO DO:
  • Make a device connection detector that runs the keyboard remap script if a keyboard connects or the visible mouse script if the mouse connects. If the mouse disconnects, run the hidemouse script.
  • Have someone package the patched mouse driver, and then depend on that package. I can't move my package out of Extras-devel with azerty1's binary embedded in my package.
  • Have someone package freemangordon's bluetooth module patches. Titan's kernel (or an extra modules package) should come with the patched module, and there should be a package for the standard kernel too.
  • Fix all the bugs you will find!

I installed your scripts with no problems. I have the Think Outside keyboard which is recognized when trying to pair. It never seems to successfully pair. I went into terminal and ran bt-dbus-connect and selected the keyboard and hit ok: I uploaded the screenshot error that it gave me. Do you have any clues what this means?

virtual_one 2010-09-19 17:32

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Hello All!

I'm new here, but I have problems with my bluetooth keyboard/mouth and can not find right answers.. Here are the problems:

1. Keyboard connects and I can type and use mouse somehow, but after 5-10 secs of using N900 reboots :(

2. Not alll keys work, numbers and symbols don't work, arrows don't work, Shift doesn't work :(

3. I can not changer layout to "russian" (ru?), so russian letters don't work.

Does anybody could help, I really appreciate it!

catretriever 2010-09-22 13:50

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Having got my Bluetooth mouse working (good times!) I am finding that it is making my N900 reboot (bad times!).
There doesn't seem to be any pattern to this other than the fact that it usually happens after a button click (although not every time).

Does anyone have any idea how I might tackle this issue?

sygys 2010-09-22 13:55

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Logitec bluetooth keyboard designed for the PS3 works awsome on the n900. it has a trackpad on the right side wich also works great as mouse.

johnel 2010-09-22 14:29

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by sygys (Post 823355)
Logitec bluetooth keyboard designed for the PS3 works awsome on the n900. it has a trackpad on the right side wich also works great as mouse.

Is it the Logitech Mediaboard Pro?

What did you do to get it working?

This post said it was straighforward.

This post said it wasn't working.

I was thinking of buying one of these myself but I want to be sure it will work before I spend any money.

www.rzr.online.fr 2010-09-22 18:52

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I just paired apple bt keyboard to my n810 ... it's working but you need to hit keys fast because it will loop repeating the current key ? can this be configured ?
regards


--
http://rzr.online.fr/q/bt

marathondon 2010-09-24 15:08

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I have finally been successful in pairing with both my Think Outside Keyboard and Think Outside mouse using Qobi's scripts. My current observations of device function:
1)Keyboard will display all letters (upper and lower case) when freshly paired following a restart. You can hold the keys that have numerics down and the corresponding number will appear. Going into Xterminal and typing bt-kbd-remap will result in both the blue and green Fn keys working properly so numerics and symbols can be accessed as the keyboard was designed. This is perfect but only works after you have created a new pairing with the keyboard so you will need to delete and pair again if you want to be able to use the FN keys.

2)Mouse doesn't work properly. Right clicking or clicking scroll wheel will open application menu and toggle between the current desktop and aplications. Clicking on the left button will restart the N900. The arrow cursor can be dragged around the desktop with the mouse but has no selection ability.

Does anyone know how to correct the scripts for the mouse and perhaps a more perminent method to get the keyboard to accept symbols and numerics without always having to generate a new pair with the device and going into Xterminal?

WhiteWolf 2010-09-25 10:27

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Do not get it to work the keyboard below.
http://www.zaapa.co.uk/Public/ficha_...o.asp?CPRO=678
For the data seems to be a Freedom but only with SPP profile.

The first is that when you connect using bt-dbus ... Disconnects in the second later.

It appears that manages to connect if you configure rfcomm0 and typing: rfcomm connect rfcomm0

Seems to connect (BT icon in blue) but the keyboard does not change its activity LED.

Then use "kbdd-p / dev/rfcomm0-t <<btfoldable or freedom>>" but does not seem to respond, pressing keys will not be reflected in the N900.

Can you help?

Note: All from root

marathondon 2010-09-26 04:10

Re: N900 Bluetooth Keyboard + Mouse scripts
 
On my Dell OEM Bluetooth Keyboard, I was never able to get numbers working. The setkbdmap command was simply being ignored. After many experiments I finally got a line that does work. I plugged it into your connection manager script and now it works automagically. THis is the line that my keyboard needed:

setxkbmap -device $EXTKBDID -I -I/usr/share/X11/xkb-chinook -rules $KBDRULES -model $KBDMODEL -layout $KBDLAYOUT -print|xkbcomp -i 4 - $DISPLAY
piping through xkbcomp was the only thing that worked for me. Oddly enough, it works without having to hit a key on the internal keyboard first.

I believe the Dell OEM keyboard is the same as the
Think Outside keyboard which I'm having the same problem with. The line you suggest to add is inserted into the connection manager. Can you show me the steps that are necessary to do that since I'm not a programmer? The other questions is how do you get the straight vertical line character to put between print and xkbcomp?

snakekontrol 2010-09-26 06:37

Re: N900 Bluetooth Keyboard + Mouse scripts
 
anyone has got mighty mouse working?

qole 2010-09-27 07:00

Re: N900 Bluetooth Keyboard + Mouse scripts
 
marathondon: I have that change already in the version on my N900, since the beginning of September.

Apparently I never uploaded it to Extras-devel. <blush> I think I expected someone to figure out what was wrong with the autostart of the Manager, or something.

I've uploaded version 0.9 now, it has the pipe-through-xkbcomp version of /usr/bin/bt-kbd-remap in it.

I wish I knew a way to avoid the reboot for people just upgrading the package. The problem is that Maemo treats an upgrade like an uninstall (of the old version) followed by a new install...

kwurk 2010-09-27 08:02

Re: N900 Bluetooth Keyboard + Mouse scripts
 
A week ago I installed 0.8 from the repos. I got my old Think Outside Stowaway XTBT01 keyboard to connect successfully using HID watcher but no input from keys although the BT symbol was blue and stayed blue. My bt mouse, a Rapoo 6600 connected successfully as well and I saw the cursor move in the direction I moved the mouse for about half a second, then the cursor wouldn't move anymore even though it was connected.

Although the BT HID scripts didn't work for me at the time, I was too busy to fiddle with it, I kept it on my system. Then about 2 days later, I think I discovered a side effect of installing the package that may have something to do with installing this package. When browsing websites in microb, I find that kinetic scrolling was not smooth like before: when swiping across the screen the page wouldn't scroll as much even though the speed of the swipe was very fast. I didn't realize it at first I thought it was my browser so I cleared the cache, and deleted my ~/.mozilla/microb directory. But the kinetic scrolling issue was still there.

I uninstalled the BT HID scripts and the original scrolling speed returned. I wonder if anyone else has experienced this issue?


All times are GMT. The time now is 10:58.

vBulletin® Version 3.8.8