Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,714 Members 41,839 Now Online
XDA Developers Android and Mobile Development Forum

CM7 MAC Address Fix

Tip us?
 
TheKid2
Old
(Last edited by TheKid2; 27th December 2011 at 02:30 PM.)
#1  
Member - OP
Thanks Meter 45
Posts: 31
Join Date: Dec 2011
Location: Shepherdsville
Talking CM7 MAC Address Fix

I could not post directly in the development thread as I joined simply to share my solution. If anyone can confirm and prepare a better guide please post to CM7 thread by whistelstop.

You will need your factory mac address.

MAC Addresses all being the same is due to the nvs_map.bin file required by the tiwlan driver. dmseg driver will tell you it is looking for it and defaulting mac address.

I am running CM7 mileage will vary in stock rom.

http://www.omappedia.org/wiki/Portin...iP_Calibration

I used the calibration instructions in terminal emulator on cm7 Kindle as "su"
#wlan_cu –b
# / w p 1 l 2 f 2
# / t b v 21
# / t b t 1 0 0 0 0 0 0 0
#/ q

New nvs_map.bin file will be ceated in /data/misc/wifi/
#cp /data/misc/wifi/nvs_map.bin to /sdcard/nvs_map.bin

connect to linux/windows host copy file to pc

open with hex editor I used xvi32 for windows.

link to my source for instruction for byte order and editing.

http://processors.wiki.ti.com/index....he_MAC_Address

Short instructions:

Editing the MAC Address

After the TX BIP runs, there is a new file called nvs_map.bin in Linux that contains the MAC address and the calibration data. The document SWAA044_NVS_INI_File_Functions_AN.pdf contains the format of the NVS file. If MAC address fields are manually edited with a hex editor, the byte order should be low byte first, followed by the high byte:
MAC address low register (offset 0x01 to 0x02)
MAC address LSB (offset 0x3 to 0x06)
MAC address high register (offset 0x08 to 0x09)
MAC address MSB (offset 0x0A to 0x0D)
The MAC address LSB and MAC address MSB, respectively, are shown in bold in the
following code for 08:00:28:12:34:56:
0000: 01 6d 54 56 34 12 28 01 71 54 00 08
For 11:22:33:44:55:66:
0000: 01 6d 54 66 55 44 33 01 71 54 22 11 00 00
Using a hex editor, you should change the bold numbers to the MAC address you
want to use.

Be careful about byte order and look closely at examples.

Good Luck
Please confirm instructions yourself and use at your own risk
The Following 21 Users Say Thank You to TheKid2 For This Useful Post: [ Click to Expand ]
 
emelie
Old
#2  
Senior Member
Thanks Meter 14
Posts: 323
Join Date: Jul 2010
Location: Vienna
Just tried that and it worked beautifully!
Thanks for that - great find!
Tablet: Kindle Fire
running on CM 9 2012-02-19 | recovery: TWRP 2.0 | kernel: intersectRaven's 20120216_1740

Phone: Samsung Galaxy S I9000
running on Rom Kitchen.XXJVT (Android 2.3.5) | kernel powered by SpeedMod Gingerbread K16-11
The Following User Says Thank You to emelie For This Useful Post: [ Click to Expand ]
 
whistlestop
Old
#3  
whistlestop's Avatar
Member
Thanks Meter 264
Posts: 88
Join Date: Dec 2011
Location: Colorado Springs, CO

 
DONATE TO ME
Quote:
Originally Posted by TheKid2 View Post
I could not post directly in the development thread as I joined simply to share my solution. If anyone can confirm and prepare a better guide please post to CM7 thread by whistelstop.

You will need your factory mac address.

MAC Addresses all being the same is due to the nvs_map.bin file required by the tiwlan driver. dmseg driver will tell you it is looking for it and defaulting mac address.

I am running CM7 mileage will vary in stock rom.

As I can not post links you will need to google my text and find correct link (noob)
maybe a moderator can fix for me.

######.omappedia.org/wiki/Porting_MCP_WLAN_to_Android#TxBiP_Calibration

I used the calibration instructions in terminal as "su"
#wlan_cu b
# / w p 1 l 2 f 2
# / t b v 21
# / t b t 1 0 0 0 0 0 0 0
#/ q

New nvs_map.bin file will be ceated in /data/misc/wifi/
#cp /data/misc/wifi/nvs_map.bin to /sdcard/nvs_map.bin

connect to linux/windows host copy file to pc

open with hex editor I used xvi32 for windows.

link to my source for instruction for byte order and editing.

##processors.wiki.ti.com/index.php/OMAP35x_Wireless_Connectivity_WL1271_Command_Line_ Interface_(CLI)_User%27s_Guide#Editing_the_MAC_Add ress

Short instructions:

Editing the MAC Address

After the TX BIP runs, there is a new file called nvs_map.bin in Linux that contains the MAC address and the calibration data. The document SWAA044_NVS_INI_File_Functions_AN.pdf contains the format of the NVS file. If MAC address fields are manually edited with a hex editor, the byte order should be low byte first, followed by the high byte:
MAC address low register (offset 0x01 to 0x02)
MAC address LSB (offset 0x3 to 0x06)
MAC address high register (offset 0x08 to 0x09)
MAC address MSB (offset 0x0A to 0x0D)
The MAC address LSB and MAC address MSB, respectively, are shown in bold in the
following code for 08:00:28:12:34:56:
0000: 01 6d 54 56 34 12 28 01 71 54 00 08
For 11:22:33:44:55:66:
0000: 01 6d 54 66 55 44 33 01 71 54 22 11 00 00
Using a hex editor, you should change the bold numbers to the MAC address you
want to use.

Be careful about byte order and look closely at examples.

Good Luck
Please confirm instructions yourself and use at your own risk
I'll verify tomorrow. Thanks for taking the time to help run this to ground and get a workaround.
If you'd like to buy me a beer, you can donate here Thank you!!
 
sikahr
Old
(Last edited by sikahr; 26th December 2011 at 09:10 AM.)
#4  
Member
Thanks Meter 11
Posts: 38
Join Date: Dec 2011
** Deleted **


For new driver only ....
The Following User Says Thank You to sikahr For This Useful Post: [ Click to Expand ]
 
ygvuhb
Old
#5  
Senior Member
Thanks Meter 37
Posts: 442
Join Date: Jul 2010
so next cm7 build will get the fix

right?
The Following User Says Thank You to ygvuhb For This Useful Post: [ Click to Expand ]
 
TheKid2
Old
#6  
Member - OP
Thanks Meter 45
Posts: 31
Join Date: Dec 2011
Location: Shepherdsville
As it was my first post forum would not allow me to post links I am hoping someone will clean up solution and add to development thread.
The Following 5 Users Say Thank You to TheKid2 For This Useful Post: [ Click to Expand ]
 
TheKid2
Old
#7  
Member - OP
Thanks Meter 45
Posts: 31
Join Date: Dec 2011
Location: Shepherdsville
Quote:
Originally Posted by whistlestop View Post
I'll verify tomorrow. Thanks for taking the time to help run this to ground and get a workaround.
love this rom , I have four of these running on my router now with original factory mac addresses, Thank You for your work. I know from personal experience hours and hours can just disappear when you get involved with a project of this type.
The Following 5 Users Say Thank You to TheKid2 For This Useful Post: [ Click to Expand ]
 
TesseractSpace
Old
#8  
Junior Member
Thanks Meter 3
Posts: 24
Join Date: Dec 2011
Is there a way to get the factory MAC address while still in CM7 or do I have to load the stock ROM to get it and then go back to CM7?
 
TheKid2
Old
#9  
Member - OP
Thanks Meter 45
Posts: 31
Join Date: Dec 2011
Location: Shepherdsville
I have not found am method other than loading stock software back on device.
If you only have one kindle on your network you most likely will never have a problem.
If you had more than one running cm7 you could have router issues as they all were reporting same mac address. You will not have any issues unless another cm7 kindle shows up on the same wireless access point as yours.
The Following 6 Users Say Thank You to TheKid2 For This Useful Post: [ Click to Expand ]
 
teookie
Old
#10  
teookie's Avatar
Senior Member
Thanks Meter 40
Posts: 215
Join Date: Feb 2011
Unless you have a router log or something with your former mac address, I think you have to reload stock to find it. Thats what I did anyway.


Thanks to the OP for posting this; worked like a charm!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes