Reply
Thread Tools
Posts: 85 | Thanked: 29 times | Joined on Jan 2008
#11
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?
 
Posts: 6 | Thanked: 5 times | Joined on Jan 2010
#12
Maybe you compiled for an i386 target instead of ARM?
 
Posts: 85 | Thanked: 29 times | Joined on Jan 2008
#13
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

Last edited by Ulysses; 2010-01-23 at 22:02.
 
Posts: 17 | Thanked: 3 times | Joined on Dec 2009 @ Bristol, UK
#14
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.
 
Posts: 17 | Thanked: 3 times | Joined on Dec 2009 @ Bristol, UK
#15
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
 

The Following User Says Thank You to ashre For This Useful Post:
Posts: 17 | Thanked: 3 times | Joined on Dec 2009 @ Bristol, UK
#16
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.
 
Posts: 17 | Thanked: 3 times | Joined on Dec 2009 @ Bristol, UK
#17
Looking at it now I think hid-apple.ko is a red herring. I think it's for the USB Apple keyboards.
 
Posts: 17 | Thanked: 3 times | Joined on Dec 2009 @ Bristol, UK
#18
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;
}
 

The Following 2 Users Say Thank You to ashre For This Useful Post:
Posts: 85 | Thanked: 29 times | Joined on Jan 2008
#19
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
 
Posts: 17 | Thanked: 3 times | Joined on Dec 2009 @ Bristol, UK
#20
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
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 16:46.