OpenWrt Firmware Selector not accepting Script to run on first boot for Mesh11sd

Hello
I recently got an OpenWrt One and since it's WiFi is much faster than my current ZyXEL WSM20 I would like to include it in my OpenWrt Mesh11sd setup and replace one of the nodes.

To do that, I wanted to build a custom firmware image as follows:
Installed Packages

base-files ca-bundle dnsmasq dropbear firewall4 fitblk fstools kmod-crypto-hw-safexcel kmod-gpio-button-hotplug kmod-leds-gpio kmod-nft-offload kmod-phy-aquantia libc libgcc libustream-mbedtls logd mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd -wpad-basic-mbedtls kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-rtc-pcf8563 kmod-usb3 kmod-nvme kmod-phy-airoha-en8811h luci wpad-mbedtls kmod-nft-bridge mesh11sd

Script to run on first boot (uci-defaults)

uci set mesh11sd.setup.auto_config='1'
uci set mesh11sd.setup.auto_mesh_id='meshidigotfrommesh11sdstatusonmyoldnodes'
uci set mesh11sd.setup.mesh_gate_encryption='2'
uci set mesh11sd.setup.mesh_gate_key='mywifipassword'
uci set mesh11sd.setup.ssid_suffix_enable='0'
uci set mesh11sd.setup.mesh_leechmode_enable='1'
uci commit mesh11sd
uci set network.lan.ipaddr='192.168.9.1'
uci commit network
uci set wireless.radio0.country='DE'
uci set wireless.radio0.channel='11'
uci set wireless.radio1.country='DE'
uci set wireless.default_radio0.ssid='CF-WiFi-HOME-2.4G'
uci set wireless.default_radio0.ieee80211r='1'
uci set wireless.default_radio0.mobility_domain='12ab'
uci set wireless.default_radio1.ssid='CF-WiFi-HOME'
uci set wireless.default_radio1.ieee80211r='1'
uci set wireless.default_radio1.mobility_domain='12ab'
uci commit wireless
rootpassword="mypassword"
/bin/passwd root << EOF
$rootpassword
$rootpassword
EOF

Now, Snapshot, 24.10.0 and 24.10.0-rc7 just fail to build right away. I can build from 24.10.0-rc6 downwards (which is OK), but the resulting image does not execute my script as intended. It always stays at the default values.

I did the same procedure last year with the ZyXEL devices without issues (slightly different packages of course).

What could be the issue?

missing shebang?

#!/bin/sh

@otnert
The firmware selector "uci-defaults" text box does not require a shebang to be entered, so it is not that.

What errors does the Firmware Selector give on failure?

Sometimes if the openwrt buildbots are working on something critical, the FS will fail. Usually, trying again later will work just fine.

What stays at the default values?

@bluewavenet you walked me through setting the mesh up last year and it has been rock-solid! Thanks again for that. I only want to upgrade devices because the OpenWrt One is so nice (and fast).

Actually none on 24.10.0 when I tried to replicate it just now! So now I have a custom image with the packages and the boot script on 24.10.0 as stated above.

Now I reflashed with the firmware created above, but I receive the following when trying

mesh11sd status

and I assumed those were defaults/auto-created values:

{
  "setup":{
    "version":"4.1.1",
    "enabled":"1",
    "procd_status":"running",
    "portal_detect":"1",
    "portal_detect_threshold":"0",
    "portal_channel":"default",
    "channel_tracking_checkinterval":"30",
    "mesh_basename":"m-11s-",
    "auto_config":"1",
    "auto_mesh_network":"lan",
    "auto_mesh_band":"2g40",
    "auto_mesh_id":"5a8f469aa40de78772b95a1c26b6e8",
    "mesh_gate_enable":"1",
    "mesh_leechmode_enable":"1",
    "mesh_gate_encryption":"2",
    "txpower":"20",
    "mesh_path_cost":"10",
    "mesh_path_stabilisation":"1",
    "checkinterval":"10",
    "interface_timeout":"10",
    "ssid_suffix_enable":"0",
    "debuglevel":"1"
  },
  "interfaces":{
    "m-11s-0":{
      "mesh_retry_timeout":"100",
      "mesh_confirm_timeout":"100",
      "mesh_holding_timeout":"100",
      "mesh_max_peer_links":"16",
      "mesh_max_retries":"3",
      "mesh_ttl":"31",
      "mesh_element_ttl":"31",
      "mesh_auto_open_plinks":"0",
      "mesh_hwmp_max_preq_retries":"4",
      "mesh_path_refresh_time":"1000",
      "mesh_min_discovery_timeout":"100",
      "mesh_hwmp_active_path_timeout":"5000",
      "mesh_hwmp_preq_min_interval":"10",
      "mesh_hwmp_net_diameter_traversal_time":"50",
      "mesh_hwmp_rootmode":"0",
      "mesh_hwmp_rann_interval":"5000",
      "mesh_gate_announcements":"0",
      "mesh_fwding":"0",
      "mesh_sync_offset_max_neighor":"50",
      "mesh_rssi_threshold":"-65",
      "mesh_hwmp_active_path_to_root_timeout":"6000",
      "mesh_hwmp_root_interval":"5000",
      "mesh_hwmp_confirmation_interval":"2000",
      "mesh_power_mode":"active",
      "mesh_awake_window":"10",
      "mesh_plink_timeout":"10",
      "mesh_connected_to_gate":"1",
      "mesh_nolearn":"0",
      "mesh_connected_to_as":"0",
      "mesh_id":"5a8f469aa40de78772b95a1c26b6e8",
      "device":"radio0",
      "channel":"11",
      "tx_packets":"194",
      "tx_bytes":"56548",
      "rx_packets":"0",
      "rx_bytes":"0",
      "this_node":"20:05:b6:ff:8e:11",
      "active_peers":"0",
      "peers":{
      },
      "active_stations":"0",
      "stations":{
      }
    }
  }
}

For

mesh11sd stations

I get nothing as expected:

===========================================================================
Mesh backhaul stations connected to this node:
===========================================================================

A user had a similar problem with the firmware builder, can you try the following please. Essentially there are new lines between some parts.

uci set mesh11sd.setup.auto_config='1'
uci set mesh11sd.setup.auto_mesh_id='meshidigotfrommesh11sdstatusonmyoldnodes'
uci set mesh11sd.setup.mesh_gate_encryption='2'
uci set mesh11sd.setup.mesh_gate_key='mywifipassword'
uci set mesh11sd.setup.ssid_suffix_enable='0'
uci set mesh11sd.setup.mesh_leechmode_enable='1'
uci commit mesh11sd
uci set network.lan.ipaddr='192.168.9.1'
uci commit network
uci set wireless.radio0.country='DE'
uci set wireless.radio0.channel='11'
uci set wireless.radio1.country='DE'
uci set wireless.default_radio0.ssid='CF-WiFi-HOME-2.4G'
uci set wireless.default_radio0.ieee80211r='1'
uci set wireless.default_radio0.mobility_domain='12ab'
uci set wireless.default_radio1.ssid='CF-WiFi-HOME'
uci set wireless.default_radio1.ieee80211r='1'
uci set wireless.default_radio1.mobility_domain='12ab'
uci commit wireless

rootpassword="mypassword"

/bin/passwd root << EOF
$rootpassword
$rootpassword
EOF

I tried it, the build worked fine, but no luck unfortunately (both via sysupgrade and full reflash).

So now I tried SNAPSHOT again and I'm receiving the following error:

Error: Impossible package selection
STDERR

Generate local signing keys...
WARNING: can't open config file: /builder/shared-workdir/build/staging_dir/host/etc/ssl/openssl.cnf
WARNING: can't open config file: /builder/shared-workdir/build/staging_dir/host/etc/ssl/openssl.cnf
read EC key
writing EC key
WARNING: opening /builder/packages/packages.adb: No such file or directory
Package list missing or not up-to-date, generating it.

