-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAC address nulled #41
Comments
I also tried with "macchanger". As expected also no avail :-( Can the mt7628.ko somehow be redirected where on the mtd devices to read the MAC from? Or can I give the mac as a parameter when installing the kernel module? As I don't have the mt7628 sources, I can't find out myself :-( |
did you have /lib/firmware/mt7628.eeprom.bin in your board? it is the hw parameter. and mac is in it.. |
Thanks for the suggestion. The vocore system I have does not have a "/lib/firmware/*.bin" file and there the mt7628 assigns the correct MAC to ra0. When I use the same setup on my TL-MR3020V3 I get a nulled MAC. As far as I can see the MAC to be used is stored in different flash areas, as factory is located in /dev/mtd6 on MR3020V3 while it is located in /dev/mtd2 on vocore. This again brings up the question, where the pre-compiled mt7628.ko is looking up the MAC from and how I might be able to tell it the MAC to use. |
I also included a "/lib/firmware/mt7628.eeprom.bin" and as an alternative a "mt7628.eeprom" file but as expected, no change. I would really love to get a hint from someone knowing the source of the mt7628.ko how to tell this driver the mac for "ra0" interface. Any idea? |
where did you get the /lib/firmware/mt7628.eeprom.bin? it should be dumped form /dev/mtd6 on MR3020V3 use hexdump or other tools.it is the factory rf parameter. the mac is is in the following feild(take mt7615 for example). |
Thanks. Hexdump is not suited to extract a file, but to inspect it. I guess you are talking about dd and I am pretty familiar with this ;-) dmesg tells me NOR flash partions as follows:
factory partition is "/dev/mtd6". Looking into that we find:
Which is fine as the default dts file for kernel compilation says to expect MAC at 0xf100 in "factory" partition:
|
the correct mt7628 rf parameter should be like this: in order to dump the correct rf parameter, you must know the factory mtd block, and shold have the correct partion for mtd block. maybe isn't not easy. you can download one from https://github.com/dcboy/mt7628-p4rev-120395/blob/master/src/eeprom/MT7628_EEPROM_20140317.bin, and rename it to /lib/firmware/mt7628.eeprom.bin. be careful, the mac in this file is null, you can edit the mac feild to what you want. |
thanks again for your patience. I downloaded your file and included the MAC:
Unfortunately, the MAC inside "/lib/firmware/mt7628.eeprom.bin" is not used at all. After a rebbot "ifconfig" tells me:
|
add a line in wireless/mt7628/mt7628.dat as follow and try again: i'm not should where is the problem ,you can post the start up log, it may be help |
I added MAC to all three MAC positions (+4, +40, +46) into the file:
...and also copied that file into "/etc/wireless/mt7628" directory, and added the "E2pAccessMode=2" into my "/etc/wireless/mt7628/mt7628.dat". But after reboot wireless adapters still show up with a nulled MAC. Kernel boot log is as follows:
|
Does your WiFi MAC change when you change the MAC in the "mt7628.eeprom.bin" file? That would be a great test, if the MAC settings in "mt7628.eeprom.bin" are used at all, which I currently doubt (as the fine working vocore2 system I also have here to test with doesn't even have any files in "/lib/firmware" at all). |
if the E2pAccessMode=2 , of course it will change. you should post the wifi start log,then i'll see where is the problem. |
@ZiqiangYu @docbee63 And unfortunately, most mtk wifi drivers do not support customizing mac via |
I reflashed the factory partition so that the typical 512 byte eeprom section starting with "7628 ...." which is located at offset 0x20000 is copied to offset 0x0 and I patched in desired MACs at offsets 4, 40 and 46. Having done so, the MAC is used for "ra0" and a modified mac (added 0x02 on the MSB) is used for "apcli0". So for the moment I can live with this solution, but it would be much nicer if I could supply the 512 bytes eeprom data as a file without the need to remove the "read-only" tag in the kernel dtsi files to have factory partition flashable via "mtd write". Is there a way to have the +2 increment on the MAC of the "apcli0" interface applied to the LSB instead of the MSB, where the vendor ID is coded inside the MAC? Again, thanks for your help... "factory" partition that works for MR3020v3:
This is how "ifconfig" reports now on "ra0" and "apcli0":
|
Is there a way to have the +2 increment on the MAC of the "apcli0" interface applied to the LSB instead of the MSB, where the vendor ID is coded inside the MAC? no, hw decided |
With the friendly help from this feed I got WiFi basically working on a MR3020V3.
Only thing the precompiled mt7628.ko does not read out correctly is the MAC.
I tried setting MAC manually with "ifconfig apcli0 hw ether 12:23:34:45:56:67" but only get a "SIOCSIFHWADDR: Not supported" error. Adding MAC as an option to /etc/config/network" gets also ignored.
Any idea how I can change the MAC to the one "eth0" is showing?
The text was updated successfully, but these errors were encountered: