# Sticky  {WIP} GUIDE: NVS_Map Creation *AKA How I fixed my wifi/MAC issues*



## blackadept

**disclaimer* This is a WIP, do it at your own risk. There is not much danger here, but I have seen some impressive feats of o-crap-iticity. So do this at your own risk, especially the advanced section coming later. I aint responable yo!*

Basically: nvs_map.bin is what is used to set you MAC address, part of calibrating, as well as other parameters that I won't get into here (can check out the other posts as I make them if curious). So if your wifi is acting weird, keep having your MAC change, getting calibration errors, etc... check /pds/wifi/ and /system/etc/wifi/ for this bin file. If its not there than this is how you make it:

*********FIRST MAKE SURE YOU CHECK ALL WIFI FOLDERS FOR THE FILE - NVS_MAP.BIN!!! THESE INLUDE: /system/etc/wifi ; /pds/wifi ; /data/misc/wifi . IF IT'S IN ONE OF THOSE FOLDERS THEN MOVE IT TO WHERE IT NEEDS TO GO MANUALLY OR CHANGE THE TERMINAL COMMANDS IN STEP 5 ACCORDINGLY. THEN CONTINUE TO STEP 6!*************

*1)* Turn phone on

*2)* Make sure that Wifi is on

*3)* Start up terminal on your phone *NOT VIA ADB SHELL...DO IT IN THE PHONE* and enter[/CODE]:
dmesg

Going to get a long list of random strings/errors/etc. IF your brave read thru em, it is identifying what may be messing up in your phone lol. Up towards the top you'll see the stuff for tiwlan giving errors about no nvs, fw, etc.. now go back to the bottom of the terminal.

*4)* Now enter this series in (The part you enter is green. The rest is what you'll be answered with. Be careful and copy the right stuff and pay attention to the spaces!):



> # wlan_cu -itiwlan0 -b
> user_main, start
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> 
> / w p 1 l 2 f 2
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> .../poWer> set_Power_mode, set_powersave_powerLevel, set_deFault_powerlevel, set_doZe_mode_in_auto, traffic_Thresholds, eNable, Disable, set_dcO_itrim
> 
> / t r h 0 7
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> .../biT> Bip/, Radio debug/
> .../Radio debug> Get hdk version, cHannel tune, Tx debug/, rx Statistics/
> Channel tune of channel 7 was performed OK
> 
> / t b b 375 128 0
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> .../biT> Bip/, Radio debug/
> .../Bip> update Buffer calref point, Tx bip, Rx bip/
> BufferCalReferencePoint was configured succesfully
> 
> / t b t 1 0 0 0 0 0 0 0
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> .../biT> Bip/, Radio debug/
> .../Bip> update Buffer calref point, Tx bip, Rx bip/
> Entering FillMACAddressToNVS
> Mac[0]=##
> Mac[1]=##
> Mac[2]=##
> Mac[3]=##
> Mac[4]=##
> Mac[5]=##
> exiting FillMACAddressToNVS
> 
> /
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> 
> q


Congrats skippy, you just made a basic general nvs_map.bin thats made by your phone FOR your phone. But you ain't done yet....

*5)* Now you gotta move it. You can do this with root explorer manually or again in terminal. Terminal commands would be:

# cp nvs_map.bin /pds/wifi
# mv nvs_map.bin /system/etc/wifi

**EDIT* For those getting errors with moving: make sure the system is read/write (rw) not read only (ro) and try again, or use root explorer. *EDIT**

*6)* In your " / " directory you'll find an init script named init.mapphone_cdma.rc . Inside there towards the bottom you'll find this strand if you open it:



Code:


service wlan_loader /system/bin/wlan_loader \<br />
							-f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini \<br />
							-e /pds/wifi/nvs_map.bin<br />
						   disabled<br />
						   oneshot

You can try leaving it like that and manually execute it like any other script with rootexplorer/script manager/ whatever.... Or you can change it like I do to:



Code:


service wlan_loader /system/bin/wlan_loader \<br />
						   -e /system/etc/wifi/nvs_map.bin \<br />
						   -f /system/etc/wifi/fw_wl1271.bin \<br />
						   -i /system/etc/wifi/tiwlan.ini<br />
						   disabled<br />
						   oneshot

Both may work or one of the two, depends on how cranky your phones being. Either way manually execute them via rootexplorer or scriptmanager. After you execute it you'll notice a whole crap load of folders got made in the directory....its fine, take a breath and leave them for now.

*Whatever # I'm up to)* Back in console type in the dmesg command.

Just scroll up and look for the stuff about the tiwlan just like before, except this time instead of errors it should say it found a nvs_map.bin and take off calibrating and downloading firmware etc, and of course .... your new MAC. Assuming all that went beuno, reboot.

If it didn't, then repeat steps 6+ with wifi turned off.

When you come back the extra folders may self delete or they may not, if they didn't erase all the stuff not used (i.e. the 770 folder etc). Now you should be good to go.

Again this is a work in progress, as I have time I will make a post explaining what those random numbers and letters you entered meant. Also, I will post other options to change the parameters in addition to any other updates on the project W-never-never-Lan .... or the other 234251 projects I have going.


----------



## blackadept

*EDIT* Sorry folks, the speed hacks and turning it into N mode is still buggy ... so taking down the command strings until I find a fix. *EDIT*

Also as a side note: I have been asked this a lot. Yes, it is possible to change the MAC after you do all this by using a hex editor. However doing so recklessly can cause you to lose all your data completely! This is why I haven't posted how to. If you feel you must anyways, its rather easy ... but you do so on your own terms. Once I find the safest and most reliable way of doing this I will post it.


----------



## blackadept

and part ummmm deux's deux?


----------



## BMc08GT

Looking forward to this black. Got a good thing going here. Email me at [email protected]


----------



## blackadept

Will do! Tbh, have too .... Mr popularity here never has an empty in box for pm's lmao. Do me a favor tho bud.... email me the file you were talking to me about so I can start thinking and not take 4 yrs again.....

As for W-never-never-lan..... Will start again tomorrow on this stuff, sorry folks ... I know I said I'd put up some of the other stuff tonight. Buuut adhd and I got sucked into the sbf splitting crap .... you'd tthink I'd learn .....

Sent from my DROIDX


----------



## dAi

Will this work on DROID 2

Can I just copy the whole command and paste it all the same time?

Sent from my DROIDX using RootzWiki Forums


----------



## BMc08GT

"blackadept said:


> Will do! Tbh, have too .... Mr popularity here never has an empty in box for pm's lmao. Do me a favor tho bud.... email me the file you were talking to me about so I can start thinking and not take 4 yrs again.....
> 
> As for W-never-never-lan..... Will start again tomorrow on this stuff, sorry folks ... I know I said I'd put up some of the other stuff tonight. Buuut adhd and I got sucked into the sbf splitting crap .... you'd tthink I'd learn .....
> 
> Sent from my DROIDX


What files you need black?
Also check yur pm's lol


----------



## blackadept

Lol 1.9.5, err that is the one you wanted me to test and mess around with right? Sorry days and nights been kinda running together lately, making me extra "special".

Sent from my DROIDX


----------



## blackadept

O and as far as the Droid 2, depends on the hardware and software. I'd think it would, or atleast he similar. But again, depends on what your wireless is on the Droid 2. I'll try and look up the specs later and let you know.

Sent from my DROIDX


----------



## BMc08GT

"blackadept said:


> Lol 1.9.5, err that is the one you wanted me to test and mess around with right? Sorry days and nights been kinda running together lately, making me extra "special".
> 
> Sent from my DROIDX


Lol 1.9.5 I'm still debugging. Ill send out the beta test once it actually runs


----------



## lakingslayer

Worked like a charm on my DX with MIUI. I had quit using the WIFI due to this problem. Now it works fine. I did use your revised #6 on my phone.

Thanks!


----------



## SaurusX

On a lark I decided to see if my phone had the nvs_map.bin file... it didn't. I was experiencing wifi problems using CM4DX, but ever since I switched to Rev's unofficial builds with the GB kernel I haven't had any problems. Never the less, I ran through the process and everything seems like it worked OK. Of course, I haven't been home to check how it works on wifi yet. Guess we'll see.


----------



## blackadept

Good! I'm glad to hear it helped y'all!

Sent from my DROIDX


----------



## RevNumbers

Appears to work swimmingly on the D2 (it's the same chip lol)

and yes... i said "swimmingly" 

Thanks for the info/write-up man

Rev


----------



## ctcfirearms

Hi blackadept,

Thanks for the thorough help post but it's not working for me on my Droid X. I'm using terminal on my X and getting the following errors:

after:

\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
.../poWer> set_Power_mode, set_powersave_powerLevel, set_deFault_powerlevel, set_doZe_mode_in_auto, traffic_Thresholds, eNable, Disable, set_dcO_itrim

I am getting:

set-dc0-itrim **Error: '1'

and after:

# mv nvs_map.bin /system/etc/wifi

I am getting:

failed on 'nvs_map.bin' - cross-device link

I get the same fail for # mv nvs_map.bin /pds/wifi

Any suggestions as to what I could be doing wrong?

Thanks for the help
ctcfirearms


----------



## blackadept

Question is tho bud, did you wear your floaties this time?!?!

Lol

PS:Rev if you want I think I might have an even easier fix for you maybe.... going thru the initial build. Let me know man

Also, I realized that I flaked on the advanced configuration, part deux of the series.... sorry folks. I promise I'll put it up soon!

Does it make of any better that you didn't get it cause I'm working on some presents?! Lmao, gotta love bribery.

Sent from my DROIDX


----------



## wrightperspective

Is there any way to put this in a flashable zip drive to make it real simple?


----------



## SyNiK4L

ctcfirearms said:


> Hi blackadept,
> 
> Thanks for the thorough help post but it's not working for me on my Droid X. I'm using terminal on my X and getting the following errors:
> 
> after:
> 
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> .../poWer> set_Power_mode, set_powersave_powerLevel, set_deFault_powerlevel, set_doZe_mode_in_auto, traffic_Thresholds, eNable, Disable, set_dcO_itrim
> 
> I am getting:
> 
> set-dc0-itrim **Error: '1'
> 
> and after:
> 
> # mv nvs_map.bin /system/etc/wifi
> 
> I am getting:
> 
> failed on 'nvs_map.bin' - cross-device link
> 
> I get the same fail for # mv nvs_map.bin /pds/wifi
> 
> Any suggestions as to what I could be doing wrong?
> 
> Thanks for the help
> ctcfirearms


After / w p 1 1 2 f 2 ....... i get **Error '1'** Iv tried this with wifi on and off and connected to a network and not connected to a network.....do i need to be connected to make this work? and is there something wrong with that first line?

and then if i just keep going thru it. When i get to the mv nvs_map.bin part i get cant rename 'nvs_map.bin': No such file or directory.


----------



## ctcfirearms

SyNiK4L said:


> After / w p 1 1 2 f 2 ....... i get **Error '1'** Iv tried this with wifi on and off and connected to a network and not connected to a network.....do i need to be connected to make this work? and is there something wrong with that first line?
> 
> and then if i just keep going thru it. When i get to the mv nvs_map.bin part i get cant rename 'nvs_map.bin': No such file or directory.


I was entering / w p 1 1 2 f 2

but I figured out that it is / w p 1 l 2 f 2 ***note it is a lower case L between the 1 and the 2***

however, When i get to the mv nvs_map.bin part I still get - failed on 'nvs_map.bin' - cross-device link???


----------



## blackadept

Yup synk that's a lower case L not a 1 like poster above pointed out, so that line should read;

/ w p 1 l 2 f 2

So / (space) w (lowercase)(space) 1 (number)(space) l (lower case L)(space) 2 (number)(space) f (lowercase)(space) 2 (number)(space) \

And on from there. I figure maybe copy/paste from phones browser over. Damn lower case is hard to tell sometimes with different fonts, lots of asked me about that.

As far as the errors, what roms/builds y'all on? Depending on how you set up your terminal you might could also try:

# cp -rf /nvs_map.bin /system/etc/wifi
#mv -rf /nvs_map.bin /pds/wifi

It might just be wanting an absolute path and not let yah short-hand it. Also, with the errors and what not happening because of syntax, might want to make sure its actually being made, and made correctly, and outputting itself to the / directory.

As far as the other error, did either of you have another nps_map.bin file on your phone in any of the 3 spots? Also, what was the permission of the nvs prior to your moving it?

As for a zip, prolly not. Not cause I'm lazy (don't worry I am) or mean (depends on who you ask) but doesn't really make sense too. What I could do tho is look into make a simple script that you folks could run from wherever (prolly terminal tho) to automate it maybe.

I'll look into that and start writing it. Only issue might be that as its a W.I.P. I'm still trying to find the best calibration, ini edits, lib edits, that kind of stuff. Could suck if I did make the script and a day later it was changed, lol. Don't wanna get beat! Lol jp, yeah, I'll look into writing it. Good idear, will have to give me time tho as rl is crazy. Guess I could just make it basic for now tho till I test these other builds more...

Sent from my DROIDX


----------



## SyNiK4L

ctcfirearms said:


> I was entering / w p 1 1 2 f 2
> 
> but I figured out that it is / w p 1 l 2 f 2 ***note it is a lower case L between the 1 and the 2***
> 
> however, When i get to the mv nvs_map.bin part I still get - failed on 'nvs_map.bin' - cross-device link???





blackadept said:


> Yup synk that's a lower case L not a 1 like poster above pointed out, so that line should read;
> 
> / w p 1 l 2 f 2
> 
> So / (space) w (lowercase)(space) 1 (number)(space) l (lower case L)(space) 2 (number)(space) f (lowercase)(space) 2 (number)(space) \
> 
> And on from there. I figure maybe copy/paste from phones browser over. Damn lower case is hard to tell sometimes with different fonts, lots of asked me about that.
> 
> As far as the errors, what roms/builds y'all on? Depending on how you set up your terminal you might could also try:
> 
> # cp -rf /nvs_map.bin /system/etc/wifi
> #mv -rf /nvs_map.bin /pds/wifi
> 
> It might just be wanting an absolute path and not let yah short-hand it. Also, with the errors and what not happening because of syntax, might want to make sure its actually being made, and made correctly, and outputting itself to the / directory.
> 
> As far as the other error, did either of you have another nps_map.bin file on your phone in any of the 3 spots? Also, what was the permission of the nvs prior to your moving it?
> 
> As for a zip, prolly not. Not cause I'm lazy (don't worry I am) or mean (depends on who you ask) but doesn't really make sense too. What I could do tho is look into make a simple script that you folks could run from wherever (prolly terminal tho) to automate it maybe.
> 
> I'll look into that and start writing it. Only issue might be that as its a W.I.P. I'm still trying to find the best calibration, ini edits, lib edits, that kind of stuff. Could suck if I did make the script and a day later it was changed, lol. Don't wanna get beat! Lol jp, yeah, I'll look into writing it. Good idear, will have to give me time tho as rl is crazy. Guess I could just make it basic for now tho till I test these other builds more...
> 
> Sent from my DROIDX


Awesome thx guys that worked. I also noticed that u dont really have to do that cp or mv thing from terminal u can actually just goto root explorer and copy and paste that file in the correct places


----------



## jv75th

Great work, thank you very much.

It works great on my Droid 2 Global, the Mac Address is not changing anymore.
Is there anyway to change the Mac Address in this file? I want to set the default one

***Nevermind, it worked with the HexEditor. Use it on nvs_map.bin

Oh, btw, within terminal I got the error where I could not move the file since the directory was Read Only, so I used Rootz Explorer to copy it manually to the pds/wifi and etc/wifi folder and it worked great


----------



## blackadept

Yes you can edit the nvs with any hex/binary editor. Only reason I haven't put that up is due to the touchyness of doing that. Changing the file can cause issues with the other files expecting one thing and getting another.

Basically, yeah you can make your MAC whatever you want....however, if done incorrectly it can lead to complete loss of data; no internet, tapatalk, nothing.

Just try and remember.... every phone has two MAC's in a way. The one seen and used (and now made by us  ), and the one "hidden" "unused" one (yes I know it IS used, just saying for general purposes ... ) native to the device (just like a comp), so if you mess with it without knowing what your doing ... bad things can happen lol.

Sent from my DROIDX


----------



## aarkayx

Ok I give up. I tried the whole process to the T, it gives an error at copying stage. if I do "ls" it doesnt even find nvs_map.bin in the current directory. so its not creating the nvs map. although the creation processor doesnt give an error. I am using .605 stock, deodexed with Jakebite and supercharger mods. 
Before doing anything I do "su " and "sysrw". Tried creating a sample folder in the current directory to check whether I have write permission or not, it does create the folder. 
I used both form of cp command


----------



## blackadept

Do you know it wasn't made or just don' t think it was made based off of the mv error in terminal? If you know it wasn't made then we can go from there. If you just think it wasn't made because terminal wouldn't move it but didn't manually look, I'd start there. Use root explorer or whichever you use and check under the / directory *make sure your in the / tho and not in /data or /system or something* if it's there, cool - just move it manually. If it ain't there, well again ... we can go from there.

Also you can try the command with as /nvs_map.bin instead ... sometimes it likes to have all the path and sometimes it doesn't care lol


----------



## ctcfirearms

blackadept said:


> Do you know it wasn't made or just don' t think it was made based off of the mv error in terminal? If you know it wasn't made then we can go from there. If you just think it wasn't made because terminal wouldn't move it but didn't manually look, I'd start there. Use root explorer or whichever you use and check under the / directory *make sure your in the / tho and not in /data or /system or something* if it's there, cool - just move it manually. If it ain't there, well again ... we can go from there.
> 
> Also you can try the command with as /nvs_map.bin instead ... sometimes it likes to have all the path and sometimes it doesn't care lol


Mine is not being created at all - all goes well, but when I check those folder locations and do root explorer search, there is no file that has been created

Maybe that's why I'm getting the "cross device Link" error?

thanks,

Droid X
Running 2.3.3
4.5.602.MB810
BP_C_01.09.13P
[email protected] #2
Apex 2.0 RC3


----------



## blackadept

Hmm so it is not giving any errors when being made, but afterwards its not in the root directory? Hmm that's weird.

Just out of curiosity what is listed in your /system/etc/wifi, /pds/wifi, and /data/misc/wifi folders? Maybe its something to do with 602 and apex as opposed to 2nd init roms. If you have the means to email whatever is in those too it'd help, [email protected].

I'll look into that error tho and see what I can find if I can recreate it and whatnot. Usually you get that if you are creating the wrong file for the phone or using one for a different device (hence the cross device part). My guess is maybe the files? It should give errors if it fails to create when those commands are given.


----------



## SaurusX

So apparently it's the flashing of a new nightly (Rev's 9-28 build in my case) that removes the nvs_map.bin files. Hopefully he does incorporate the scripting in this thread into his builds. It could get tiring running this every time otherwise.


----------



## phaz

Don't think its nightly related. This went on me a month or 2 ago - right about the time the .602 leak appeared in tbh app. Used to restrict router access by mac - couldn't connect for nothing after .602 was flashed - found my mac was not the same as I had in router - and it's been KILLING me all this time.
We good now!!!
FYI - had to run this 3 times before bin file was created - DX cm7gb 9-29 - best to sysrw before starting. ALso - have been flashing cm since build 1, and cmgb since the first - every nightly - problem was after .602 from tbh. Not saying it was tbh problem though - most likely it was 602.

And to end

THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU.

Did I say Thanx already ...............


----------



## ctcfirearms

blackadept said:


> Hmm so it is not giving any errors when being made, but afterwards its not in the root directory? Hmm that's weird.
> 
> Just out of curiosity what is listed in your /system/etc/wifi, /pds/wifi, and /data/misc/wifi folders? Maybe its something to do with 602 and apex as opposed to 2nd init roms. If you have the means to email whatever is in those too it'd help, [email protected].
> 
> I'll look into that error tho and see what I can find if I can recreate it and whatnot. Usually you get that if you are creating the wrong file for the phone or using one for a different device (hence the cross device part). My guess is maybe the files? It should give errors if it fails to create when those commands are given.


Blackadept,

You are the man! That last fix, the ( / slash ) before the nvs_map.bin worked! You're also right; the folder was already created (my bad). I think I checked for that file so damn much that I gave up the last time before the screenshots. All I had to do was copy it into the other folder and then execute the init.mapphone_cdma.rc. Thank you for your assistance and I hope you know how valued your contributions are! :grin:

Thanks again and keep up the great work,

ctcfirearms


----------



## blackadept

Haha, its all good bud. I'm just glad we got it fixed.  I appreciate the compliment too, thanks!


----------



## mtrain

So I went through the process and I have the nvs file in both locations but am still having problems. The wifi turns on now (before it would just say error or continually turn on and off) and connects to neworks but when i try to access the internet through something it says "no network connection". Any thoughts?

Thanks,
Micah

I actually just fixed it by going back to a back up I had.


----------



## dangerous

SaurusX said:


> So apparently it's the flashing of a new nightly (Rev's 9-28 build in my case) that removes the nvs_map.bin files. Hopefully he does incorporate the scripting in this thread into his builds. It could get tiring running this every time otherwise.


that's about when mine went bad. I flashed about 40 of the CM7 official, then i switched and Poof.. Sad thing is, i think now there is [under the breath] an "oops" to be heard... 

Oh well, we can't blame anyone but ourselves for breaking things on our phones when we flash..


----------



## blackadept

Sorry I am just now getting back you Micah.... normally I try my best to be quicker, things are just crazy right now (hell I'm actually wearing cat and brains right now just to give an example....). Regardless, I'm glad to hear it helped and more so glad to hear you fixed whatever was causing the connectivity issue! Data can be a fickle thing on android sometimes I am finding while experimenting with this stuff. Take this browser for example, I made it from scratch mixing and matching diff source compiling. Still testing it I tweak internal values for different builds.... last night I literally changed one of the thru-put values by 1 .. literally ONE point ... and when installed completely kaboomed my data lol. Soon as I took it off and lowered it by 1 again, *poof* phone is happy again lol.

So yeah, glad you got it fixed and sorry I didn't get back to iou sooner! Any other issues let me know.

And dangerous, lol so true. But we all have em ... trust me... lmao if only you knew how many 'oops' moments I have .... ahaha.


----------



## dangerous

it's when you start repeating the 'Ooops' Moments then you are losing your mind.


----------



## blackadept

What's a mind?! I don't think I have one of tthose...


----------



## thegreyspot

Hallo!

Can't wait to get this to work, my random mac addresses have been killing me!!

I have this issue though:


> wlan_cu -itiwlan0 -b
> ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = 800003, res = -1, errno = 1)
> user_main, start
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit


And then when I run the next commands I just get stuff about "device not loaded". I have wifi on and not connected to any network...

Thanks!


----------



## ttavis323

YOU ARE THE MAN!!!!!!!!!!!!!!!!!!!!!

Ended up with a replacement about a month ago because of this. Spent an hour on the phone with Verizon tech then another 45 minutes with Motorola........they were clueless.

Posted a link to your thread in a couple other forums where eberyone was beating their collective heads against the wall over this....

Much respect!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


----------



## BMc08GT

thegreyspot said:


> Hallo!
> 
> Can't wait to get this to work, my random mac addresses have been killing me!!
> 
> I have this issue though:
> 
> And then when I run the next commands I just get stuff about "device not loaded". I have wifi on and not connected to any network...
> 
> Thanks!


Type su and then dmesg and then run rest of commands.


----------



## blackadept

ttavis323 said:


> YOU ARE THE MAN!!!!!!!!!!!!!!!!!!!!!
> 
> Ended up with a replacement about a month ago because of this. Spent an hour on the phone with Verizon tech then another 45 minutes with Motorola........they were clueless.
> 
> Posted a link to your thread in a couple other forums where eberyone was beating their collective heads against the wall over this....
> 
> Much respect!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Haha, well damn ... thanks, just glad it could help! I feel you with the tech support folks, they are horrendous at Verizon and Motorola both... tho has to be said you can get some pretty good ones once you get to tier 3+, of course to get that high you need a small miracle, 10 Twinkies, a handful of $100 monopoly bills, and another miracle.....

As for the problem with wlan ... what BMc said, are you root? And what does dmesg tell you?

Sent from my DROIDX


----------



## thegreyspot

BMc08GT said:


> Type su and then dmesg and then run rest of commands.


thanks! I tried this however I still go the same errors


----------



## BMc08GT

thegreyspot said:


> thanks! I tried this however I still go the same errors


hm you mind taking a screen cap and posting it so i can take a look?


----------



## thegreyspot

BMc08GT said:


> hm you mind taking a screen cap and posting it so i can take a look?


Is this the screenshot you wanted?
View attachment 4657


----------



## blackadept

What happens if you type "svc wifi start"? Any errors come up? Your interface is not starting for some reason. That's why you are getting your errors I believe. Look thru the dmesg and see what errors its giving for it, or post/pm the logs. Hard to say without having the info.

Also that first line, what was the string you typed? Couldn't really make it out, only ask cause a lot of people mix up the 1 (one) and l (lower case L), well that and I'm appearently blind .... lmao.

Sent from my DROIDX


----------



## thegreyspot

Ok so I was being stupid... when I tried the su trick, i didnt turn the wifi on. So device not started problem is fixed. But now, The nvs file is not being created.... Here is my log:
http://pastebin.com/ZHPfKHB6


----------



## BMc08GT

its because the nvs_map.bin file is not being created to root directory "/".

After executing the q command check:

1) /
2) /pds/wifi/
3) /system/etc/wifi/
4) /data/misc/wifi/ **(My guess is its in here)**

Whereever it may be do this command for cp:



HTML:


busybox cp -f /path/to/nvs_map.bin /pds/wifi/nvs_map.bin

and the same for the mv to /system/etc/wifi/nvs_map.bin



HTML:


busybox mv /path/to/nvs_map.bin /system/etc/wifi/nvs_map.bin


----------



## x13thangelx

works great on d2g, thanks for posting it.


----------



## rlorenz89

I'm having some trouble getting my phone to create the file. Here's my console (after the dmesg output):



> # wlan_cu -itiwlan0 -b
> user_main, start
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> / w p 1 l 2 f 2
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> .../poWer> set_Power_mode, set_powersave_powerLevel, set_deFault_powerlevel, set_doZe_mode_in_auto, traffic_Thresholds, eNable, Disable
> / t r h 0 7
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> ..._/biT> Bip/_, Radio debug/
> ..._/Radio debug> Get hdk version, cHannel tune, Tx debug/_, rx Statistics/
> Channel tune of channel 7 was performed OK
> / t b b 375 128 0
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> ..._/biT> Bip/_, Radio debug/
> ..._/Bip> update Buffer calref point, Tx bip, Rx bip/_
> BufferCalReferencePoint was configured succesfully
> / t b t 1 0 0 0 0 0 0 0
> \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
> ..._/biT> Bip/_, Radio debug/
> ..._/Bip> update Buffer calref point, Tx bip, Rx bip/_
> Open NVS file failed


Why isn't my phone creating this file? Can anyone help out? I'm running this with SuperUser permissions, and the file does not exist in any of the three places mentioned in the OP.

Any help is greatly appreciated!

