Git Product home page Git Product logo

ymodem's Introduction

板卡配置

  • 根据串口设备文件 修改uart.c文件 uart_start()函数 fd = open( "/dev/ttyS?", O_RDWR | O_NOCTTY | O_NDELAY);
  • 如果配置错误,程序会报错: write wrong!

程序参数:

  • 使用程序时可以加参数,目前只支持波特率的设置: 如 ./receive 9600 默认为115200

主要文件的作用:

  • uart.c : 串口操作函数
  • save_data.c : 存储数据用,暂时将数据存入文件中

  • Ymodem.c : ymodem协议中用到的各种函数

注意

  • CRT结尾包并不都是0x1a,为了适应传CRT ((buf[offset]==0x20)||(buf[offset]==0x30) || (buf[offset]==0x00)
    问题:如果全是空格也会当成结束的
    这个问题不会出现: 因为第一包是带文件名的,不可能是全0包, 数据包是在YMODEM_RX_ACK状态下接收的,不进行全0判断,因此就算文件全为空格,也不会当成结束。

  • 通过crt传输文件时,测试板接收到文件,发送C后无响应,以至于ymodem程序无法正常退出,但xshell可以退出。 解决办法: 一次只传一个文件,接收到一个文件后就退出程序。

ymodem's People

Contributors

jiadakong1 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.