OpenWrt Forum Archive

Topic: Uploading firmware in failsafe mode TL-WR841ND

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I successfully install OpenWrt earlier on my TL-WR841ND 7.2 by installing the factory to OpenWrt firmware from the trunk first and then the SysUpgrade firmware, also in the trunk.

My issue began when I tried to install the Gargoyle WebUI by installing the gargoyle_1.5.6-ar71xx-tl-wr841nd-v5-squashfs-factory.bin firmware from the Gargoyle site. To do that I followed the directions I found here: http://www.gargoyle-router.com/phpbb/vi … =10#p10193 and after giving the "mtd -r write /tmp/fw.bin firmware" command I lost access to the router. It wrote the firmware reset and then I couldnt connect to it anymore.

I was however able to get into the failsafe by following the instruction in the wiki (pressing the QSS button after turning it on). I tried the instructions under the failsafe wiki aswell. I tried mount_root,firstboot and mtd -r erase rootfs_data. After issuing those commands and rebooting I still was not able to ssh or telnet to the router under normal conditions. I can only telnet under failsafe.

Under failsafe I also cant seem to connect the router to the internet. I tried using both wget and opkg to download a firmware but the router could not get a connection.

Is there a way for me to load a firmware on the router through the failsafe mode to revert to openwrt or even the stock firmware? I cant scp to the router and only my Windows 7 laptop seems to be able to connect to it under failsafe. Both my debian PC's cant connect.

Ok so I tried that and Ive gotten a few errors. Here is what I did:

First I put the router in failsafe mode again so I could access it. Then from windows I issued this command: nc -q0 192.168.1.1 1234 < C:\firmware.bin
The firmware I wanted to put on the router being C:\firmware.bin

Then back on the router I connected via telnet and issued: nc -l -p 1234

In windows I got this error: nc.exe: invalid option -- q
Looking under the help it seems thats not even an option.

Under the router I get this error: Usage: nc [IPADDR PORT] Open a pipe to IP:port

Anything else I can try? Thanks for your help by the way.

just transfer the file then flash it:

Transferring image file to a temporary location
On your Linux PC run:
cat [specified firmware].bin | pv -b | nc -l 3333
On the router run:
nc 192.168.1.111 3333 > /tmp/[specified firmware].bin

search google for a better nc windows binary or use a linux machine

So no matter what Ive tried I cant seem to get netcat to work under windows. I also cant get any linux distros to connect to the router under normal mode and failsafe mode so im stuck using Windows.

Is there any way I could get the network connection working on the router in failsafe mode to download the firmware? Or is that not possible with failsafe mode?

Ok I finally got my linux PC to connect to the router in failsafe mode. However the netcat method seems to not work there either:
Here is my PC:
http://i.imgur.com/7We62h.png
And here is the router:
http://i.imgur.com/TgnCA.png

maybe some firewall issue on your PC.make sure port 3333 is opened

I dont have a firewall installed Ive always relied on the router for a firewall:
http://i.imgur.com/XMngn.png

Could the routers firewall be blocking the connection maybe?

in failsafe mode there is no firewall active on the router.
other solutions to try in failsafe mode are wget and tftp from the linux box in the same lan as the router

Thanks for all your help maurer the wget trick finally did it for me. After setting a static ip on my debian desktop I was able to download the file to the router from my apache server.

The discussion might have continued from here.