View Single Post
Old 10-29-2012, 09:14 AM   #34
kaneorotar
Enthusiast
kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.kaneorotar for a long time would go to bed early.
 
Posts: 41
Karma: 17678
Join Date: Aug 2011
Location: CA, USA
Device: K3, KW3, PW4
I accidentally found the script /etc/init.d/wifi which is related to flashing the MAC address to the EEPROM of the Wi-Fi board. After examining it and /opt/ar6k/host/support/loadAR6000.sh for a few times, I came up with the following code that's able to change the MAC Wi-Fi address.
Code:
#!/bin/sh

export IMAGEPATH=/sbin
export WORKAREA=/opt/ar6k
export ATH_PLATFORM=SHASTA_NATIVEMMC-SDIO
export TARGET_TYPE=AR6002
export AR6002_REV=2
export TARGET=AR6002
export EEPROM=/opt/ar6k/target/AR6002/hw2.0/bin/lab126_15dBm_nodiv_WWR_CTL.bin

#Changing the Wi-Fi MAC address
idme --mac 28EF01F3XXXX

args=$*
RAWMAC=`idme ? | awk '/MAC address/ { print $4 }`
MAC=`echo $RAWMAC | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/'`
echo $MAC
#Flashing to the EEPROM
/opt/ar6k/host/support/loadAR6000.sh -i wlan0 --setmac $MAC  $args
I've managed to change the MAC to my original one and it works well with the B006 S/N. But as soon as the S/N is also changed to mine, the Wi-Fi MAC goes back to 'Unavailable' again.
kaneorotar is offline   Reply With Quote