| Prev |   1   2   3     4   | Next
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Apple Wireless keyboard hack (https://talk.maemo.org/showthread.php?t=41845)

Ulysses 2010-01-23 20:56

Re: Apple Wireless keyboard hack
 
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?

axonpoet 2010-01-23 21:21

Re: Apple Wireless keyboard hack
 
Maybe you compiled for an i386 target instead of ARM?

Ulysses 2010-01-23 21:58

Re: Apple Wireless keyboard hack
 
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

ashre 2010-01-29 13:01

Re: Apple Wireless keyboard hack
 
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.

ashre 2010-01-29 16:57

Re: Apple Wireless keyboard hack
 
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


ashre 2010-01-30 11:25

Re: Apple Wireless keyboard hack
 
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.

ashre 2010-01-30 12:49

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

ashre 2010-01-30 13:17

Re: Apple Wireless keyboard hack
 
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;
}


Ulysses 2010-01-30 17:00

Re: Apple Wireless keyboard hack
 
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

ashre 2010-01-30 19:33

Re: Apple Wireless keyboard hack
 
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


| Prev |   1   2   3     4   | Next
All times are GMT. The time now is 19:38.

vBulletin® Version 3.8.8