Results 1 to 7 of 7

Thread: How to configure the RTL8187 usb adapter

  1. #1
    Just burned his ISO
    Join Date
    Jul 2008
    Posts
    4

    Default How to configure the RTL8187 usb adapter

    I have long since loathed using this piece of hardware ever since I got my Gateway MT6452 with it built in. It was annoying, and horrible to work with. It frustrated me for the longest time, and I even considered throwing my laptop out of my window in my anger. Hopefully I can save you a little bit of that, with a few simple steps.

    First off, since 2.6.23- the RTL8187 driver has been included vanilla, so you could look into that.

    Anyway, to get this driver up, it's pretty straightforward. You need to load two modules:

    Code:
    modprobe r8187
    Code:
    modprobe mac80211
    From there it is pretty much up to you. Configuring it with ifconfig, iwconfig, or other tools is all on you. However I have written a small bash script which you can use to configure your network located on sourceforge:

    Code:
    https://sourceforge.net/project/showfiles.php?group_id=233556
    (I had to put it in the code brackets because apparently you can't post a link until you have 15 posts) :P

    If you want to use that, here's how:

    Download wlan0up_BT3.

    cd into the directory that you downloaded it to, Firefox's default directory for Backtrack is /root so that is probably where you will find it.

    Code:
    cd /root
    Now rename it to just wlan0up:

    Code:
    mv wlan0up_BT3 wlan0up
    Change the permissions so that it can be executable:

    Code:
    chmod a+x wlan0up
    And then move it to your /bin directly, so you can just type "wlan0up" to get it running:

    Code:
    mv wlan0up /bin/wlan0up
    Now you can type
    Code:
    wlan0up
    in a terminal, and it will give you the options to do the following:

    Shutdown all other interfaces besides wlan0
    (I recommend this, because for me I had some issues in the past with other interfaces interfering with wlan0)
    Type
    Code:
    y
    to accept that

    Would you like to change the mode of wlan0?
    Answering "y" here will let you select managed, auto, or monitor, adhoc or whatever.
    Just select "n" here because the mode should be at managed, which is the default.

    Would you like to list the networks available?
    Typing "y" here will show you the available networks, and their information.
    If you know the essid of the network, just say "n" here otherwise review the essids available.

    Now please enter network name
    Here you should enter your essid.
    for instance
    Code:
    linksys
    Now enter the p4ssw0rdz. If there is no key, enter off.
    Enter you WEP key here, or wpa or what have you.
    Code:
    mywirelesskey
    Would you like to get your DHCP request? y/n
    Type "y" to automatically configure your IP settings, and netmask, and all of the other goodies that DHCP can do for you.
    If you typed "n" you will be met with prompts to set up your static info.

    Next it pings google, make sure you get a connection here.

    And lastly it uses the macchanger tool to fake your MAC address. This isn't important for you to configure your network, I mainly wrote this tool for myself, and I like to fake my MAC address when I get onto wireless networks a lot. Type "y" to input your new MAC, or "n" to skip this step.

    And that's all, you should be connected to the network.

    Have fun pwning teh n00bs and watching your pr0n.

    Axl

  2. #2
    Just burned his ISO
    Join Date
    Jun 2008
    Posts
    15

    Default

    Another nice feature when using the r8187 driver (the one from aircrack-ng.org) is the highpower mode.

    First you have to enable highpower by setting

    Code:
    iwpriv wlanX highpower 1
    Then you can raise the transmission power by setting

    Code:
    iwconfig wlanX txpower Y
    Y can ba a value from 0 to 35, be aware, that using high values might damage your stick. I've been using values from 25 to 30 without having problems so far. It's a great way to establish a stable connection to distant AP's.
    I love deadlines. I like the whooshing sound they make as they fly by.

    Douglas Adams

  3. #3
    Senior Member
    Join Date
    Apr 2008
    Posts
    2,008

    Default

    Quote Originally Posted by :[Axl]: View Post
    And lastly it uses the macchanger tool to fake your MAC address. This isn't important for you to configure your network, I mainly wrote this tool for myself, and I like to fake my MAC address when I get onto wireless networks a lot. Type "y" to input your new MAC, or "n" to skip this step.
    I have not taken a look at the actual script of yours, but according to your post it seems like the mac will be faked after you are connected to the network. If you want it to be impossible for your real MAC to be logged you should make sure that the MAC is faked as the very first step, before any scanning or associating is done. Faking the MAC after the connection is established should also confuse the AP and most likely require you to re-associate.

    Quote Originally Posted by RaginRob View Post
    Another nice feature when using the r8187 driver (the one from aircrack-ng.org) is the highpower mode.
    As a sidenote the highpower mode will work with the included driver in BT3F. I have also been using my Alfa at the highest possible TX setting (35) for several hours at a time and have not noticed any issues to this date.
    -Monkeys are like nature's humans.

  4. #4
    Just burned his ISO
    Join Date
    Jul 2008
    Posts
    4

    Default

    Quote Originally Posted by =Tron= View Post
    I have not taken a look at the actual script of yours, but according to your post it seems like the mac will be faked after you are connected to the network. If you want it to be impossible for your real MAC to be logged you should make sure that the MAC is faked as the very first step, before any scanning or associating is done. Faking the MAC after the connection is established should also confuse the AP and most likely require you to re-associate.
    Ah, that is a good idea. Thanks .

  5. #5
    Just burned his ISO
    Join Date
    Sep 2007
    Posts
    4

    Default

    See, this is where dummys like me get confused. When I first searched into this, I found all the posts stating that you had to go through the whole ndiswrapper garbage if you want to use this card in managed mode.

    then I find a post that basically stated:

    Its not complex at all.

    --------------------------------

    ifconfig wlan0

    (brings it up)

    iwconfig wlan0 mode monitor

    (puts it in monitor mode)

    and
    iwconfig wlan0 mode managed

    (puts it back in managed mode)


    ohh.. alright.. no Ndiswrapper headache? alright..

    I get that straight and of course the GUI wifi manager i test it with crashes every couple minutes, where I search for the typical "drop that, go with the command line, yarrrrrrrrrrrrrr!" alright.. cool thanks for the detailed steps..

    I try the command line info, get through it no prob, but the dhcpd fails (yeah I deleted the old files first).. so.. upon searching through that little headache, it led me back to this script, which looks like it could be handy for someone like me (if I give up on figuring out why the manual way isn't working.) but it also brings my confusion full circle.

    The info (in my pea brain) that I've found in these different situations seems to contradict other things. Is it simple or is it a headache? I don't mind going through some headaches to learn a thing or 2.. I just want to make sure I'm going through the proper headache to learn. Should I throw all I read about ndiswrappers out the window?

    Here's where I left off:

    typed in the following as instructed (after stopping the card, setting the AP + WEP then restarting the card

    dhcpd wlan0

    and I get the no subnet declaration something something 0.0.0.0

    I'll probably try out this script for sanity's sake, but anyone have a clue as to what I did wrong? (from memory, sorry.. forgot to "enable copy and paste to and from host machine" for the hundredth time (AHHHHHHHHHHHHHHH give me a break) anyway.
    --------------------------------
    basically what I did:

    did the whole rmmod thing (after not redoing it the first time..forgot)

    ifconfig wlan0 up
    iwconfig wlan0 mode managed
    ifconfig wlan0 down
    iwconfig essid "My AP" key ########
    ifconfg wlan0 up
    dhcpd wlan0

  6. #6
    Just burned his ISO
    Join Date
    Jul 2008
    Posts
    4

    Default

    Previously, you would have had to use the windows driver with ndiswrapper. But since the kernel release of 2.6.23* and on, it is supported natively.

    After you have loaded the modules for the driver (r8187 and mac80211) then you should do
    Code:
    lsmod | grep 8187
    to make sure they are both there, and are both using the rtl8187 wireless adapter.
    If they are, then you are on your next step to configuring the network. Use the ifconfig and iwconfig tools to do that if you don't want to use the script. For instance say your wlan essid is NETWK and your WEP key is WEP123:

    Code:
    ifconfig eth0 down && ifconfig wlan0 up && iwconfig wlan0 key WEP123 && iwconfig wlan0 essid NETWK && dhcpcd wlan0
    The first command shuts down eth0 (it gets in the way for me) the second brings wlan0 up, third sets the key, fourth sets your essid, and finally gets your DHCP info.

    If you have issues with DHCP and your subnet mask try setting it before you run dhcpcd:

    Code:
    ifconfig wlan0 netmask addr 255.255.255.0
    That is of course if your netmask is 255.255.255.0, which in most cases it is. If it isn't, then you should know about it, and if you know about it, you should know how to set it.

  7. #7
    Just burned his ISO
    Join Date
    Sep 2007
    Posts
    4

    Default

    Excellent advice -- thank you. That definitely helps me make sense of some of the holes that I've been missing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •