U-boot和Windows TFTP server交互,socket recv error 10060
Sailor_forever sailing_9806#163.com 转载请注明
http://blog.csdn.net/sailor_8318/archive/2009/11/14/4811785.aspx
TFTP服务器设置在Windows上,采用的是CISCO的TFTP服务器
开发板ping Windows主机,证明网络连接没有问题
=> ping 150.236.68.227
Trying FCC1 ETHERNET
Using FCC1 ETHERNET device
host 150.236.68.227 is alive
小文件传输,没有问题
=> tftp 0x800000 hrcw.bin
Trying FCC1 ETHERNET
Using FCC1 ETHERNET device
TFTP from server 150.236.68.227; our IP address is 150.236.68.211
Filename 'hrcw.bin'.
Load address: 0x800000
Loading: #
done
Bytes transferred = 256 (100 hex)
=> tftp 0x800000 ppcboot_ram.bin
Trying FCC1 ETHERNET
Using FCC1 ETHERNET device
TFTP from server 150.236.68.227; our IP address is 150.236.68.211
Filename 'ppcboot_ram.bin'.
Load address: 0x800000
Loading: T T T #T T T T #T T T #
Retry count exceeded; starting again
Trying FCC1 ETHERNET
Loading: ##T #T #T T #T T T fec: rx error 0c84
大的文件传输过程中偶尔出现错误,导致超时,次数达到Uboot的设置次数时,将对所有内容进行重传
主机端tftp显示socket recv error 10060
客户端显示如下图所示:
=> tftp 0x80000 pbist.0817.1.swd
Trying FCC1 ETHERNET
Using FCC1 ETHERNET device
TFTP from server 150.236.70.104; our IP address is 150.236.68.211; sending through gateway 150.236.68.129
Filename ' pbist.0817.1.swd
.
Load address: 0x80000
Loading: T T T T T T
Abort
捉包分析如下图所示:
可见数据包是一个畸形(malformed)的数据包
这是因为uboot采用的是Linux的socket机制,和Windows的实现有细微差异,导致传输过程在网络环境不好时易出现错误
按照http://blog.csdn.net/sailor_8318/archive/2009/11/14/4811277.aspx在Linux上设置服务器
=> tftp 0x80000 pbist.0817.1.swd
Trying FCC1 ETHERNET
Using FCC1 ETHERNET device
TFTP from server 150.236.70.104; our IP address is 150.236.68.211; sending through gateway 150.236.68.129
Filename 'pbist.0817.1.swd'.
Load address: 0x80000
Loading: ################
done
Bytes transferred = 221263 (3604f hex)
在Linux服务器上 很快就传输完成了