AR 300M changing MAC address

Tried the documented stuff posted on OpenWRT and it didn’t work. How do I change the Mac address?

This is what I did:

1 - find the art partition

~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 “u-boot”
mtd1: 00010000 00010000 “u-boot-env”
mtd2: 00fa0000 00010000 “reserved”
mtd3: 00010000 00010000 “art”
mtd4: 00200000 00020000 “kernel”
mtd5: 07e00000 00020000 “ubi”

2 - copy the art partition to a file

~# dd if=/dev/mtd3 of=art2.bin
128+0 records in
128+0 records out

3 - looked at the file with hexdump

~# hexdump art2.bin
0000000 e495 6e41 176d ffff ffff ffff ffff ffff
0000010 6c6a 3131 3736 64ff ffff ffff ffff ffff
0000020 3538 3438 3932 3863 6461 3835 6661 6166
0000030 3264 3638 3139 3461 3732 3635 3238 3332
0000040 ffff ffff ffff ffff ffff ffff ffff ffff
0001000 xxxx xxxx xxxx xxxx 0000 0000 0000 0000
Where x’s equals current mac address.

3 - Remoted in to the AR300M and using Bless Hex editor changed mac address.

4 - copied edited file back to /dev/mtd3

mtd write art2.bin /dev/mtd3

5 - rebooted

Mac remains the same.

What am I doing wrong here?

>>> mtd write ar2.bin /dev/mtd3

I am not an expert but reading your post, the file you should be writing appears to be art2.bin and not ar2.bin


Thank you Glitch. Yup; that was a typo above. I kept backing up the partition mtd3 and calling it different names just in case.

I have tried writing the changes now 6 ways from Sunday and it doesn’t work and reboots always with the original MAC address.

Gone to Xerox mac addressing (all zeros) on my home network widgets mostly cuz it’s easier to remember.

BTW are you still in Rochester?

Found an easier way to spoof the mac addresses which requires no changes to the firmware and is a simple script.

I call the scripts /etc/init.d/spoof0, spoof1 and spoof2

1 - nano /etc/init.d/spoof0

2 - script for LAN

#!/bin/sh /etc/rc.common
uci set network.lan.macaddr=aa:bb:cchexdump -n3 -e'3/1 ":%02x"' /dev/urandom
uci commit network
3 - change it to be executible

chmod +x /etc/init.d/spoof0

4 - enable it

./spoof0 enable

5 - cp spoof0 spoof1 and cp spoof1 spoof2

6 - nano spoof1 (WAN)

#!/bin/sh /etc/rc.common
uci set network.wan.macaddr=aa:bb:cchexdump -n3 -e'3/1 ":%02x"' /dev/urandom
uci commit network
7 - ./spoof1 enable

8 - nano spoof2 (WLAN)

#!/bin/sh /etc/rc.common


uci set wireless.@wifi-iface[0].macaddr=aa:bb:cchexdump -n3 -e'3/1 ":%02x"' /dev/urandom

uci commit network

9 - ./spoof2 enable

10 - reboot



why not just mac clone provide in the UI?

That would work too alzhao.

Here I tinker with much hardware at home. (close to 100 devices today).

I manage or look at the hardware via IP, names and custom mac addresses.

My touchscreen consoles are in the same set of IPs with matching numbered mac addresses arranged in groups of hardware / OS types. Guessing that is a bit OCD.

In the mix today there are a few SOHO routers of all types. I utilize PFSense today with multiple internet connections, multiple NICs/VLANs for internal connections some for day to day use and other networks just to play with.

Well too to become more familiar with OpenWRT. That is me though.

Is the mac address stored in other than the art partition? Did I edit the wrong file?

Is there a copy of the mtd3 partition being cached?

cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 “u-boot”
mtd1: 00010000 00010000 “u-boot-env”
mtd2: 00fa0000 00010000 “reserved”
mtd3: 00010000 00010000 “art”
mtd4: 00200000 00020000 “kernel”
mtd5: 07e00000 00020000 “ubi”



mac is stored at the start of ART.

Thank you alzhao.

Yes edited the beginning of the art image with the Linux Bless Hex editor where I saw the mac address and wrote it back to the AR 300M.

Relating to the AR300M’s use as a travel router I have recommended it’s use to a peer who is purchasing it for himself / his parents.

Here also went to installing a competitor’s micro router inside of my Leviton OmniPro 2 alarm panel media cabinet. I chose this one based on it’s size as I have the security panel fully optioned out. The board is about 1/2 the size of the AR300M. It fits on one side between a stacked set of daughter boards and the side of the cabinet.

I use it to massage the network connectivity to the panel. It is powered by the panel such that in an event of a power outage it continues to work. Also talks serially to the panel. It can also serve as an out of band management device using a 3-4G cellular device. I happen to have a few of the automotive style 12VDC to 5VDC transformers around but switching over to a bucky style power supply for two 5VDC device use. (also using a GPS / PPS board for time sync off net). BTW and it’s been about a year ago had a mfg company over there design a board (on paper) a micro router as wide as a NIC with two NIC ports on it / USB / Serial and an RTC. It was the size of my index finger (with no antennas). Looked more like a dongle.