maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Accessories (https://talk.maemo.org/forumdisplay.php?f=17)
-   -   how to get bluetooth pc105 keyboards to work with N900 (https://talk.maemo.org/showthread.php?t=38372)

qobi 2010-02-11 15:46

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by JoHnY (Post 521274)
I'm not sure if it's possible to connect SPP keyboard, I'm afraid not...

On the N810 it was possible to connect an SPP keyboard using a package called kbdd written/maintained by Frantisek Dufka <dufkaf@seznam.cz>. I have not (yet) tried to use that package on the N900 so I don't know if it will work or how much modification it would need. I will eventually because I have an Elektex cloth keyboard that uses SPP that I used to use on my N810 (I added support to kbdd for the Elektex keyboard) that I will someday try to get to work with the N900.

qobi 2010-02-11 17:56

Re: how to get bluetooth pc105 keyboards to work with N900
 
Here is a list of outstanding issues for bluetooth keyboards. Just to compile it in one place:

1. need to type a key on the internal keyboard for setxkbmap to take
effect
2. Enter on bluetooth keyboards not work when the slider is closed
even though it works when the slider is open and even though
it works in emacs when the slider is closed
3. double pressing shift sets caps lock even on bluetooth keyboard
4. it sometimes get caught in autorepeat loop
appears to be dependent on WiFi or WLAN
5. it sometimes drops the bluetooth connection
6. need to rerun setxkbmap when it drops and reestablishes the
bluetooth connection
7. shift sometimes get out of sync on either the bluetooth
keyboard, internal keyboard, or both
8. m-sh-C and m-sh-E don't work on Stowaway (but they do on IRXON)
(m-rsh-E works but m-lsh-E does not; both m-lsh-C and m-rsh-C do not work;
with caps lock, both m-c and m-e generate m-sh-C and m-sh-E)
9. c-m-b and c-m-t don't work on Stowaway (but they do on IRXON)

Olle 2010-02-11 19:05

Re: how to get bluetooth pc105 keyboards to work with N900
 
SPP connects with

rfcomm connect /dev/rfcomm0 XX:XX:XX:XX:XX:XX

and thanks to all, reading this thread and start thinking about the problem, helps me a lot in understandign the system.

TigertheGambler 2010-02-11 19:35

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by technosopher (Post 520977)
Hi people,

Error org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "" on interface "org.bluez.Input" doesn't exist

Thanks!

Ok my first enthusiasm cooled off a bit, because my Stowaway only connects succesfully every 10th time or so. Between my attempts I get the same error above like technosopher.
What does that mean? And why it connects sometime and sometime not? I always have to go through the complete dbus command thing from JoHnY to setup a connection... bit annoying... is there a way to make a script for that or a one click shortcut or s.th. else?
This is my 3rd successful pair and I am writing this from the Stowaway Keyboard :)

Olle 2010-02-11 20:09

Re: how to get bluetooth pc105 keyboards to work with N900
 
jepp
get Root in Xterminal
just open vi and enter

Code:

#! /bin/sh
dbus-send --system --print-reply --dest=org.bluez /org/bluez/YOURID/hci0/dev_YO_UR_BT_CO_DE_xx org.bluez.Input.Connect

then escape
:w myscript.sh
:q

then

chmod 667 myscript.sh


and you make your script

cardiff-blues 2010-02-11 21:13

Re: how to get bluetooth pc105 keyboards to work with N900
 
ok, I dont know how I have got this to work and what was different compared with my last attempt.

I have followed Johnys instructions but somehow it has worked this time and i am now in fact typing this out via the bluietooth keyboard.

Havent figured out how do do an apostrophe yet though and dont know if it will reconnect if I switch off and retry.

What should i need to do to reconnect from afresh.

meep 2010-02-11 22:31

Re: how to get bluetooth pc105 keyboards to work with N900
 
Hi all,

Thanks for your help so far...

I can't get the ctrl key working for my dinovo mini. I have loaded an evdev mapping from ubuntu 9.10 and it doesn't work on this either.

How can I log my keystrokes and what is happening when I press ctrl?

When I run this:
setxkbmap -device 4 -I -I/usr/share/X11/xkb-ubuntu -rules base -model evdev -layout us -print|xkbcomp -i 4 - $DISPLAY

I get the following: (does not mention LCTRL or anything)

Warning: Key <I29> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <RO> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: No symbols defined for <KPMU> (keycode 63)
Warning: No symbols defined for <KP7> (keycode 79)
Warning: No symbols defined for <KP8> (keycode 80)
Warning: No symbols defined for <KP9> (keycode 81)
Warning: No symbols defined for <KPSU> (keycode 82)
Warning: No symbols defined for <KP4> (keycode 83)
Warning: No symbols defined for <KP5> (keycode 84)
Warning: No symbols defined for <KP6> (keycode 85)
Warning: No symbols defined for <KPAD> (keycode 86)
Warning: No symbols defined for <KP1> (keycode 87)
Warning: No symbols defined for <KP2> (keycode 88)
Warning: No symbols defined for <KP3> (keycode 89)
Warning: No symbols defined for <KP0> (keycode 90)
Warning: No symbols defined for <KPDL> (keycode 91)
Warning: No symbols defined for <AB11> (keycode 97)
Warning: No symbols defined for <JPCM> (keycode 103)
Warning: No symbols defined for <KPDV> (keycode 106)
Warning: No symbols defined for <I120> (keycode 120)
Warning: No symbols defined for <KPEQ> (keycode 125)
Warning: No symbols defined for <AE13> (keycode 132)
Warning: No symbols defined for <I149> (keycode 149)
Warning: No symbols defined for <I154> (keycode 154)
Warning: No symbols defined for <I161> (keycode 161)
Warning: No symbols defined for <I168> (keycode 168)
Warning: No symbols defined for <I178> (keycode 178)
Warning: No symbols defined for <I183> (keycode 183)
Warning: No symbols defined for <I184> (keycode 184)
Warning: No symbols defined for <FK13> (keycode 191)
Warning: No symbols defined for <FK14> (keycode 192)
Warning: No symbols defined for <FK15> (keycode 193)
Warning: No symbols defined for <FK16> (keycode 194)
Warning: No symbols defined for <FK17> (keycode 195)
Warning: No symbols defined for <FK18> (keycode 196)
Warning: No symbols defined for <FK19> (keycode 197)
Warning: No symbols defined for <FK20> (keycode 198)
Warning: No symbols defined for <FK21> (keycode 199)
Warning: No symbols defined for <FK22> (keycode 200)
Warning: No symbols defined for <FK23> (keycode 201)
Warning: No symbols defined for <FK24> (keycode 202)
Warning: No symbols defined for <I217> (keycode 217)
Warning: No symbols defined for <I219> (keycode 219)
Warning: No symbols defined for <I221> (keycode 221)
Warning: No symbols defined for <I222> (keycode 222)
Warning: No symbols defined for <I224> (keycode 224)
Warning: No symbols defined for <I226> (keycode 226)
Warning: No symbols defined for <I228> (keycode 228)
Warning: No symbols defined for <I230> (keycode 230)
Warning: No symbols defined for <I244> (keycode 244)
Warning: No symbols defined for <I245> (keycode 245)
Warning: No symbols defined for <I246> (keycode 246)
Warning: No symbols defined for <I247> (keycode 247)
Warning: No symbols defined for <I248> (keycode 248)
Warning: No symbols defined for <I249> (keycode 249)
Warning: No symbols defined for <I250> (keycode 250)
Warning: No symbols defined for <I251> (keycode 251)
Warning: No symbols defined for <I252> (keycode 252)
Warning: No symbols defined for <I253> (keycode 253)

I get pretty much the same for xkb-chinook. I've also tried remapping the super key to CTRL, doesn't work either!

Thanks for the help

cardiff-blues 2010-02-11 23:08

Re: how to get bluetooth pc105 keyboards to work with N900
 
OK. My keyboard is working and pairing automatically when restarted. :) I have created a script 'qwerty.sh' and put the setxkbmap statement in.

