Hi, is there any way to set default values of wireless settings as are written on the bottom label on the device when reset with button is performed while on OpenWrt firmware? I was not able to find any default values of mac addresses and wifi password in mtd partitions...
there's probably only one - https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c9cb6411c1a70516d5922e88c45b338de041baba
kind of pointless, since wifi is off by default when you install openwrt.
You can define a script to run on first boot (uci-defaults) to enable wifi radios and define SSIDs and passwords consistent with any on the device label. You can also modify the default IP address of the device to match the one on the label in this way.
I've done this occasionally for devices provided long term to noobs so they are left with something if they mess with the reset button.
Yes, this is the thing I wanna do. But I can't find the place where are those defaults stored in device's memory. I have tried process described here but without any success...
depends on how the password's generated, if it's just the MAC, or a formula based on the MAC, etc.
it could be tricky to figure out the logic used to compute it.
You can use the firmware selector to define the script in the "Customize installed packages and/or first boot script" drop down when the image is built.
Here is an example script, but you'll need to adjust IP address, country code, passwords, radio 0 and radio 1, etc. to match your preferences and device. You could also use auto for the channel, which may make more sense for different countries, etc.
Most of the device configuration can be modified this way, for example defining a gateway or disabling dhcp for a device set up as a dumb AP. It is pretty flexible.
Script Example
uci set network.lan.ipaddr='10.10.10.10'
uci commit network
uci set wireless.@wifi-device[0].disabled="0"
uci set wireless.@wifi-iface[0].disabled="0"
uci set wireless.@wifi-iface[0].ssid="SSID-2G"
uci set wireless.@wifi-iface[0].key="Password"
uci set wireless.@wifi-iface[0].encryption="psk2+ccmp"
uci set wireless.@wifi-device[0].country="US"
uci set wireless.@wifi-device[0].channel="6"
uci set wireless.@wifi-device[1].disabled="0"
uci set wireless.@wifi-iface[1].disabled="0"
uci set wireless.@wifi-iface[1].ssid="SSID-5G"
uci set wireless.@wifi-iface[1].key="Password"
uci set wireless.@wifi-iface[1].encryption="psk2+ccmp"
uci set wireless.@wifi-device[1].country="US"
uci set wireless.@wifi-device[1].channel="149"
uci commit wireless
Okay, I assumed that it's just stored somewhere. While it's probably computed from mac address, I understand that I will have hard time to find out how it's done...
Alternatively, make your own label with the OpenWrt defaults and paste it over the manufacturer's...
Still need to do something about the radios off by default with OpenWrt for noobs with no other way to access the device. I prefer the manufacturer label since it is already there, but to each their own. Making a custom label works too.
You can also turn them on by uci-defaults script. I will set essids as in factory firmware and password will be the same as MAC address so I will just add label saying WIFI password = MAC address...
Hey, I've recently bought a WR3000_EU V1.0 (that's what is says on the box ), I succesfully flashed OpenWRT from Cudy's website, it looks like that was working fine.
Then I wanted to upgrade to latest OpenWRT (the openwrt from Cudy's website was some old snapshot version) - so I've flashed the sysupgrade image - but that actually bricked the router - just the Power LED was ON and the router didn't provide any IP. (tried versions 23.05.4 and 23.05.5 with same result). Setting IP manually didn't help.
I've noticed that I had to check the box that I really wanted to force update, which I've never seen on OpenWRT (of course I've chose not to keep settings).
Luckily there wasn't any problem to use TFTPD to go back to the Cudy's openWRT version.
I've also tried to flash both sysupgrade and factory image via TFTP from OpenWRT WR3000 page and it didn't work - same problem.
Hi,
Try ro load sysupgrade from gui, when you are in the cudy's openwrt.
Make sure you take OpenWrt sysupgrade image fromhttps://firmware-selector.openwrt.org/ or any legit openwrt sources.
Good luck
Kr
K
I have done that of course (as I've written in the comment), but it bricks the router... Only the OpenWRT provided on Cudy's website works...
If you receive "force flash" error - than there is a mismatch between your router version and the sysupgrade router version. Double check what you are trying to flash to what router.
Edit: nevermind, I actually did mix up the versions..I was trying to flash the Cudy version on top of the Cudy version...OMG I am getting old the 23.05.5 sysupgrade actually works fine now...