Playing with ‘r8187′

Hello again guys ,, sorry for being away all that time… anyways i’ll get into the subject directly

i bough a wireless card “gb” that uses r8187 driver and i pluged it with an antenna , the maximum TX-power the regular linux driver can be increased to 12 or 15 as far as i remember but what i know about that card is it can take more power than 12~15dBm so i patched the driver and made it possible to increase it to what ever you want so be careful while using it…

the driver also has lots of good and special features than the regular one which uses mac80211 this driver uses ieee80211, and BTW i’m working on Ubuntu 2.6.27-11-generic kernel

if you don’t have the necessary packages to deal with this tutorial then download them from apt

just type

apt-get install build-essential
apt-get install libssl-dev

here’s a picture :

Alfa+Outdoor antenna

Click to see it! ^^

first of all download the driver

wget http://0x80.org/code/drivers/rtl8187_linux_26.1010.0622.2006.tar.gz

then extract it contents

tar xzf rtl8187_linux_26.1010.0622.2006.tar.gz
cd rtl8187_linux_26.1010.0622.2006/

then compile it using makedevbk script

sh makedrvbk

finally install it

make install

Done!

but wait, your using a new kernel which by default uses mac80211 and our patched driver uses ieee80211 so what you need to do is blacklist the old r8187 module by adding this line

blacklist rtl8187

in /etc/modprobe.d/blacklist

and then restart your computer … after restarting
plugin your device you’ll see it right there, but with new features

type :

iwpriv wlan1 ,, you’ll 4 new things

highpower : ** user it on your own it might destroy your device **
activescan : if 0 the driver will avoid to send probe requests, sanning will be only on beacon basis
badcrc : let you choose to kill or to pass to the upper layer frames with bad crc in monitor mode
and fasttx

so if you want to enable the highpower type :

iwpriv wlan1 highpower 1

and then for example increase your device TX-power using iwconfig

iwconfig wlan1 txpower 40

to see the actual power using iwlist :

iwlist wlan1 txpower

have fun!! :-D

BTW this code is based on rtl8180-sa2400 pre-0.22-CVS and most of the code was patched by aircrack-ng members and other dudes around the world… what changes i have added to the code are

* removing the limitation of increasing the TX-power
* adding support of the latest kernels

in the driver package you downloaded there are lots of Readme files , so read them and help your self if you have any other questions just ask! ^^

Have a nice day!

