I’ve run into the same issue as the posters in this thread and this thread. All of the mt7697s seem to have the same MAC address, and none of the normal linux ways of changing it seem to work. This legato-specific page didn’t work for me either. I even looked into burning the efuses on the chipset myself, but I couldn’t figure out how.
Changing the address with ifconfig or ip link yields
RTNETLINK answers: Operation not supported
and adding a line in interfaces just gets ignored.
Is there something I’m overlooking? And would I have the same issue if I used a wifi expansion card? Thanks.
I found the solution. Hopefully other will find this useful, too. To change the MAC address, you have to change it on the wifi chipset itself.
-
To start, follow steps 1 through 12 of section Program the MT7697 on the mangOH Red
from here.
-
Open cmd and run mt76x7-flash-tool-console -g
from the flash tool folder. This will generate the XML files we need to modify the efuse.
-
Open the new xml subfolder within the flash tool folder. Open commands.xml
in your preferred text editor, and change enable to false
for everything except efuse. Make sure that the com port is right, then save and close.
-
Now open efuse.xml
. Change burn_all_efuse
to false and read_all_efuse
to true. Change the filepath to ./efuse.dat
for both fields. Save and close.
-
Back to the command prompt, run mt76x7-flash-tool-console batch xml\commands.xml
. When it completes, unplug the mangOH and plug it back in.
-
Open efuse.dat
in your preferred hex editor. Starting at offset 0x4, change the 0s to your desired MAC address. Save and close.
-
Back in efuse.xml
, change burn_all_efuse
to true and read_all_efuse
to false. Save and close.
-
Repeat step 5. When it completes, you can set the dip switches back to their normal configuration and ssh into legato as normal. Run ifup wlan1
and ifconfig wlan1
and it should reflect your new MAC address.
If you want to change the MAC address of additional mangOHs, all you have to do is repeat steps 6 and 8!
If you’re curious why this happens, the mt7697 has a default MAC address (00:0C:43:76:87:23
) that seems to be stored in its firmware, but it only uses it if the address stored in its efuse is all 0s. So if you set an address in the efuse, it will use that.
1 Like