Build an Impractical But Awesome Lego Mindstorm Dock

The vast majority of what we cover here on the XDA-Developers News Portal relates to … more

MultiROM Makes its Way Over to the HTC One (M8)

While browsing our forum, you will undoubtedly find more than a few enticing ROMs available … more

Welcome to the New XDA-Developers Portal!

You may recall that a few weeks ago, we opened up the XDA-2015 forum themesto intrepid users … more

An Android Enthusiast’s Apple iPhone 6 Challenge

The media has gone batty again over Apple “revolutionizing” smartphones. … more
Post Reply

[Q]Custom Wifi drivers, possible and how?

3rd July 2012, 09:03 AM   |  #1  
OP Junior Member
Thanks Meter: 3
 
10 posts
Join Date:Joined: Feb 2011
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
Last edited by Lupo1989; 3rd July 2012 at 11:07 AM.
The Following User Says Thank You to Lupo1989 For This Useful Post: [ View ]
3rd July 2012, 09:49 AM   |  #2  
OP Junior Member
Thanks Meter: 3
 
10 posts
Join Date:Joined: 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
Last edited by Lupo1989; 3rd July 2012 at 12:03 PM.
29th July 2012, 06:24 PM   |  #3  
Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: Aug 2008
Lupo,

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

Thanks in advance!!

BRs,
Victor
23rd October 2013, 03:44 PM   |  #4  
Member
Thanks Meter: 47
 
35 posts
Join Date:Joined: Aug 2012
Donate to Me
More
According to the i9300_defconfig, the i9300 has a BCM4334. This is also confirmed by looking at the device behind the wlan0 interface:
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:
# 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:
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
Last edited by Lekensteyn; 25th October 2013 at 11:18 PM. Reason: more monitor attempts
The Following User Says Thank You to Lekensteyn For This Useful Post: [ View ]
8th May 2014, 09:16 AM   |  #5  
n01ce's Avatar
Member
Thanks Meter: 67
 
50 posts
Join Date:Joined: Aug 2013
Exclamation
(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.
Last edited by n01ce; 9th May 2014 at 08:23 AM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes