Code Monkey home page Code Monkey logo

modem's People

Contributors

tehmaze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

modem's Issues

ymodem.py inital packet is too large in send()

Total packet length should only be 128 or 1024 bytes. The payload (data) being passed to the _send_packet() is already 128 or 1024 byte, that coupled with the additional transmission of the start_char, the sequence (2 bytes) and the checksum (2 bytes) makes the packet too large by five bytes.

ymodem.py initial packet composition error

If I send a simple file called "hello.txt" using a program that I know has a working y-modem send protocol to another program that I know has a working y-modem receive program data transfer looks like (blue = sender, green = receiver, ymodem-ul is the command to start the receiver):
image

The initial packet payload consists of the filename + 0x00 + filesize + 0x00 padding.

The ymodem.py program is not adding the file size to the initial packet which is causing my receiver to reject the packet:

image

I'm not sure if either programs that I know work are compliant to the standard and the files size may be optional.

The checksum of the initial packet from ymodem.py does seem to be being calculated correctly.
image

YModem remote file path / local file path

It may be desirable that the local file path and the remote file path when transmitting a file over ymodem be different. Currently YMODEM.send uses the same file path for both the local and remote filenames. Adding a second parameter to the send function can remedy this issue. If the second parameter is None then the local file will be used for the remote file.

This issue, however, is complicated by the use of glob.glob to expand wild cards in the file name. The use of glob.glob further complicates issues in that it will put directories in to a list that are not expanded to specific files which will probably cause things to fall apart quick quickly.

Should I attempt to add this feature I will assume that only a single file is being transferred per call to send and that it will contain no shell expansion wild cards. Or I will a string that can be prepended to the file to put it in a specific directory on the receiving computer.

YModem Multi Threading

I finally gave up on Python 2 and moved to the Python 3 version. The multi-threading branch on my fork support threaded y-modem uploads. That's all we need so no plans to add threaded receives but it should be easy enough for anyone increased. Also, it would be nice to actually make YMODEM-THREADED class that inherits from YMODEM so that if you don't need threading you don't have to pull it in. I'm not a Python expert by any means so I don't know how big of a deal this is.

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.