minicom文件传输方式选择 相关

来源:互联网 发布:唱念爱 知乎 编辑:程序博客网 时间:2024/05/22 20:49

真得不能用USB传么。。。。

 

1: 打开minicom
#minicom

2: 启动开发板,输入
#load flash vivi x

3: ctrl+a  &&  s,选择xmodem,输入要传输的文件

4: 传输文件

注意:第一次一般都会因为超时出错。 2,3,4的操作要快,不然就不行,我也不知道为什么???
反正不行就多试几次,呵呵,总比回WIN要快的!


 

 

在Linux可以通过minicom和嵌入式设备进行通讯,对其中的文件传输在网上就有很多选择有xmodem/ymodem/zmodem/kermit/ascii等方式,大部分采用xmodem。在具体的环境中,通过多次采用的xmodem的传输可以发现,不管是直接传输,还是按照网上的说法采用rz sz传输,都很难将文件正确传输到嵌入式设备上。当采用zmodem进行传输的时候却发现传输的效率很高,几乎没有失败。在网上查看xmodem/ymodem/zmodem的区别发现了以下的一段话:
 
 

XMODEM
Xmodemis one of the most widely used file transfer protocols. The original Xmodem protocol uses 128-byte packets and a simple "checksum" method of error detection. A later enhancement, Xmodem-CRC, uses a more secure Cyclic Redundancy Check (CRC) method for error detection. Xmodem protocol always attempts to use CRC first. If the sender does not acknowledge the requests for CRC, the receiver shifts to the checksum mode and continues its request for transmission.
Xmodem-1K
Xmodem 1K is essentially Xmodem CRC with 1K (1024 byte) packets. On some systems and bulletin boards it may also be referred to as Ymodem. Some communication software programs, most notably Procomm Plus 1.x, also list Xmodem-1K as Ymodem. Procomm Plus 2.0 no longer refers to Xmodem-1K as Ymodem.

YMODEM
Ymodem is essentially Xmodem 1K that allows multiple batch file transfer. On some systems it is listed as Ymodem Batch.
Ymodem-g
Ymodem-g is a variant of Ymodem. It is designed to be used with modems that support error control. This protocol does not provide software error correction or recovery, but expects the modem to provide the service. It is a streaming protocol that sends and receives 1K packets in a continuous stream until instructed to stop. It does not wait for positive acknowledgement after each block is sent, but rather sends blocks in rapid succession. If any block is unsuccessfully transferred, the entire transfer is canceled.

ZMODEM
Zmodem is generally the best protocol to use if the electronic service you are calling supports it. Zmodem has two significant features: it is extremely efficient and it provides crash recovery.
Like Ymodem-g, Zmodem does not wait for positive acknowledgement after each block is sent, but rather sends blocks in rapid succession. If a Zmodem transfer is canceled or interrupted for any reason, the transfer can be resurrected later and the previously transferred information need not be resent.
 
 
 
简而言之:xmodem/ymodem/zmodem是modem中采用了的三种文件传输协议,区别在于

  xmodem:简单通用,传输信息单位是“包=128B”,传输速度慢,适合电话线路质量差的情况下用  
  ymodem:由XMODEM演变来,效率可靠性高,包=128*8B;一次传输可发送或接受几个文件  
  zmodem:于上两种不同,已连续的数据流发送数据,效率更高

 

因此,我在用minicom进行文件传输的时候通常采用了zmodem。具体方法是:首先在shell里进入目标目录,就可以用zmodem传输到当前的目标目录了。

原创粉丝点击