Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Apple Wireless keyboard hack

    Reply
    Page 2 of 4 | Prev |   1   2   3     4   | Next
    Ulysses | # 11 | 2010-01-23, 20:56 | Report

    Got it. Thanks.

    I followed the instructions pertaining internal modules compilation, everything went smooth, however:

    Nokia-N900-42-11:/home/user# insmod hid-apple.ko
    insmod: error inserting 'hid-apple.ko': -1 Invalid module format

    What gives?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    axonpoet | # 12 | 2010-01-23, 21:21 | Report

    Maybe you compiled for an i386 target instead of ARM?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Ulysses | # 13 | 2010-01-23, 21:58 | Report

    No, it was the ARM target.

    So how did you do it? You compiled the module and did an insmod on the device? That's it? You didn't reflash a custom kernel on the device, or did you? Was there anything that is not documented and we should know?

    Thanks in advance.

    Ulysses

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Ulysses; 2010-01-23 at 22:02.

     
    ashre | # 14 | 2010-01-29, 13:01 | Report

    Have you got this working Ulysses?

    I'm going to have a go this weekend but wondered if you had succeeded and had any hints.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ashre | # 15 | 2010-01-29, 16:57 | Report

    By the way I got the same problem as you with the invalid module format, it was because I hadn't built the kernel before I built the modules. Here is the complete guide to getting it to compile:

    Download and install the GUI installer from http://doiop.com/maemosdk

    Open a command prompt and type:

    Code:
    newgrp sbox
    scratchbox
    
    # Now within the scratchbox environment
    # Set up a kernel target
    sb-conf setup MaemoKernel -c cs2007q3-glibc2.5-arm7 -d qemu:perl:svn:apt-https -t /scratchbox/devkits/qemu/bin/qemu-arm-sb
    sb-conf select MaemoKernel
    sb-conf rs MaemoKernel /home/user/maemo-sdk-rootstrap_5.0_armel.tgz 
    sb-conf in MaemoKernel -edFL
    
    # Get the kernel source
    mkdir ~/maemo_kernel
    fakeroot apt-get update
    cd ~/maemo_kernel
    apt-get source kernel
    cd kernel-2.6.28
    
    # Create the config
    make EXTRAVERSION=-omap1 rx51_defconfig
    nano .config
    # Add a line that says:
    CONFIG_HID_APPLE=m
    
    # Build the kernel and modules
    make EXTRAVERSION=-omap1 oldconfig
    make EXTRAVERSION=-omap1 bzImage
    make EXTRAVERSION=-omap1 modules
    
    # Exit from scratchbox
    exit
    
    # Install the new module, I use ssh and zeroconf but you can copy it manually - change the names in angle brackets to your own values and remove the angle brackets
    scp /scratchbox/users/<ashre>/home/<ashre>/maemo_kernel/kernel-2.6.28/drivers/hid/hid-apple.ko root@<N900>.local:/lib/modules/2.6.28-omap1/
    ssh root@<N900>.local
    
    # Now on the N900, in an XTerminal if not using ssh
    insmod /lib/modules/2.6.28-omap1/hid-apple.ko

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to ashre For This Useful Post:
    clasificado

     
    ashre | # 16 | 2010-01-30, 11:25 | Report

    I can now load hid-apple.ko (I have to load hid.ko first) with insmod but the Apple keyboard refuses to connect properly.

    I've tried restarting bluetooth as well with:
    Code:
    stop bluetoothd
    start bluetoothd
    But still no joy. I think this is because I have to signal the connection is encrypted. On the N800 it seems to work out of the box:

    http://cs.gmu.edu/~sean/stuff/n800/keyboard/

    Will keep trying anway, any hints appreciated.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ashre | # 17 | 2010-01-30, 12:49 | Report

    Looking at it now I think hid-apple.ko is a red herring. I think it's for the USB Apple keyboards.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ashre | # 18 | 2010-01-30, 13:17 | Report

    Ok by editing /etc/bluetooth/main.conf and pairing repeatedly I got it to work, teh connection keeps dropping though so I need to work on that and I also need to remap the keys. Here's what I added to main.conf:

    Code:
    HIDD_ENABLED=1
    device 00:25:BC:FB:7D:B6 {
     name "Apple Wireless Keyboard";
     auth enable;
     encrypt enable;
    }

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to ashre For This Useful Post:
    attila77, clasificado

     
    Ulysses | # 19 | 2010-01-30, 17:00 | Report

    Same here. The connection keeps dropping.
    I tried to debug with hcidump.
    http://maemo.org/development/tools/d...bluez-hcidump/

    hcidump reports a successful connection, but then a disconnect occurs almost immediately. Accordingly, the bluetooth icon on the desktop turns blue for one second, then goes white again.

    What is causing the disconnect?

    Ulysses

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ashre | # 20 | 2010-01-30, 19:33 | Report

    I think the problem of it closing the connection after a few seconds is related to this bug:

    https://bugs.maemo.org/show_bug.cgi?id=8483

    Talked about in this thread:

    http://talk.maemo.org/showthread.php...xkbmap&page=11

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 2 of 4 | Prev |   1   2   3     4   | Next
vBulletin® Version 3.8.8
Normal Logout