View Single Post
Posts: 34 | Thanked: 15 times | Joined on Jan 2010
#29
Hey guys, i've got r8187 compiled and insmoded ok

Tryed once again compiling r8187 and trying to understand every step i was doing

The messages you are getting should be warnings according to the wiki, but there is also a fix there too:

http://www.aircrack-ng.org/doku.php?id=r8187
Thanks paulkoan for this tip

Ok, here are the steps i did so anyone can build it:

1. at scratchbox download the rtl8187 source
wget http://dl.aircrack-ng.org/drivers/rt...ux_26.1010.zip

2. Unzip and enter source folder
unzip rtl8187_linux_26.1010.zip
cd rtl8187_linux_26.1010.0622.2006/

3. Download patch
wget http://patches.aircrack-ng.org/rtl8187_2.6.27.patch

4. Unpack driver and stack
tar xzf drv.tar.gz
tar xzf stack.tar.gz

5. apply the new patch:
patch -Np1 -i rtl8187_2.6.27.patch

6. edit ./beta-8187/r8187.h
change the line:
#include <asm/semaphore.h>
to:
#include <linux/semaphore.h>

7.edit ./beta-8187/Makefile
change the line:
EXTRA_CFLAGS += -mhard-float -DCONFIG_FORCE_HARD_FLOAT=y
to:
EXTRA_CFLAGS += -msoft-float -DCONFIG_FORCE_HARD_FLOAT=n
(Thanx to qwerty12)

8. Compile stack against kernel-power-headers
make -C /usr/src/kernel-power-headers/ M=/targets/FREMANTLE_ARMEL/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211/ modules

9. Remove ./beta-r817/Module.symvers and link the one at the folder ieee80211:
rm -f ./beta-8187/Module.symvers
ln -s ../ieee80211/Module.symvers ./beta-8187Module.symvers
(Thanxs to paulkoal)

10. Compile driver against kernel-power-headers
make -C /usr/src/kernel-power-headers/ M=/targets/FREMANTLE_ARMEL/usr/src/rtl8187_linux_26.1010.0622.2006/beta-8187/ modules

Note: If its fails saying it needs ECHI KERNEL SUPPORT remove lines referencing this at ./beta-8187/r8187_core.c
(Thanx qwerty12)

11. Copy modules to your N900, rmmod modules for wifi and mac80211 stack and insmod new modules in sequence.
rmmod wl12xx
rmmod mac80211
insmod /path.to.your.modules/ieee8011_crypt-rtl.ko
insmod /path.to.your.modules/ieee8011_crypt_wep-rtl.ko
insmod /path.to.your.modules/ieee8011_crypt_tkip-rtl.ko
insmod /path.to.your.modules/ieee8011_crypt_ccmp-rtl.ko
insmod /path.to.your.modules/r8187.ko

You are done.

Take a look to this:
Loading Modules:
[83180.697662] ieee80211_crypt: registered algorithm 'NULL'
[83180.729888] ieee80211_crypt: registered algorithm 'WEP'
[83180.761230] ieee80211_crypt: registered algorithm 'TKIP'
[83180.791564] ieee80211_crypt: registered algorithm 'CCMP'
[83180.928344]
[83180.928344] Linux kernel driver for RTL8187 based WLAN cards
[83180.928375] Copyright (c) 2004-2005, Andrea Merello
[83180.928375] rtl8187: Initializing module
[83180.928405] rtl8187: Wireless extensions version 22
[83180.928405] rtl8187: Initializing proc filesystem
[83180.933319] usbcore: registered new interface driver rtl8187

Connecting usb adapter with h-e-n:
[87292.424987] twl4030_usb twl4030_usb: HW_CONDITIONS 0xd0/208; link 2
[87294.017333] usb usb1: usb resume
[87294.036346] hub 1-0:1.0: hub_resume
[87294.036407] hub 1-0:1.0: port 1: status 0101 change 0001
[87294.146575] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
[87294.146667] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[87294.270904] usb 1-1: new high speed USB device using musb_hdrc and address 27
[87294.421234] usb 1-1: default language 0x0409
[87294.428497] usb 1-1: uevent
[87294.428710] usb 1-1: usb_probe_device
[87294.428741] usb 1-1: configuration #1 chosen from 1 choice
[87294.433959] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[87294.434326] usb 1-1:1.0: uevent
[87294.434600] rtl8187 1-1:1.0: usb_probe_interface
[87294.434631] rtl8187 1-1:1.0: usb_probe_interface - got id
[87294.568725] rtl8187: Enabling 14 channels.
[87294.569427] rtl8187: MAC chip version: 04
[87294.569458] rtl8187: Card type: AD
[87294.569610] rtl8187: Reported EEPROM chip is a 93c46 (1Kbit)
[87294.671600] rtl8187: Card MAC address is 00:c0:ca:20:53:d9
[87294.921722] rtl8187: RF Chip ID: 05
[87294.964965] rtl8187: Card reports RF frontend Realtek 8225
[87294.964996] rtl8187: WW:This driver has EXPERIMENTAL support for this chipset.
[87294.965026] rtl8187: WW:use it with care and at your own risk and
[87294.965057] rtl8187: WW:**PLEASE** REPORT SUCCESS/INSUCCESS TO andreamrl@tiscali.it
[87295.044311] rtl8187: This seems a new V2 radio
[87295.044708] rtl8187: PAPE from CONFIG2: 0
[87295.056091] rtl8187: Driver probe completed
[87295.056121]
[87295.074859] /home/builder2/maemo-fremantle-armel-extras-devel/work/kernel-power-2.6.28/drivers/usb/core/inode.c: creating file '027'
[87295.076538] usb 1-1: New USB device found, idVendor=0bda, idProduct=8187
[87295.076599] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[87295.076629] usb 1-1: Product: RTL8187_Wireless_LAN_Adapte˙
[87295.076660] usb 1-1: Manufacturer: Manufacturer_Realtek_RTL8187_
[87295.076690] usb 1-1: SerialNumber: 00C0CA2053D9
[87295.076721] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[87295.076812] hub 1-0:1.0: port 1 enable change, status 00000503


iwconfig output:

wlan0 802.11b/g Mode:Managed Access Point: Not-Associated
Bit Rate:11 Mb/s Tx-Power=5 dBm
Retryn Fragment thrff
Encryption keyff
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Its works without any external power source , at list for the moment

Now im going to experiment a little

Thanx to everyone who helped me and, of course, h-e-n developers. (rtl8187 stack mac80211 is next)

Last edited by pinoverclock; 2010-12-04 at 18:35.
 

The Following 3 Users Say Thank You to pinoverclock For This Useful Post: