Firmware upgrade over wireless

Discussion in 'Tomato Firmware' started by Mike, May 2, 2008.

  1. Mike

    Mike Network Guru Member

    I have a few wireless WDS links where one end is not easily accessable. I'd like to be able to upgrade the remote end, and be able to reset the configuration (occasionally necessary, especially when upgrading from really old firmware to tomato).

    Someone has mentioned a post with scripts, etc, but I can't find the post.

    So I tried experimenting with the following idea. After a complete reset, Tomato comes up in access-point mode, channel 6, wireless enabled. So I thought, I'll put the local Tomato in Wireless-Client mode on channel 6, etc. The boxes connect (good connection in Device List), but I can't access the web interface for the remote box. So, I then try Wireless Ethernet Bridge mode on the local Tomato with the same result - good connection but I can not access or ping the remote box.

    Any ideas why this doesn't work?

    Finally, is there a firmware load of Tomato that come up in a WDS mode? I don't care about the channel, or anything else - just as long as I know the parameters and can get connected to the remote box and set it up the way I want.
  2. fyellin

    fyellin LI Guru Member

    After a complete reset, the new box will be Is that, by any chance also the IP address of the local router? In Wireless client mode, you won't be able to see the remove router unless it's on a different subnet. In Wireless Ethernet Bridge mode, they'll need different addresses, but be on the same subnet.

    Why are you even bothering, though. The hard-to-get-to machine will boot up with a default wireless network name that will be different that your current network. You ought to be able to find that wireless network and link directly to it.
  3. Phoenixxx*

    Phoenixxx* Addicted to LI Member

    Is it possible to flash a new version of tomato with WDS (without reset)? I tried this but after the new firmware is uploaded the router disables wlan and my browser can't send the command for updating. Is there a solution?
  4. MiseryQ

    MiseryQ Network Guru Member

    I've been doing this for awhile now. I haven't had any problems.
    I flash from a computer that is wired to the 1st router. I haven't needed a reset but if you do you'll have some hoops to jump through as already mentioned.
  5. roadkill

    roadkill Super Moderator Staff Member Member

    best way that I have come up with is to update via ssh using a script
    it can simplify things and make it go faster when you got a lot of units...
    mtd-write -i <Firmware File> -d <Destination Part>
  6. TexasFlood

    TexasFlood Network Guru Member

    So do something like the below?

    Telnet/SSH to the router
    wget -P /tmp [url][/url]
    cd /tmp
    mtd-write -i tomato.bin -d linux
    Seems safer than upgrading through the GUI over wireless (which I know one shouldn't do although I have done it :-D ).


    *Added note: I just tested this process and it worked fine for me. I did it slightly differently, using a cifs mount I had set up already. Here is the log FYI:

    # cd /cifs2
    # ls
    # cp WR850G.bin /tmp
    # cd /tmp
    # mtd-write -i WR850G.bin -d linux
    Image successfully flashed
    # reboot
    Connection to host lost.
    After the router rebooted, it had the different version of Tomato on it but maintained the previous settings. This definitely seems like a better idea than going through the GUI. Although in reality using the GUI has usually worked for me, all it would take is someone to turn on the microwave oven while I'm doing it and I'd probably be back to using tftp to recover the router so I'll probably use this method from now on just to be safe.
  7. roadkill

    roadkill Super Moderator Staff Member Member

    I'm using scp and ssh but the concept is the same...
    copy the trx file to /tmp
    mtd-write -i filename.trx -d destination part
  8. TexasFlood

    TexasFlood Network Guru Member

    SCP and SSH are the smart way to go, I"m just lazy since it's on my LAN.
  9. i1135t

    i1135t Network Guru Member

    Hi RoadKill, I have a few questions. Is the "destination part" the name you give to the router, or should it always be set to "linux"? Also, will this work for only upgrades, meaning, can this be done for flashing a different firmware onto it? Is this the same as TFTP?

    Thanks for the info...
  10. roadkill

    roadkill Super Moderator Staff Member Member

  11. Toxic

    Toxic Administrator Staff Member

    just for the newbies in the forums, please do not upgrade the firmware via the webgui over a wireless link. it is not recommended.

    just my 2 cents worth....
  12. TexasFlood

    TexasFlood Network Guru Member

    For flashing the firmware, I think it always should be linux. Looks like the actual devices are under /dev/mtd and /dev/mtdblock, the alias names like "linux" should be in the /proc/mtd file. Here is what I got when I just looked on my router:
    / # cd /dev/mtd
    /dev/mtd # ls -l
    crw-rw-rw-    1 root     root      90,   0 Dec 31  1969 0
    crw-rw-rw-    1 root     root      90,   1 Dec 31  1969 0ro
    crw-rw-rw-    1 root     root      90,   2 Dec 31  1969 1
    crw-rw-rw-    1 root     root      90,   3 Dec 31  1969 1ro
    crw-rw-rw-    1 root     root      90,   4 Dec 31  1969 2
    crw-rw-rw-    1 root     root      90,   5 Dec 31  1969 2ro
    crw-rw-rw-    1 root     root      90,   6 Dec 31  1969 3
    crw-rw-rw-    1 root     root      90,   7 Dec 31  1969 3ro
    crw-rw-rw-    1 root     root      90,   8 Dec 31  1969 4
    crw-rw-rw-    1 root     root      90,   9 Dec 31  1969 4ro
    /dev/mtd # cd /dev/mtdblock
    /dev/mtdblock # ls -l
    brw-rw-rw-    1 root     root      31,   0 Dec 31  1969 0
    brw-rw-rw-    1 root     root      31,   1 Dec 31  1969 1
    brw-rw-rw-    1 root     root      31,   2 Dec 31  1969 2
    brw-rw-rw-    1 root     root      31,   3 Dec 31  1969 3
    brw-rw-rw-    1 root     root      31,   4 Dec 31  1969 4
    /dev/mtdblock # cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00040000 00020000 "pmon"
    mtd1: 003a0000 00020000 "linux"
    mtd2: 0025d490 00020000 "rootfs"
    mtd3: 000a0000 00020000 "jffs2"
    mtd4: 00020000 00020000 "nvram"
    /dev/mtdblock #
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice