stën

    • Login
    • Search
    • Back to Blog
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    xmodem

    Projects
    1
    1
    767
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      exile last edited by exile

      Xmodem

      In order to upgrade XBee programmable modules over the air with node.js based tooling there is need for an Xmodem protocol implementation.

      Project home: https://github.com/exsilium/xmodem.js

      Protocol sequence for uploading

      • Sender == uploader
      • Receiver == downloader
      • Transfers are receiver driven!
      • All errors are retried 10 times.
      • The receiver has a 10-second timeout.
      • Variable length checksum depending on the transfer mode:
        • normal/classic/original: 1 byte
        • crc mode: 2 bytes

      WORK IN PROGRESS

      %% Xmodem normal transfer sequenceDiagram participant Sender participant Receiver loop every 3 sec Receiver-xSender: <NAK> end Sender->>Receiver: <SOH> 01 FE -data- <xx> Receiver->>Sender: <ACK> Sender->>Receiver: <SOH> 02 FD -data- <xx> Note right of Receiver: Data gets corrupted in transfer Receiver->>Sender: <NAK> Sender->>Receiver: <SOH> 02 FD -data- <xx> Receiver->>Sender: <ACK> Sender->>Receiver: <SOH> 03 FC -data- <xx> Receiver->>Sender: <ACK> Note left of Sender: <ACK> gets garbaged Sender->>Receiver: <SOH> 03 FC -data- <xx> Receiver->>Sender: <ACK> Sender->>Receiver: <EOT> Receiver->>Sender: <ACK>

      Questions

      • What is the frequency that the receiver sends out the NCG byte to start the transfer? - 3 seconds?

      Testing

      • The suite will have Mocha tests built in, some good documentation is available
      • https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Locally-in-a-Docker-Image
      1 Reply Last reply Reply Quote 0
      • First post
        Last post