I have two Gl.iNet version 6416A and if I take a look at the back of the router, it is written that both routers have different MAC addresses but is it possible for two or more GL.iNet routers to have the same MAC address ?
Every device should have unique MAC address.
Of course you can just let them have the same MAC address, as long as they are not in the same subnet, not broadcasting wifi signal in the same area.
For example, if you want to override the MAC of WAN, add in /etc/config/network
config ‘interface’ ‘wan’
option macaddr ‘xx:xx:xx:xx:xx:xx’
On the back of Gl.iNet routers there’s a serial number, what command I can use to see that serial number on the terminal when SSHing to my router ? Basically I need a unique identifier that can’t be changed by anything / anyone and that unique ID can be retrieved with a linux command.
The ddns is unique. The SN is randomly generated, but you can think it unique if you don’t have toooo many units, as it is long.
Actually why don’t you use MAC as unique id?
To read the ddns and sn:
dd if=/dev/mtd0 bs=1 skip=$((0x1fc10)) count=7 2>/dev/null
dd if=/dev/mtd0 bs=1 skip=$((0x1fc20)) count=16 2>/dev/null
Well you told me that MAC address can be changed so I was looking for something else, can ddns be changed even if we flash the router with another firmware or it stays the same no matter what firmware it is? anyway the SN is different from the one written on the back of the router, I got “c5b7b1f2ee470d7f” with “dd if=/dev/mtd0 bs=1 skip=$((0x1fc20)) count=16 2>/dev/null”. It should begin with “6b0f8bxxxxx…”
There is two S/N actually, another one is dd if=/dev/mtd0 bs=1 skip=$((0x1fc30)) count=16 2>/dev/null
These info is stored in the uboot partition so even if you change firmware, they will remain. Even the MAC address, if not changed by intention, they should remain the same. If you have your own firmware, you can control the process.
If the flash content is totally erased, nothing will be left.
There is no unique ID of the device that cannot be changed!!
I could use accessing the serial number in the flash /dev/mtd0
What are the new locations in the AR-150 firmware? I recall uboot was enlarged and the calls above give me garbage as output so I am clearly not poking the right addresses.
I just did a complete dump of mtd0
cat /dev/mtd0 | strings
But I cannot find the serial number nor the DDNS anywhere in the uboot section of the AR-150.
Is the serial number still there or was it removed when enlaring U-Boot for the AR-150?
As said I would like to use the qrcode on the box to link the serial number to a particular box. That can only be done when I can read that serial from the firmware somehow. Thanks for any info.
I dug a little deeper (necessity is the mother of invention 新年快乐 and I came to realize that all the info I need is stored in /dev/mtd6
dd if=/dev/mtd6 bs=1 skip=$((0x30)) count=16 2>/dev/null
Will output the AR-150’s serial…
Yes, @JW, you are correct!
Would it be possible to also get the locations of serial numbers on the X750 and MT300N-V2?
It is just very similar and it is a try and see.
For future reference:
GL-MT300N-V2 >> dd if=/dev/mtd2 bs=1 skip=$((0x4030)) count=16 2>/dev/null
GL-X750 >> dd if=/dev/mtd2 bs=1 skip=$((0x30)) count=16 2>/dev/null
See my bug report…
Hi I don’t understand why you call it a bug.
dd if=/dev/mtd7 bs=1 skip=$((0x30)) count=16 2>/dev/null | hexdump
Thanks, was looking for this.
dd if=/dev/mtd2 bs=1 skip=$((0x30)) count=16 2>/dev/null