I was following along here:
http://www.myopenrouter.com/article/10496/How-To-Switch-Firmwares-on-the...
The very last comment as of 21:03 Oct.12 2009 is my problem, it's pasted below:
"""
tftp> status
Connected to 192.168.1.1.
Mode: octet Verbose: on Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> put
(file) openwrt_wgr614l.chk
putting openwrt_wgr614l.chk to 192.168.1.1:openwrt_wgr614l.chk [octet]
tftp: sendto: Network is unreachable
What's
the problem? Also do I need a bin, trx, or chk? If anything other than
chk (maybe I'm wrong for even attempting to use this), where can I find
the download?
"""
The program used was the equivalent of tftp available in the repo for the distro I was using at the time. I thought I'd have another go at it tonight, and the new distro provides tftp, however, I am still presented with the network is unreachable error. Maybe I need to change the routing tables? I'll check them and report back the results in a little while.
Your PC is probably not in the same network range as the router. Check if your IP address is in the 192.168.1.x range.
Whoops, I forgot to come back and respond, route -n shows nothing. And I'm not really sure how to get any of it showing...
If you are on Windows: Go to the conrol panel -> network connections -> local area connection. The support tab shows your IP address, properties button -> TCP/IP properties, allows you to change the IP address.
I'm on linux, have been for awhile and don't plan on changing :) I tried dhclient eth0 but I of course knew it wouldn't work since the cable modem is connected to the router which can't even boot up. I'm thinking that I need to manually insert addresses for the gateway and destination, but I'm not sure if that will affect the problem at all. And would someone mind explaining, as well, how it is that you can tftp into the router after deleting whatever it is that I deleted preventing it from booting...
You need to establish a static IP address (such as 192.168.1.2 mask 255.255.255.0) on the Linux PC you're using to fix the router. dhclient on the PC won't work, because you've already erased the DHCP server on the router.
You can run ping 192.168.1.1 on the PC to verify connectivity with the router, prior to attempting the tftp.
The explanation on why you can tftp into the router is because that function is part of the router's CFE boot loader (analogous to the PC's BIOS), and it's located in a flash partition separate from the router's linux partition. When the boot loader can't find Linux to start, it enters failsafe, and runs tftpd instead.
It's clearly not advisable to erase the router's boot loader, but that's a separate topic.
Linux makes it indeed a lot easier. Just run as root or sudo: ifconfig eth0 192.168.1.2 up.
Check if you can ping 192.168.1.1
Then use your tftp client (I use atftp) and: tftp -pl binary.chk 192.168.1.1
tftp mode needs the boot wait option. Are you sure it has been checked?
Sorry to have responded late, here's my attempt to place the chk file on the modem after reading the comments (and you thank you so much for the prompt help).
---
$ sudo -i
[sudo] password heath:
~# ifconfig eth0 192.168.1.2 up
~# ifconfig lo up
~# ping 192.168.1.1 -c 3
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=100 time=1.88 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=100 time=1.88 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=100 time=1.88 ms
--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2006ms
rtt min/avg/max/mdev = 1.882/1.883/1.886/0.050 ms
~# logout
$ ping -c 2 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=100 time=1.88 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=100 time=1.88 ms
--- 192.168.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1004ms
rtt min/avg/max/mdev = 1.881/1.881/1.882/0.043 ms
~$ tftp
tftp> binary
tftp> connect 192.168.1.1
tftp> put openwrt_wgr614l.chk
Transfer timed out.
tftp> verbose
Verbose mode on.
tftp> mode binary
mode set to octet
tftp> put openwrt_wgr614l.chk
putting openwrt_wgr614l.chk to 192.168.1.1:openwrt_wgr614l.chk [octet]
Transfer timed out.
tftp> trace
Packet tracing on.
tftp> status
Connected to 192.168.1.1.
Mode: octet Verbose: on Tracing: on
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> timeout 30
tftp> put openwrt_wgr614l.chk
putting openwrt_wgr614l.chk to 192.168.1.1:openwrt_wgr614l.chk [octet]
sent WRQ
sent WRQ
sent WRQ
sent WRQ
sent WRQ
sent WRQ
Transfer timed out.
---
As you can see, it didn't quite work as planned. Schugy, I'm not aware of a boot option, the help and man page doesn't mention anything of it. retro98, thank you for answering both my questions.
Your WGR614L is pingable, tftp is working.
I've read that you can upload the file within the first seconds after plugging the power supply in. But for me it works if I just mark the put command with the mouse and use a middle click (+ enter if no linebreak marked too).
Then you can enter the put command a few times in a few seconds. AFAIK without a firmware it loads the bootloader, stalls and reboots again. Keep putting the file or try to adjust the mtu with ifconfig ethX mtu 1200 or delete your IPV6 IP with ifconfig ethX del ...... Or try a route del default.
I've never had probblems with putting a chk file onto the WGR614L.
I have had some problems with TFTP to. For me it also would not work to get the firmware uploaded in the 3 seconds it should listen for the binary. So, I purchased a serial cable which really makes life easier. Just solder a header on the board so you can disconnect and close the router when your done. Then you don't have to worry you will block yourself out when you are fiddling with your firewall rules ;)
I suggest attempting tftp-s to the router continuously, while powering it (the router) up. If tftp transfer still doesn't engage, try power up with hard reset. And if that doesn't work, then a serial cable would be necessary to see what's happening at the router, and why the router isn't waiting for tftp transfer as we're expecting it should.
~$ tftp
tftp> binary
tftp> verbose
Verbose mode on.
tftp> connect 192.168.1.1
# and repeat the following over 10 times:
tftp> put openwrt_wgr614l.chk
putting openwrt_wgr614l.chk to 192.168.1.1:openwrt_wgr614l.chk [octet]
Transfer timed out.
I also unplugged the router and plugged it back in then tried putting immediately, but it didn't work, same error. I'm assuming that's what was meant by hard reset since I'm not seeing a reset button anywhere. It was difficult trying to put within 3 seconds of the router being plugged in. I tried the following originally:
tftp -m binary 192.168.1.1 -c put openwrt_wgr614l.chk
but it just got me to the tftp prompt. So where to go from here? Maybe I did something wrong? And again, I really can't thank you all enough for your generous help.
Hard reset means:
hold down the reset button
power the router up
keep the reset button held down for 30 seconds.
There's a well hidden reset button in a metal hole next to the antenna. There's also a short description on the label on the bottom of the router.
Looks like I will have to purchase a serial cable, though I don't see a port for it. Is there a walkthrough on restoring the router using a serial cable?
I found this but it's for Windows, anything for linux?
http://www.myopenrouter.com/article/10341/Recover-Your-WGR614L-Using-a-S...
Is there a recommended place for purchasing a serial cable, mouser.com was linked to in the article linked above, but they are out of stock.
EDIT
The part was just obsolete, they recommended this one to me:
http://www.mouser.com/Search/ProductDetail.aspx?R=895-TTL-232R-3V3-2MM&b...
I ordered mine at farnell.com, but that might not be so easy for you. I ordered the FTDI TTL-232R-3V3. If you solder a pinheader on the print you can easily connect the cable to the board and disconnect when you're done.
The FTDI chip embedded in the cable is recognised by Linux. Just install and open Putty and point it to serial /dev/ttyUSB0. Also set the baudrate to 115200. When it doesn't work check the permissions on /dev/ttyUSB0. If I remember correctly I also had to load a kernel module.
Alright, so I got the serial cable in, ripped out the wires from the plastic head, stripped them, soldered them as described in http://www.myopenrouter.com/article/10341/Recover-Your-WGR614L-Using-a-S... and then downloaded ftdi-eeprom, libftdi-dev, libftdi1, libftdipp-dev, libftdipp1, python-ftdi, and python2.6-ftdi from the Ubuntu repositories, so I'm guessing one of those is the driver needed to recognize the serial connection. But what to do now, the guide is for Windows.
After plugging the the yellow ethernet cable to the cable modem and network router, I then plugged another ethernet cable to the computer and my network router. From the command line, ifconfig showed that eth0 (my wired connection) didn't have an ipv4 IP address. I tried from within tftp to connect using the ipv6 address, I figured it would fail and it did. If someone could help me at this point, you deserve some major whuffie. And thanks to everyone for getting me this far.
I was inspired by this thread: http://www.myopenrouter.com/forum/thread/15549/Another-bricked-router-th...
He was going through the same thing I am with the same distro, so I looked and indeed there is a Putty client for Ubuntu, this is as far as I'm able to get: http://imgbin.org/images/1076.png ..that is starting tftpd but not able to send to the router... If you look at the image, the putty console has text which reads "gateway not set, nameserver not set". I didn't manually set the IP address, maybe that's the issue? If so, how would I go about doing this?
You don't need a gateway or nameserver for tftp, but your PC has te be in the same subnet as your router to be able to connect. In this case your PC has to have an IP in the 192.168.1.x range. "sudo ifconfig eth0 192.168.1.10 255.255.255.0 up" should do the trick.
Hrm, same error after trying that. See screenshot for reference:
http://imgbin.org/images/1081.png
The webpage with your screenshot won't load, but here is a short checklist:
- Make sure your computer is directly connected to your router, bot not on the WAN port.
- Make sure both your router and your computer are in the same subnet, likely 192.168.1.x
- Make sure you have the tftp daemon running on your router, type "tftpd" in the routers CFE bootloader console
- Check if the LAN port lights are on
- Check if you can ping your router from your computer
- tftp your .chk image to your router
Hope this helps
I'm not able to ping the router, and I'm not exactly sure how to make sure both the router and computer are in the same subnet. As you can see, I've attempted to assign an ip address and subnet mask, but failed this time around. I'm definitely going to need some answers or sources to read in order to get around my lack of knowledge in this area.
I just did
but I don't think that sets the router's IP.
Here's the output in putty:
This is my attempt to ping the router:
You should not change your routers IP, just your computers temporarily. If your set your computers IP to 192.168.1.10 and connect it directly to your router, you should be able to ping 192.168.1.1 from your computer. If you succeed you should send your image from your computer to 192.168.1.1.
I'm unable to ping 192.168.1.1 through 192.168.1.9 while my computer's ip is set to 192.168.1.10, so it's impossible to send anything via tftp. If the router can start tftpd, what other programs does it have at its disposal?
I'm not sure you are doing it right. Is your computer directly connected to your router? And what is your output for ifconfig and ping 192.168.1.1?
And hopefully not the WAN port.....
The earlier output of ifconfig on the Linux PC shows its eth0 has no IP address. To set one:
# ifconfig eth0 192.168.1.10 up
Then check that it is set:
# ifconfig eth0
Without properly configured NICs, "sendto: Network is unreachable" is a common error. Also the connect message from tftp is misleading. No real network xmits occur until the put command starts, and that's when the networking errors occur.