el_supremo
Well-known member
Zmodem file transfer from Teensy to PC
Last year I started trying to convert the rz and sz programs to allow zmodem transfers between Teensy (and Arduino) and a PC. I got the 'sz' code (from Teensy to PC) more or less working but then something distracted me and I only started looking at it again last week. The sz code now works but in a rather restricted way.
- It can send one file or the contents of an entire directory from a uSD card on the Teensy to the PC. It works when sending to TeraTerm but I can't get it to work with Hyperterminal. TeraTerm only works on COM1 2, 3 and 4.
- TeraTerm and Hyperterminal have the problem/feature that all directory paths MUST exist before transferring a file. E.g. with TeraTerm, if you have set its receive directory as C:\fred and send the file: /logs/2014/06/23/171002.csv then the path C:\fred\logs\2014\06\23\ must already exist.
- it will not work in a 'hostile' environment. Any timeouts or other transmission errors will cause it to fail.
In one test, it transferred 10 files with a total of 2853852 bytes in 266 secs at 115200baud. That's a throughput of about 107000baud which isn't too bad.
I've decided to post it as-is so that if someone finds it useful they can give it a try. Maybe someone with more patience than I have can improve it or even get rz to work as well
Pete
P.S. it uses about 6kB of sram so it isn't going to work on Teensy2 or 328-based Arduinos. I did have it running on a Teensy++2 and currently it runs on a Teensy3.
Last year I started trying to convert the rz and sz programs to allow zmodem transfers between Teensy (and Arduino) and a PC. I got the 'sz' code (from Teensy to PC) more or less working but then something distracted me and I only started looking at it again last week. The sz code now works but in a rather restricted way.
- It can send one file or the contents of an entire directory from a uSD card on the Teensy to the PC. It works when sending to TeraTerm but I can't get it to work with Hyperterminal. TeraTerm only works on COM1 2, 3 and 4.
- TeraTerm and Hyperterminal have the problem/feature that all directory paths MUST exist before transferring a file. E.g. with TeraTerm, if you have set its receive directory as C:\fred and send the file: /logs/2014/06/23/171002.csv then the path C:\fred\logs\2014\06\23\ must already exist.
- it will not work in a 'hostile' environment. Any timeouts or other transmission errors will cause it to fail.
In one test, it transferred 10 files with a total of 2853852 bytes in 266 secs at 115200baud. That's a throughput of about 107000baud which isn't too bad.
I've decided to post it as-is so that if someone finds it useful they can give it a try. Maybe someone with more patience than I have can improve it or even get rz to work as well
Pete
P.S. it uses about 6kB of sram so it isn't going to work on Teensy2 or 328-based Arduinos. I did have it running on a Teensy++2 and currently it runs on a Teensy3.
Attachments
Last edited: