Friday, April 25, 2014

Installing Broadcom BCM43142 Drivers on Kali Linux

Introduction

I've seen some confusion when it comes to installing the wireless drivers for Broadcom's BCM43142 802.11b/g/n card, specifically with Kali or other Debian based distributions. If you're running Linux kernel < 3.10, then just comment out the lines regarding the wl_3.10 patch. This script has been run on both 32bit and 64bit installations with Kali 1.0.6.

lspci

$ lspci | grep BCM43142
02:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)

Installing the drivers

The script is available through Github using the wget command below, or check the bottom of this article for the full script.

$ wget https://gist.githubusercontent.com/chokepoint/11305606/raw/52109f648c2ad5ec6a65bf8eee78fbda15fa1cfb/bcm43142_drivers.sh
$ chmod +x bcm43142_drivers.sh
$ sudo ./bcm43142_drivers.sh

Resources

Kali Linux
Broadcom Driver Instructions
Original wl_3.10 Patch

Script

#!/bin/bash
# chmod +x broadcom_drivers.sh
# ./broadcom_drivers.sh

mkdir broadcom 
cd broadcom
apt-get install linux-headers-`uname -r` build-essential -y

if [ `uname -m` == "i686" ] ; then
 wget http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz
else
 wget http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz
fi
tar -xvf hybrid-v35*
wget http://www.mindwerks.net/wp-content/uploads/2013/10/wl_3.10.patch
patch -p2 < wl_3.10.patch
make
cp wl.ko /lib/modules/`uname -r`/kernel/net/wireless/
depmod
rmmod bcma
echo "blacklist bcma" >> /etc/modprobe.d/blacklist.conf
modprobe wl

