<div dir="ltr"><div><div>Hi, <br><br></div>Thank you so much for reply.<br><br>The offset for the mac address is as below:<br>Ethernet MAC address is saved in art partition with offset 0
<br>WiFi device calibration data is saved in art partition with offset 0x1000<br><br></div><div>As you mentioned above: I have tried the below command but the mac address is not changed<br><br>root@ST-MA_WIFI:/# dd if=/dev/mtd5 of=/tmp/art.img<br>128+0 records in<br>128+0 records out<br>root@ST-MA_WIFI:/# printf "\x00\x26\x75\x96\x22\x33" | dd conv=notrunc of=/tmp/a<br>rt.img bs=1 seek=$((0x0))<br>6+0 records in<br>6+0 records out<br>root@ST-MA_WIFI:/# mtd write /tmp/art.img art<br>Unlocking art ...<br><br>Writing from /tmp/art.img to art ...<br><br></div><div>Thanks,<br></div><div>John<br></div><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 16, 2016 at 7:23 PM, <span dir="ltr"><<a href="mailto:micke.prag@telldus.se" target="_blank">micke.prag@telldus.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">2016-02-16 11:43 skrev John kerry:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi<br>
<br>
I am trying to write mac address and Serial number in ART partition.<br>
<br>
Creating 6 MTD partitions on "spi0.0":<br>
0x000000000000-0x000000040000 : "u-boot"<br>
0x000000040000-0x000000050000 : "u-boot-env"<br>
0x000000050000-0x000000680000 : "rootfs"<br>
mtd: partition "rootfs" set to be root filesystem<br>
mtd: partition "rootfs_data" created automatically, ofs=5B0000, len=D0000<br>
0x0000005b0000-0x000000680000 : "rootfs_data"<br>
0x000000680000-0x0000007f0000 : "kernel"<br>
0x0000007f0000-0x000000800000 : "art"<br>
0x000000050000-0x0000007e0000 : "firmware"<br>
<br>
cat /proc/mtd<br>
dev: size erasesize name<br>
mtd0: 00040000 00010000 "u-boot"<br>
mtd1: 00010000 00010000 "u-boot-env"<br>
mtd2: 00630000 00010000 "rootfs"<br>
mtd3: 000d0000 00010000 "rootfs_data"<br>
mtd4: 00170000 00010000 "kernel"<br>
mtd5: 00010000 00010000 "art"<br>
mtd6: 00790000 00010000 "firmware"<br>
<br>
Could anyone help me to write wifi mac address and Serial number to ART<br>
partition without overwriting on calibration data.<br>
<br>
Thanks, John<br>
<br></div></div><span class="">
_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank">openwrt-devel@lists.openwrt.org</a><br>
</span><a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a> [1]<br>
</blockquote>
<br>
You may modify these three lines for your application. You need to alter the offset for the mac address:<br>
<br>
dd if=/dev/mtd5 of=/tmp/art.img<br>
printf "\xAA\xBB\xCC\xDD\xEE\xFF" | dd conv=notrunc of=/tmp/art.img bs=1 seek=$((0x10))<br>
mtd write /tmp/art.img art<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
</div></div></blockquote></div><br></div>