Mods for Tenbay_T-MB5EU-v01 MAC LAN address not good

I discovered that the mac address of the lan ports did not correspond to the indication of the sticker glued to the back of the device

I modified the snapshots dts file like this:

&gmac0 {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-2)>;

&switch0 {
ports {
wan_port: port@0 {
status = "okay";
label = "wan";
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-1)>;

and also snapshots 10_fix_wifi_mac as this:

hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr "0" > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr "1" > /sys${DEVPATH}/macaddress

I have now all correct:

LAN = Sticker
WAN = Sticker +1
WIFI 2.4 GHZ = Sticker +2
WIFI 5 GHz = Sticker +3


I'm begging to differ here. I specifically remember checking the vendor firmware and WAN had the MAC address of the label which is the case on my board. This also makes sense, as eg. in University dorms you have to register your devices physical address.

I'll re-check with the vendor firmware, but i would be interested how this maps on your device with the original SW.

I booted the original firmware and the situation follows:

Label: e4:67:1e:29:b8:19
WAN: e4:67:1e:29:b8:19
LAN: 00:e0:00:00:10:00 (sic!)
W24: e4:67:1e:29:b8:1b
W50: e6:67:1e:39:b8:1b

The LAN mac is obviously different from the OEM firmware (and we stick to that).

The factory partition reads the MAC E4 67 1E 29 B8 1B at offset 4 (Same as the 2.4 GHz WiFi).

OpenWrt currently uses:

Label: e4:67:1e:29:b8:19 (Same)
WAN: e4:67:1e:29:b8:19 (Same)
LAN: e4:67:1e:29:b8:1b (Not same - For the better part)
W24: e4:67:1e:29:b8:1c (Wrong)
W50: e6:67:1e:39:b8:1b (Wrong)

WAN and LAN are fine, while 2.4GHz and 5 GHz seem to be off. I'll fix that.
What is notable about this, is that the 5 GHz MAC can not be made identical with the current toolset we have at hand (lang time on my todo). I'll use the unused MAC address (e4:67:1e:29:b8:1a in this example) from the block.

Can you elaborate how you came to your mapping? I don't see where this comes from (Although your stock OS version might be different.)

I saw this by comparing with the mac address indicated on the sticker of the device

This is not the first time that I realize that the manufacturers are doing anything

For example, I bought two NeWfi D2 boxes where the MAC addresses were identical on the two devices and which did not correspond to the sticker either. In this case it was easy because the breed bootloader can reprogram the 4 * MAC addresses of the product /art partition and it is supported correctly by the OpenWrt firmware

I also encountered the same problems with CUDY-X6 and Huasifei WR1800K-AX-Nand boxes exactly as with my 2 * Tenbay

With the mods ( dts file & 10_fix_wifi_mac ) i now have everything correct: and all is good
no problems with the Wifi 2.4 & 5 Ghz

LAN = Sticker
WAN = Sticker +1
WIFI 2.4 GHz = Sticker +2
WIFI 5 GHz = Sticker +3

Also i use the 2 Tenbay box with 32M flash ...

The Sticker on the device might not reveal the physical address of all interfaces. Or does your device's sticker contain multiple addresses denoting their respective interface?

If not, it is desirable to match the assignment with the OEM firmware where possible. As explained before, for wired this was already the case while WiFi is still incorrect. Assignment of those addresses is not uniform between different models (not even between boards from the same vendor)

With the fixes currently in my staging tree, this should be fixed, as far as i can tell from the single device i own.

Hence i was asking the question how you came up with this assignment:

I'm not able to reflect this theory with the OEM firmware on my device, so I'm curious whether this is different based on the OEM firmware version or how else you drew this conclusion.

To be sure not to have a conflict i used this

The main thing is that there is no conflict as with the addresses as before your 10_fix_wifi_mac

And Lan = product sticker not Wan

I believe there is no downside to doing this:as many internet box's

LAN = Label
WAN = Label +1 ( not same as LAN )
WIFI 2.4 GHz & WIFI 5 GHz = Label

So that there are no problems, it would be enough for the dts , 10_fix_wifi_mac files to only have the factory address 0x4 as a reference if this corresponds well to the product label