70 comments:

  1. Do you think this would work on Tails 1.1, too? I noticed that both Kali and Tails are *extremely* similar.

    ReplyDelete
    Replies
    1. patching file src/wl/sys/wl_linux.c
      Hunk #1 succeeded at 3236 (offset 7 lines).
      Hunk #2 succeeded at 3254 (offset 7 lines).
      Hunk #3 succeeded at 3417 (offset 7 lines).
      Hunk #4 succeeded at 3447 (offset 7 lines).
      Hunk #5 succeeded at 3483 (offset 7 lines).
      KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
      make[1]: Entering directory `/usr/src/linux-headers-3.18.0-kali1-686-pae'
      CFG80211 API is prefered for this kernel version
      Using CFG80211 API
      LD /root/broadcom/built-in.o
      CC [M] /root/broadcom/src/shared/linux_osl.o
      CC [M] /root/broadcom/src/wl/sys/wl_linux.o
      /root/broadcom/src/wl/sys/wl_linux.c: In function ‘wl_alloc_linux_if’:
      /root/broadcom/src/wl/sys/wl_linux.c:1348:64: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
      /root/broadcom/src/wl/sys/wl_linux.c:1348:8: error: ‘alloc_netdev’ undeclared (first use in this function)
      /root/broadcom/src/wl/sys/wl_linux.c:1348:8: note: each undeclared identifier is reported only once for each function it appears in
      make[4]: *** [/root/broadcom/src/wl/sys/wl_linux.o] Error 1
      make[3]: *** [_module_/root/broadcom] Error 2
      make[2]: *** [sub-make] Error 2
      make[1]: *** [all] Error 2
      make[1]: Leaving directory `/usr/src/linux-headers-3.18.0-kali1-686-pae'
      make: *** [all] Error 2
      cp: cannot stat `wl.ko': No such file or directory
      FATAL: Module wl not found.




      Any Solution to this..problem

      Delete
    2. I also encountered the same error....please help me....
      I dont have active internet connection

      Delete
    3. i have same problem too plz help

      Delete
    4. Did you guys have any luck with this? I am super stressed over such a simple thing as a driver install causing this much trouble.

      Delete
    5. same error any solution yet?

      Delete
    6. ngươi phải chú ý, còn những người khác thì Hổ Quyết đã bị đánh chết, Viễn Cổ Hổ Tộc cũng không còn bao nhiêu cường giả.

      Nhạc Cốc trưởng lão nói với Nhạc Thành.

      - Hổ Mãnh, ta sẽ để hắn cuối cùng nhận một cái chết, để hắn tận mắt nhìn Viễn Cổ Hổ Tộc của mình từng người bị đánh chết trước đã.

      Nhạc Thành thản nhiên nói.
      dongtam
      mu private
      tim phong tro
      http://nhatroso.com/
      nhac san cuc manh
      tổng đài tư vấn luật
      http://dichvu.tuvanphapluattructuyen.com/
      văn phòng luật
      tổng đài tư vấn pháp luật
      thành lập công ty
      http://we-cooking.com/
      chém gió
      trung tâm ngoại ngữ
      Ở trong kết giới của Viễn Cổ Hổ Tộc, mấy trăm người mặc khôi giáp màu vàng chỉnh tề mà đứng ở dưới đường, lúc này bọn họ đã được sự sắp xếp của lão tổ, ai mà không tuân thủ thì lập tức bị xử phạt.

      - Xoẹt.

      Mộ thanh âm chấn động nhẹ vang lên, một cái tháp từ từ bay ra bên trong không gian thông đạo ngoài ra không có ai khác, những người thuộc Viễn Cổ Hổ Tộc thì cũng kinh ngạc không thôi.

      Delete
    7. I too have same Issue bcm43142 is not supported by Kali but works fine in Ubuntu :/

      Delete
    8. Me too ..I have lenovo laptop and same error like the guys above....

      Delete
    9. i also had the same issue with my wireless adapter bcm43142 then i referred this link https://wiki.debian.org/wl . now it's working perfectly.

      Delete
    10. type 'lsmod | grep wl' and see whether the module is installed. if it is not installed then install the 'wl' module using 'apt-get install wl'

      Delete
    11. I found a patch by this link http://ouo.io/gi03wp on a site and it is working fine..and kali is now detecting my broadcom wifi device.

      Delete
    12. Pendejo el que no lo supo arreglar y encima de eso se queja, contribuye pinche huebon.

      Delete


    13. wireless-bcm43142 needs wl driver by Broadcom. The problem with wireless-bcm43142-dkms-6.20.55.19_amd64.deb is you need to patch it with appropriate patches for your kernel version.

      you also need corresponding kernel headers to build the kernal driver (wl.ko) You can identify your kernel version using : uname -r

      Make sure you have appropriate kernel headers else you cannot perform build

      for kernel 4.0 perform following steps:-

      add this repository to /etc/apt/sourrces.list : deb http://old.kali.org/kali sana main non-free contrib

      sana is required to download 4.0 kernel headers

      perform apt-get install linux-headers-uname -r build-essential -y

      download Broadcom wl driver source code from https://github.com/gtank/broadcom-wl-dkms-4.0

      extract the zip and cd to that folder

      apply all 9 patches

      patch -p1 < patches/wl-kmod-001_license.patch

      patch -p1 < patches/wl-kmod-002_wext_workaround.patch

      patch -p1 < patches/wl-kmod-003_kernel_3.8.patch

      patch -p1 < patches/wl-kmod-004_kernel_3.15.patch

      patch -p1 < patches/wl-kmod-005_gcc_4.9.patch

      patch -p1 < patches/wl-kmod-006_kernel_3.16.patch

      patch -p1 < patches/wl-kmod-007_kernel_3.17.patch

      patch -p1 < patches/wl-kmod-008_kernel_3.18.patch

      patch -p1 < patches/wl-kmod-009_kernel_4.0.patch

      then execute following codes:

      make

      cp wl.ko /lib/modules/uname -r/kernel/net/wireless/

      depmod

      rmmod bcma

      echo "blacklist bcma" >> /etc/modprobe.d/blacklist.conf

      modprobe wl

      Delete
    14. rmmod: ERROR: Module bcma is not currently loaded
      please help

      Delete
    15. @saurabh you dont have to wory about it. Just skip that command. It is used to remove any preloaded bcma module, since u dont have any there is nothing to remove.

      Delete
  2. its working.............................

    ReplyDelete
  3. works on Kali.... Awesome

    ReplyDelete
  4. Superb! Thanks alot bro. I've been trying all the fixes but only this one worked. thanks again. :)

    ReplyDelete
  5. I am having issues with this installation I installed 32 bit Kalilinux OS on a 64 BIt sony VAIO...TECHIESSS please help meee



    root@Backtrack:~/Desktop# ./broadcom.sh


    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package linux-headers-3.7-trunk-686-pae
    E: Couldn't find any package by regex 'linux-headers-3.7-trunk-686-pae'
    --2014-09-24 16:58:53-- http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz
    Resolving www.broadcom.com (www.broadcom.com)... 63.251.216.155
    Connecting to www.broadcom.com (www.broadcom.com)|63.251.216.155|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1735911 (1.7M) [application/x-gzip]
    Saving to: `hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz'

    100%[======================================>] 17,35,911 11.6K/s in 2m 29s

    2014-09-24 17:01:25 (11.4 KB/s) - `hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz' saved [1735911/1735911]

    Makefile
    lib/
    lib/wlc_hybrid.o_shipped
    lib/LICENSE.txt
    src/
    src/shared/
    src/shared/linux_osl.c
    src/shared/bcmwifi/
    src/shared/bcmwifi/include/
    src/shared/bcmwifi/include/bcmwifi_channels.h
    src/shared/bcmwifi/include/bcmwifi_rates.h
    src/include/
    src/include/typedefs.h
    src/include/bcmdefs.h
    src/include/bcmendian.h
    src/include/linuxver.h
    src/include/wlioctl.h
    src/include/bcmutils.h
    src/include/osl.h
    src/include/linux_osl.h
    src/include/packed_section_end.h
    src/include/packed_section_start.h
    src/include/pcicfg.h
    src/include/epivers.h
    src/common/
    src/common/include/
    src/common/include/proto/
    src/common/include/proto/ethernet.h
    src/common/include/proto/bcmeth.h
    src/common/include/proto/bcmip.h
    src/common/include/proto/bcmevent.h
    src/common/include/proto/ieee80211_radiotap.h
    src/common/include/proto/802.11.h
    src/common/include/proto/802.1d.h
    src/common/include/proto/wpa.h
    src/wl/
    src/wl/sys/
    src/wl/sys/wl_cfg80211_hybrid.c
    src/wl/sys/wl_export.h
    src/wl/sys/wl_dbg.h
    src/wl/sys/wlc_key.h
    src/wl/sys/wlc_ethereal.h
    src/wl/sys/wl_linux.c
    src/wl/sys/wl_linux.h
    src/wl/sys/wl_cfg80211_hybrid.h
    src/wl/sys/wl_iw.c
    src/wl/sys/wl_iw.h
    src/wl/sys/wlc_types.h
    src/wl/sys/wlc_pub.h
    src/wl/sys/wlc_utils.h
    --2014-09-24 17:01:25-- http://www.mindwerks.net/wp-content/uploads/2013/10/wl_3.10.patch
    Resolving www.mindwerks.net (www.mindwerks.net)... 192.81.217.188
    Connecting to www.mindwerks.net (www.mindwerks.net)|192.81.217.188|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2916 (2.8K) [application/octet-stream]
    Saving to: `wl_3.10.patch'

    100%[======================================>] 2,916 18.0K/s in 0.2s

    2014-09-24 17:01:28 (18.0 KB/s) - `wl_3.10.patch' saved [2916/2916]

    patching file src/wl/sys/wl_linux.c
    Hunk #1 succeeded at 3236 (offset 7 lines).
    Hunk #2 succeeded at 3254 (offset 7 lines).
    Hunk #3 succeeded at 3417 (offset 7 lines).
    Hunk #4 succeeded at 3447 (offset 7 lines).
    Hunk #5 succeeded at 3483 (offset 7 lines).
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make: *** /lib/modules/3.7-trunk-686-pae/build: No such file or directory. Stop.
    make: *** [all] Error 2
    cp: cannot stat `wl.ko': No such file or directory
    Error: Module bcma is not currently loaded
    FATAL: Module wl not found.


    root@Backtrack:~/Desktop#

    ReplyDelete
    Replies
    1. Looks like you're on backtrack. Try manually installing the appropriate linux-headers package for your current kernel version and then rerun the script.

      Delete
    2. I am new to kali linux and i am running x64 kali 1.10
      it is asking file to patch ?
      what should i do ?

      Delete
    3. I found a patch by this link http://ouo.io/gi03wp on a site and it is working fine..and kali is now detecting my broadcom wifi device.

      Delete
  6. It is showing as "root@Backtrack:~/Desktop# " because I have named the host as "Backtrack" instead of "Kali" and here is the result for the OS version that i got on running "uname -a"

    Linux Backtrack 3.7-trunk-686-pae #1 SMP Debian 3.7.2-0+kali8 i686 GNU/Linux

    Please let me know the commands and steps needed to be done as I am illiterate in LINUX OS...THANKS IN ADVACE......stderr...

    ReplyDelete
  7. Try using "apt-cache search linux-headers". Find the package that matches your installed kernel version, and then "apt-get install ". Typically it is the result of "echo linux-headers-$(uname -r)" Hope this helps.

    ReplyDelete
  8. Is it the latest driver?
    As per the "broadcom driver instruction" mentioned in RESOURCES the site is showing latest driver as ----223.248 and the script is installing ----223.241
    What should I do? Need advice.......thanks

    ReplyDelete
    Replies
    1. Good call. I'll look into updating the script to point to the latest driver. You should be able to just copy/paste the link in the correct spot and run it, but I haven't tested the latest driver either.

      Delete
  9. JUST THANK YOU !!!

    ReplyDelete
  10. hello there! am new for kali and also having patch failure, i try to relocate the patch file too but it again...


    root@kali:~/broadcom# patch -p2 < wl_3.10.patch.1
    can't find file to patch at input line 4
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    --------------------------
    |diff -Naur bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c
    |--- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200
    |+++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200
    --------------------------
    File to patch: wl_3.10.patch
    patching file wl_3.10.patch
    Hunk #1 FAILED at 3229.
    Hunk #2 FAILED at 3242.
    Hunk #3 FAILED at 3401.
    Hunk #4 FAILED at 3424.
    Hunk #5 FAILED at 3455.
    5 out of 5 hunks FAILED -- saving rejects to file wl_3.10.patch.rej
    root@kali:~/broadcom#
    any help please?


    ReplyDelete
  11. Thanks! Worked perfectly!

    ReplyDelete
  12. Soooo perfect, thanks

    ReplyDelete
  13. Thank you very much. It's working for me.

    ReplyDelete
  14. my lappy is lenovo y510p ideapad. my wireless chipset is bcm43142. i m working on enabling the wifi from last 3 weeks. i followed the above procedure and got my wifi working. but i am able to use it for injection on my dual boot kali linux. after looking around for it i found that my drivers wl is unable to support the injection. is it true ??? if yes then can i get it work after installing another drivers?? give me the link here. if it s not true then tell me how to enable it for injection. thank you!!!!

    ReplyDelete
    Replies
    1. *not able to use injection

      Delete
  15. Hello, I am totally new to kali . . .please anyone guide me how to run this script please

    ReplyDelete
  16. Love you stderr. . . good work . . .i fix it . . .thank you soooooooo much

    ReplyDelete
  17. Awesome... >Works 100% (Y)

    ReplyDelete
  18. Hi, works perfectly, but wifi hack tools (air...-ng) trigger related driver errors.
    Anybody here install the drivers with air-ng tools working?

    ReplyDelete
  19. Hey buddy i am having the same issue with my broadcom driver and my kernel version is 3.18.0-kali1-amd64.
    what should i do.

    ReplyDelete
  20. If your are using Broadcom drivers for kali it will not support the packet injection, so you cant go for the wifi hacking :( Rafael E. Espinosa Santiesteban

    ReplyDelete
  21. i m running kali version 3.18.0-kali1-amd64
    network interface
    02:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01).

    this is the output when i run the above script.


    Saving to: `wl_3.10.patch'

    100%[======================================>] 2,916 --.-K/s in 0s

    2015-02-24 08:48:56 (172 MB/s) - `wl_3.10.patch' saved [2916/2916]

    patching file src/wl/sys/wl_linux.c
    Hunk #1 succeeded at 3236 (offset 7 lines).
    Hunk #2 succeeded at 3254 (offset 7 lines).
    Hunk #3 succeeded at 3417 (offset 7 lines).
    Hunk #4 succeeded at 3447 (offset 7 lines).
    Hunk #5 succeeded at 3483 (offset 7 lines).
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: Entering directory `/usr/src/linux-headers-3.18.0-kali1-amd64'
    CFG80211 API is prefered for this kernel version
    Using CFG80211 API
    LD /root/shell-script/broadcom/built-in.o
    CC [M] /root/shell-script/broadcom/src/shared/linux_osl.o
    CC [M] /root/shell-script/broadcom/src/wl/sys/wl_linux.o
    /root/shell-script/broadcom/src/wl/sys/wl_linux.c: In function ‘wl_alloc_linux_if’:
    /root/shell-script/broadcom/src/wl/sys/wl_linux.c:1348:64: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
    /root/shell-script/broadcom/src/wl/sys/wl_linux.c:1348:8: error: ‘alloc_netdev’ undeclared (first use in this function)
    /root/shell-script/broadcom/src/wl/sys/wl_linux.c:1348:8: note: each undeclared identifier is reported only once for each function it appears in
    make[4]: *** [/root/shell-script/broadcom/src/wl/sys/wl_linux.o] Error 1
    make[3]: *** [_module_/root/shell-script/broadcom] Error 2
    make[2]: *** [sub-make] Error 2
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.18.0-kali1-amd64'
    make: *** [all] Error 2
    cp: cannot stat `wl.ko': No such file or directory
    FATAL: Module wl not found.

    ReplyDelete
  22. Found a way of the decision for a kernel 3.18.0 here: http://www.sakryukin.ru/index.php?module=articles&c=articles&b=6&a=17

    ReplyDelete
    Replies
    1. the problem got more worse after going above solution.
      i am unable to run wifi.
      nothings work now

      always says Fatal Error
      leaving directory.
      No make...
      etc

      please help me sir.

      Delete
  23. this don't work for me :
    ------
    root@kali:~/Downloads/tmp# ./bcm43142_drivers.sh
    --2015-03-14 21:55:56-- http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz
    Résolution de www.broadcom.com (www.broadcom.com)... 63.251.216.155
    Connexion vers www.broadcom.com (www.broadcom.com)|63.251.216.155|:80...connecté.
    requête HTTP transmise, en attente de la réponse...200 OK
    Longueur: 1735911 (1,7M) [application/x-gzip]
    Sauvegarde en : «hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz»

    100%[============================================================================================================>] 1 735 911 64,9K/s ds 28s

    2015-03-14 21:56:24 (61,0 KB/s) - «hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz» sauvegardé [1735911/1735911]

    Makefile
    lib/
    lib/wlc_hybrid.o_shipped
    lib/LICENSE.txt
    src/
    src/shared/
    src/shared/linux_osl.c
    src/shared/bcmwifi/
    src/shared/bcmwifi/include/
    src/shared/bcmwifi/include/bcmwifi_channels.h
    src/shared/bcmwifi/include/bcmwifi_rates.h
    src/include/
    src/include/typedefs.h
    src/include/bcmdefs.h
    src/include/bcmendian.h
    src/include/linuxver.h
    src/include/wlioctl.h
    src/include/bcmutils.h
    src/include/osl.h
    src/include/linux_osl.h
    src/include/packed_section_end.h
    src/include/packed_section_start.h
    src/include/pcicfg.h
    src/include/epivers.h
    src/common/
    src/common/include/
    src/common/include/proto/
    src/common/include/proto/ethernet.h
    src/common/include/proto/bcmeth.h
    src/common/include/proto/bcmip.h
    src/common/include/proto/bcmevent.h
    src/common/include/proto/ieee80211_radiotap.h
    src/common/include/proto/802.11.h
    src/common/include/proto/802.1d.h
    src/common/include/proto/wpa.h
    src/wl/
    src/wl/sys/
    src/wl/sys/wl_cfg80211_hybrid.c
    src/wl/sys/wl_export.h
    src/wl/sys/wl_dbg.h
    src/wl/sys/wlc_key.h
    src/wl/sys/wlc_ethereal.h
    src/wl/sys/wl_linux.c
    src/wl/sys/wl_linux.h
    src/wl/sys/wl_cfg80211_hybrid.h
    src/wl/sys/wl_iw.c
    src/wl/sys/wl_iw.h
    src/wl/sys/wlc_types.h
    src/wl/sys/wlc_pub.h
    src/wl/sys/wlc_utils.h
    --2015-03-14 21:56:24-- http://www.mindwerks.net/wp-content/uploads/2013/10/wl_3.10.patch
    Résolution de www.mindwerks.net (www.mindwerks.net)... 104.28.31.52, 104.28.30.52, 2400:cb00:2048:1::681c:1f34, ...
    Connexion vers www.mindwerks.net (www.mindwerks.net)|104.28.31.52|:80...connecté.
    requête HTTP transmise, en attente de la réponse...200 OK
    Longueur: 2916 (2,8K) [application/octet-stream]
    Sauvegarde en : «wl_3.10.patch»

    100%[============================================================================================================>] 2 916 --.-K/s ds 0,002s

    2015-03-14 21:56:24 (1,73 MB/s) - «wl_3.10.patch» sauvegardé [2916/2916]

    patching file src/wl/sys/wl_linux.c
    Hunk #1 succeeded at 3236 (offset 7 lines).
    Hunk #2 succeeded at 3254 (offset 7 lines).
    Hunk #3 succeeded at 3417 (offset 7 lines).
    Hunk #4 succeeded at 3447 (offset 7 lines).
    Hunk #5 succeeded at 3483 (offset 7 lines).
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make: *** /lib/modules/3.14-kali1-686-pae/build: Aucun fichier ou dossier de ce type. Arrêt.
    make: *** [all] Erreur 2
    cp: impossible d'évaluer « wl.ko »: Aucun fichier ou dossier de ce type
    Error: Module bcma is not currently loaded
    FATAL: Module wl not found.
    -----------

    ReplyDelete
  24. Great post. Hope it'll help others. Here the solution for Centos 6 http://thisismynota.blogspot.com/2015/05/how-to-install-broadcom-bcm43142-wifi.html

    ReplyDelete
  25. i've uninstalled my kalilinux because the broadcom issue, and if this really work i'd like to install it again..
    its just wondering me, since i now there is no connection and the script order us to download some file "wget http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz" ?
    i got an idea, can i download the file in another pc. and then run it on my kalilinux?

    ReplyDelete
  26. This comment has been removed by the author.

    ReplyDelete
  27. this is not work for me
    that error is :




    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: Entering directory '/usr/src/linux-headers-3.16.0-23-generic'
    CFG80211 API is prefered for this kernel version
    Using CFG80211 API
    CC [M] /home/hello/bcm/broadcom/src/wl/sys/wl_linux.o
    /home/hello/bcm/broadcom/src/wl/sys/wl_linux.c: In function ‘wl_dump_ver’:
    /home/hello/bcm/broadcom/src/wl/sys/wl_linux.c:2041:3: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
    __DATE__, __TIME__, EPI_VERSION_STR);
    ^
    /home/hello/bcm/broadcom/src/wl/sys/wl_linux.c:2041:13: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
    __DATE__, __TIME__, EPI_VERSION_STR);
    ^
    cc1: some warnings being treated as errors
    scripts/Makefile.build:257: recipe for target '/home/hello/bcm/broadcom/src/wl/sys/wl_linux.o' failed
    make[2]: *** [/home/hello/bcm/broadcom/src/wl/sys/wl_linux.o] Error 1
    Makefile:1345: recipe for target '_module_/home/hello/bcm/broadcom' failed
    make[1]: *** [_module_/home/hello/bcm/broadcom] Error 2
    make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-23-generic'
    Makefile:136: recipe for target 'all' failed
    make: *** [all] Error 2







    please help me pleasssssse

    ReplyDelete
    Replies
    1. GREEEEEAAATTT NEWS!!!
      For all of you who did not succede with this driver.
      1. Make sure that file: /etc/apt/sources.list contains following 4 lines:

      deb-src http://http.kali.org/kali sana main non-free contrib
      deb-src http://security.kali.org/kali-security sana/updates main contrib non-free
      deb http://http.kali.org/kali sana main non-free contrib
      deb http://security.kali.org/kali-security sana/updates main contrib non-free

      2. After that normaly:,

      apt-get update
      apt-get dist-upgrade
      apt-get install-y linux-headers-$(uname -r)

      3.Then the big surprise (full graphical install):-) Install synaptic.

      apt-get install synaptic -y

      -Then just open synaptic (the new-installed program under Kali-linux) and type "bcm43142" and search.

      -U'll see 3 different drivers.
      broadcom-sta-common
      broadcom-sta-dkms
      broadcom-sta-source

      -Mark for installation to broadcom-sta-dkms and install it.

      -Reboot.

      The wi-fi card will magicly come to life..
      Please comment if it works for you-Thanks...

      Delete
    2. it didn't work with me

      Delete
  28. for an amd64 system i did the following ( lenovo g510 with BCM43142)
    make sure you have the correct sources in your sources.list file

    # main sources for kali
    deb http://http.kali.org/kali kali main non-free contrib
    deb http://security.kali.org/kali-security kali/updates main contrib non-free

    # source sources for kali
    deb-src http://http.kali.org/kali kali main non-free contrib
    deb-src http://security.kali.org/kali-security kali/updates main contrib non-free

    # bleeding edge...
    #deb http://repo.kali.org/kali kali-bleeding-edge main
    #deb-src http://repo.kali.org/kali kali-bleeding-edge main

    and then update and upgrade your system.
    (get update, get upgrade and even get dist-upgrade)

    Then add the specific kernel headers:

    install the (apt-get install) linux-headers-3.18.0-kali3-amd64 ( following the version in the /lib/modules folder)

    then you can jump to the following site and it will explain next steps:


    https://wiki.debian.org/wl

    for clarification:
    #skip step one (thus do not alter the sources.list file as this will cock up the installation badly.)

    #step 2 is safe to run as it will auto build and install the wl.ko driver

    apt-get update
    apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') broadcom-sta-dkms

    #step 3 and 4 must be performed:

    #(unload conflicting modules)
    modprobe -r b44 b43 b43legacy ssb brcmsmac

    #Load the wl module:

    modprobe wl

    at this point i rebooted the system as i did not see a wireless connection. after the reboot the wireless connection was visible and i could connect to the AP and the connection is working fine.

    the wl driver cannot inject packets so if you need to perform such tests then the broadcom card is not the right card..

    i might have over simplified the installation of the kernel module for the BCM card. most important lesson i learned is: patience. reading, trial and error and a reinstall (based on the trial/error result) can occur. but hey. in the end this way i did learn something new

    ReplyDelete
  29. mindwerks link no longer working, just to let you know :)

    ReplyDelete
  30. Thanks that work on my Sony Vaio F15213

    ReplyDelete
  31. GREEEEEAAATTT NEWS!!!
    For all of you who did not succede with this driver.
    1. Make sure that file: /etc/apt/sources.list contains following 4 lines:

    deb-src http://http.kali.org/kali sana main non-free contrib
    deb-src http://security.kali.org/kali-security sana/updates main contrib non-free
    deb http://http.kali.org/kali sana main non-free contrib
    deb http://security.kali.org/kali-security sana/updates main contrib non-free

    2. After that normaly:,

    apt-get update
    apt-get dist-upgrade
    apt-get install-y linux-headers-$(uname -r)

    3.Then the big surprise (full graphical install):-) Install synaptic.

    apt-get install synaptic -y

    -Then just open synaptic (the new-installed program under Kali-linux) and type "bcm43142" and search.

    -U'll see 3 different drivers.
    broadcom-sta-common
    broadcom-sta-dkms
    broadcom-sta-source

    -Mark for installation to broadcom-sta-dkms and install it.

    -Reboot.

    The wi-fi card will magicly come to life..
    Please comment if it works for you-Thanks...

    ReplyDelete
    Replies
    1. perfect after long hustle

      Delete
    2. it still doesn't work....
      i still stuck in apt-get install-y linux-headers-$(uname -r)
      it showed E: Invalid operation install-y

      Delete
  32. # lspci | grep BCM43142
    07:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)
    root@kali:~# wget https://gist.githubusercontent.com/chokepoint/11305606/raw/52109f648c2ad5ec6a65bf8eee78fbda15fa1cfb/bcm43142_drivers.sh
    --2015-12-13 19:45:08-- https://gist.githubusercontent.com/chokepoint/11305606/raw/52109f648c2ad5ec6a65bf8eee78fbda15fa1cfb/bcm43142_drivers.sh
    Resolving gist.githubusercontent.com (gist.githubusercontent.com)... 103.245.222.133, 64:ff9b::67f5:de85
    Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|103.245.222.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 646 [text/plain]
    Saving to: ‘bcm43142_drivers.sh’

    bcm43142_drivers.sh 100%[=====================>] 646 --.-KB/s in 0s

    2015-12-13 19:46:04 (6.87 MB/s) - ‘bcm43142_drivers.sh’ saved [646/646]

    root@kali:~# chmod +x bcm43142_drivers.sh
    root@kali:~# sudo ./bcm43142_drivers.sh
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package linux-headers-4.0.0-kali1-amd64
    E: Couldn't find any package by regex 'linux-headers-4.0.0-kali1-amd64'
    --2015-12-13 19:46:51-- http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz
    Resolving www.broadcom.com (www.broadcom.com)... 63.251.216.155, 64:ff9b::3ffb:d89b
    Connecting to www.broadcom.com (www.broadcom.com)|63.251.216.155|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1786627 (1.7M) [application/x-gzip]
    Saving to: ‘hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz’

    hybrid-v35_64-nodeb 52%[==========> ] 913.61K 5.26KB/s in 2m 52s

    2015-12-13 19:49:46 (5.31 KB/s) - Connection closed at byte 935536. Retrying.

    --2015-12-13 19:49:47-- (try: 2) http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz
    Connecting to www.broadcom.com (www.broadcom.com)|63.251.216.155|:80... connected.
    HTTP request sent, awaiting response... 206 Partial Content
    Length: 1786627 (1.7M), 851091 (831K) remaining [application/x-gzip]
    Saving to: ‘hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz’

    hybrid-v35_64-nodeb 89%[+++++++++++=======> ] 1.53M 5.89KB/s in 2m 10s

    2015-12-13 19:52:00 (4.99 KB/s) - Connection closed at byte 1602375. Retrying.

    --2015-12-13 19:52:02-- (try: 3) http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz
    Connecting to www.broadcom.com (www.broadcom.com)|63.251.216.155|:80... connected.
    HTTP request sent, awaiting response... 206 Partial Content
    Length: 1786627 (1.7M), 184252 (180K) remaining [application/x-gzip]
    Saving to: ‘hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz’

    hybrid-v35_64-nodeb 100%[+++++++++++++++++++==>] 1.70M 4.00KB/s in 28s

    2015-12-13 19:52:32 (6.50 KB/s) - ‘hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz’ saved [1786627/1786627]

    Makefile
    lib/
    lib/wlc_hybrid.o_shipped
    lib/LICENSE.txt
    src/
    src/shared/
    src/shared/linux_osl.c
    src/shared/bcmwifi/
    src/shared/bcmwifi/include/
    src/shared/bcmwifi/include/bcmwifi_channels.h
    src/shared/bcmwifi/include/bcmwifi_rates.h
    src/include/’

    wl_3.10.patch 100%[=====================>] 2.85K 9.52KB/s in 0.3s

    2015-12-13 19:52:36 (9.52 KB/s) - ‘wl_3.10.patch’ saved [2916/2916]

    patching file src/wl/sys/wl_linux.c
    Hunk #1 succeeded at 3236 (offset 7 lines).
    Hunk #2 succeeded at 3254 (offset 7 lines).
    Hunk #3 succeeded at 3417 (offset 7 lines).
    Hunk #4 succeeded at 3447 (offset 7 lines).
    Hunk #5 succeeded at 3483 (offset 7 lines).
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: *** /lib/modules/4.0.0-kali1-amd64/build: No such file or directory. Stop.
    Makefile:136: recipe for target 'all' failed
    make: *** [all] Error 2
    cp: cannot stat ‘wl.ko’: No such file or directory
    modprobe: FATAL: Module wl not found.


    help me plz....

    ReplyDelete
    Replies
    1. Dont make files an such nonsence-there is graphis user program for installing this driver now-its very easy...My card did not work too(i have Lenovo B590)with this script but using this program worke..Follow this instructions:

      1. Make sure that file: /etc/apt/sources.list contains following 4 lines:

      deb-src http://http.kali.org/kali sana main non-free contrib
      deb-src http://security.kali.org/kali-security sana/updates main contrib non-free
      deb http://http.kali.org/kali sana main non-free contrib
      deb http://security.kali.org/kali-security sana/updates main contrib non-free

      2. After that normaly:,

      apt-get update
      apt-get dist-upgrade
      apt-get install-y linux-headers-$(uname -r)

      3.Then the big surprise (full graphical install):-) Install synaptic.

      apt-get install synaptic -y

      -Then just open synaptic (the new-installed program under Kali-linux) and type "bcm43142" and search.

      -U'll see 3 different drivers.
      broadcom-sta-common
      broadcom-sta-dkms
      broadcom-sta-source

      -Mark for installation to broadcom-sta-dkms and install it.

      -Reboot.

      The wi-fi card will magicly come to life..
      Please comment if it works for you-Thanks...

      Delete
  33. I found a patch by this link http://ouo.io/gi03wp on a site and it is working fine..and kali is now detecting my broadcom wifi device.

    ReplyDelete
  34. I have both wlan0 wlan1 but my wifi is not able to find any networks??why??please reply

    ReplyDelete
  35. Hi,
    I’ve installed VMware player in kali 2.0 but it is now working at all.
    After installation everything VMware player is not opening(It is just showing as opening VMware player but not opening)in my kali machine.

    ReplyDelete
  36. http://www.bineesh.net/2016/09/how-to-install-broadcom-bcm43142.html method works for me.

    ReplyDelete