CM7 MAC Address Fix

Search This thread

TheKid2

Member
Dec 23, 2011
35
45
Shepherdsville
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/Porting_MCP_WLAN_to_Android#TxBiP_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...ce_(CLI)_User's_Guide#Editing_the_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
 
Last edited:

whistlestop

Senior Member
Dec 4, 2011
88
263
Colorado Springs, CO
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_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
I'll verify tomorrow. Thanks for taking the time to help run this to ground and get a workaround.
 

TheKid2

Member
Dec 23, 2011
35
45
Shepherdsville
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.
 

TheKid2

Member
Dec 23, 2011
35
45
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.
 

teookie

Senior Member
Feb 5, 2011
227
42
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!
 

jfb9301

Senior Member
Dec 25, 2011
92
28
direct editing

could we use a hex editor to change the local file on the kindle?

I spotted one at the market place, and combined with SU privileges it might get the job done.
 

jfb9301

Senior Member
Dec 25, 2011
92
28
Hopefully better instructions

having just stumbled through to OPs instructions (hats off to the OP for finding this). Successfully I might add, I thought I'd write up a hopefully more clear method of achieving this.

As I have had difficulty with the adb.exe command (connection issues, probably from a dodgy connection if I have too many USB devices plugged in) I chose to use applications local to my Kindle itself for as much as I could.

Apps:
adb.exe (the one that came with Kindle_Fire_Utility worked for me) grab a copy of this useful tool here kindle fire utility thread
Root explorer from the android market android market link
HexEditor android market link
Kindle fire
Computer

Data:
Your original MAC address - this might suck to get, as you will have to get it from your Kindle booted to stock Kindle Fire Firmware. I had installed CM7 using TWRP, so I booted to TWRP did a backup of my current CM7 OS, did a restore to the KF OS, booted to stock(rooted) opened up settings/device and nabbed that pesky MAC address, rebooted to TWRP, restored CM7.

Instructions:
connect KF to computer
open the computers start menu and select run, type CMD in the box
navigate to kindle_fire_utility/tools
type command: adb shell
adb should open and start communication with you Kindle
within the shell you have to type the following (be mindful of the spaces as they are important, ignore the #s as they are to make this post put the spaces in):
#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
now use ctrl-c to end ADB, and command:
exit
to close cmd, you are done with windows.
now the kindle part...
open root explorer
/data/misc/wifi
select nvs_map.bin and copy to the sdcard, I made two copies and named the second nvs_map.bin.bak just in case things got screwed from this point on.
exit root explorer
open HexEditor
open /sdcard/nvs_map.bin and change the digits in the very first line of the file
(example from OPs post)
following code for 08:00:28:12:34:56:
0000: 01 6d 54 56 34 12 28 01 71 54 00 08 00 00
For 11:22:33:44:55:66:
0000: 01 6d 54 66 55 44 33 01 71 54 22 11 00 00
save the file
use root explorer to copy it back to /data/misc/wifi
long press the file and set permissions to RW-RW-RW-
Reboot.....

Done

---------- Post added at 04:09 PM ---------- Previous post was at 03:11 PM ----------

I confimed MAC address using my wifi router (DDWRT) is awesome.

Does anyone know a way to get CM7 to cough up the kindles MAC address?
 
Last edited:
  • Like
Reactions: jmbneaf

csyria6919

New member
Dec 26, 2011
1
0
I'm having some difficulties with these instructions. I've tried with the WiFi setting from CM7 on and off, and also with the full instructions from the omappedia.org site, and it's still not working. A quick Google didn't come up with anything.

This is my output (from an ADB shell, obviously):
Code:
# insmod /system/etc/wifi/tiwlan_drv.ko
# start wlan_loader
# ifconfig tiwlan0 up
# wlan_cu –b
ERROR - IpcWpa_Sockets_Open - can't connect the socket
******************************************************
Connection to supplicant failed
******************************************************
ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = 800003,  res = -1, errno = 19)
ERROR - driver is not in RUNNING state!
user_main, start
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
/ D S
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
.../Driver> Start, sTop, stAtus
ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = 8000001,  res = -1, errno = 19)
ERROR - Failed to start driver!

