Tftpd64 doesn't transmit stucking at 0 bytes sent

Hi all,

I have a bricked w8980 which I've described exactly how I've bricked it on this thread

I am trying to resurrect it but having problem tftping OpenWrt or original firmware. The TFTP will start
downloading just forever stuck at 0 bytes sent, and then immediately get an error on PuTTY, and it says:

8192 KiB W25Q64 at 0:3 is now current device
MAC: e8-de-27-86-be-40
Using vr9 Switch device
TFTP from server; our IP address is
Filename 'openwrt.bin'.
Load address: 0x80800000
Loading: T T T T
TFTP error: 'Undefined error code' (0)
Starting again

I believe that my serial connection is good and I can access U-Boot. Here's PuTTY log if you want to check it yourself...

I'm on Windows 7 x64 and I've followed this guide

Any suggestions will be greatly appreciated!

I was going to suggest there was an ethernet or tcpip connection issue when you witness T T T T..... and to press CTRL-C and resend the tftp command, check your firewall, or use a different computer if it was an ethernet problem.

But I then realised you said

which suggests it is not a IP connection issue.

That can still be a firewall issue, since the packets of data are sent through different ports than the starting request. Disable Windows Firewall and any third-party firewalls on the PC while running the TFTP server. That is safe to do because the PC will not be connected to the Internet at the time. Which is another point, be sure to disconnect any wifi or other networks connected to the PC while doing TFTP.

1 Like

Thanks, guys for replying. I've already disabled firewall and AV, made sure that UPnP and SSDP Discovery services are enabled, I also have tinkered with windows file-sharing settings but with no help, maybe these last two things are irrelevant to TFTP process but I've done them anyway.

check listening socket on host ( netstat ) and/or try another port on the router... and/or try with switch~noswitch in between...

Excuse me, I'm not into networking stuff. so may you please provide some more explanation?

I've initialized the TFTP server within PuTTY, after that I used netstat but the connection IP doesn't show up in there, is that normal?

If you mean to try another physical lan port, I've tried that, don't know how to do that if you wanted me to try another UDP port.

Didn't get that at all. sorry!

there is a device used in networking that is called a switch. it is used to interconnect separate host devices. it has several female rj45 ports in a row, into which, you can plug cat5/cat6 networking cables ( the commonly blue looking ones )...

if you are not using a network device called a switch. i am making the suggestion that you try plugging one in between the pc ( computer ) and the router.

or vice versa... ( which means the other way around i.e. use a single cable without a device called a network switch )

1 Like

That's hilarious :smiley: the way you've typed "try with switch~noswitch" just gave me an impression that you are talking about some mystery parameter or command line that I got to enter it into a matrix terminal, my bad.

I don't use a switch, I'm connecting my router directly, I don't think putting another stage in between would return better results but I'm gonna give it a shot.

For now, I've just made a bootable Ubuntu USB drive, will try to flash the router under Linux.

Please try, as it very well could. I was going to suggest it and the firewall thing. The point of suggesting a network switch for flashing is to eliminate the possibility that:

  • the Ethernet port on the computer is dropped and attempts to reconnect - because
  • the switch goes down/reset

The time it takes for the Ethernet to come back up could be during the moment TFTP is active. Using a switch ensures the Ethernet link always remains up during this time.

I actually have a device where the countdown can be set (in fact, these boot configs have to be set to flash and access it again without needing a serial connection). I had problem TFTPing it for an upgrade (this device cannot be sysupgraded from the running system). It turned out on the machine I used that day, that my original bootloader timeout was too short to interrupt it, because the PC's Ethernet link had not yet came back up. :wink:

1 Like

Thanks for your time and the detailed reply. I now understand the switch thing.

Fortunately, I've managed to flash the router and bring it back to life under Ubuntu Live, this was my first time involved with Linux, it was fun installing things through terminal, it gave me the hacker vibe :rofl:

At first I was struggling to do anything due the lack of permissions so I've granted root access through terminal with command line

sudo -i

After that I went to install tftp server & screen

apt-get install atftpd
apt-get install screen

Then moved the firmware to tftpd directory "/srv/tftp" and started the server

atftpd --daemon /srv/tftp

At this point, I've adjusted network configuration like this


I connected the usb-ttl to my computer then launched screen with U-Boot interruptted by spamming "t" button

screen -L -Logfile logfile.txt /dev/ttyUSB0 115200

I adjusted router & server IPs

setenv ipaddr
setenv serverip

I've entered this line, looks like it declares board ID

setenv bootargs 'board=WD8980'

From there I was able to flash it easily just like what is explained in openwrt site

// Retrieve the OpenWrt image
tftpboot $(loadaddr) openwrt.bin

// Erase old image and write the new one to disk and reboot:
sf erase 0x20000 0x7a0000
sf write $(loadaddr) 0x20000 0x$(filesize)

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.