Shop OBEX P1 Docs P2 Docs Learn Events
SD file transfer or copy to a PC FSRW 2.6 — Parallax Forums

SD file transfer or copy to a PC FSRW 2.6

Don MDon M Posts: 1,652
edited 2013-05-26 11:14 in Propeller 1
If I wanted to copy a file from the sd card serially through a Prop to a PC (via USB) what would be involved in doing this?

Let's say I have one of Martin's DNA boards with the sd card and usb connection already in place. What would be needed on the PC end of this? For instance if I had a file on the sd card named test.txt that was 150K in size how would I get it to the PC as the same type of file?

I know I could just take the card out and make a copy by inserting into a PC but what if I wanted to do it via a USB connection?

Bean's post yesterday [url] http://forums.parallax.com/showthread.php/147835-Serial-Data-Logger-with-quot-Time-Stamp-quot-feature[/url] got me thinking about this.

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2013-05-08 06:37
    I use the YMODEM protocol with Windows HyperTerminal to transfer files back and forth.
  • Don MDon M Posts: 1,652
    edited 2013-05-08 07:15
    Dave Hein wrote: »
    I use the YMODEM protocol with Windows HyperTerminal to transfer files back and forth.

    Do you use the "YModem" object on the Prop side?

    Then with Hyper Terminal you do a download?
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-08 07:29
    You use the YModem object on the Propeller side and HyperTerminal (and other terminal emulators) has a YModem file transfer function on the PC side.
  • Don MDon M Posts: 1,652
    edited 2013-05-08 07:48
    Mike Green wrote: »
    You use the YModem object on the Propeller side and HyperTerminal (and other terminal emulators) has a YModem file transfer function on the PC side.

    Ok. Thanks Mike.

    Now where do I find the YModem object? A search of the new and classic OBEX yields nothing searching for "ymodem".
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-05-08 08:56
    You might also find PACS interesting..

    http://propellerpowered.com/forum/index.php?topic=244.0
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-08 09:09
    I don't think it was ever put into the ObEx, but here's a copy that I had in my archives. It uses an earlier modified version of FSRW, so I don't think it will work with larger SD cards (> 2GB).
  • RaymanRayman Posts: 14,665
    edited 2013-05-08 09:10
  • Dave HeinDave Hein Posts: 6,347
    edited 2013-05-08 09:48
    Here's the YMODEM code I use in the spinix sb.spin (send binary) and rb.spin (receive binary) apps. The code has built-in timeouts so it won't hang forever if the host side is not sending data or ACKs. This code uses the file I/O methods provided by the spinix OS. These would need to be converted to the FSRW equivalents. The printf's would also need to be converted, but the rest of the serial I/O is compatible with the FullDuplexSerial methods.

    I believe this code will run up to 57,600 baud with FDS. You would need to increase the size of the FDS receive buffer to run at higher speeds. I have also attached rb1.spin and sb1.spin, which use a faster CRC calculator. They run faster than the other versions, and I think rb1.spin it will run at 115,200 without any changes to FDS.
  • Don MDon M Posts: 1,652
    edited 2013-05-25 08:18
    You might also find PACS interesting..

    http://propellerpowered.com/forum/index.php?topic=244.0

    Se my post on the other forum. I get an error when trying to Config.
  • Don MDon M Posts: 1,652
    edited 2013-05-26 11:06
    So I was able to get the Y Modem object working. Cool stuff.

    Now for another question. I have a 2 prop setup like this:


    SD Card -> (pin 0, etc.)Prop 2 (pins 30 & 31) ---> (pins 1 & 2) Prop 1(pins 30 & 31) --> FTDI USB --> PC

    First of all is it even possible to still use the Y modem object to get the files off SD card through Prop2 then through Prop1 to a PC? And secondly how would this be setup? Run the Y modem object in Prop2?

    Thanks.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-26 11:14
    I'd write a trivial program for Prop1 that simply copies the state of pins 1 & 2 to pins 30 & 31 so the PC (through the USB adapter) is talking directly to Prop2. There'd be a YModem program on Prop 2 that would talk to a YModem program on the PC. and do the actual file transfers.
Sign In or Register to comment.