Open wrtcoder opened 6 years ago
in order to let 7612 work normally,you should have /lib/firmware/mt7612e.eeprom.bin . if not,driver can't find correct rf parameter and mac address
I'm writing a wiki on how to retrieve the eeprom.bin, that may help solve the issue.
Hi @ZiqiangYu and @Nossiac,
Thank you for your reply, I tried to copy the mt7612e.eeprom.bin from witi repo to /lib/firmware/mt7612e.eeprom.bin, but it does not solve the issue. The MAC address of rai0 interface is still all zeros. May you please help to point me to the correct firmware binary.
First of all, you need to locate the factory data partition on your device.
For example, this is the partition table of your device:
root@LEDE:/# cat /proc/mtd
dev: size erasesize name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "factory"
mtd3: 00fb0000 00010000 "firmware"
mtd4: 001748fb 00010000 "kernel"
mtd5: 00e3b705 00010000 "rootfs"
mtd6: 00be0000 00010000 "rootfs_data"
the eeprom data resides in the "factory" partition. You can check the data hexdump -C -n 128 /dev/mtd2
, you will get something like this:
root@LEDE:/# hexdump -C -n 256 /dev/mtd2
00000000 63 76 00 00 00 0c 43 26 60 d0 63 76 c3 14 00 80 |cv....C&`.cv....|
00000010 02 00 63 76 c3 14 00 00 00 00 00 00 00 00 00 00 |..cv............|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
If the data is correct, dump it into the file required by driver:
dd if=/dev/mtd2 of=/lib/firmware/mt7612e.eeprom.bin bs=1 count=512
Here's the openwrt's script to do the same thing, FYI:
In my case (XiaoMi Mini), the path of eeprom seems defined as "/etc/wireless/mt7612/mt7612e.eeprom.bin" As I can find these message from dmesg after "modprobe mt7612"
[ 300.265319] rtmp_get_default_bin_file_by_chip::chip version=0x7612
[ 300.271641] rtmp_get_default_bin_file_by_chip(): Found E2P bin file name:mt7612/mt7612e.eeprom.bin
[ 300.280798] rtmp_get_default_bin_file_by_chip::Found E2P bin file name=mt7612/mt7612e.eeprom.bin
[ 300.289783] rtmp_ee_load_from_bin::FileName=/etc/wireless/mt7612/mt7612e.eeprom.bin
[ 300.297692] RtmpOSFileOpen(): Error 2 opening /etc/wireless/mt7612/mt7612e.eeprom.bin
[ 300.305686] rtmp_ee_load_from_bin::Error opening /etc/wireless/mt7612/mt7612e.eeprom.bin
The line 'rtmp_ee_load_from_bin' of indicates the path of eeprom
/dev/mtd2 is my "factory" mtd partition
As the MAC address can be modified by "Breed" or other tools on eeprom, I didn't copy a file but link to /dev/mtd2
ln -s /dev/mtd2 /etc/wireless/mt7612/mt7612e.eeprom.bin
And then my mt7612 can finally work with valid BSSID.
Thanks Nossiac for making this great project!
why is this still not closed?
Hi All,
We tried to test the mtk driver on WG3526 router with tag 17.01.4. Below is the status we get
Please see the log of mt7612 when it is loaded and the ifconfig output
Another strange thing we observed on the UI page is that ra0 appears as the interface for mt7612 instead of rai0