Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    how to get bluetooth pc105 keyboards to work with N900

    Reply
    Page 28 of 36 | Prev | 18   26     27   28   29     30   | Next | Last
    pgaarde | # 271 | 2010-05-13, 21:35 | Report

    Originally Posted by jakoleh View Post
    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()

    Hi,

    I know Python quiet well, but not the Maeomo specific stuff. The script is setting the layout every time the keyboard connects, but how is the script invoked the first time, to make the MainLoop run at all times?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    superbelow | # 272 | 2010-05-15, 13:53 | Report

    Hello guys,

    I followed this wiki to connect my Apple Wireless Keyboard.

    http://wiki.maemo.org/Fremantle_Blue...eyboard_Layout

    It works fine so far, but I have to issues:

    1) Is there a working German layout within xkb-chinook?
    If I just use
    HTML Code:
    "cp -i xkb-chinook/symbols/de xkb/symbols/."
    and
    Code:
    setxkbmap -device 4 -I -I/usr/share/X11/xkb-chinook -rules base -model pc105 -layout de
    it does not work (I do have ü, ä, ö but on arrow keys )


    2) I do not understand the last part of the wiki article.
    What does "Put this in /etc/init.d/bluetooth-keyboard" mean?
    Is that folder/file and how do I edit/create it?!


    Thank you very much for your support!!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    GameboyRMH | # 273 | 2010-05-15, 15:37 | Report

    Hey couple of quick questions.

    Today I hooked up a Rocketfish bluetooth keyboard (model RF-BTKB2) to the N900, got the layout set up and was playing Descent on the TV, had no problems setting it up. But I ran into a couple of issues:

    1. If the phone is in sleep mode (screen off) the bluetooth keyboard doesn't work. Any workarounds for this?

    2. After disconnecting the keyboard, the N900's Ctrl key wouldn't work and it was stuck in caps lock mode. I had to reboot to get it back to normal. Is there a command that will reset the keyboard?

    Thanks

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by GameboyRMH; 2010-05-18 at 12:54.

     
    WhiteWolf | # 274 | 2010-05-15, 16:36 | Report

    Originally Posted by superbelow View Post
    Hello guys,

    I followed this wiki to connect my Apple Wireless Keyboard.

    http://wiki.maemo.org/Fremantle_Blue...eyboard_Layout

    It works fine so far, but I have to issues:

    1) Is there a working German layout within xkb-chinook?
    If I just use
    HTML Code:
    "cp -i xkb-chinook/symbols/de xkb/symbols/."
    and
    Code:
    setxkbmap -device 4 -I -I/usr/share/X11/xkb-chinook -rules base -model pc105 -layout de
    it does not work (I do have ü, ä, ö but on arrow keys )


    2) I do not understand the last part of the wiki article.
    What does "Put this in /etc/init.d/bluetooth-keyboard" mean?
    Is that folder/file and how do I edit/create it?!


    Thank you very much for your support!!
    I have the same problem with the Spanish language

    Edit | Forward | Quote | Quick Reply | Thanks

     
    qobi | # 275 | 2010-05-26, 23:32 | Report

    Has anybody tried the bluetooth keyboard methods from this thread with PR1.2? Known to work? Known not to work?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    GameboyRMH | # 276 | 2010-05-26, 23:51 | Report

    I don't see any reason this shouldn't work just the same.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    JoHnY | # 277 | 2010-05-27, 07:58 | Report

    Originally Posted by qobi View Post
    Has anybody tried the bluetooth keyboard methods from this thread with PR1.2? Known to work? Known not to work?
    Hi,

    yes, I can confirm the steps I have previously got together are still working, even after reflashing the device with the new firmware.

    JoHnY

    Edit | Forward | Quote | Quick Reply | Thanks

     
    dnastase | # 278 | 2010-05-27, 11:29 | Report

    Originally Posted by JoHnY View Post
    Hi,

    yes, I can confirm the steps I have previously got together are still working, even after reflashing the device with the new firmware.

    JoHnY
    So this issue hasn't been fixed by PR 1.2 ?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    JoHnY | # 279 | 2010-05-27, 11:33 | Report

    Originally Posted by dnastase View Post
    So this issue hasn't been fixed by PR 1.2 ?
    Yes, it does not work out of the box... Although I did not have to send the dbus command and the keyboard did connect succesfully instantly (after removing the input from the disabled plugins for bluetooth) and I only had to set the new keyboard layout, but it's probably just due to the fact that I have been using it previously.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ericf2009 | # 280 | 2010-05-28, 06:58 | Report

    Originally Posted by qobi View Post
    Has anybody tried the bluetooth keyboard methods from this thread with PR1.2? Known to work? Known not to work?
    Yes: NO they do not work for me. Just before installing PR1.2 I was ecstatic to get my iGo Ultra Slim Stowaway working beautifully, with the exception of the return key periodically quitting. On re-executing the setxkbmap command and pressing yet again a key on the N900, it would come back.
    After installing PR1.2, the N900 doesn't hear the iGo. Nothing at all. If I delete it and re-pair, it says it pairs successfully, but no keystrokes get to the N900, nor does it appear in the hildon-im-xkbtool --list. It's dead in the water.
    I've stopped and restarted bluetoothd, also.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 28 of 36 | Prev | 18   26     27   28   29     30   | Next | Last
vBulletin® Version 3.8.8
Normal Logout