How do i now add that shortcut to the desktop so that I can just click on it and so map my keyboard before using it?

ps

Big thanks to JoHny for helping us out here - and Qobi for his work as well.

cardiff-blues 2010-02-11 23:41

Re: how to get bluetooth pc105 keyboards to work with N900
 
Have now managed to put a shortcut on the desktop that maps the keyboard. Picked this trick up from another thread where I added a shortcut for an internet radio station, but the principle is the same.

Have to say that using the bluetooth keyboard is brilliant and the best mod I have used on the n900. How Nokia didn't think it important to have this working out of the box i'll never know.

Anyhow, thanks to everyone here who have contributed to finding a solution to this.

p.s typing on the bt keyboard now and I have typed this in less than half the time it normally would have taken. :)

woody14619 2010-02-12 04:47

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by cardiff-blues (Post 522136)
Have now managed to put a shortcut on the desktop that maps the keyboard. Picked this trick up from another thread where I added a shortcut for an internet radio station, but the principle is the same.

Can you share a link to that? I'd love to get mine setup that way too, once I verify it works for me. :) I'm sure I could find it with a little searching, but the search feature here kind of sucks. :(

cardiff-blues 2010-02-12 07:37

Re: how to get bluetooth pc105 keyboards to work with N900
 
Woody..
This is the thread and you can create your own icon and use if you want.

http://talk.maemo.org/showthread.php...radio+shortcut

One problem I originally had that was causing confusion was that it didn't like me copying the code straight into a new file. The safest way to avoid this is to type out the scripts on your N900 in leafpad.

Let me know how you get on.

Ulysses 2010-02-12 18:08

Re: how to get bluetooth pc105 keyboards to work with N900
 
Now that we know how to pair and connect a bluetooth keyboard even on PR1.1 (without reflashing), has anybody managed to configure properly (with setxkbmap) an *international* keyboard (not us layout, but fr, de, be, es or pt, etc.) Please share your experience.

I'm still unsuccessful with my french apple wireless keyboard.



Ulysses

meep 2010-02-12 21:41

Re: how to get bluetooth pc105 keyboards to work with N900
 
Righto, having done some digging with xev, it seems that the n900 is picking up ctrl correctly as keycode 37...

Therefore, does anyone know if there's a way to either get ctrl to be sticky (add something into compat?) or failing that a way to press "ctrl + bksp" with a single button press (eg super key = ctrl + bksp)?

Thanks for the help

meep 2010-02-12 22:06

Re: how to get bluetooth pc105 keyboards to work with N900
 
Oki doke, in order to get around the fact that my dinovo mini will only send 1 key at once to the n900, I added the following line to usr\share\X11\xkb\compat\basic to give me sticky ctrl:

interpret Control_Lock+AnyOf(Control+Lock) {
action= LockMods(modifiers=Control+Lock)
}

I added this under the equivalent Shift_Lock {...} line.

Works a treat!

I read about how to do this here, some v. useful info:

http://www.charvolant.org/~doug/xkb/html/node5.html

Cheers

EDIT: Dagnamit, I've tried editing xkb-chinook in the same way and mapping my keyboard, it doesn't latch ctrl! (but the hw keyboard does) :(

meep 2010-02-13 00:34

Re: how to get bluetooth pc105 keyboards to work with N900
 
It seems that the rx-51 vendor specific settings under symbols is messing with how ctrl works I reckon...

any way i can make the setxkbmap command not load these settings?

cheers

brbrbrad 2010-02-13 17:15

Re: how to get bluetooth pc105 keyboards to work with N900
 
Hi all, I'm using a Logitech MX 5500 and following JoHnY's instructions, but the setxkbmap command doesn't seem to remap the BT keyboard to pc105. Any troubleshooting tips or suggestions?

shadow52 2010-02-13 20:02

Re: how to get bluetooth pc105 keyboards to work with N900
 
Hi All,

I've been following this thread for some time and as I finally took the plunge today and followed the instructions for pc105 support I thought I'd join the discussion...

Brief summary of my setup and experience in case it's useful for anyone:
I got an N900 just before Christmas and already had a Freedom Universal 2 BT keyboard. I followed the instructions to enable HID support on the N900 and was able to pair the keyboard. It's been working fine since then, but only as a larger copy of the built-in keyboard. By that I mean:

The Alt-Gr key worked as the function key. All the keys and symbols on the internal keyboard could be reproduced with the BT keyboard - tap or double/tap Shift or Alt-Gr for caps/lock or symbol/lock. With Alt-Gr pressed 'A' would give '*', 'H' would give ')' etc.

Once the device was paired there was no need to re-pair unless it was rebooted. Once the keyboard was opened, the connection light would flash briefly and it was ready to go.

Installing the new firmware over-the-air did not cause me any problems.
Since following qobi's instructions it's been working as before but now with all keys working as expected - brilliant work!

One note - the enter key doesn't work for me when the internal keyboard is closed too... but if I hit Ctrl-Enter it does. Had anyone else discovered that?

Also I'm using another BT device - a Nokia BH-103 headset. So in case the device ID changes, I'm using the Bash script below to set the keymap (need to 'apt-get install bash' for this to work). Replace 'FREEDOM' with the name of your device.


PHP Code:

#!/bin/bash
kbid=`hildon-im-xkbtool --list | grep FREEDOM`
#echo "kbid:${kbid:3:1}"
setxkbmap -device ${kbid:3:1} --I/usr/share/X11/xkb-chinook -rules base -model pc105 -layout us 

Many thanks especially to quobi and to all the contributors.

dnastase 2010-02-14 05:23

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by shadow52 (Post 525076)
Hi All,

One note - the enter key doesn't work for me when the internal keyboard is closed too... but if I hit Ctrl-Enter it does. Had anyone else discovered that?

Yes, I've noticed this as well.
I've also noticed that actually Enter by itself, works for a little while (4-6 times) and then it stops working.

jakoleh 2010-02-14 09:00

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by shadow52 (Post 525076)

PHP Code:

#!/bin/bash
kbid=`hildon-im-xkbtool --list | grep FREEDOM`
#echo "kbid:${kbid:3:1}"
setxkbmap -device ${kbid:3:1} --I/usr/share/X11/xkb-chinook -rules base -model pc105 -layout us 

Many thanks especially to quobi and to all the contributors.

Here is my simple python script to execute setxkbmap when keyboard connects. You can test it if it is any use for you. It is very quick and dirty version, but is working for me. Just change those values to correct ones.

Code:

import sys
# import python dbus module
import dbus
# import python dbus GLib mainloop support
import dbus.mainloop.glib
import gobject
import thread, time
import re
import commands

#hildon-im-xkbtool --list
KEYBOARDNAME = "Nokia SU-8W"
#Keyboard mac address
DEVICE = "dev_00_0E_xx_xx_xx_xx"
#setxkbmap
MODEL = "nokiasu8w"
LAYOUT = "fi"

def connected(*args, **kwargs):   
    bus = dbus.SystemBus()
    iface = dbus.Interface(bus.get_object('org.freedesktop.Notifications',
                                    '/org/freedesktop/Notifications'),
                                    'org.freedesktop.Notifications')
    if args[0] == "Connected":
        if args[1] == False:     
            iface.SystemNoteInfoprint(KEYBOARDNAME + " disconnected")
        else:
            iface.SystemNoteInfoprint(KEYBOARDNAME + " connected")
            time.sleep(2)
            testi = commands.getoutput("hildon-im-xkbtool --list") 
            #ID 3, Name: "keyboardname"
            keybId = re.search("ID (\\d+), Name: \"" + KEYBOARDNAME, str(testi)).group(1)
            commands.getoutput("setxkbmap -device " + keybId +
                        " -I -I/usr/share/X11/xkb-chinook " +
                        "-rules base -model " + MODEL +
                        " -layout " + LAYOUT)           
                           
   
def main():           
    dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
    # Get the session bus
    bus = dbus.SystemBus()       
    try:     
        #Get default adapter
        manager = dbus.Interface(bus.get_object("org.bluez",
                        "/"),
                        "org.bluez.Manager")
        #dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter   
        adapter = manager.DefaultAdapter()
    # Get the remote interface for the remote object
        interface = dbus.Interface(bus.get_object('org.bluez',
                                  adapter + "/" + DEVICE),
                                  "org.bluez.Input") 
        interface.connect_to_signal("PropertyChanged", connected)             
    except dbus.DBusException:       
        sys.exit(1)   
    loop = gobject.MainLoop()   
    loop.run()
   
if __name__ == "__main__":
    main()


lwwalker 2010-02-14 14:47

Re: how to get bluetooth pc105 keyboards to work with N900
 
I'm using an SU-8W and us layout, so didn't have to change much. Works like magic, jakoleh! Running that setmap every time the keyboard reconnected was such a pain. Thank you and thanks to all the other people who have been working on this!

borgmountain 2010-02-14 19:01

Re: how to get bluetooth pc105 keyboards to work with N900
 
Hi
Coming here as the happy owner of the N900 I really want to be able to use a BT keyboard with the device. Unfortunately I have no skill in programming what so ever and therefore I have a hard time understanding the above explenations.
Is there anyone that could provide for me (I think there are others as well) a very basic step by step instruction on how to make a BT keyboard work with the N900?
Kind regards

cardiff-blues 2010-02-14 19:14

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by borgmountain (Post 526250)
Hi
Coming here as the happy owner of the N900 I really want to be able to use a BT keyboard with the device. Unfortunately I have no skill in programming what so ever and therefore I have a hard time understanding the above explenations.
Is there anyone that could provide for me (I think there are others as well) a very basic step by step instruction on how to make a BT keyboard work with the N900?
Kind regards

You can't get a lot easier than JoHny's instructions here
http://talk.maemo.org/showpost.php?p...&postcount=174

Ulysses 2010-02-14 21:26

Re: how to get bluetooth pc105 keyboards to work with N900
 
Hi,

I was intrigued by the post from jakoleh, who obviously had no trouble to configure his non-us keyboard, by issuing the same command as his:

Code:

setxkbmap -v 10 -device 4 -I -I/usr/share/X11/xkb-chinook -rules base -model nokiasu8w -layout fi
No error on the command line.

Then I issued the same command for a french layout.

Code:

setxkbmap -v 10 -device 4 -I -I/usr/share/X11/xkb-chinook -rules base -model nokiasu8w -layout fr
And this gave the following error:

Code:

Error loading new keyboard description
Note: Changing from "nokiasu8" to "pc105" model result on my N900 in the above error as well, regardless of the layout.

Ulysses

meep 2010-02-14 23:38

Re: how to get bluetooth pc105 keyboards to work with N900
 
I had a look and I don't think that there's a fr layout defined in /usr/share/X11/xkb-chinook/symbols/nokia_vndr/su-8w...

meep 2010-02-14 23:52

Re: how to get bluetooth pc105 keyboards to work with N900
 
Further on my problem getting Ctrl to work on my dinovo mini, here's a xev output:

KeyPress event, serial 40, synthetic NO, window 0x3e00001,
root 0x44, subw 0x0, time 109249971, (598,205), root:(598,261),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:

XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x3e00001,
root 0x44, subw 0x0, time 109250161, (598,205), root:(598,261),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

A successful key (TAB as an example) looks like this


KeyPress event, serial 26, synthetic NO, window 0x3e00001,
root 0x44, subw 0x0, time 109423817, (598,205), root:(598,261),
state 0x0, keycode 23 (keysym 0xff09, Tab), same_screen YES,
XLookupString gives 1 bytes: (09) " "
XmbLookupString gives 1 bytes: (09) " "

XFilterEvent returns: False

KeyRelease event, serial 29, synthetic NO, window 0x3e00001,
root 0x44, subw 0x0, time 109424025, (598,205), root:(598,261),
state 0x0, keycode 23 (keysym 0xff09, Tab), same_screen YES,
XLookupString gives 1 bytes: (09) " "
XFilterEvent returns: False


Does anyone know anything about XLookupString and why it is failing for Ctrl?

Anyway I can observe happens when I press the Ctrl on the N900s keyboard? (xev does not seem to log keypresses on the device itself!)

Thanks

borgmountain 2010-02-15 17:21

Re: how to get bluetooth pc105 keyboards to work with N900
 
Alright installed rootsh
How do I do the next step. What and where do I write:

First, you need to enable bluetooth HID support, edit /etc/bluetooth/main.conf and remove "hid" from "DisablePlugins=" line. Then send these commands:
stop bluetoothd
start bluetoothd

Kind regards

Ulysses 2010-02-15 21:15

Re: how to get bluetooth pc105 keyboards to work with N900
 
meep, fr and fi are both defined in the same place: /usr/share/X11/xkb-chinook/symbols/

I have no idea why it works for the fi and de layout but not for the fr nor be.

meep 2010-02-16 12:13

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by Ulysses (Post 528222)
meep, fr and fi are both defined in the same place: /usr/share/X11/xkb-chinook/symbols/

I have no idea why it works for the fi and de layout but not for the fr nor be.

True but fr does not look like it's defined within this file which will be referenced when using the su-8w layout:

/usr/share/X11/xkb-chinook/symbols/nokia_vndr/su-8w.

I don't think the folders under symbols for countries are actually being referenced when setting keyboard maps as they're not referenced for use by anything else so far as I can see (could be wrong)

Cheers

borgmountain 2010-02-16 15:02

Re: How to get the bluetooth keyboard to fully work with N900
 
I seem to get stuck at step five where I get the following error message:

Error org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "" on interface "org.bluez.Input" doesn't exist

What do I do wrong.
Can anyone please enlighten me

Kind regards

------------------
Quote:

Originally Posted by JoHnY (Post 517684)
Some commands need to be run as root, if you haven't already done it, install package "rootsh" and then you can gain root privileges by entering "sudo gainroot" in the X terminal.

First, you need to enable bluetooth HID support, edit /etc/bluetooth/main.conf and remove "hid" from "DisablePlugins=" line. Then send these commands:
stop bluetoothd
start bluetoothd

Now:

1. Enable bluetooth through GUI (if it's not on) and pair the keyboard with the device through GUI (although I'm not sure if pairing through GUI is necessary to get the keyboard working, but it does not hurt and you need to do it just once)
2. Issue the following command:
Code:

dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter
You'll get a response like: object path "/org/bluez/11984/hci0"
4. Enter this command: hcitool scan (be sure that your bluetooth keyboard did not fall into sleep mode in the meantime and that it's still sending out information about its presence - usually indicated by blinking blue light)
After some time, you should be able to see the MAC address of your keyboard (if you don't have 10 other people having the same bluetooth keyboard in a close distance to you, you should be able to identify yours by the name)
5. Send this command:
Code:

dbus-send --system --print-reply --dest=org.bluez  /org/bluez/11984/hci0/dev_00_07_61_75_xx_xx org.bluez.Input.Connect
BUT you need to replace /org/bluez/11984/hci0 by whatever response you got in step 2 (actually the number should be only thing that will be different) and replace 00_07_61_75_xx_xx by the mac address of your keyboard from step 4 (replacing all colons by underscores)

Now you should be able to use the keyboard, but only functional characters will be letters a-z, space, backspace and Enter (not even numbers)
To get the keyboard to be fully working, continue with these steps:

1. Download xkb-chinook.tar file from this post: http://talk.maemo.org/showpost.php?p=441444&postcount=3 and untar it to the /usr/share/X11 directory (Copy it to the /usr/share/X11 directory, then go to that directory and type "tar xf xkb-chinook.tar". You will probably have to be root to do this and you can delete xkb-chinook.tar file after you untar it to save space.)
2. Then, as root, do:
Code:

cd /usr/share/X11
cp -i xkb-chinook/symbols/pc xkb/symbols/.
cp -i xkb-chinook/symbols/us xkb/symbols/.
cp -i xkb-chinook/geometry/pc xkb/geometry/.

3. Type this command: hildon-im-xkbtool --list
This will list all connected HID devices, it will look like this:
Code:

ID 0, Name: "Virtual core pointer"
ID 1, Name: "Virtual core keyboard"
ID 2, Name: "TSC2005 touchscreen"
ID 3, Name: "omap_twl4030keypad"
ID 4, Name: "Freedom Pro Keyboard"

The "omap_twl4030keypad" is the N900's hardware keyboard and after that line, you should see your keyboard connected (Freedom Pro Keyboard in my case above). Write down the ID of your keyboard.
4. Do: setxkbmap -device 4 -I -I/usr/share/X11/xkb-chinook -rules base -model pc105 -layout us
Replace "-device 4" with your device ID of your keyboard from step 3, if it's different, but most likely you will get 4 as well.
5. Press any key on the N900 keyboard (not on the bluetooth one). I don't know why this is needed, but it is :-)
6. Your keyboard is now fully functional.

When you turn your keyboard off and on again, it will now pair automatically and the only thing you need to do is to issue the setxkbmap command from step 4 above, to get all keys working.

Hope this helps.

JoHnY


Ulysses 2010-02-16 20:05

Re: how to get bluetooth pc105 keyboards to work with N900
 
Is anything changed after the latest firmware update (3.2010.02-8.002) as to what concerns us in this thread, pairing/connecting/remapping bluetooth keyboards?

Thanks in advance.

jakoleh 2010-02-16 21:43

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by Ulysses (Post 530441)
Is anything changed after the latest firmware update (3.2010.02-8.002) as to what concerns us in this thread, pairing/connecting/remapping bluetooth keyboards?

Thanks in advance.

Seems to work as before. No changes to worse or better.

Ulysses 2010-02-17 07:23

Re: how to get bluetooth pc105 keyboards to work with N900
 
Ah, thanks.
My customizations in /usr/share/X11 were gone after the update, and one needs to re-install xkb-chinook, etc.

I had hoped that something would have happened upstream, and that support for bluetooth keyboards would be official.

I was dreaming. This issue has not received a lot of votes, and it is not a priority for Nokia. Too bad.

ErnieDK 2010-02-17 11:17

Re: how to get bluetooth pc105 keyboards to work with N900
 
Hi filologen,

I have a nokia su-8w with danish layout.

I tried starting out by:

$ cp -i /usr/share/X11/xkb-chinook/geometry/pc /usr/share/X11/xkb/geometry/.

- but I get an error "cannot stat /usr/share/X11/xkb-chinook/geometry/pc"

Do I need to do something prior to this?

Best regards,
ErnieDK

dnastase 2010-02-18 05:09

Re: How to get the bluetooth keyboard to fully work with N900
 
Quote:

Originally Posted by borgmountain (Post 529694)
I seem to get stuck at step five where I get the following error message:

Error org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "" on interface "org.bluez.Input" doesn't exist

What do I do wrong.
Can anyone please enlighten me

Kind regards

------------------

I was getting the same error, until I realized that I was using the MAC of the N900 instead of the MAC of the BT keyboard.
Please double check that you are *indeed* doing the steps from the howto (I spend 3 hours on this).

dnastase 2010-02-18 05:19

Re: how to get bluetooth pc105 keyboards to work with N900
 
I have just bought a Palm BT keyboard and I would like to share my experience in setting it up.

As you know I already have a ThinkOutside BT keyb that is setup properly (before the PR 1.1 upgrade) and works nicely.

Setting up the Palm keyboard took at least 6 hours of my life.
Everything seems to be kind of random: pairing, connecting.

At first I paired it rather quickly and then spent a lot of hours trying to get the N900 to connect to it. In vain. After discovering an error on my part (see my previous post) I got it to connect, but only for a couple of seconds.
I have installed syslog (as advised on this thread) and it showed:

bluetoothd[898]: Encryption failed: Permission denied(0x5)

I have no idea what this means and I couldn't find it on Google.
I have decided to re-pair, because that's what it sounded to me like it might be a problem.

But this time it wouldn't pair. I have must have tried like 20 times, when it finally wanted to pair.

I have quickly issued the dbus-send command and, finally, I could see that the bluetooth sign on N900 became blue and stayed like that.
Typing on the keyboard would be seen in the terminal.

I have closed the keyboard, waited until the N900 dropped the connection and then opened the keyboard again. It reconnected automatically and I could use it again.

So it seems like I have arrived at the same status as with the old one. Only I'm scared like hell to touch anything now, seeing how sensitive setting these up is.

And just to vent: it's amazing how things are regressing instead of moving forward. Instead of building upon the things that were working properly in the previous generation tablets it seems like Nokia is inventing the wheel again and again and again.

dnastase 2010-02-18 05:21

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by Ulysses (Post 531598)
Ah, thanks.
My customizations in /usr/share/X11 were gone after the update, and one needs to re-install xkb-chinook, etc.

I had hoped that something would have happened upstream, and that support for bluetooth keyboards would be official.

I was dreaming. This issue has not received a lot of votes, and it is not a priority for Nokia. Too bad.

This was a minor upgrade. Let's hope a (more) major one is coming and it fixes (some) things.

I have to leave on a vacation and I'm holding off on the upgrade as I don't want to start all over with this :(

borgmountain 2010-02-18 16:36

N900 and igo stoaway ultra slim keyboard bluetooth
 
Hi

Does anyone know where to find the instruction to set up the igo stoaway ultra slim keyboard bluetooth on the N900?

shadow52 2010-02-20 22:39

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by jakoleh (Post 525721)
Here is my simple python script to execute setxkbmap when keyboard connects. You can test it if it is any use for you. It is very quick and dirty version, but is working for me. Just change those values to correct ones.

Cheers mate, that's great! Could you let me know if I'm using your script the right/best way... I'm doing the following:

1) Boot device, connect keyboard.
2) Open X Terminal, run setxkbmap manually.
3) Slide open built-in keyboard, press key.
4) In X Terminal, run 'nohup python keys.py &' (keys.py is your script). Close terminal.
5) Thereafter, whenever keyboard dis/reconnects, press a key on the built-in keyboard and the map will be reset.

