1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Issues with Tomato settings backup and restore on a WNR3500L

Discussion in 'Tomato Firmware' started by toolbox, Oct 7, 2011.

  1. toolbox

    toolbox Addicted to LI Member

    I use the backup script from http://tomatousb.org/tut:backup-settings-logs-more-to-usb-drive-script on my WNR3500L with toastman firmware and ran across something I don't understand when I used the file under NVRam/Set to restore my rounter parameters after firmware. Before I update the firmware, I run the backup script to get the current settings. When I update the firmware, I always check mark "After flashing, erase all data in NVRAM memory" to erase router's settings. After the router is updated and restarted, I telent into the router and do
    . configfile (file under NVRam/Set)
    nvram commit

    After the unit is rebooted, most parameters are restored except the WiFi settings. For the WiFi settings, my SSID is changed to "wireless", WiFi mode is changed from "G only" to "Auto", WiFi security mode is change from "WPA/WPA2 Personal" to "disabled"
    In the config file, I have
    nvram set wl0_ssid=my original SSID
    nvram set wl0_security_mode="wpaX_personal"
    nvram set wl0_wpa_psk=my shared key
    If I change the security mode manually from "disabled" to "WPA/WPA2 personal, my original shared key will be restored.
    If I restore the router's configuration by using the file under Configurations, everything will be restored.
    My questions:
    Should I use the file under NVRam/Set to transfer my parameters between different firmware builds?
    Is my method of restoration the right way to go?
    Did anyone seeing something similar when you use this method to restore a router's parameters?
    Another item I noticed is wl_txpwr is set to 42 no matter what I set at the GUI page.
  2. phuque99

    phuque99 LI Guru Member

    There are some quirks on wireless settings when it comes to restoring them using nvram commands. For example, when I restore my settings after an nvram reset, I have the following nvram commands to set the radios to US country code:

    nvram set wl0_country=US
    nvram set wl0_country_code=US

    After nvram commit and reboot, the router will restart with Afghanistan. I had to manually re-configure the country via the GUI. Then I discovered that in order for the country to stick via nvram reconfiguration is the make sure the wl_country is correctly configured in the following sequence:

    nvram set wl_country=EU
    nvram set wl_country_code=EU
    nvram set wl0_country=US
    nvram set wl0_country_code=US

    US country code setting will now stick after commit and reboot. So I believe that you could be facing the same problem and you might want to check what are the corresponding "wl_" key values that you must set in order for "wl0_" ones to stick. I didn't look into the source code hard enough to figure out this "problem".
  3. Toastman

    Toastman Super Moderator Staff Member Member

    I would recommend using "nvram export --set" to transfer only settings that are time consuming to reconfigure manually. Transferring the whole setup ( or almost whole), especially wireless data, doesn't do a good job. As phuqe99 has said, some variables are read and rewritten by the firmware into other variables, which are also then rewritten to nvram. How many of these wl settings are actually necessary, I don't know. But try to avoid it. Make a script to post into the "Tools/System" boxand keep it safe somewhere to copy the worst bits automatically. Let your "basic" config stand from the new router, and only alter it from the web GUI to be safe.

Share This Page