OpenWrt mesh routers problems (Encryption, MAC address & Hostname)

You don't have to go deep into dts fille or hotplug to override the MAC, just add an option macaddr to the wifi-iface, using the factory MAC address from the sticker.

If you've been copying configs between the two units you may have ended up with a duplicate option macaddr in /etc/config/network. This should also be fixed by using the sticker MAC or a close one by increasing the last number by one or two.

Ah, Wifi 6, that explains it :wink:

No problem, we all have to start somewhere.

Let's simply work through the problems one by one.

  1. Mac address problem. This looks like a firmware image issue as @anon69880279 suggested and does not effect the mesh, but causes problems with the 5GHz network.
    We can work around this problem easily by setting the mac for the 5G radios on both routers.
    On each mesh node (router) in turn, in a terminal session do the following -

On the one with the 5c:92:5e:37:e8:70 mac:

uci set wireless.wlan1.macaddr='5c:92:5e:37:e8:70'
uci commit wireless

On the one with the 5c:92:5e:b7:7a:d8 mac:

uci set wireless.wlan1.macaddr='5c:92:5e:b7:7a:d8'
uci commit wireless

For simplicity, reboot both then check if the mac problem is fixed.

If it is we can go on to the next problem.

1 Like
  1. The encryption problem.
    802.11s mesh has an additional dependency and an addon to make it work properly.

To install these you need to make sure both routers in turn are connected to an Internet feed.
It looks like you have both configured as pure AP/Meshnodes so all you need to do is connect, each in turn to your isp router with an ethernet cable (lan port to lan port)

In a terminal session on each meshnode in turn do (making sure you do net get any errors):

opkg update
opkg remove wpad-basic-wolfssl
opkg install wpad-mesh-wolfssl
opkg install mesh11sd

Making sure you did both, then put the meshnodes back where you want them (only one connected to the isp router by ethernet) and power them both back up.

Test again and report back :smiley:

1 Like

Hello, 1st of all, thank you for helping me troubleshoot the problem :grinning:

Can you tell me on what basis, that you use to determine which router should have the
correct MAC address on the 5GHz radio?

Is it based on the ip link command or the iw dev wlan0 mpath dump output?

I am confused, as to why I am setting MAC address on the wlan1 (5GHz Radio) using MAC address from the 2.4GHz Radio?

Both 5c:92:5e:37:e8:70 & 5c:92:5e:b7:7a:d8 Both these MAC addresses are actually referring to the 2.4GHz Radios coming from the OpenWrtX5000R180 and OpenWrtX5000R182

Shouldn't I should be setting the ACTUAL(or REAL) MAC address for the 5GHz Radio?

Both routers need a proper mac address, different to each other. They do already ie 5c:92:5e:37:e8:70 and 5c:92:5e:b7:7a:d8. These are seen in the ip link output as well as in your screenshots from Luci.
It is a bug in the OpenWrt firmware that prevents OpenWrt determining a unique preset mac for the 5G wireless (perhaps there isn't one). As previously discussed it is possible to patch the basic image, one way or another but this is not essential and you also stated:

Next question:

These mac addresses are unique to each router. That is all we need.

The ip link output was to verify your interface configuration (the screenshots are of limited value)
The iw output was to get the current mesh status (which was showing a layer 2 mac-routing error).

1 Like

Referring to the commands below:

uci set wireless.wlan1.macaddr='5c:92:5e:37:e8:70'
uci commit wireless

The commands are for setting the 5GHz Radio to a new MAC address = '5c:92:5e:37:e8:70'
Am I right? :roll_eyes:

Yes. And on the other router use the other mac address as in the commands I showed.

1 Like

Ok then....but......do you agree this MAC address 5c:92:5e:37:e8:70 actually refers to 2.4GHz radio's MAC address? See the picture below :point_down:

2022-04-12_15-07-13

Yes but it does not matter. It is a mac address that is unique to that router. That is all we need.
You could make up your own mac address if you wanted to, but there is no need.

From ip link:

1 Like

OK,

How do I recover the original MAC address for 5GHz Radio (wlan1) in OpenWrt firmware?
If possible, I prefer that way. I like to see some consistency in my work.

Is there a command that I can use?

Or

I need to flash the stock firmware then only I can see the MAC address?

See the reply from @anon69880279
You said you did not want to go that route as you did not understand it.

By the way, the 5G mac problem has nothing to do with the mesh network... It is a bug in the OpenWrt firmware for the device.

1 Like

From the ip link output:

Most likely the manufacturers intended the 5G mac to be 5c:92:5e:37:e8:73

1 Like

Referring to F5BJR's solution below:

Ok, I am willing to try.
Can you guide me?
So I just follow what @anon69880279 shown below:

  1. ssh to router
  2. edit the file: /etc/hotplug.d/ieee80211/10_fix_wifi_mac
    ( Is there such a file called: 10_fix_wifi_mac? )
    add the code below at the bottom of the txt file:
  3. then run wifi down and wifi up and check the result?
tenbay,t-mb5eu-v01)
                hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
                 [ "$PHYNBR" = "1" ] &&  macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress
                 ;;

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

I know nothing about this device, so no.

1 Like

You seem to be making too much of what is a simple fix for a bug that is best fixed by knowledgeable developers that are familiar with the device.

1 Like

I tested already this method does not change the incorrect MAC address to the correct one

I have 3 units of the X5000R, one is configured to the main mesh router which is
OpenWrtX5000R180 (hostname)

I took 1 unit and reflashed it with original stock OEM firmware and found out that
the 5GHz radio MAC address is always ending with X4 (the last digit is always a
hexadecimal number 4) instead of X3.

X-denotes hexadecimal numbers from 1 to F

See the picture below:

Well put a 4 on the end then. I do not see why you are obsessing about this. You can put in anything you like, it does not matter as long as all your routers are different to each other.

1 Like

Hi, when I run these commands below:

uci set wireless.wlan1.macaddr='5c:92:5e:37:e8:74'     #<--------------1st line of command
uci commit wireless

The 1st line of command, returns: uci: Invalid Argument see below:

2022-04-12_17-42-07

Show the output of:
uci show wireless

1 Like