Do you normally have to run setxkbmap manually? Are you placing your script in with the system init scripts or running as user?

Many thanks again :D

dcarter 2010-02-21 06:22

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by jakoleh (Post 525721)
Here is my simple python script to execute setxkbmap when keyboard connects. You can test it if it is any use for you. It is very quick and dirty version, but is working for me. Just change those values to correct ones.

Code:

import sys
# import python dbus module
import dbus
# import python dbus GLib mainloop support
import dbus.mainloop.glib
import gobject
import thread, time
import re
import commands

#hildon-im-xkbtool --list
KEYBOARDNAME = "Nokia SU-8W"
#Keyboard mac address
DEVICE = "dev_00_0E_xx_xx_xx_xx"
#setxkbmap
MODEL = "nokiasu8w"
LAYOUT = "fi"

def connected(*args, **kwargs):   
    bus = dbus.SystemBus()
    iface = dbus.Interface(bus.get_object('org.freedesktop.Notifications',
                                    '/org/freedesktop/Notifications'),
                                    'org.freedesktop.Notifications')
    if args[0] == "Connected":
        if args[1] == False:     
            iface.SystemNoteInfoprint(KEYBOARDNAME + " disconnected")
        else:
            iface.SystemNoteInfoprint(KEYBOARDNAME + " connected")
            time.sleep(2)
            testi = commands.getoutput("hildon-im-xkbtool --list") 
            #ID 3, Name: "keyboardname"
            keybId = re.search("ID (\\d+), Name: \"" + KEYBOARDNAME, str(testi)).group(1)
            commands.getoutput("setxkbmap -device " + keybId +
                        " -I -I/usr/share/X11/xkb-chinook " +
                        "-rules base -model " + MODEL +
                        " -layout " + LAYOUT)           
                           
   
