tftp retry timeout exceeded

Waqas picture Waqas · Oct 5, 2012 · Viewed 10.3k times · Source

My issue is retry count exceeds when I download kernel image to Econa processor board (Econa is ARM based processor) via TFTP as shown below

CNS3000 # tftp 0x4000000 bootpImage.cns3420.uclibc 
MAC PORT 0 : Initialize bcm53115M 
MAC PORT 2 : Initialize RTL8211 
TFTP from server 192.168.0.219; our IP address is 192.168.0.112 
Filename 'bootpImage.cns3420.uclibc'. 
Load address: 0x4000000 
Loading: T T T T T T T T T T 
Retry count exceeded; starting again 

Following are the points which may help you in finding the cause of this error.

  1. Ping response is OK

    CNS3000 # ping 192.168.0.219 
    MAC PORT 0 : Initialize bcm53115M 
    MAC PORT 2 : Initialize RTL8211 
    host 192.168.0.219 is alive 
    
  2. When I tried to verify TFTP is running, I tried as shown below. It seems TFTP server is working. I placed a small file in /tftpboot:

    # echo "Hello, embedded world" > /tftpboot/hello.txt"
    

    Then I did localhost

    # tftp localhost
    tftp> get hello.txt
    Received 23 bytes in 0.1 seconds
    tftp> quit
    
  3. Please note that there is no firewall or SELinux on my machine.

  4. Please verify location of these files are OK. I have placed kernel image file bootpImage.cns3420.uclibc in /tftpbootTFTP service file is located in /etc/xinetd.d/tftp.

  5. My TFTP service file is:

    service tftp
    {
    socket_type =dgram
    protocol=udp
    wait=yes
    user=root
    server=/usr/sbin/in.tftpd
    server_args=-s /tftpboot -b 512
    disable=no
    per_source=11
    cps=100 2
    flags=ipv4
    }
    
  6. printenv response in U-boot is:

    CNS3000 # printenv 
    bootargs=root=/dev/mtdblock0 mem=256M console=ttyS0 
    baudrate=38400 
    ethaddr=00:53:43:4F:54:54 
    netmask=255.255.0.0 
    tftp_bsize=512 
    udp_frag_size=512 
    mmc_init=mmcinit 
    loading=fatload mmc 0 0x4000000 bootpimage-82511 
    running=go 0x4000000 
    bootcmd=run mmc_init;run loading;run running 
    serverip=192.168.0.219 
    ipaddr=192.168.0.112 
    bootdelay=5 
    port=1 
    bootfile=/tftpboot/bootpImage.cns3420.uclibcl 
    stdin=serial 
    stdout=serial 
    stderr=serial 
    verify=n 
    

    Environment size: 437/4092 bytes

Regards Waqas

Answer

Oliver Sievers picture Oliver Sievers · Dec 26, 2013

Loading: T T T T T T T T T T

Means there is no transfer at all; this can be caused by wrong interface setting i.e. u-boot is configured for 100Mbit full duplex, and you try to connect via half duplex or 10Mbit (or some mix of it). Another point is the MTU size, should be 1500 (u-boot cannot handle packet fragmentation)

Hint for windows/vmware users:

tftp timeouts from u-boot are caused by windows ip-forwarding.

1) If you have a home network : switch it of. 2) You are running Routing and Remote Access service : shut down service 3) check registry for ip forwarding:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter

set value to 0 (and maybe reboot)