I have tried it with and without the first three lines (going straight to wlan_cu -b), and the / D S line is an unsuccessful attempt to start the driver. An attempt to just push through all the commands gives an error message with every line, and does not create the nvs_map.bin file.

Anyone have any ideas?
 

jfb9301

Senior Member
Dec 25, 2011
92
28
I had wifi on, and did not run the first 3 commands. No thoughts beyond that.

For reference, I am on the latest CM7 with the updated video stuff by wistlestop (I think)
 

TheKid2

Member
Dec 23, 2011
35
45
Shepherdsville
I'm having some difficulties with these instructions. I've tried with the WiFi setting from CM7 on and off, and also with the full instructions from the omappedia.org site, and it's still not working. A quick Google didn't come up with anything.

This is my output (from an ADB shell, obviously):
Code:
# insmod /system/etc/wifi/tiwlan_drv.ko
# start wlan_loader
# ifconfig tiwlan0 up
# wlan_cu –b
ERROR - IpcWpa_Sockets_Open - can't connect the socket
******************************************************
Connection to supplicant failed
******************************************************
ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = 800003,  res = -1, errno = 19)
ERROR - driver is not in RUNNING state!
user_main, start
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
/ D S
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
.../Driver> Start, sTop, stAtus
ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = 8000001,  res = -1, errno = 19)
ERROR - Failed to start driver!

I have tried it with and without the first three lines (going straight to wlan_cu -b), and the / D S line is an unsuccessful attempt to start the driver. An attempt to just push through all the commands gives an error message with every line, and does not create the nvs_map.bin file.

Anyone have any ideas?
Hi,

I only used docs as reference. Wifi should be turned on on Kindle. I issued all command from terminal emulator running on Kindle. Hope you have found solution that works for you. Also there are spaces in between just about every letter in the commands.
Let us know if you were successful.
 
Last edited:

TheKid2

Member
Dec 23, 2011
35
45
Shepherdsville
Hello,

I am hearing about cpu utilization issue in another thread. http://xdaforums.com/showthread.php?t=1411895
Can anyone running cm7 and using nvs_map file check utilization connected to secure network. My installation is not exhibiting cpu behavior stuck at 1008 that is being described. Wondering if using calibration file is actually improving performance.
As a side not same file can be used in the current build of ics they are developing in that thread.

cpu scaling issue does not show up on unsecured net. Need a few people to sound off here to determine if my kindles are the only ones not having scaling issue.

Thanks
 

TheKid2

Member
Dec 23, 2011
35
45
Shepherdsville
Is there somewhere in cm7 to check cpu utilization, I looked everywhere ended up downloading task manager from market. Seems like task manager, and performance monitor should be in there somewhere. I am sure I am overlooking something simple.

Thanks
 

emelie

Senior Member
Jul 4, 2010
327
14
Vienna

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    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/Porting_MCP_WLAN_to_Android#TxBiP_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...ce_(CLI)_User's_Guide#Editing_the_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
    6
    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.
    5
    Appears as if it is working

    Confirmed! This works and is much easier.

    I confirm this confirmation! This is the wlan_loader, extracted from (http://xdaforums.com/showthread.php?t=1295928&page=3) attached for reference. md5sum: 060895d4b979050429a31c0992cf5e24

    I used root explorer, mounted as r/w, made a copy of the original JIC, overwrote the existing file within /system/bin and modified the permissions to appear as the original (rwxr-xr-x) rebooted leaving the system as r/w
    Sure enough mac address is the same as when I was in 6.1 Kindle Fire OS.

    My CPU is not pegged at 1008 and is varying as it should. I am using CPU Spy v0.4.0 (http://xdaforums.com/showthread.php?t=1011497) and attached is a screenshot. I am using the kernel with CM7 (http://xdaforums.com/showthread.php?t=1390773), not the overclocked one from @intersectRaven (http://xdaforums.com/showthread.php?t=1382999)

    We should implement this into the CM7 ROM if @whistlestop would like it to be :D
    5
    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.
    5
    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.