yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] Myshkinbob:
Cool, glad to hear it's working. :)

It's not super-difficult to make the modules yourself. You need to set up a build environment initially, and the easiest way to do that is install virtualbox on windows, then install Linux on that and a few developer tools. That's a one-time setup that takes maybe 30 minutes, most of which is download time.

After that each time you need to make a module you just get the config.gz off the phone for the rom you're using, get the kernel source for the rom you're using and patch it's wifi code, then set the kernel localversion to match what it says in About Phone (that's the "-netarchy-nexus-1.3.7-cfs-2.3.4+" part), and then finally build the module and copy it to your phone. Takes all of 5 minutes. :)

If you want the specifics let me know and i'll write up some instructions.
[Desire Android Development] punky.mtp:
WORKING :D !!! Thanks a lot
[Desire Android Development] tijru:
Well i managed to set up a virtual linux box and found some instructions to set up a build environment (put link in txtfile as attachment because can only put links in post after 8 posts). All those instructions went ok so i'm hoping i'm already half way :P

Some instructions how to proceed from that step would be cool, there is no rush, already stole some precious free time from you :D
[Desire Android Development] Komadyret:
Does this mean you sit on the sources for the latest GB sense kernels???
[Desire Android Development] Alex-V:
Hello :)

Did you know the values that must be changed to change rssi threshold for scan results..than let me know..i want to play with the values..

as in froyo there were better as in gingerbread..

thx to all..with kind regards..Alex
[Desire Android Development] Alex-V:
No One..?
[Desire Android Development] Komadyret:
Just throwing out some random thoughts here, but...

- isn't these values available in a readable format in the kernel source (wifi module)?

- isn't the wifi chip in the HTC Salsa the same as in the Desire?

- would it then be possible to compare the wifi module in Froyo Desire source to the Salsa Gingerbread source?

- It should (?) the be possible to compile a module with the edited values by compiling the Slasa kernel from source, then take out the compiled wifi module and make a flash-able zip from the .ko file?

Please disregard/correct if I'm totally way off here, as I'm no kernel hacker (not adapt at programing at all, in fact) but these are thoughts that come to mind...
[Desire Android Development] Myshkinbob:
I'd suggest PM'ing snq about the RSSI threshold, since he's patching modules for it (i think post-compile by hex-editing), he's going to know the relevant details.

You could also have a look through drivers/net/wireless/bcm4329_204 and the include folder. There's certainly a few #define's regarding RSSI values. You might be able to diff the rssi #define's for the likely file between the froyo desire source and the gingerbread bcm4329_204 source, from the evo 4g or another phone with the same wifi driver (i used the desire S / Saga source to make my module).
[Desire Android Development] Alex-V:
Sounds interesting..but unsure..if it work..but a good theory/thinking

Thx
[Desire Android Development] Alex-V:
As snq is dev i cant write a pm to him..and i have wrote 5 or 6 x on the kernel thread..but i dont have a nswer....but for the rest i say thx a nice idea also..hexedit is not a problem..but i need to know what value :)

Will think about this again..because that would help many people..but my problem is that i not have the knowledge to compile a kernel..do you know a good how to..?
[Desire Android Development] vichimp:
what about no ful sleep for 2.6.35.10-g3f43272 kernel

10x
[Desire Android Development] Myshkinbob:
Previous page of this thread. :)

http://xdaforums.com/showpost.php?p=16223124&postcount=294
[Desire Android Development] Myshkinbob:
I took a spare half hour today to look through the 2.6.35 HTC source for the bcm4329 wifi driver, and i think i found the relevant code to change the rssi threshold to -108dBm and also suppress the rssi_low event messages.

Attached is module for the 2.6.35.10-g3f43272 kernel that comes with the official HTC desire gingerbread rom. It has mode-n, nofullsleep (a.k.a PM_FAST), and an RSSI threshold of -108dBm. You need to manually unzip and push or copy to '/system/lib/modules/'.

Do post back about whether the module is working as intended for you, thanks. :)

Also attached is a diff file for kernel developers, which includes both nmode and rssi threshold changes. If you don't want nmode you can easily open the diff and reset those changes. patches with -p0.
[Desire Android Development] Alex-V:
wow...big big thanks...will try and let you know :) :)

with kind regards..Alex
[Desire Android Development] Alex-V:
tested now...and must say...pretty good.. :) so thx again :) Also the come back to wifi is better i think... :)

One little thing i like to know...did you know...is the time factor than wlan goes off also patchable...i mean if it not have a signal for maybe 15s...is that patchable for more..?

with kind regards..Alex
[Desire Android Development] Myshkinbob:
Cool to hear it's working. :)

I wasn't super clear on what it affects, since i only have a solid -50 to -70dBm wifi signal here. My guess is the rssi threshold is the level at which the phone drops a wifi network upon low signal?

Regarding the timeout at which it drops connections, i'm far from an expert on wifi networking and 802.11x protocol, so it's hard to say. I'd guess that the AP will drop the client (the phone) after a certain period without handshaking/responding? I can take a look through the driver source for anything relevant but it's a long shot though.
[Desire Android Development] Komadyret:
Now, this excites me. The WiFi dropout has been a pain since I went Gingerbread, and I had little if any hope that a good fix could be available before kernel sources where out.

Thank you so much for the work on this sidetrack of your thread.
[Desire Android Development] Alex-V:
I also not a expert in this..i think less than you..but i think about all this...

but what you say.. sounds logically...so i hope that you can look into this...only if you want :)

with kind regards..Alex
[Desire Android Development] Myshkinbob:
Just to clarify the above, the current behavior is that wlan will drop if you lose signal for roughly 15 seconds, correct?

So far as i can tell, the phone sends a keepalive packet every 60s when the screen is on, and every 15s when the screen is off. Do you only get disconnected on wifi after 15s when the phone is in standby (but not when the screen is active)?
[Desire Android Development] Alex-V:
15 s was round about..its not always so..it can be also more...its not really clear to say..will look ..maybe stop time next days...and only if i have zero connection..but with screen on..

Thx for your work and looking into the problems
[Desire Android Development] Myshkinbob:
Ah ok, only happens when the screen is on? Let me know next time it happens, cheers. :)
[Desire Android Development] Alex-V:
I dont looked to this yet if screen is off..as i tried some other modifications with my rom..so many flashs and no time for hear music over wifi..so i will look in the next days.. :) and hope i can give you more details..now i must go to bed...work in the morning :) thx for help again
[Desire Android Development] Zeljko1234:
I flashed it today and for now works great. Thanks Myshkinbob.

Could you please compile without nmode?
[Desire Android Development] mayurh:
thanks for this

unziped and moved it to the folder with root explorer

but then i kept getting error when trying to connect to wifi

went back to root explorer to the file and set the permissions to select all

and its working
[Desire Android Development] punky.mtp:
This module don't work in N mode. This one work : http://xdaforums.com/showpost.php?p=16223124&postcount=294
[Desire Android Development] oxide-:
can you change the rssi threshold to -108db on this one?
[Desire Android Development] :
Thank you!!! this is exactly i was looking for... great work, with this my HTC Desire gingerbread is perfect. Thank you again!
[Desire Android Development] mnaeh:
I copied the file from zip over the one in the modules folder using ES File Explorer followed by full reset (with quick reboot disabled just to be sure), and it still doesn't work as it should. I have a Desire with stock froyo to compare side by side.

Fortunately I have a sweetspot for testing where wifi signal variates between -80dBm and -95dBm all the time, and unfortunately this is the spot I most often surf at.

Did I do anything wrong and if I did then what is the correct procedure to apply this patch. I tested with SGBS v2.2 ROM (root, s-off, ext4... the usual stuff).

:(

EDIT: I used zip from post #309. And one noob question: is there maybe the "right" and the "wrong" way to copy that file. Is ES explorer OK or do I need some other program. Should I delete the original file before pasting the new one?
[Desire Android Development] coolexe:
ya working gr8 here, thx man:D
[Desire Android Development] MGuDiM:
can I use 2.6.35.10 wifi module on 2.6.35.13? if no can someone please post it here , my wifi stopped working and is missing wlan.ko and bcm4329.ko :(
[Desire Android Development] mnaeh:
I tried again to test wifi. This time I used the newest version of SGBS ROM, 2.3, which already includes the aformentioned patch. Did a full wipe and clean install without any aditional setup (google account, apps... nothing, only setup my wifi connection) just to be sure that it's not my fault.

I entered the wifi status through *#*#4636#*#* and clicked refresh constantly. I watched the results of signal variation: 75, 72, 86, 84, 85... 90 and at that moment by by wifi :) So I guess the treshold is still -88dBm.

Can this be fixed? If anyone thinks that it works OK for him, please check the signal. Maybe you just have a bigger antenna :)
[Desire Android Development] Komadyret:
Have to agree with you. I posted earlier on this thread that I couldn't see any improvement, and following your test confirms. I get disconnected as it hits 89 or 90.
[Desire Android Development] tijru:
Thanks a lot for writing a manual for this :)

After a week on the beach I tried it out and I partly succeeded :p

I tried to make a driver for the MIUI rom 1.8.12 for the nexus S for the kernel that came with it. Couldn't find a source for it but then i thought it was a stock nexus s kernel. Phone information says for kernel version: 2.6.35.7-g3cc95e3 android-build@apa28 #1.

So for step 2a. Download the kernel source i took the kernel source from here git://android.git.kernel.org/kernel/samsung.git

Then all goes well till step 2c. Configuring the kernel source to match the phone's kernel, the part for getting config.gz of the phone.

When doing adb pull /proc/config.gz i get:

C:\Android\android-sdk\platform-tools>adb pull /proc/config.gz

remote object '/proc/config.gz' does not exist

Seems that is an option in the kernel to permit that or not.

No problem i thought i'll take the config from my post 285 earlier when i was running the netarchy kernel :p

Then everything went OK, no errors whatsoever till the end of the manual.

But when i want to enable the wifi i get the magic version error:

<3>[ 9246.556807] bcm4329: version magic '2.6.35.7-g3cc95e3+ preempt mod_unload

ARMv7 ' should be '2.6.35.7-g3cc95e3 preempt mod_unload ARMv7 '

So the + sign at the end is the culprit i guess but the problem is that i never put one in the general setup - local version string while configuring the kernel. I only put "-g3cc95e3" in the box.

So I'm a bit lost now. Where i can disable that + sign from showing? :p

Or i did something completely wrong hehe :D

Hope you could help me out and that I can learn from my noob mistake hehe :cool:
[Desire Android Development] Myshkinbob:
Ok looks like the problem is the + is in the Local version of the General Setup of the kernel source you're compiling from. You might want to double check it by typing "gedit .config" in the console from the kernel source directory. That'll pop up the text editor and you can just search the file for the LOCAL_VERSION string. If you still have the + symbol in the compiled module even though it's not present in the .config, you can just set the localversion at compile time by adding:

LOCALVERSION=-g3cc95e3

to the make command when you build the module.

Also i came across an issue with the bcm4329 module and the android NDK toolchain. If you get an unknown symbol error in the dmesg when you try to turn wifi on, you need to recompile the module with a different toolchain -

http://www.codesourcery.com/sgpp/li...03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2

then when you compile the module, change the CROSS_COMPILE= to /path-you-extracted-above-toolchain/bin/arm-eabi-

The part in bold is required, the rest is the path that depends where you extracted the toolchain to.
[Desire Android Development] Myshkinbob:
Just reading through the replies i take it the rssi threshold isn't actually working?

I found a nearby weak wifi signal that's around -90dBm or worse, so i'll take a look at it in the next few days. :)

I assume i can just use an app like wifi analyzer to test whether it's working, as it should show > -100dBm networks when it's working?
[Desire Android Development] mnaeh:
WiFi settings menu under the "secret" menu (*#*#4636#*#*) will do just fine. I think clicking on refresh button once is enough. It will update signal strength as it variates. You can install a dedicated app if you like. I tested with few froyo roms today and it goes above -100 without problems...
[Desire Android Development] tijru:
OK i started over from scratch with clean kernel source and with double checking config file and by adding 'LOCALVERSION=-g3cc95e3' to the build command so it looked like this:

make ARCH=arm LOCALVERSION=-g3cc95e3 CROSS_COMPILE=/home/tijru/nexus-s-build/downloads/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- modules

and the result was:

<3>[54564.093009] bcm4329: version magic '2.6.35.7-g3cc95e3-g3cc95e3 preempt mod

_unload ARMv7 ' should be '2.6.35.7-g3cc95e3 preempt mod_unload ARMv7 '

But at least the + sign has disappeared :D

So i did the same again with clean kernel sources and without adding 'LOCALVERSION=-g3cc95e3' to the build command like the original tutorial and the result was:

<3>[55815.381904] bcm4329: version magic '2.6.35.7-g3cc95e3+ preempt mod_unload

ARMv7 ' should be '2.6.35.7-g3cc95e3 preempt mod_unload ARMv7 '

Hello + sign again :p

I attached my .config file maybe there is something else wrong with it.

Thanks for all the help so far :)
[Desire Android Development] Myshkinbob:
I should've been clearer about how to remove the plus symbol, i meant you could remove the -g3cc95e3 from the .config localversion and specify it in the make command instead. What happened was you had it in the .config and the make command, hence the module coming out as '2.6.35.7-g3cc95e3-g3cc95e3' - it was set twice.

So you can remove it from the .config and specify it in the make command only.

One thing i wasn't aware of was the equivalent alternative; leave it in the .config and then do the make command with a blank localversion, that is, a blank argument, eg. LOCALVERSION=

The short of it is that the localversion will have an appended + symbol when you build the module unless you manually specify the localversion in the make command. :)

The reason for the + symbol appearing automatically is to do with the git source of the kernel, and whether it had clean tags.
[Desire Android Development] tijru:
Now i got a step further :D

Now i got another error while loading the module:

<4>[66484.215335] bcm4329: Unknown symbol __aeabi_unwind_cpp_pr0 (err 0)

<4>[66484.251816] bcm4329: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)

<4>[66484.259075] bcm4329: Unknown symbol __aeabi_unwind_cpp_pr1 (err 0)

<4>[66500.069126] bcm4329: Unknown symbol __aeabi_unwind_cpp_pr0 (err 0)

<4>[66500.076370] bcm4329: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)

<4>[66500.077725] bcm4329: Unknown symbol __aeabi_unwind_cpp_pr1 (err 0)

So I read in you tutorial that when I got unknown symbol errors I should try that other compiler you suggested.

I did that with the following command:

make ARCH=arm LOCALVERSION= CROSS_COMPILE=/home/tijru/nexus-s-build/downloads/arm-2011.03/bin/arm-none-eabi- modules

followed by the usual command:

/home/tijru/nexus-s-build/downloads/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-debug drivers/net/wireless/bcm4329/bcm4329.ko

But i still get errors while loading the module on the phone:

<4>[68234.708791] bcm4329: Unknown symbol __aeabi_unwind_cpp_pr0 (err 0)

<4>[68234.724638] bcm4329: Unknown symbol __aeabi_unwind_cpp_pr1 (err 0)

But at least no more magic version mismatch :)
[Desire Android Development] Myshkinbob:
I'd assume that last error is because you're mixing toolchains, building with the codesourcery toolchain, then stripping symbols with the ndk toolchain. You want to use the same toolchain for both steps. :)

Also there may be remnants left over from previous builds of the module using the ndk. To remove those you use 'make clean'. So i suggest the following, run from the kernel source directory.

remove any previously compiled code:

make clean

recompile the module with the codesourcery toolchain, as you did before:

make ARCH=arm LOCALVERSION= CROSS_COMPILE=/home/tijru/nexus-s-build/downloads/arm-2011.03/bin/arm-none-eabi- modules

strip the debug symbols with the codesourcery toolchain this time, instead of the ndk:

/home/tijru/nexus-s-build/downloads/arm-2011.03/bin/arm-none-eabi-strip --strip-debug drivers/net/wireless/bcm4329/bcm4329.ko

That ought to work now. :)
[Desire Android Development] tijru:
Still errors loading the module I'm afraid:

<4>[101818.931912] bcm4329: Unknown symbol __aeabi_unwind_cpp_pr0 (err 0)

<4>[101818.955023] bcm4329: Unknown symbol __aeabi_unwind_cpp_pr1 (err 0)

Is it still related to the compiler or could it be the wrong kernel sources after all?
[Desire Android Development] Myshkinbob:
Hmm, this symbol is a new one on me, but it's basically complaining about a feature present in the compiled module that's missing in the kernel. One thing you can try is doing "gedit .config" in the console, then search for "CONFIG_ARM_UNWIND=y" and change it to =n instead or put a # at the start of the line (disabling the unwind feature). Don't forget to save the file after editing it.

Then repeat the build steps above (make clean, make, strip). Let me know how it goes. :)
[Desire Android Development] tijru:
Well set that option to "n" but it takes a bit longer when I enable WiFi and I thought hey its working and then my phone rebooted lol :D

Tried to get a dmesg output but it reboots to fast to catch anything.

Any thoughts? :P
[Desire Android Development] Myshkinbob:
Link to the kernel/rom and the source you're using. Something weird is going on. The unwind thing is a debug feature, but it's only used with certain compilers (EABI ones). Cheers. :)

Edit: Actually i just checked back in this thread, you're using MIUI but couldn't get the config off the phone? That's probably the issue, since it's probably using different kernel options compared to netarchy, so using the netarchy config isn't going to work.

Edit2: Did a little more checking, your MIUI apparently uses the current stock Nexus S kernel (2.6.35.7-g3cc95e3). If you can't get the config off the phone, you can use the default config for the nexus s that comes with the source. do make clean again, then run:

rm .config

followed by:

make ARCH=arm herring_defconfig

Then you'll need to "make ARCH=arm menuconfig" and re-enter the localversion in the general setup menu. Then run the make and strip commands from two posts earlier (post #336).
[Desire Android Development] tijru:
Any way of getting a config of the phone with the MIUI rom running?

adb pull /proc/config.gz didn't work and I read somewhere that this is an option in the kernel config to let this happen or not.

Ah was a bit fast replying i see lol :)
[Desire Android Development] tijru:
Well tried all that but back to magic version troubles :)

<3>[ 3951.981303] bcm4329: version magic '2.6.35.7-g3cc95e3-dirty preempt mod_un

load ARMv7 ' should be '2.6.35.7-g3cc95e3 preempt mod_unload ARMv7 '

He keeps adding -dirty to the end no matter what i set in the kernel config or in the make command with "LOCALVERSION=".

Must be something stupid I think hehe :)
[Desire Android Development] Myshkinbob:
Yup it's something a bit silly, that's the kernel autoversion option tagging the build as modified from the original, ie. 'dirty'.

I think that to fix it you do a 'make ARCH=arm menuconfig' and go to General setup then Automatically append version information... and disable it there.
[Desire Android Development] tijru:
It works :D

Really many thanks for guiding me through all the troubles :)

Irl I would have payed you a drink or 5 hehe :D

If you got paypal i can donate some for all your efforts ;)
[Desire Android Development] Myshkinbob:
No problem at all. Cool to hear it's working, finally. :)

Have to say though, that was one the most troublesome compiles i've come across!

On the plus side i bet we've given some useful google results to find for people hitting the same compile errors later. hehe.

edit: oh and check your PM.
[Desire Android Development] mnaeh:
I tried yesterday the newest version of AceSMod007 LITE and it seems that wifi problem is not present there. My signal is around -93 and it holds. Can you please maybe post some noob-proof guide on how to include your wifi patch properly - for end users who just install different ROMs and want to patch them later, as well as for chefs who want to include it at cooking time since there is obviously a confusion surrounding this issue?
[Desire Android Development] :
Thanks a lot for this clear tutorial for compiling bcm4329 module, i'm trying to compile but I get this error: (the other steps go fine)

I use ubuntu 10.04 and HTC saga-2.6.35 source code, I have a HTC Desire Gingerbread 2.6.35.10-g3f43272

vadmin@ubu1004:~/desire-build/Downloads/saga-2.6.35-crc$ make ARCH=arm CROSS_COMPILE=/vadmin/desire-build/Downloads/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- modules

make: /vadmin/desire-build/Downloads/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found

CHK include/linux/version.h

CHK include/generated/utsrelease.h

make[1]: `include/generated/mach-types.h' is up to date.

CC kernel/bounds.s

/bin/sh: /vadmin/desire-build/Downloads/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: not found

make[1]: *** [kernel/bounds.s] Error 127

make: *** [prepare0] Error 2

vadmin@ubu1004:~/desire-build/Downloads/saga-2.6.35-crc$

Possibly this is a stupid question but I'm totally noob...
[Desire Android Development] Myshkinbob:
There's a problem with the path in the CROSS_COMPILE= argument of the make command. It's saying arm-linux-androideabi-gcc does not exist in that path, gcc is the compiler.

Type the path manually and use the tab key to autocomplete each step of the path, that way you can ensure it's all typed correctly. If the path is correct, the last tab will give you a bunch of filenames beginning arm-linux-androideabi-. Good luck. :)

If after successfully compiling, you get a missing symbols error in the dmesg log when you try turn on wifi, see a few messages earlier in the thread (#330), you need to use the codesourcery toolchain as the CROSS_COMPILE argument instead. You'll find it here:

http://www.codesourcery.com/sgpp/li...03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2

In other news i got a new mouse today at lunchtime, so i'll take another look at the RSSI thing later. :)