Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,739,099 Members 45,763 Now Online
XDA Developers Android and Mobile Development Forum

[Q]Custom Wifi drivers, possible and how?

Tip us?
 
Lupo1989
Old
(Last edited by Lupo1989; 3rd July 2012 at 11:07 AM.)
#1  
Junior Member - OP
Thanks Meter 3
Posts: 10
Join Date: Feb 2011
Default [Q]Custom Wifi drivers, possible and how?

Hey xda people,

I have been looking for custom Galaxy S 3 i9300 Wifi Drivers to enable monitor mode. At first i figured out that the device has a "Murata M2322007 WiFi Module" on board.
Source: stuff-review .com/2012-06/samsung-galaxy-s-iii-receives-the-teardown-treatment/

"Murata supplies its M2322007 WiFi module, which features Broadcom's (BRCM) BCM4330"
Source: seekingalpha .com/article/647181-the-galaxy-s-iii-supply-chain-winners

It workes with Broadcom's that means aircrack has a support for right?
Aircrack Driver List: aircrack-ng .org/doku.php?id=compatibility_drivers
brcm80211 - brcmfmac (SDIO) driver: BCM4330: wireless.kernel .org/en/users/Drivers/brcm80211

Has anyone have a clue that i go to the right direction? Or isnt it possible at the moment because code has to rewriten before it works?

I did little more research and found this about the Galaxy S II: ns3.spinics .net/lists/linux-wireless/msg85390.html
The Following User Says Thank You to Lupo1989 For This Useful Post: [ Click to Expand ]
 
Lupo1989
Old
(Last edited by Lupo1989; 3rd July 2012 at 12:03 PM.)
#2  
Junior Member - OP
Thanks Meter 3
Posts: 10
Join Date: Feb 2011
I found this and downlaod the firmware. But is this the right one? and how can i install it on my android?

"Alternatively, when not available the Android version can be used as well:
git clone https :// android.googlesource .com/platform/hardware/broadcom/wlan
firmware files: bcmdhd/firmware/bcm4329/fw_bcm4329.bin bcmdhd/firmware/bcm4330/fw_bcm4330_b2.bin"
Source: wireless.kernel .org/en/users/Drivers/brcm80211

Example Install guide Wifi driver: nagaraj-embedded.blogspot .nl/2011/02/guide-on-adding-wifi-drivers-on-android.html
 
n_vitek
Old
#3  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Aug 2008
Lupo,

Could you please upload that firmware files somewhere? This f**ing git is pain in ass ((

Thanks in advance!!

BRs,
Victor
 
Lekensteyn
Old
(Last edited by Lekensteyn; 25th October 2013 at 11:18 PM.) Reason: more monitor attempts
#4  
Member
Thanks Meter 47
Posts: 35
Join Date: Aug 2012

 
DONATE TO ME
According to the i9300_defconfig, the i9300 has a BCM4334. This is also confirmed by looking at the device behind the wlan0 interface:
Code:
Select Code
$ grep . -H /sys/class/net/wlan0/device/* 2>/dev/null                                                            
/sys/class/net/wlan0/device/class:0x00
/sys/class/net/wlan0/device/device:0x4334
/sys/class/net/wlan0/device/modalias:sdio:c00v02D0d4334
/sys/class/net/wlan0/device/uevent:DRIVER=bcmsdh_sdmmc
/sys/class/net/wlan0/device/uevent:SDIO_CLASS=00
/sys/class/net/wlan0/device/uevent:SDIO_ID=02D0:4334
/sys/class/net/wlan0/device/uevent:MODALIAS=sdio:c00v02D0d4334
/sys/class/net/wlan0/device/vendor:0x02d0
Monitoring mode appears to be supported if WLP2P and WL11N (depends on WLP2P) are disabled. On i9300, both configuration options are enabled, which prevents adding monitor interfaces:
Code:
Select Code
# iw dev wlan0 interface add mon0 type monitor                                                                                            
command failed: Operation not supported on transport endpoint (-95)
See function wl_cfg80211_add_monitor_if in kernel/samsung/smdk4412/drivers/net/wireless/bcmdhd/wl_cfg80211.c. After disabling that ifdef, and the ifdef near interface_modes (in function wl_setup_wiphy), I could add a monitor, but this interface was unusable.

Another attempt, this time with the following patch:
Code:
Select Code
diff --git a/drivers/net/wireless/bcmdhd/Makefile b/drivers/net/wireless/bcmdhd/Makefile
index 40bc790..51bc125 100644
--- a/drivers/net/wireless/bcmdhd/Makefile
+++ b/drivers/net/wireless/bcmdhd/Makefile
@@ -7,10 +7,11 @@ DHDCFLAGS += -Wall -Wstrict-prototypes -Dlinux -DLINUX -DBCMDRIVER             \
         -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE            \
         -DDHDTHREAD -DBDC -DOOB_INTR_ONLY                                     \
         -DDHD_BCMEVENTS -DSHOW_EVENTS -DBCMDBG                                \
-        -DMMC_SDIO_ABORT -DBCMSDIO -DBCMLXSDMMC -DBCMPLATFORM_BUS -DWLP2P     \
+        -DMMC_SDIO_ABORT -DBCMSDIO -DBCMLXSDMMC -DBCMPLATFORM_BUS \
         -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT          \
         -DKEEP_ALIVE -DCSCAN -DPKT_FILTER_SUPPORT                             \
         -DEMBEDDED_PLATFORM -DPNO_SUPPORT
+#	-DWLP2P     \
 
 #################
 # Common feature
@@ -84,7 +85,7 @@ DHDCFLAGS += -DUSE_KTHREAD_API
 ############
 # JellyBean
 ############
-DHDCFLAGS += -DWL_ENABLE_P2P_IF
+#DHDCFLAGS += -DWL_ENABLE_P2P_IF
 DHDCFLAGS += -DMULTIPLE_SUPPLICANT
 DHDCFLAGS += -DWL_CFG80211_STA_EVENT
Unfortunately, the network module does not load at all (getting I/O timeouts in dmesg).

I think I'll go for a USB adapter + USB OTG cable instead of messing with this driver.

Aside, according to the mainline Linux sources (checked 3.12), the device is supported by the brcmfmac module which does not support monitor modes yet: http://wireless.kernel.org/en/users/...fullmac_driver
Spyware-free, open-source APK Downloader Chrome Extension: https://lekensteyn.nl/apk-downloader/
The Following User Says Thank You to Lekensteyn For This Useful Post: [ Click to Expand ]
 
n01ce
Old
(Last edited by n01ce; 9th May 2014 at 08:23 AM.)
#5  
n01ce's Avatar
Member
Thanks Meter 60
Posts: 42
Join Date: Aug 2013
(I know this is an old post but for those interested int he answer, here's one).

You've to differentiate between the wifi driver (in the linux kernel) and the firmware (that is uploaded to and runs on the bcm4334 chipset).

WiFi driver cracking is (quite) easily doable.
But there's normally no need to patch the wifi driver: If you're running a standard bcmdhd DRIVER, cracking tools should be run after a LD_PRELOAD of the fake driver library to make them understand the interface is in monitor mode, without changing the driver.

Now, for the firmware part...

Quote:
Originally Posted by bcmon team
We are currently working on GS3&4 support (which have a different broadcom chipset), we will release it “when it’s done”.
And that was mid-2013. Bcmon team has not shown any sign of life since (maybe they've been caught by Qualcomm! ).
So that means, if you want bcmon to work on the Galaxy S3, you've to crack the firmware binary code yourself.
And good luck because cracking steps are superficially documented and human-readable patching source code is non-existent.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes