Reply
Thread Tools
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#1
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 December 2010:

These scripts now depend on freemangordon's mouse driver and keyboard layouts. If you wish to have a GUI to configure your external mouse and keyboard, or you wish to connect USB devices instead, then use his applications instead, Ext Kbd and Ext Mou.

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. Done, this is the watcher 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. Done, freemangordon has made an opensource version.
  • 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. (has this been fixed, too?)
  • Fix all the bugs you will find!
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2010-12-26 at 20:42. Reason: .btkeyboard update
 

The Following 49 Users Say Thank You to qole For This Useful Post:
giannoug's Avatar
Posts: 334 | Thanked: 171 times | Joined on Dec 2009
#2
Testing as I type. Will report back :-)

EDIT: I can't get it to work. I pair the mouse (the same as you, MS BT Notebook Mouse 5000), open BT HID Connect but I see nothing on the list.

I tried rebooting, restarting bt... nothing.

Last edited by giannoug; 2010-07-11 at 21:23.
 
Posts: 42 | Thanked: 27 times | Joined on Jun 2010
#3
I tried it with 0.1 and 0.2, but on both, the list of keyboards appears empty on my n900.

The keyboard is "Leasun Bluetooth Wireless Keyboard".

When launching bt-dbus-connect, it appears on the console:

Code:
cat: can't open '/var/lib/bluetooth/0*/names': No such file or directory
cat: can't open '/var/lib/bluetooth/0*/names': No such file or directory
, and on the n900 screen, the list is empty

It connects when I manually launch:
Code:
dbus-send --system --print-reply --dest=org.bluez /org/bluez/673/hci0/dev_01_18_09_12_04_BD org.bluez.Input.Connect
bt-kbd-remap, tells me there is no keyboard when I launch it, if I have not connected the keyboard.

After connecting with dbus-send, it shows this error:
Code:
/usr/bin/bt-kbd-remap: line 57: syntax error: "fi" unexpected (expecting "then")
I hope I may help.
 

The Following User Says Thank You to jormartr For This Useful Post:
Posts: 57 | Thanked: 15 times | Joined on Apr 2010
#4
I can't connect Apple Mighty Mouse. after runnumg app, there is no item in the list.
I turn on BT, then go to devices > New > find my mouse and pair it before running app.
 
Posts: 61 | Thanked: 24 times | Joined on Jun 2010
#5
Even with my BT keyboard (HP Ipaq) already paired the script shows no devices detected.


Probably because this keyboard requires KBDD to work I guess.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#6
Thanks everyone for your testing. I've made some fixes. My next version (released in a few minutes) has debugging for you to post when things don't work... Run bt-dbus-connect from the terminal and post the output.

bandario: yes, these scripts are for "modern" HID devices, but that might not be your problem here. The connect script should work at least...
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2010-07-12 at 02:01. Reason: bt-dbus-connect is the correct command
 

The Following 3 Users Say Thank You to qole For This Useful Post:
Posts: 459 | Thanked: 669 times | Joined on Sep 2007 @ The DMV
#7
With the latest version of the bt-hid-connect script, I was finally able to find and select my Think Outside Keyboard in the gui. The bluetooth icon does turn blue when I type on the BT keyboard, but I cannot generate text.

Upon running bt-kbd-remap in xterm, I get the "No external keyboard found!" warning.

I tried to run bt-hid-connect in xterm as you requested, but I get "not found" in response. Should I be in a certain directory or run as root?
 

The Following User Says Thank You to klinglerware For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#8
Originally Posted by klinglerware View Post
With the latest version of the bt-hid-connect script, I was finally able to find and select my Think Outside Keyboard in the gui. The bluetooth icon does turn blue when I type on the BT keyboard, but I cannot generate text.
The fact you get a blue icon means you're connected. Type something on the internal keyboard and then try on the external keyboard.

Also check the Bluetooth menu, devices, and your keyboard. Is the "disconnect" button active?

Originally Posted by klinglerware View Post
I tried to run bt-hid-connect in xterm as you requested, but I get "not found" in response. Should I be in a certain directory or run as root?
Sorry, bt-dbus-connect is the correct command.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following 3 Users Say Thank You to qole For This Useful Post:
Posts: 61 | Thanked: 24 times | Joined on Jun 2010
#9
How odd. After updating to the latest version the program now crashes upon execute (nice new icon though).

If I try to run it from command line using bt-hid-connect i just get an error that says: not found.

Doesn't matter if I am root or not.

Where can I find the log file?
Huge thanks for your efforts by the way! It would be amazing to get this working properly. I will just buy a newer BT keyboard if I have to, which one are you using?

Pretty keen to get this up and running.
I have previously managed to get the KB to the stage where I can use the letters but I had to do everything from the command line each time using KBDD...pain in the bum.

As soon as I have got the keyboard map working I will try and work on a script to execute KBDD automatically from the desktop...not sure how I'll manage but we will see.
 
Posts: 958 | Thanked: 483 times | Joined on May 2010
#10
doesn't work for me qole. i run the app and i get a blank list.

i run it from a command prompt and i see

Nokia-N900-42-11:/usr/bin# bt-dbus-connect
cat: can't open '/var/lib/bluetooth/0*/names': No such file or directory
cat: can't open '/var/lib/bluetooth/0*/names': No such file or directory
 
Reply

Tags
bluetooth, keyboard, mouse, package

Thread Tools

 
Forum Jump


All times are GMT. The time now is 08:03.