Change MAC address

Running 9.2.5 OE from SD on Android TX95 box
It has a sticker with MAC (and it is burned in), but 06:xx:xx:xx:xx which is private address, and I ban on my network private addresses.

Is there a reliable way to change this address?

Tried all like here

Nothing seems to work

sebus

Try this: https://forum.libreelec.tv/thread/2139-how-to-change-duplicate-mac-address/

Been there, tried them all, none worked

sebus

Can you try if you get a print out with fw_printenv?

This must work as in autoexec.sh or in some systemd script.

ifconfig eth0 down
ifconfig eth0 hw ether your_new_mac
ifconfig eth0 up

Does not, tried it as well

unicast address has to have the first octet as an even value

It was after all as simple as using address with starting ie 88:

as I explicitly did not want

x2:xx:xx:xx:xx:xx
x6:xx:xx:xx:xx:xx
xA:xx:xx:xx:xx:xx
xE:xx:xx:xx:xx:xx

otherwise

autostart.sh

#!/bin/sh
(
sleep 30;
ifconfig eth0 down;
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx;
ifconfig eth0 up
) &

got execute, but MAC stayed the same due to error:

ifconfig: SIOCSIFHWADDR: Cannot assign requested address

CoreELEC (official): 9.2.5 (Amlogic.arm)
CoreELEC:~ # systemctl status kodi-autostart.service -l --no-pager
â—Ź kodi-autostart.service - Kodi user autostart script
   Loaded: loaded (/usr/lib/systemd/system/kodi-autostart.service; disabled; vendor preset: disabled)
   Active: active (exited) since Thu 2015-01-01 00:00:19 GMT; 5 years 10 months ago
  Process: 2814 ExecStart=/bin/sh -c . /etc/profile; exec /bin/sh /storage/.config/autostart.sh (code=exited, status=0/SUCCESS)
 Main PID: 2814 (code=exited, status=0/SUCCESS)
   Memory: 12.0K
   CGroup: /system.slice/kodi-autostart.service

Jan 01 00:00:19 CoreELEC systemd[1]: Starting Kodi user autostart script...
Jan 01 00:00:19 CoreELEC systemd[1]: Started Kodi user autostart script.
Nov 13 08:16:45 CoreELEC sh[2814]: **ifconfig: SIOCSIFHWADDR: Cannot assign requested address**

You removed it already but your fw_printenv shows mac=06:61:61:12:db:43.

You should be able to set the mac by:

fw_setenv mac xx.xx.xx.xx.xx.xx
sync
reboot
1 Like

How confusing!
Why such simple “issue” could not be well documented?
Going in circles from thread to thread…

Because it´s no issue.
Remeber, You baned privat MAC on Your network

2 Likes

Yada yada, it is an “issue” or lack of proper documentation, it has nothing to do with MY network

Everywhere I can find only this is mentioned: fw_setenv ethaddr

And what address you actually like to use?

Already solved above!