Building package index...
ERROR: unable to select packages:
  nftables (no such package):
    required by: world[nftables]
  opkg (no such package):
    required by: world[opkg]
  ppp (no such package):
    required by: world[ppp]
  ppp-mod-pppoe (no such package):
    required by: world[ppp-mod-pppoe]
  nftables-json (no such package):
    required by: firewall4-2024.12.18~18fc0ead-r1[nftables-json]
make[2]: *** [Makefile:226: package_install] Error 9
make[1]: *** [Makefile:167: _call_manifest] Error 2
make: *** [Makefile:344: manifest] Error 2

Also 24.10.0 builds like instantly (before it always took like half a minute) so I feel like that's not right, either.

So I checked all my custom builds manually and the packages are there (and absent in the case of wpad-basic-mbedtls). The root password is also set (I can use it to ssh in and to login to LuCi). The two WiFi networks are also there, but without password, mobility domain and fast roaming. Channel and country however are set. What's not there is the mesh_id part.

To summarize what was applied (to the best of my understanding):

uci set network.lan.ipaddr='192.168.9.1'
uci commit network
uci set wireless.radio0.country='DE'
uci set wireless.radio0.channel='11'
uci set wireless.radio1.country='DE'
uci set wireless.default_radio0.ssid='CF-WiFi-HOME-2.4G'
uci set wireless.default_radio1.ssid='CF-WiFi-HOME'
rootpassword="mypassword"

and what was not:

uci set mesh11sd.setup.auto_config='1'
uci set mesh11sd.setup.auto_mesh_id='meshidigotfrommesh11sdstatusonmyoldnodes'
uci set mesh11sd.setup.mesh_gate_encryption='2'
uci set mesh11sd.setup.mesh_gate_key='mywifipassword'
uci set mesh11sd.setup.ssid_suffix_enable='0'
uci set mesh11sd.setup.mesh_leechmode_enable='1'
uci commit mesh11sd
uci set wireless.default_radio0.ieee80211r='1'
uci set wireless.default_radio0.mobility_domain='12ab'
uci set wireless.default_radio1.ieee80211r='1'
uci set wireless.default_radio1.mobility_domain='12ab'

Well it worked for me, as I also started having issues with the script not running on first boot (uci-defaults). Tried both FS & owut.

I just tried it but the result is the same as without it.

1 Like

@bluewavenet I know manual mode isn't recommended but is there another way to set this up with my custom values other than the boot script?

This is because the openwrt build bots had either encountered a problem or were actually in the process of rebuliding, making the Firmware selector fail.

Normally if you give it a little while it will start working again.

Go back to 24.10.0. I just tried generating the firmware for your model with all the custom stuff and it completed with no errors.

How do you know it is not running the uci-defaults?
Is the password not set?

What are the outputs of:
uci show mesh11sd
and
uci show wireless

Hello, I’m also interested in setting up a mesh on two routers AX. What are the exact commands that need to be entered for the first router and for the second router? Thank you very much for your help.

# Wireless 2.4 GHz band configuration
uci del wireless.default_radio0
uci set wireless.wifinet1=wifi-iface
uci set wireless.wifinet1.device="radio0"
uci set wireless.wifinet1.mode="ap"
uci set wireless.wifinet1.ssid="$SSID_NAME1"
uci set wireless.wifinet1.encryption="psk2+ccmp"
uci set wireless.wifinet1.key="$PASSWORD1"
uci set wireless.wifinet1.network="lan"
uci set wireless.radio0.channel="11"
uci set wireless.radio0.country="$COUNTRY1"
uci set wireless.radio0.cell_density="0"

# Wireless 5 GHz band configuration
uci del wireless.default_radio1
uci set wireless.wifinet2=wifi-iface
uci set wireless.wifinet2.device="radio1"
uci set wireless.wifinet2.mode="ap"
uci set wireless.wifinet2.ssid="$SSID_NAME2"
uci set wireless.wifinet2.encryption="psk2+ccmp"
uci set wireless.wifinet2.key="$PASSWORD2"
uci set wireless.wifinet2.network="lan"
uci set wireless.radio1.htmode="HE80"
uci set wireless.radio1.channel="100"
uci set wireless.radio1.country="$COUNTRY2"
uci set wireless.radio1.cell_density="0"

# Enable wireless 2.4 GHz band
uci del wireless.radio0.disabled
uci del wireless.wifinet1.disabled

# Enable wireless 5 GHz band
uci del wireless.radio1.disabled
uci del wireless.wifinet2.disabled

my actual settings i has hidden the password

Nothing special needed at all if you are using the Rapid Deployment method.
Here:
https://openwrt.org/docs/guide-user/network/wifi/mesh/rapiddeployment

By default, on 2.4GHz you will get ~560Mb/s between 2 stream AX nodes (those with 2 antennas) or ~120Mb/s on 4 stream AX nodes (those with 4 antennas).

2.4GHz is the best choice in most circumstances as range/penetration is better for the mesh backhaul, using shorter range 5GHz for users to connect.

1 Like

Umm actually... it was.

mesh11sd.setup=mesh11sd
mesh11sd.setup.auto_config='1'
mesh11sd.setup.auto_mesh_id='mymeshid'
mesh11sd.setup.mesh_gate_encryption='2'
mesh11sd.setup.mesh_gate_key='mywifipassword'
mesh11sd.setup.ssid_suffix_enable='0'
mesh11sd.setup.mesh_leechmode_enable='1'
mesh11sd.mesh_params=mesh11sd
mesh11sd.mesh_params.mesh_fwding='0'
mesh11sd.mesh_params.mesh_rssi_threshold='-65'
mesh11sd.mesh_params.mesh_gate_announcements='0'
mesh11sd.mesh_params.mesh_hwmp_rootmode='0'
mesh11sd.mesh_params.mesh_hwmp_rann_interval='5000'
mesh11sd.mesh_params.mesh_hwmp_root_interval='5000'
mesh11sd.mesh_params.mesh_hwmp_active_path_timeout='5000'
mesh11sd.mesh_params.mesh_hwmp_active_path_to_root_timeout='6000'
mesh11sd.mesh_params.mesh_max_peer_links='16'
mesh11sd.mesh_params.mesh_plink_timeout='10'
mesh11sd.mesh_params.mesh_connected_to_as='0'
mesh11sd.mesh_params.mesh_connected_to_gate='1'
wireless.radio0=wifi-device
wireless.radio0.type='mac80211'
wireless.radio0.path='platform/soc/18000000.wifi'
wireless.radio0.band='2g'
wireless.radio0.channel='11'
wireless.radio0.htmode='HE40'
wireless.radio0.num_global_macaddr='7'
wireless.radio0.disabled='0'
wireless.radio0.country='DE'
wireless.radio0.log_level='0'
wireless.radio0.noscan='1'
wireless.default_radio0=wifi-iface
wireless.default_radio0.device='radio0'
wireless.default_radio0.network='lan'
wireless.default_radio0.mode='ap'
wireless.default_radio0.ssid='CF-WiFi-HOME-2.4G'
wireless.default_radio0.encryption='none'
wireless.default_radio0.ieee80211r='1'
wireless.default_radio0.mobility_domain='12ab'
wireless.default_radio0.macaddr='22:05:b6:00:8e:11'
wireless.default_radio0.disabled='0'
wireless.radio1=wifi-device
wireless.radio1.type='mac80211'
wireless.radio1.path='platform/soc/18000000.wifi+1'
wireless.radio1.band='5g'
wireless.radio1.channel='36'
wireless.radio1.htmode='HE80'
wireless.radio1.num_global_macaddr='7'
wireless.radio1.disabled='0'
wireless.radio1.country='DE'
wireless.radio1.log_level='0'
wireless.default_radio1=wifi-iface
wireless.default_radio1.device='radio1'
wireless.default_radio1.network='lan'
wireless.default_radio1.mode='ap'
wireless.default_radio1.ssid='CF-WiFi-HOME'
wireless.default_radio1.encryption='none'
wireless.default_radio1.ieee80211r='1'
wireless.default_radio1.mobility_domain='12ab'
wireless.default_radio1.macaddr='22:05:b6:01:8e:11'
wireless.default_radio1.disabled='0'
wireless.m11s0=wifi-iface
wireless.m11s0.device='radio0'
wireless.m11s0.mode='mesh'
wireless.m11s0.encryption='sae'
wireless.m11s0.mesh_id='5a8f469aa40de78772b95a1c26b6e8'
wireless.m11s0.key='010c1b405e53a1ce9e4e7365b6f770856be0c8ec1f442e25a4045b326d94d1f2'
wireless.m11s0.network='lan'
wireless.m11s0.ifname='m-11s-0'
wireless.m11s0.mesh_rssi_threshold='-65'
wireless.m11s0.disabled='0'
wireless.m11s0.macaddr='22:05:b6:ff:8e:11'
wireless.m11s1=wifi-iface
wireless.m11s1.device='radio1'
wireless.m11s1.mode='mesh'
wireless.m11s1.encryption='sae'
wireless.m11s1.mesh_id='5a8f469aa40de78772b95a1c26b6e8'
wireless.m11s1.key='010c1b405e53a1ce9e4e7365b6f770856be0c8ec1f442e25a4045b326d94d1f2'
wireless.m11s1.network='lan'
wireless.m11s1.ifname='m-11s-1'
wireless.m11s1.mesh_rssi_threshold='-65'
wireless.m11s1.disabled='1'
wireless.m11s1.macaddr='22:05:b6:ff:8e:11'