15 thoughts on “Playing with ‘r8187′”

  1. iwconfig wlan1 txpower 40

    –> you have test with how many with txpower,
    and you use how many in tx power by defaut ?
    You have an “kde autostart” for your config or just boost the tw power 1 hour for private reason ?

  2. I didn’t understand most of what you said, anyways

    q) “and you use how many in tx power by default ?”
    The default driver that comes in compat-wireless-2.6 package
    for this driver supports only 12dBm as far as i remember :>
    but in this driver the minimum is 20dBm and the maximum is infinity
    just increase it on your own risk.

    q) “and you use how many in tx power by default ?”
    I use 27 in the moment

    q) “You have an \“kde autostart\” for your config or just boost the tw power 1 hour for private reason ?”
    I have never used KDE environment and know nothing more than it uses QT library :P , and the rest of your question i didn’t understander
    anyways No i dont have a configuration file for “kde autostart” thing..!

  3. how can i configure alfa usb wireless devise on ubunto ??
    It works fine with vista, but with ubuntu i see the connection establish icon but not able to browse internet nor able to ping the gateway 192.168.1.1.
    with i type ifconfig i see the following ipaddress 192.168.1.9.

    i tried above steps, but no success ???

    I am new to ubuntu.

  4. Hi Qnix,

    Thanks for the tip, but no luck.

    find below the results, if anyone can help me with this it will be great.

    root@r-nav:/etc/network# iwconfig

    wlan1

    IEEE 802.11bg ESSID:”Abc”
    Mode:Managed Frequency:2.462 GHz Access Point:

    00:1B:9E:BE:AA:03
    Bit Rate=54 Mb/s Tx-Power=27 dBm
    Retry min

    limit:7 RTS thr:off Fragment thr=2352 B
    Encryption key:off
    Power

    Management:off
    Link Quality=14/100 Signal level:65/65
    Rx invalid

    nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid

    misc:0 Missed beacon:0

    root@r-nav:/etc/network# ping google.com -c 4

    ping: unknown host google.com

  5. root@r-nav:/tmp/rtl8187b# dhclient
    Internet Systems Consortium DHCP Client V3.1.1
    Copyright 2004-2008 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/sw/dhcp/

    wmaster0: unknown hardware address type 801
    wmaster0: unknown hardware address type 801
    Listening on LPF/pan0/8e:a0:33:b0:48:cb
    Sending on LPF/pan0/8e:a0:33:b0:48:cb
    Listening on LPF/wmaster0/
    Sending on LPF/wmaster0/
    Listening on LPF/eth1/00:17:31:1c:23:0e
    Sending on LPF/eth1/00:17:31:1c:23:0e
    Listening on LPF/wlan1/00:c0:ca:1b:d3:d5
    Sending on LPF/wlan1/00:c0:ca:1b:d3:d5
    Listening on LPF/eth0/00:17:31:1c:29:4d
    Sending on LPF/eth0/00:17:31:1c:29:4d
    Sending on Socket/fallback
    DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3
    DHCPDISCOVER on pan0 to 255.255.255.255 port 67 interval 3
    DHCPDISCOVER on wmaster0 to 255.255.255.255 port 67 interval 7
    DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 3
    DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
    DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 9
    DHCPDISCOVER on wmaster0 to 255.255.255.255 port 67 interval 8
    DHCPDISCOVER on pan0 to 255.255.255.255 port 67 interval 7
    DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
    DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 5
    No DHCPOFFERS received.
    No working leases in persistent database – sleeping.

    appreciate your help.

  6. I don’t see any problem! you can supply more information about your problem so i can know at least what’s the problem.
    As i can see from what you comments that the signal is too weak 14 of 100 thats mean its really unstable depending on the environment your in, anyways try to be near the network and check it again or write your real problem clearly with suppling all the information about it i/someone can help you.

  7. Hi Qnix,
    I have installed 8.10 ubuntu on a usb disk and connected usb ALFA network (as shown in the above picture) for internet.
    I am getting connected to access point, but I am not able to browse any web page nor able to pint google.com –c 4 from the terminal

  8. addition to the above information, when i boot from vista instead of ubuntu (hardware and location remains the same) i am getting good strength and fast internet.

  9. Hi Qnix,

    thanks for your help, actual problem was i have installed few other drivers from other sites before installing the above driver, but when i reinstall ubuntu and followed above step i am getting internet.

    But few more questions, appreciate if you can answer.

    1) I bought 8 DBi ANTENNA Kit (for better coverage), but i don’t know how to configure as i am getting the same result as 2 DBi.

    2) I have install ubuntu on my laptop acer aspire 5920G which has got inbuilt wireless. i want to disable that inbuilt wireless and use alfa to get better internet strength.

  10. 1) I bought 8 DBi ANTENNA Kit (for better coverage), but i don’t know how to configure as i am getting the same result as 2 DBi.

    well you have to use a driver that can support increasing the TX-power
    most of the drivers doesn’t support that feature and has a limited value
    of TX-power , you can patch there codes and make them support whatever value you want but that’s really dangerous it might corrupt your device so becareful and don’t do it till you know what you are doing.
    I think there are couple drivers and devices that support a good TX-power value that you’ll need for a 16 Dbi i think or more, check out Atheros cards or others.

    2) I have install ubuntu on my laptop acer aspire 5920G which has got inbuilt wireless. i want to disable that inbuilt wireless and use alfa to get better internet strength.

    You can remove the mini device from your laptop
    or just blacklist it in /etc/modprob.d/blacklist
    for example add this line
    “blacklist iwl8082″
    where iwl8082 is the driver the builtin wireless card uses it “lsmod” to know your drivers

    You welcome,

  11. Hi Qnix,
    Appreciate if you can spare some more time and answer below question.
    1) I am using TX power to 40 as stated above, is it ok or shell I increase or decrease the value. My alfa wireless devise is same as shown in the above picture, except I recently bought long antenna for better performance.
    2) When I remove my Alfa usb wireless devise and re connect it settings are restore to factory settings (e.g. txpower 5), is there a way to store those commands (iwconfig wlan0 txpower 40 and iwpriv wlan0 highpower 1) in a file and make it run automatically when I connect my usb wireless devise?

    3) Is there any way to increase TX power in vista, as I got desktop (ubuntu)and laptop(dual boot(ubuntu and vista)) and wanted to have txpower increased on vista.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>