Update randomized mac through CLI

Trying to do what the “randomize mac” button does, but on the CLI:

uci set glconfig.general.macclone_addr='94:75:b8:6a:39:63'
uci commit glconfig

However mac within the admin UI is still showing the old randomized Mac. So does ifconfig apclix0 (interface used by the repeater to connect to the wireless lan)

Does anything need restarting, or are other commands needed?

1 Like

Can you try to use the API?
such as:

curl -k -H 'glinet: 1' -d '{"jsonrpc":"2.0","method":"call","params":["","macclone","set_mac",{"mode":"2","mac":"94:75:B8:6A:39:63"}],"id":1}'

Let me give that a go!

Is there a reason why the uci command doesn’t work? Wondering if in general using uci to manipulate glconfig isn’t supported, or if this specific config is a bit more involved so it needs additional steps?

Hello, it needs additional steps and you can try the following steps to see if there are still any issues!
1.Set the mode to manual configuration and commit (skip this step if already manually configured in the web interface):

  uci set gl_macclone.macclone.mode=2
  uci commit gl_macclone

2.Set the cloning address in glconfig and commit:

  uci set glconfig.general.macclone_addr='mac cloning address'
  uci commit glconfig

3.Set the MAC address of the WAN interface to the cloning address and commit:

  uci set network.@device[2].macaddr='mac cloning address'
  uci commit network

3.Flush the committed values to the disk immediately:


4.Enable the repeater service and invoke the macclone method:

  ubus call repeater macclone

5.Start the WAN interface to complete the cloning:

  /sbin/ifup wan