Help with custom default settings on WR940N v6

Hi, i have installed openwrt on my routers and would like to install it on many others for home user clients.
My clients router use a bridge configuration with DHCP disabled, and often they press the reset button and have to come over to reconfigure, i would like to put a default configuration so after the reset they still have internet and easy access and can put the wifi password again, this would save me a lot of support.

I read it can be done with a backup configuration and the firmware im using but i have no clue how to do it.

Disable the reset button, if it’s even functional, and burn your default configuration into a custom ROM. Can be done with the build chain and probably with the image builder as well.

You’ll need to figure a strategy for client-specific settings at your scale.

That might backfire if the user changes the settings and can't get back to a working config

I was thinking that users were pressing reset while the device is running ("Hold down the reset button for at least 10 seconds." instructions on some commercial devices' OEM firmware) -- and I don't recall if OpenWrt did anything, by default.

My mistake on not being clear that it would still be available in the two-second preinit window to enter failsafe.

1 Like

Disables the reset could be a good way if the router had a way to enter on firmware recovery mode and be able to put a new firmware by tftp in case something goes wrong, cant find a way to get them on recovery mode

I think you need to put a customized /etc/config/network so it becomes a "factory default". I'm planning to do it but still didn't have time to explore it fully.

You could do it quite easily including your customized /etc/config/network under "files" directory before building your image. If you are on a, say, subnet, you could try to assign, say as default "factory ip", then, when redneck resets and resets and resets again, and router gets "factory defaults" you should be able to get it from WAN side. EDIT: of course, must be always free. If you do this way, you can build just an image for
each subnet.

If you do, consider also customizing at least /etc/shadow and even /etc/dropbear/autorized_keys so router gets at least a pasword for root or, better, a ssh key. You can do it including them under "files" directory before building. You must replicate directory structure under "files" so there would be:


An so on, you can build a completely customized "factory image"

Or, you can do the same with imagebuilder, this has the advantage you can make a fully customized image for each customer without rebuilding each time. You can build one time, then make a "factory image" for each customer simply changing the
customized /etc/config/network to have the final IP assigned as "factory defaults", then using imagebuilder to create the squashfs file. But, as said before, I still haven't tried this way.

Hope this helps

@tatel you gave me the idea of accessing via WAN port and was able to do it, didnt knew the firmware had "Failsafe Mode", found it and now i can reset the configurations if i cant get back in.

Planning on disable the reset button, anyone know if can be done with the web software or if need to do the image again? Thanks

Was able to disable the reset button with SSH, is there an easy way or could it be added in the configuration file, so when i upload the configurations it disables the button, could save a lot of time because will need to redo this with many routers, any suggestions?