def main():           
    dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
    # Get the session bus
    bus = dbus.SystemBus()       
    try:     
        #Get default adapter
        manager = dbus.Interface(bus.get_object("org.bluez",
                        "/"),
                        "org.bluez.Manager")
        #dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter   
        adapter = manager.DefaultAdapter()
    # Get the remote interface for the remote object
        interface = dbus.Interface(bus.get_object('org.bluez',
                                  adapter + "/" + DEVICE),
                                  "org.bluez.Input") 
        interface.connect_to_signal("PropertyChanged", connected)             
    except dbus.DBusException:       
        sys.exit(1)   
    loop = gobject.MainLoop()   
    loop.run()
   
if __name__ == "__main__":
    main()


OK, I apologize in advance,
but to run this script (after entering my own personal variables corresponding to my keyboard) should I create a text file with Leafpad?

If so, then how do I run it and make it always run?

dcarter

jakoleh 2010-02-21 08:09

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by shadow52 (Post 539006)
Cheers mate, that's great! Could you let me know if I'm using your script the right/best way... I'm doing the following:

1) Boot device, connect keyboard.
2) Open X Terminal, run setxkbmap manually.
3) Slide open built-in keyboard, press key.
4) In X Terminal, run 'nohup python keys.py &' (keys.py is your script). Close terminal.
5) Thereafter, whenever keyboard dis/reconnects, press a key on the built-in keyboard and the map will be reset.

