Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

  1. #1
    Join Date
    Dec 2008
    Location
    /home/chenxiaolong&/root
    Beans
    474
    Distro
    Ubuntu Development Release

    HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    First of all, this tutorial will use NDISWRAPPER, not b43, not wl (Broadcom STA). So, hooray for new method (actually, the only method ). Now, I don't want anyone to get scared because of bad experiences with Ndiswrapper or whatever, it's actually quite easy. I did not come up with any of this info. I'm just putting this guide together from Kacper Szczesniak's info (who came up with this method), WifiDocsDriverbcm43xxFeisty_No-Fluff from the Ubuntu Wiki, and my experience.

    The Broadcom STA (wl) driver has references to monitor mode in it's code, but does not have that functionality in reality. The Broadcom Windows driver on the other hand does have this capability. So, for monitor mode to work, you will need a patched version of ndiswrapper.

    Pre-everything stuff
    ----------------------

    1) Install the Linux kernel headers:

    Code:
    sudo apt-get install linux-headers-$(uname -r)
    2) Install the tools required to compile Ndiswrapper:

    Code:
    sudo apt-get install checkinstall dh-make fakeroot gcc build-essential
    3) Unload current Ndiswrapper module, if running:

    Code:
    sudo rmmod ndiswrapper
    4) Ummm...continue on!

    Download and Patch Ndiswrapper
    -------------------------------

    1) Download the Latest Ndiswrapper tarball by click the green download button at http://sourceforge.net/projects/ndiswrapper/files/ to a folder called "ndiswrapper" in your home directory. So, download to ~/ndiswrapper.

    2) Change to ~/ndiswrapper in the Terminal:

    Code:
    cd ~/ndiswrapper
    3) Extract the tarball:

    Code:
    tar zxvf ndiswrapper-1.*.tar.gz
    4) Download "bcmmon.diff.zip" (attached to this post) to ~/ndiswrapper and unzip it to make "bcmmon.diff":

    Code:
    unzip bcmmon.diff.zip
    5) This is the annoying part (for some people). If you the latest version of Ndiswrapper, when you downloaded, was 1.56, then continue to the next step. Otherwise, keep reading. If you downloaded a later version, you will need to open the "bcmmon.diff" in a text editor (Gedit -- Gnome, Kwrite -- KDE). DON'T LET ALL THAT TEXT SCARE YOU . Now, press <Ctrl> + F and find "1.56". Every time you find 1.56, change it to the version you downloaded.

    6) Patch the sources:

    Code:
    patch -p1 < bcmmon.diff
    7) Now, change to the ndiswrapper-1.* directory:

    Code:
    cd ndiswrapper-1.*
    8) Now, run "make" to compile Ndiswrapper:

    Code:
    make
    9) Remove existing Ndiswrapper, if installed:

    Code:
    sudo apt-get remove ndiswrapper-common
    If you are running Linux Mint, the packages: [mint-meta-gnome mint-meta-x64 mintwifi] will be removed. This is okay. We will reinstall them later.

    10) After compiling, run checkinstall to make a DEB package:

    Code:
    sudo checkinstall
    For the description, I put:

    Patched ndiswrapper build to make monitor mode work on Broadcom cards.
    For kernel: <your kernel>
    I definitely suggest that you put your kernel version in the description because you will need to make a new DEB package every time your kernel gets upgraded (I.e. run "sudo apt-get remove ndiswrapper-common && sudo checkinstall" again).

    For the name, use: "ndiswrapper-common2"

    For "Provides: ," also use: "ndiswrapper-common"

    11) Press Enter. Your new ndiswrapper package will be installed automatically.

    If you are running Linux Mint, you can reinstall the packages: [mint-meta-gnome mint-meta-x64 mintwifi] now.

    Download and Install Windows Driver
    -------------------------------------

    1) Change back to "~/ndiswrapper" and create "~/ndiswrapper/windriver". Then change to "~/ndiswrapper/windriver":

    Code:
    cd ~/ndiswrapper
    mkdir ~/ndiswrapper/windriver
    cd ~/ndiswrapper/windriver
    2) Download this file using a web browser (wget gives wierd file name) to "~/ndiswrapper/windriver":

    3) Unzip "R174291-pruned.zip":

    Code:
    unzip R174291-pruned.zip
    4) Check if there were previous Windows WLAN drivers installed:

    Code:
    sudo /usr/sbin/ndiswrapper -l
    If there are, remove it with:

    Code:
    sudo /usr/sbin/ndiswrapper -r <the driver>
    5) Install the downloaded Dell Windows driver in Ndiswrapper:

    Code:
    sudo /usr/sbin/ndiswrapper -i bcmwl5.inf
    6) Now, when you run "sudo /usr/sbin/ndiswrapper -l," you should get something similar to this:

    bcmwl5 : driver installed
    device (14E4:4315) present (alternate driver: wl)
    7) Umm...continue on.

    Ndiswrapper module stuff
    --------------------------

    1) Refresh the list of modules to make sure that the ndiswrapper module is found:

    Code:
    sudo depmod
    sudo depmod -a
    2) To ensure that there are no conflicting drivers loaded on boot, add the following lines to "/etc/modprobe.d/broadcom.conf":

    Code:
    sudo < gedit OR kwrite > /etc/modprobe.d/broadcom.conf
    Add:

    blacklist b43
    blacklist b43legacy
    blacklist bcm43xx
    blacklist ssb
    blacklist wl
    3) Open "/etc/modules" and check to make sure that b43 / b43legacy / bcm43xx / ssb / wl aren't mentioned. Then, add "ndiswrapper" on a new line.

    Code:
    sudo < gedit OR kwrite > /etc/modules
    4) REBOOT!!! OR to use ndiswrapper without rebooting, run:

    Code:
    sudo rmmod b43 b43legacy bcm43xx ssb wl
    sudo modprobe ndiswrapper
    5) Enjoy cracking your neighbor's wireless...I mean...I didn't say...anything .

    -----------

    Again, thanks to Kacper Szczesniak for his experience and his info at http://seclists.org/fulldisclosure/2008/Nov/506 and also to the Ubuntu Wiki for the Dell Windows XP Broadcom driver: https://help.ubuntu.com/community/Wi...oad/Extraction.
    Attached Files Attached Files
    Last edited by chenxiaolong; April 6th, 2010 at 01:47 AM. Reason: add more info
    Laptop broke ...

  2. #2
    Join Date
    Mar 2007
    Beans
    97

    Re: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    Hey,

    Sorry, I was pretty excited by this post. Especially considering the amazing timing of the google search. The patch isn't working for me though. Running 10.04 beta btw, but that shouldn't affect the patch process. Also, I'm using gcc4.4 instead of 3.4, which I could see making a difference.

    Code:
    alaric@alaric-laptop:~/.opt/ndiswrapper-1.56$ patch -p1 < bcmmon.diff
    patching file ndiswrapper-1.56_bcmmon/driver/iw_ndis.c
    Hunk #1 FAILED at 29.
    Hunk #2 FAILED at 176.
    Hunk #3 FAILED at 205.
    Hunk #4 FAILED at 302.
    Hunk #5 FAILED at 316.
    Hunk #6 FAILED at 1832.
    Hunk #7 FAILED at 1935.
    Hunk #8 FAILED at 1948.
    8 out of 8 hunks FAILED -- saving rejects to file ndiswrapper-1.56_bcmmon/driver/iw_ndis.c.rej
    patching file ndiswrapper-1.56_bcmmon/driver/iw_ndis.h
    Hunk #1 FAILED at 194.
    1 out of 1 hunk FAILED -- saving rejects to file ndiswrapper-1.56_bcmmon/driver/iw_ndis.h.rej
    patching file ndiswrapper-1.56_bcmmon/driver/ndis.c
    Hunk #1 FAILED at 30.
    Hunk #2 FAILED at 56.
    Hunk #3 FAILED at 89.
    Hunk #4 FAILED at 102.
    Hunk #5 FAILED at 154.
    Hunk #6 FAILED at 201.
    Hunk #7 FAILED at 2244.
    Hunk #8 FAILED at 2259.
    Hunk #9 FAILED at 2266.
    9 out of 9 hunks FAILED -- saving rejects to file ndiswrapper-1.56_bcmmon/driver/ndis.c.rej
    Last edited by Alaric; April 4th, 2010 at 04:41 AM. Reason: Take that back.

  3. #3
    Join Date
    Mar 2007
    Beans
    97

    Re: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    Fail, Be sure to be in the directory outside of ndiswrapper-1.56, not inside of ndiswrapper-1.56.

  4. #4
    Join Date
    May 2010
    Beans
    4

    Re: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    Thanks for this guide. I did everything EXACTLY as you posted and it all worked, except...

    The only problem I have now is that wlan0 had disappeared when I check ifconfig

    Any ideas?

  5. #5
    Join Date
    Dec 2008
    Location
    /home/chenxiaolong&/root
    Beans
    474
    Distro
    Ubuntu Development Release

    Re: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    Does wlan0 show up in "iwconfig"? If it does, then all you need to do, is to run "sudo ifconfig wlan0 up."
    Laptop broke ...

  6. #6
    Join Date
    May 2010
    Beans
    4

    Re: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    Quote Originally Posted by chenxiaolong View Post
    Does wlan0 show up in "iwconfig"? If it does, then all you need to do, is to run "sudo ifconfig wlan0 up."
    Nope, not there. "no such device"

  7. #7
    Join Date
    May 2010
    Beans
    4

    Re: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    I did a reinstall of Ubuntu 10.04, followed the directions, and still no wlan0. Not even in iwconfig

  8. #8
    Join Date
    Dec 2008
    Location
    /home/chenxiaolong&/root
    Beans
    474
    Distro
    Ubuntu Development Release

    Re: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    Well, that's frustrating. My card shows up just fine.

    EDIT: Oh yeah, does "sudo ndiswrapper -l" say "Hardware Present" (or something of the sort)? If not, you will need a new WinXP driver for ndiswrapper.
    Laptop broke ...

  9. #9
    Join Date
    May 2010
    Beans
    4

    Re: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    Yeah the card shows up there. Weirdest thing ever.

  10. #10
    Join Date
    Dec 2008
    Location
    /home/chenxiaolong&/root
    Beans
    474
    Distro
    Ubuntu Development Release

    Re: HOWTO: Monitor Mode on Broadcom 14e4:4315 and 14e4:432* Wireless Cards

    Hmmmm....mmmm....GAH!!!

    The only thing I can suggest now is the most basic thing:

    sudo rmmod ndiswrapper
    sudo modprobe ndiswrapper
    dmesg | grep "ndiswrapper" #<--Check for errors in dmesg
    Laptop broke ...

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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