I does not have any encryption on the two WiFi networks though. The reason I thought it wasn't working was I ran mesh11sd status (which shows a different auto_mesh_id and mesh11sd stations (which shows an empty list). Sorry! So how should I go about fixing that and establishing a connection to the other two nodes?

If I recall correctly, mesh11sd v4.x.x honours any encryption settings that it finds in the wireless config when it starts up....

The mesh_id and mesh_key found in the wireless config are dynamically generated by a hash algorithm based on the mesh11sd config value(s) and will be the same on every node.

So is it all working for you now, or not?

1 Like

Unfortunately not. When running mesh11sd stations on this new device I see nothing and when running it on either of the two old ones they only find each other.

What version of mesh11sd are they running? You probably need to update them too.

Nevermind I figured it out! The issue was exactly that mesh_id you mentioned. When I gathered the information from the two old nodes to write the build script, I took the mesh_id from mesh11sd status. I should have used the mesh_id from uci show mesh11sd instead! Now everything works fine and I'm writing this from the new connection already.

One thing out of curiosity: is it possible to run the mesh (not the WiFi where the devices login to) between the nodes on 5 Ghz instead of 2.4 Ghz?

EDIT: Unfortunately I cannot edit the topic of this thread or my first post to reflect that the issue was myself rather than the OpenWrt Firmware Selector. Sorry about that!

Yes, but as I said above to @Drop

2.4GHz is the best choice in most circumstances as range/penetration is better for the mesh backhaul, using shorter range 5GHz for users to connect.

In summary, for stability you need a greater range for the mesh backhaul than you do for the access point functionality.

1 Like

No problem, it is all a good learning experience.
Your next experience will be upgrading to mesh11sd v5 which is coming soon :scream: :rofl:

2 Likes

I will for sure, it's amazing software. Arguably the best kind: set it up once and never think about it again. :wink:

1 Like