【嵌入式Linux学习七步曲之第二篇 交叉开发环境】U-boot和Windows TFTP server交互,socket recv error 10060

 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服务器上 很快就传输完成了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值