I checked the “/etc/bat-hosts” file and it stores mac address list as per the attached image
Among the above cases, I found that the mac assignment to the device(eth0,wlan0) as per the 3rd case but not getting an idea from where this mac address got.
Can you please support us on how to assign the mac address to a device or provide us the steps which you are following till now.?
MAC addresses can be stored and then used in many ways in the board. The way that is currently implemented is using the ART partition of the SPI flash, they are at offsets:
eth0: 0x000000
eth1: 0x000006
wlan0: 0x00000C
You can check the partitions with: cat /proc/mtd you should see something like
In this case mtd7 is the ART partition, where the qualcom calibration data for the wlan0 is stored and also the MAC addresses. The calibration data is at offset 0x1000 of the ART partition.
You should be able to configure the MAC addresses using ART tool (I don’t know how but there should be an option there). It also can be setup from linux writing to /dev/mtd7
We found the 8 partition on our board as below but in your last message you show the 7 parttiton. i flashed “lr-u-boot-v1.1.0.bin” and “librerouteros-1.3-r8118+1-8fa342b289-ar71xx-generic-librerouter-v1-squashfs-sysupgrade.bin” firmware on our board.
Also we have some query so please help us to clear those.
What happens for the first time when SPI FLASH is blank and it has only u-boot binary preloaded?
What happens if calibration data are not available for wlan0? didn’t start the radio? or it will give below error
ath9k: probe of qca955x_wmac failed with error -5
How do you load the calibration data on /mtd/ART partition? can you please share with us the steps /document/link which can help us with the fresh board?
is there any method to check the calibration data are available on SPI flash of librerouter which we purchased from the dragino?
run `sudo ./tools/tftp_server.sh eth0 path/to/openwrt-ar71xx-generic-librerouter-v1-squashfs-sysupgrade.bin`
and at the serial interface execute:
ath> tftp 82000000 openwrt-ar71xx-generic-librerouter-v1-squashfs-sysupgrade.bin
ath> erase 0x9f050000 +$filesize
ath> cp.b 0x82000000 0x9f050000 $filesize
ath> boot
Also you can directly pre flash the SPI with the u-boot and the firmware. You just need to use the correct offsets for the firmware (0x9f050000).
Yes, the driver needs the calibration data to load AFAIK so it gives error -5.
I don’t know how to do it. I think that it can be done using the ART utility. Anyway you can always read and write to the FLASH from the firmware using the mtd utility ([OpenWrt Wiki] MTD).
Yes, you can dump the ART partition to a file with cat /dev/mtd8 > /tmp/ART.partition
Dear SAM,
We purchased the new 5G modules (QCA9882 PCI Module) due to unavailability of existing 5GHz PCI module. Currently we are facing the issue to storing the MAC address of those PCI module and it always gives “00:03:07:12:34:56” MAC so can you help us for this? how you stored the MAC address in exist 5Ghz PCI module?
Hi! Sorry I don’t know how to help you. Each module may be different on how to store the MAC and then how the driver retrieves and applies the MAC. I suggest you to write to the openwrt forum for help as this is a “generic” openwrt support question.