(I've been looking for a solution to this problem for quite some time. Thanks for posting it!)

EDIT: Currently running CM7 Nightlies, if that makes any difference.


----------



## blackadept

Can you send me a dmesg?

Sent from my DROIDX


----------



## tdbone1

http://pastebin.mozilla.org/1375568 <<<20111019 rom (this rom had been idling for at least an hour)

http://pastebin.mozilla.org/1375824 <<<20111105 rom (this rom just shows after i did a fresh install of the rom and been on 5 mins or so)

could someone look at that?

i only use WIFI for my SKYPE
i mean this is my only phone and its VOIP

anyhow i have wireshark running on the AP that this Droid-X is connected to so i can get additional info if anyone needs it

the main thing i am concerned about in that pastebin (dmesg) is the "CONN LOST" areas
as you can see there is a pattern there (i think mine is related to the power saving features or something)
i have wifi sleep policy on NEVER

thanks

ok i changed my network to a bridged with same subnet and here is new results
http://pastebin.mozilla.org/1376657


----------



## blackadept

I'll take a look, sorry I didnt get back to your pm. Things have been getting a little crazy around here.


----------



## tdbone1

that would be great.
right as i read this i was just about ready to install the stock vzw rom .605 or maybe thinking about downgrading from GB back to froyo

this is my ONLY phone (skype over wifi) it is crucial for me to have this working 100%
my wifi has to stay on all the time no matter what.








btw my moms droid-x has stock vzw .605 rom and hers does disconnect sometimes but nothing like this cm4dx GB

hope its not to big
BTW i seen these same errors on openwrt routers and other distros so it is common with this kernel i believe


----------



## blackadept

Yup, I'll have to go over some stuff with you sometime soon to try and figure it out. I'm just getting my ass handed to me IRL atm, so might take a day or two. Hopefully I can look over yours and rlenzo's tomorrow and start getting with everybody to figure their problems out. I apologize for the time its taken to get with y'all, but like I said, things been getting crazy here so far.


----------



## tdbone1

blackadept said:


> Yup, I'll have to go over some stuff with you sometime soon to try and figure it out. I'm just getting my ass handed to me IRL atm, so might take a day or two. Hopefully I can look over yours and rlenzo's tomorrow and start getting with everybody to figure their problems out. I apologize for the time its taken to get with y'all, but like I said, things been getting crazy here so far.


just pm me in #cvpcs if you want
im usually there and we can prob get it done quick
as you prob know i am very anxious about fixing this.


----------



## rlorenz89

blackadept said:


> Yup, I'll have to go over some stuff with you sometime soon to try and figure it out. I'm just getting my ass handed to me IRL atm, so might take a day or two. Hopefully I can look over yours and rlenzo's tomorrow and start getting with everybody to figure their problems out. I apologize for the time its taken to get with y'all, but like I said, things been getting crazy here so far.


Don't worry about it, I can relate and really appreciate it. Life's more important than our 'Droids.


----------



## tribals

I have not used the emulator yet so could I get some advice on how to go about entering in the commands on step 4?











> *4)* Now enter this series in (The part you enter is green. The rest is what you'll be answered with. Be careful and copy the right stuff and pay attention to the spaces!):


Maybe I am making this out to be more difficult than it really is, but do I enter the entire code at one time or one command at a time? I'm assuming one command at a time.

Any help would be much appreciated as I can flash roms all day, but this emulator confuses me....hehe.

**EDIT** I was able to take the nvs_map.bin from my wife's DX and place it in the /pds/wifi on my DX and it worked fine.....had the same mac address as hers of course, but not sure if this effects anything else though?

Thanks!


----------



## tdbone1

* blackadept*

i first made my reply on November 6th
today is the 12th
is there anything i can do to help move this along?


----------



## blackadept

.....really? Please remember that I am a person with a RL ... I am not being paid, which means I have to deal with things that do pay me first, otherwise I don't eat or have a place to live. I made a post telling you and appoligizijg to you for the delay, but remember I have no obligation to help, I do so because I choose to and enjoy doing so, repaying all of those that have helped me. I'd encourage you to show more patience when the IT work is free.

What happens when you do the commands I put in the op? Your wifi is procing and updating properly.

Sent from my DROIDX using Tapatalk


----------



## dfogelstrom

Thanks for the help! took me a little while to read and fully understand what i was doing. Worked flawlessly!!! Thanks for this Guide!!!


----------



## tdbone1

blackadept you around?
ji just seen your reply.

i dont have any of the errors the other people were having

mine has to do with power saving dont it?

are you wanting me to do this guide as in post #1?


----------



## blackadept

Yes, what happens when you follow the guide (post #1). And I don't think it is power saving.

Sent from my DROIDX


----------



## tdbone1

blackadept said:


> Yes, what happens when you follow the guide (post #1). And I don't think it is power saving.
> 
> Sent from my DROIDX


i copied /pds/wifi/nvs_map.bin to /system/etc/wifi/nvs_map.bin

i then edited /init.mapphone_cdma.rc as you said
i then executed it
i powered off phone and then back on and here is what i got
http://pastebin.com/GNp9jHpL

i think it looks like same output dont it?
power save up and down every few seconds



> <6>[ 32.496185] TIWLAN: 4198.179603: TrafficMonitor_ChangeDownTimerStatus: Going to power save, clear wake_lock!!
> 
> <7>[ 32.775604] turning off regulator
> 
> <6>[ 35.975830] TIWLAN: 4201.281316: TrafficMonitor_ChangeDownTimerStatus: Going to active, set wake_lock!!
> 
> <6>[ 37.472747] TIWLAN: 4202.778234: TrafficMonitor_ChangeDownTimerStatus: Going to power save, clear wake_lock!!
> 
> <7>[ 39.242340] turning off regulator
> 
> <7>[ 41.324188] tiwlan0: no IPv6 routers present
> 
> <3>[ 49.536621] binder: release proc 1946, transaction 7613, not freed
> 
> <6>[ 52.970336] TIWLAN: 4218.275792: TrafficMonitor_ChangeDownTimerStatus: Going to active, set wake_lock!!
> 
> <7>[ 54.045684] turning off regulator
> 
> <6>[ 54.972808] TIWLAN: 4220.278264: TrafficMonitor_ChangeDownTimerStatus: Going to power save, clear wake_lock!!
> 
> <6>[ 55.741943] TIWLAN: 4221.047399: TrafficMonitor_ChangeDownTimerStatus: Going to active, set wake_lock!!
> 
> <7>[ 56.787170] turning off regulator
> 
> <6>[ 57.001708] AUDIO_DRIVER:spkr1 = 0x20, spkr2 = 0x0
> 
> <7>[ 63.339385] turning off regulator
> 
> <6>[ 64.238800] TIWLAN: 4229.544256: TrafficMonitor_ChangeDownTimerStatus: Going to power save, clear wake_lock!!
> 
> <6>[ 66.250274] TIWLAN: 4231.555730: TrafficMonitor_ChangeDownTimerStatus: Going to active, set wake_lock!!
> 
> <6>[ 67.746582] TIWLAN: 4233.052038: TrafficMonitor_ChangeDownTimerStatus: Going to power save, clear wake_lock!!


----------



## Enzymaticracer

Awesome work blackadept!

Just did this on my CM7GB ROM and so far looks like I'm no longer limited to using 3g!

Thank you!

Sent from my DroidX running CM74GB using Tapatalk


----------



## blackadept

Hey NP bud glad it helped!

For other poster, if you already have an nvs_map.bin are you still having an issue with your Mac address?

Sent from my DROIDX


----------



## tdbone1

blackadept said:


> Hey NP bud glad it helped!
> 
> For other poster, if you already have an nvs_map.bin are you still having an issue with your Mac address?
> 
> Sent from my DROIDX


do you see my message 2 posts above this one?
you dont see my quotes?
can you show your dmesg and some others too?
why am i the only one showing pastebin?

go on irc
im on freenode and in channel #cvpcs
im en1gma and we can talk there if you want


----------



## blackadept

yeah I'm good, preciate the offer tho. Good luck with your wifi tho bud, I hope you get it working correctly.


----------



## tdbone1

blackadept said:


> yeah I'm good, preciate the offer tho. Good luck with your wifi tho bud, I hope you get it working correctly.


i knew that wasnt going to do anything.
this has to do with the power saving feature
if anyone wants to try and fix the problem you can see my pastebin 4 posts above this one.
there is a definately problem going to sleep and then active....it is going to sleep and then waking up alot

can someone do a dmesg and see if their droid-x running cm4dx GB is also doing this?
i gonna get my moms droid-x with stock vzw .605 rom and i will take a look at its dmesg and post it also
i could really use some help


----------



## blackadept

That is due to your having wakelock issues. Check partial wakelocks and remove said app and you wont have those issues. Wakelocks and wifi aren't the same thing.....

Sent from my DROIDX


----------



## tdbone1

blackadept said:


> That is due to your having wakelock issues. Check partial wakelocks and remove said app and you wont have those issues. Wakelocks and wifi aren't the same thing.....
> 
> Sent from my DROIDX


yea thats what i mean the wakelocks
and they have something to do with losing wifi
when the wakelocks happen i can look on ly dd-wrt router and look at wireless clients and i can see the clients drops when that happens
not every single time but its close

so what exactly do i need to look for that can be causing this?
i think it has something to do with cm4dx

here are dmesgs of both my droid-x`s both had vzw .605 and both are rooted...only one then got cm4dx (latest as of this post)

http://pastebin.com/D952Q0kU = vzw stock .605 rooted

http://pastebin.com/vb8xPP32 = vzw stock .605 rooted then cm4dx GB

both phones were powered off
both phones turned on exactly same time
both phones on for 1hr and 5mins
both phones sent dmesg to email

they both look alot alike


> Successfully put all powerdomains to target state


look for that in both links


----------



## tdbone1

is anyone gonna even look what i suggested and found about "Successfully put all powerdomains to target state" showing up in the original vzw rom (rooted) and not the cm4dx gb?
i know there are more differences thats just one that i noticed

also can you look out how many more lines are in the pastebin for the cm4dx then there is for the vzw rom?
note:
cm4dx gb only had background data enabled....no sync stuff
the vzw rom had all the google stuff (4 checks = on) and also a skype account.

how can the vzw rom have all this extra stuff on and be 1/2 the size of the cm4dx with only backgroud data enabled?

ok there is a problem somewhere guys im thinking it is on the phone sides and since i have two droid-x`s and the vzw rom stays connected more then the cm4dx gb rom i am thinking its has to do with cm4dx then vzw rom

if this isnt the thread to reply i dont know where is but this is definately a problem


----------



## BMc08GT

tdbone1 said:


> is anyone gonna even look what i suggested and found about "Successfully put all powerdomains to target state" showing up in the original vzw rom (rooted) and not the cm4dx gb?
> i know there are more differences thats just one that i noticed
> 
> also can you look out how many more lines are in the pastebin for the cm4dx then there is for the vzw rom?
> note:
> cm4dx gb only had background data enabled....no sync stuff
> the vzw rom had all the google stuff (4 checks = on) and also a skype account.
> 
> how can the vzw rom have all this extra stuff on and be 1/2 the size of the cm4dx with only backgroud data enabled?
> 
> ok there is a problem somewhere guys im thinking it is on the phone sides and since i have two droid-x`s and the vzw rom stays connected more then the cm4dx gb rom i am thinking its has to do with cm4dx then vzw rom
> 
> if this isnt the thread to reply i dont know where is but this is definately a problem


Tdbone you are starting to become a harrassment. Please refrain from this type of activity. This may be a problem, but it is more or less YOUR problem. Not a rom specific problem. Continuation of this action can result in user infractions.

Have yu tried sbfing? When I was running cmdx gB my wifi connected successfully. It may be the particular device that has the issue, thus meaning a warranty exchange could be an option if this occurs on stock 602 or 605


----------



## Enzymaticracer

Hi blackadept,

So I know I said things were going fine for a while, however, my Wifi quality seems to be deteriorating. my phone now says that it is connected, but will stop communicating with the router after a somewhat random amount of time. I have rebooted the phone several times, and have not made any changes to the phone since I ran through the nvs_map.bin creation process you put together. Do you have any ideas? Should I go through all the folders, delete any of the nvs_map.bin files I find and start over?

Thanks for any help


----------



## Zeklandia

Hi,
I am running MIUI 1.11.9 With ICS Framework on my Droid X, and everytime I go to move or copy nvs_map.bin, it says it doesn't exist. I also tried the other commands on page 3.

*EDIT* It was in /data/misc/wifi *EDIT*


----------



## blackadept

Ezy, I wouldn't do that just yet. First try cleaning out your internet browsers. Also you could try booting into recovery and wipe your cache (not your data remember). Then there is always the trick of forgetting the network and reconnecting, similarly you could reset the router itself either normally or unplugging its power cable and leaving it disconnected for ~30 secs and then plugging it back in.

Also, depending on what Rom, kernel, and what other mods you have installed it could be being caused by a bug on that end as there have been plenty seen over time. All in all there's lots you can try, including remaking the bin, however I'd save that for last.

Zek, glad you figured it out! Lil bastard can be pretty good at hide and go seek ... Haha.

Sent from my ADR6425LVW


----------



## nhugh406

not gonna lie, this is probably beyond my skill set, but i have no idea how to even proceed after dmesg. haha, i iz special!


----------



## Enzymaticracer

blackadept said:


> Ezy, I wouldn't do that just yet. First try cleaning out your internet browsers. Also you could try booting into recovery and wipe your cache (not your data remember). Then there is always the trick of forgetting the network and reconnecting, similarly you could reset the router itself either normally or unplugging its power cable and leaving it disconnected for ~30 secs and then plugging it back in.
> 
> Also, depending on what Rom, kernel, and what other mods you have installed it could be being caused by a bug on that end as there have been plenty seen over time. All in all there's lots you can try, including remaking the bin, however I'd save that for last.
> 
> Zek, glad you figured it out! Lil bastard can be pretty good at hide and go seek ... Haha.
> 
> Sent from my ADR6425LVW


Cool thanks, will attempt those first

Sent from my DroidX running CM74GB using Tapatalk


----------



## droidtoro

Comment deleted because I am an dork who does not read.

Don't be like me and just pay attention where it mentions that the nvs_map.bin file might be at /data/misc/wifi/nvs_map.bin


----------



## kwest12

I'm trying to do this on MIUI 1.12.9 b/c my Wifi has been freaking out and I don't know why. I did in fact have the nvs_map.bin file appearing in my pds/wifi and my data/misc/wifi folders. I simply moved them outside of those folders and proceeded from step one in order to start from scratch.

I started by opening Terminal Emulator from the market, granting myself su permissions and proceeding from step 1. Everything occurred as advertised, but once I got to step 5, I ran into problems. When attempting to move the files using the commands listed, I got the following error: "cp: can't stat 'nvs_map.bin': No such file or directory". I went and looked in the root directory ('/') and saw that no such file existed. Is terminal emulator possibly creating the file somewhere else on my phone? I don't understand why it wouldn't have given me errors during the creation process if it didn't make one...


----------



## cbrady1981

Hey blackadept - nice guide, but I still have an issue that hopefully you can help with:
On my DX running Liberty 3 v2.0 (previously Liquid 3.2, when I think the problem started), I can create the bin, place it where it's needed, run the script and all is well - until I reboot. Then I'm back to square one; my bin has vanished from /pds/wifi and hence no NVS. It does remain in the /system/etc/wifi dir however, so I try to point to that location instead in the init.mapphone_cdma.rc script. But again, when I reboot the script reverts to its original form, and no NVS. Similarly, any new files or folders I create in the / directory are gone after a reboot.

I notice on my 2nd DX, running Liberty v0.8 (flashed numerous ROMs prior) that the bins stay in both the /pds/wifi and /system/etc/wifi, but I still can't make any permanent changes to the init script.

Are these files/folder systems being re-loaded from somewhere on boot-up? If so, how can I prevent or control it?

Thanks for all your help!


----------



## wicozani

Thanks for the guide! I was having problems with the MAC address changing with every reboot. Couldn't find nvs_map.bin anywhere, and so used your guide. It was successful, however I found my newly created nvs_map.bin file in /data/misc/wifi, not where expected. i copied the file from here and pasted it into /system/misc/wifi. Am I supposed to then go back to /data/misc/wifi and delete the original file? Everything seems to be working fine with my wifi and connections. Thanks again!


----------



## ynksbsbll2

I realize this thread is kind of old, but I'll post anyways. I ran through the tutorial, got the nvs_map and changed the init.mapphone script (as well as the one located in the hijack-boot.zip just in case). However, whenever I manually execute it, I don't notice any additional folders being created (done through Root Explorer). If i try to run the script in script manager, it tells me that permission is denied and the script never runs. This is leading me to believe that Root Explorer isn't actually doing anything and thus I can't complete the final step of the tutorial. Any ideas? Thanks in advance.


----------



## bobcaruso

ynksbsbll2 said:


> I realize this thread is kind of old, but I'll post anyways. I ran through the tutorial, got the nvs_map and changed the init.mapphone script (as well as the one located in the hijack-boot.zip just in case). However, whenever I manually execute it, I don't notice any additional folders being created (done through Root Explorer). If i try to run the script in script manager, it tells me that permission is denied and the script never runs. This is leading me to believe that Root Explorer isn't actually doing anything and thus I can't complete the final step of the tutorial. Any ideas? Thanks in advance.


Number one, what does root explorer have anything to do with it?
Number two, when you setup your script in Scriptmanager, did you flag it to run as root?
Number three, did you setup Scriptmanager to mount system as read/write?


----------



## ynksbsbll2

bobcaruso said:


> Number one, what does root explorer have anything to do with it?
> Number two, when you setup your script in Scriptmanager, did you flag it to run as root?
> Number three, did you setup Scriptmanager to mount system as read/write?


The OP said the script can be run in either Root Explorer or Script Manager. I was just pointing out that Root Explorer says the script ran (but I don't see a bunch of folders created like the OP says). I do have Script Manager running as root and the system mounted as R/W. Do I need to somehow mount the rootfs as R/W (i.e. does mounting the system only mount "/system")?

I just ran it again in Script Manager and didn't get permission denied this time...I attached a text file of its output if that helps.


----------



## bobcaruso

ynksbsbll2 said:


> The OP said the script can be run in either Root Explorer or Script Manager. I was just pointing out that Root Explorer says the script ran (but I don't see a bunch of folders created like the OP says). I do have Script Manager running as root and the system mounted as R/W. Do I need to somehow mount the rootfs as R/W (i.e. does mounting the system only mount "/system")?
> 
> I just ran it again in Script Manager and didn't get permission denied this time...I attached a text file of its output if that helps.


post the script you're trying to run


----------



## ynksbsbll2

init.mapphone_cdma.rc attached. I had to save it as .txt for uploading purposes


----------



## bobcaruso

This is the phone boot script, it runs automatically every boot, why are you running this again? of course it won't run.


----------



## ynksbsbll2

bobcaruso said:


> This is the phone boot script, it runs automatically every boot, why are you running this again? of course it won't run.


I'm simply following the OP to the letter.


----------



## Sandman007

I have followed this to the letter. On step 5 when I check for nvs_map.bin in /pds/wifi its not there. I didn't see any strange errors when running commands.

Sent from my ICS/CM9 Droid X


----------



## ynksbsbll2

Deadly_Hamsters said:


> I have followed this to the letter. On step 5 when I check for nvs_map.bin in /pds/wifi its not there. I didn't see any strange errors when running commands.
> 
> Sent from my ICS/CM9 Droid X


nvs_map.bin was always in data/misc/wifi after I ran through the commands. Doing this fixed my MAC address changing but wifi still bugs out after a few hours and will never connect again so I made the plunge to a Galaxy Nexus


----------



## INt_Rnd_Pooka

ynksbsbll2 said:


> nvs_map.bin was always in data/misc/wifi after I ran through the commands. Doing this fixed my MAC address changing but wifi still bugs out after a few hours and will never connect again so I made the plunge to a Galaxy Nexus


That seems like a fairly expensive fix, lol.


----------



## ynksbsbll2

INt_Rnd_Pooka said:


> That seems like a fairly expensive fix, lol.


Hah, yea I know, I just couldn't stomach going back to GB


----------



## Enzymaticracer

blackadept said:


> Ezy, I wouldn't do that just yet. First try cleaning out your internet browsers. Also you could try booting into recovery and wipe your cache (not your data remember). Then there is always the trick of forgetting the network and reconnecting, similarly you could reset the router itself either normally or unplugging its power cable and leaving it disconnected for ~30 secs and then plugging it back in.
> 
> Also, depending on what Rom, kernel, and what other mods you have installed it could be being caused by a bug on that end as there have been plenty seen over time. All in all there's lots you can try, including remaking the bin, however I'd save that for last.
> 
> Zek, glad you figured it out! Lil bastard can be pretty good at hide and go seek ... Haha.
> 
> Sent from my ADR6425LVW


Hi blackadept...

So I got pretty busy there for a long time and had to put my wifi issues on the backburner. I did try firstencounters ICS build, and my wifi worked great on it, but had to come back to the Pooka CM7GB builds for stability and the other features missing from ICS. Plus I got a Asus TF Prime, so I've been playing with that, however, I'm still having connectivity issues.

After flashing multiple different ROMS, SBFing, clearing cache, all that fun stuff, my wifi will still connect but it is still nearly useless. Now that I'm back on CM7GB, my Wifi issues have returned.

I decided to go through the process to create the nvs_map.bin again after deleting one I found in / .

First observation is that the output for my / w p 1 l 2 f 2 does not put "set_dc0_itrim" at the end like your instructions say it should. Second observation is that the nvs_map.bin is created in / and not /pds/wifi or /data/misc/wifi . Finally, after modifing my init.mapphone_cdma.rc file to your second suggestion, the dmesg output looks like it is trying to do something, however, buried towards the top of the TIWLAN stuff is something like "NVS not found... Setting default MAC".I ran it with the wifi both on and off, but it didn't seem to make much difference.

Any further help with this is seriously appreciated!


----------



## Migamix

had this issue with my DX (this fixed it and its still fixed , now its doing it with My Gnex after flashing an AOPK rom, something to do with kernel code from what i understand, anyone have luck doing this on their Gnex, or is the radio version different... ive seen posts with other devices doing the same thing, with the same fix used, but the radio part " / t r h 0 7 " is different, any sugestions?


----------



## blackadept

O wow, hell ladies and gents sorry I hadn't replied to this post. I picked up my nexus a couple days after launch and at the time this thread had died down and I just plain forgot about it, I do apologize. Unfortunately there's a crap load of posts to catch up on and I haven't slept since weds so I'll try to hit as much as I can and will finish tomorrow.

First I'll finish my little disclaimer by pointing out it might be a bit rusty as i haven't worked on the x in quite sometime save for helping a buddy out (bmc shout out). For the same reason I'll start by answering one of the last questions, seeing as how I have a nexus and can't use the same excuse lmao.

The gnex uses a very different system for its wifi's software/firmware. There isn't too great a need to do the manual calibration via basically, at least in my mind, a glorified .config file. All those numbers and letters and spaces and whatnot all signify a configuration setting for the phones wifi, everything from interface, mode, power, and throughput, right down to what flavor fail flakes it chooses to have that morning. This is why you will see differences in said configuration values, different phones call for/can handle different things. The coding itself is fairly ubiquitous amongst a large number of phones due to the prevalence of TI and that chip as well as the omap boards. As a matter of fact the reason that second post I reserved was never filled is because you can actually force the hardware to believe its full-out top-of-line N and "activate" a whole slew of mods such as burst mode, etc. Only problem is .... while it thinks it is and says it is .... it really ain't lol, its merely mimicking in title alone what other phones can actually do. The gnex however has a much more robust and easy to use configuration method (and source code lol), hence the lack (more or less) of crazy strings of digits. Also it uses a different file configuration then the X and the nv is created/stored/used/ etc differently.

Another quark of the wifi system is responsible for another issue somebody had, if I had to take a blind guess that is, as it was the culprit many times over in the past. One of the most fickle and annoying problems a lot of android phones used to have (some still do) is the wpa_supplicant.conf file. Normally this file is pretty harmless, which is good considering it stores information that makes the wifi all happy and stuff, in this case though it could easily turn into a pain in the ass. This is because normally if the file gets updated with new info it just takes it or if needed remakes itself ... the X's however doesn't always act like that. Instead its supplicant file erases itself entirely if you tamper with it at all, hell even when the system does it it still will erase itself or become empty/blank. When this happens your wifi is unable to really function as it doesn't have its info and it makes it go bat shit until its properly remade by the system. One thing you could maybe try the next time it goes wonky on you (assuming you have a backup and/or replacement on your SD or somewhere) is to make it write able much the same as you would edit a grub.cfg file in linux. In a terminal try:

chmod +w /path/to/wpa_supplicant.conf

Then either fill the info back in or repeat the commands except make the replacement write able as well before you replace em. Once your done with either choice and everything's gravy just undo the command:

chmod -w /path/to/wpa_supplicant.conf

Careful tho, while it works just fine for grub I havent tried it myself on the pita supplicant.conf of the x.

As to the discrepancy of where the nv files are supposed to go, you are correct in that it usually goes where it needs to on its own. However, for whatever reason, it doesn't always go there so (for me it had appeared in /data like it should have but also had appeared in / and /system too). I added that line to cover all the bases and so folks didn't freak out if it showed up somewhere else, guess that game plan backfired lol...

Another line that was asked about was the init edit. All of those init scripts come from the boot.img and are created every boot, which is why even after editing them they go back. As to why root explorer didn't work for you I'm not sure, I'm going to guess it was an issue with permissions. You can also proc the script via the emulator or try not editing the script as well.

Again I apologize for not seeing this in so long and should prolly apologize for the rambling wall of text too lol, sleep deprivation is a bitch haha. I will try to get back and finish answering questions and helping those that still need it out. For future reference tho please feel free to pm me if I don't respond here as I normally don't read thru these boards anymore.

Edit: mig pm me a log of your gnex. I haven't heard of this issue on our nexus. I more or less use aokp in a way too and haven't had an issue, so I'd be interested to see what's up.


----------



## blackadept

OK guys, unfortunately I don't have time to go as in depth as I wanted to, also I am not sure who is still having issues or who is not. So if you need help please pm me as I won't be checking this post very often anymore, only when updating it if I have a reason too.


----------



## tomasrov

great solution, it works for my droid x!!!


----------



## wizard0f0s

Just want to say Thank You to BlackAdept. With his permission, his wifi fix is scripted and added into bootmenu (in the Fixes section).

Thank You!

Sent from my DROIDX using Tapatalk 2


----------



## kwest12

That's something you added a while back right? Pretty sure I saw something like that in the BM you included with 4.5 version of your MIUI ROM.

Anyway, a big thanks to both of you for (BlackAdept for building it and Wizard0f0s for utilizing it).


----------



## wizard0f0s

kwest12 said:


> That's something you added a while back right? Pretty sure I saw something like that in the BM you included with 4.5 version of your MIUI ROM.
> 
> Anyway, a big thanks to both of you for (BlackAdept for building it and Wizard0f0s for utilizing it).


Yep, it is. I just hadn't posted it on here. Also wanted to publicly thank BlackAdept for coming up with the fix.

Sent from my DROIDX using Tapatalk 2


----------



## blackadept

Np bud, glad you got it working and thanks for asking!

Sent from my Galaxy Nexus using Tapatalk 2


----------



## gautamrao

Does anyone have a link to a script that automates this process? It seems to work for me sometimes, but is definitely gone again upon a reboot. If I could just run a script each time I rebooted, that would be amazing.

Clearly, wizard0f0s does have some sort of script for this, but I'm not running MIUI. Could I somehow get the MIUI bootmenu going on my Gummy? Or any other links to a script? I've searched high and low...

Thanks!


----------



## gautamrao

Actually, now I'm facing a more important issue: when I start Terminal, then su and dmesg, all is well. But then when I type [background=rgb(247, 247, 247)]wlan_cu -itiwlan0 -b [/background]
I get a message
sh: wlan_cu: not found

I'm running 4.0.4 Gummy. Any help would be greatly appreciated.


----------



## wizard0f0s

gautamrao said:


> Actually, now I'm facing a more important issue: when I start Terminal, then su and dmesg, all is well. But then when I type [background=rgb(247, 247, 247)]wlan_cu -itiwlan0 -b [/background]
> I get a message
> sh: wlan_cu: not found
> 
> I'm running 4.0.4 Gummy. Any help would be greatly appreciated.


Wlan_cu should be in your /system/bin folder. You may be able to run the cm9 bootmenu on Gummy. You can get it from goo if you want to try. I would definitely make a nandroid first. Wouldn't hurt to ask about it in the gummy thread too.

GOO site - http://goo.im/devs/wizard0f0s Just drill down into the Hijacked_Bootmenu folder. You should see a cm9 folder and the flash inside of there.

I can also just send you the script if you would rather. Either way, it still depends on the wlan_cu being available first though.

Sent from my DROIDX using Tapatalk 2


----------



## gautamrao

wizard0f0s said:


> Wlan_cu should be in your /system/bin folder. You may be able to run the cm9 bootmenu on Gummy. You can get it from goo if you want to try. I would definitely make a nandroid first. Wouldn't hurt to ask about it in the gummy thread too.


Hey, thanks for the prompt reply -- this is very helpful, I appreciate it!

Weirdly, I don't have wlan_cu in my system/bin or anywhere else. Perhaps I could restore an old nandroid, copy it to my sdcard and restore it again. Would that work? Or perhaps someone could send me / link the file?

I would love to have the script directly, if that's not too much of a bother.

Thanks again. It's a bit crazy how kind people are on here.


----------



## BeboSaab

I have the same problem was gautamrao. I don't have wlan_cu installed on my Droid x running Gummy or the may 9th AOKP, the bootmenu nvs.map fix doesn't work because of this either, I am missing my nvs file and every time I connect to wifi I have a new MAC address and eventually it causes problems on the router, not sure when this started happening just a few days ago probably.


----------



## wizard0f0s

gautamrao said:


> Hey, thanks for the prompt reply -- this is very helpful, I appreciate it!
> 
> Weirdly, I don't have wlan_cu in my system/bin or anywhere else. Perhaps I could restore an old nandroid, copy it to my sdcard and restore it again. Would that work? Or perhaps someone could send me / link the file?
> 
> I would love to have the script directly, if that's not too much of a bother.
> 
> Thanks again. It's a bit crazy how kind people are on here.


Sorry dude, life got crazy. I'll have the script up here shortly. It's actually 2 files - 1 is the script and the other is the instructions to the wlan_cu binary.

I'm not sure why you don't have the wlan_cu in /system/bin. I'll package mine with the script files (along with some instructions). Actually, would it be easiest if I just made a flashable patch for it or would you rather have the files individually? If a flashable, do you want it to run every boot or have to run it manually when needed?

Sent from my Transformer Prime TF201 using Tapatalk 2


----------



## BeboSaab

Anything would be good man, I appreciate it. I can't speak for the other guy but I am familiar with linux and if you don't want to make a zip I'm cool with it, any help is very appreciated.

It really sucks when your wlan_cu disappears, lol. As a workaround I have my DHCP lease set to 400 minutes and the max DHCP licenses increased to 100. If you can't fix your random MAC addresses this will at least keep your router from screwing up if the droid x taking out 50 DHCP leases a day becomes a problem for it.


----------



## wizard0f0s

Built and uploaded to Goo. Just waiting for the site to refresh their cache for the zip to show up and I'll post the link.

Edit - Ok, here you go, flashable form - http://tinyw.in/QrnW

Please let me know if you have any problems with it. I haven't run Gummy yet, so I've made a couple of assumptions:

1) Gummy has init.d support. This "should" be a safe assumption
2) Gummy hasn't completely changed the wifi configuration. Meaning there is a /system/etc/wifi directory and the init scripts still look to load the nvs_map from the normal places (the script copies to both common locations so it should be ok).

If anybody does run into problems, please let me know. I'll pull Gummy down and take a look at how it runs and what it expects.


----------



## wizard0f0s

BeboSaab said:


> Anything would be good man, I appreciate it. I can't speak for the other guy but I am familiar with linux and if you don't want to make a zip I'm cool with it, any help is very appreciated.
> 
> It really sucks when your wlan_cu disappears, lol. As a workaround I have my DHCP lease set to 400 minutes and the max DHCP licenses increased to 100. If you can't fix your random MAC addresses this will at least keep your router from screwing up if the droid x taking out 50 DHCP leases a day becomes a problem for it.


I know the feeling. My DX would eventually crash my router because of all the DHCP addresses being in use. That's what finally got me to script it and put it into bootmenu. I just got tired of it crashing my router all the time.


----------



## Goose306

wizard0f0s said:


> Built and uploaded to Goo. Just waiting for the site to refresh their cache for the zip to show up and I'll post the link.
> 
> Edit - Ok, here you go, flashable form - http://tinyw.in/QrnW
> 
> Please let me know if you have any problems with it. I haven't run Gummy yet, so I've made a couple of assumptions:
> 
> 1) Gummy has init.d support. This "should" be a safe assumption
> 2) Gummy hasn't completely changed the wifi configuration. Meaning there is a /system/etc/wifi directory and the init scripts still look to load the nvs_map from the normal places (the script copies to both common locations so it should be ok).
> 
> If anybody does run into problems, please let me know. I'll pull Gummy down and take a look at how it runs and what it expects.


Gummy has init.d support. I'd assume WIFI config is the same as any other ICS ROM. The most recent change that the DX supports for WIFI is .621. I haven't heard if thats backwards-compatible though (i.e. the libs from .621 work on .605) I know .605 blur libs break WIFI on .621, but I haven't heard the reverse. So far, only heard good about integrating .621 libs into .605 ROMs  It's like VZW inadvertently gave an extra life to the DX for ICS development.


----------



## BeboSaab

Just flashed that fix to my droid, wlan_cu seems to start now but always throws up an error if you try to run it. I tried to run the nvs_map fix inside BootMenu 1.15 as well as enter the commands in terminal, it pretty much always gives the same error.

I attached a screenshot

Thanks again


----------



## BeboSaab

never mind ran it with root elevation and im getting somewhere, will report back


----------



## BeboSaab

I went through all the steps of post 1 on this thread and everything looked the same, but at the end no [background=rgb(245, 245, 245)]nvs_map.bin file was created at the end, so nothing to move anywhere, didn't show up with ls right after and doesn't show in root explorer, unless it gets copied to some directory other than /[/background]

[background=rgb(245, 245, 245)]I seem to be getting pretty close though, one thing I noticed when you type one of those commands it generates a MAC address with the 08 08 BS multiple MAC address error, I don't know if that matters or not, looked fishy.[/background]


----------



## BeboSaab

Got it to make my nvs.map.bin file, moved them to the right places, the script didn't execute properly at the end but I was messing with it and somehow the errors in dmesg were gone and the nvs_map was loaded.

Now it seems like my MAC address is sticking, my router isn't loaded with tons of DHCP leases and different MAC addresses yay, thanks guys.

I really appreciate that zip file WizardofOS, I couldn't find that file anywhere on the Internet. It might be a good idea to include that fix in a new version of your Bootloader maybe? When the wlan_cu disappears you are really screwed on WiFi.

I'm not even sure how I deleted those files, I've been haphazardly flashing through CM9 Gummy and AOKP nightlies, and I'm sure somewhere along the way I lost those critical WiFi files.

Crazy how an SBF does not fix this problem and people returned their phones to Verizon over this back in the day.

Thanks again


----------



## lexluthor

I just tried both the script and the fix from bootmenu, but the NVS_Map file isn't anywhere and my MAC still changes frequently.

Now what?


----------



## lexluthor

lexluthor said:


> I just tried both the script and the fix from bootmenu, but the NVS_Map file isn't anywhere and my MAC still changes frequently.
> 
> Now what?


I re-ran the process using the manual method outlined in the first post (after su elevation which someone might want to edit into that first post).

When it got to the part about moving/copying the nvs_map.bin file, the file wasn't there. I read through the thread further and saw someone suggested looking in a couple of other places. I found it in data/misc/wifi and copied it to pds/wifi and then moved it to system/etc/wifi.

My MAC address is now not changing and I'm able to use static DHCP again.

Not sure why the script or bootmenu process didn't work for me (pretty sure I did check those directories after I ran those processes), but I guess I'm all set now.

I did not do step #6 in the OP either.

Thanks to everyone who posted assistance in this thread.


----------



## pej1025

welp. this worked the first time i did it and confirmed that the MAC matched in wifi settings/advanced and settings/about phone/status but after a reboot a different MAC was getting generated. toggling wifi on and off as well. this is the most outrageous thing ever after flashing rom's. it's crazy how this problem follows you even after sbf'ing. blows my mind.


----------



## Samolab

can some please help?

I opened Terminal Emulator.

SU
wlan_cu -itiwlan0 -b

sh: wlan_cu: NOT FOUND

I don't understant whats wrong.

Using Droid X Gummy1.2


----------



## Samolab

wizard0f0s said:


> Built and uploaded to Goo. Just waiting for the site to refresh their cache for the zip to show up and I'll post the link.
> 
> Edit - Ok, here you go, flashable form - http://tinyw.in/QrnW
> 
> Please let me know if you have any problems with it. I haven't run Gummy yet, so I've made a couple of assumptions:
> 
> 1) Gummy has init.d support. This "should" be a safe assumption
> 2) Gummy hasn't completely changed the wifi configuration. Meaning there is a /system/etc/wifi directory and the init scripts still look to load the nvs_map from the normal places (the script copies to both common locations so it should be ok).
> 
> If anybody does run into problems, please let me know. I'll pull Gummy down and take a look at how it runs and what it expects.


The link is not working would you please re-upload wlan_fix_blackadept.zip


----------



## pej1025

tried the directions ONE last time, to the T but of course, no luck. oh well. i can't believe there's no other fix.


----------



## sona

guys i'm having a micromax yu yureka phone with the same issue

do i have to root my phone to the steps


----------