Do you normally have to run setxkbmap manually? Are you placing your script in with the system init scripts or running as user?

Many thanks again :D

You don't have to run setxkbmap manually. The idea of the script is that it will execute the setxkbmap command every time your keyboard is connected.

It works with the Nokia SU-8W keyboard very well.

With SU-8W you don't need to press any keys from internal keyboard.

PC105 keyboards doesn't work at the moment. I wasn't able to get mine Microsoft mobile keyboard 6000.

Quote:

Originally Posted by dcarter (Post 539338)
OK, I apologize in advance,
but to run this script (after entering my own personal variables corresponding to my keyboard) should I create a text file with Leafpad?

If so, then how do I run it and make it always run?

dcarter

Yes you should create a text file using ex. leafpad and then save it to N900 (this is the same as /home/user/MyDocs from terminal) with name keys.py.

I haven't been able to get it start on startup so I have created a desktop icon for it using this guide: http://www.themaemo.com/howto-launch...om-a-shortcut/
(To get icon use this guide also: http://www.themaemo.com/howto-launch...ortcut-part-2/)

[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=false
Name=Nokia SU-8W
Exec=nohup python /home/user/MyDocs/keys.py
Icon=connect

It would be better if it would start on startup, but at least following tip didn't work (http://talk.maemo.org/showpost.php?p...8&postcount=11)


All times are GMT. The time now is 06:50.

vBulletin® Version 3.8.8