integrating zmodem support

131 views
Skip to first unread message

Mike Frysinger

unread,
Oct 4, 2014, 1:50:30 AM10/4/14
to chromiu...@chromium.org
a lot of terminals make it easy to transmit files via zmodem.  has anyone looked into making this functionality available in hterm ?  this would solve a large problem we have currently with trying to move files to/from systems we already connected to via SecureShell (especially on CrOS where we can't simply fall back to rsync/scp/sftp).

for example, on a remote system, run:
 $ sz test.txt
the terminal detects the zmodem stream and provides the option of saving that file somewhere.  once the transfer finishes, your session resumes like normal.

conversely, you could start a zmodem receive:
 $ rz
then in the terminal, tell it to initiate a zmodem transfer.  once it finishes, your session resumes like normal.
-mike

Robert Ginda

unread,
Oct 6, 2014, 12:32:02 PM10/6/14
to Mike Frysinger, chromium-hterm

Nobody has looked into it AFAIK, but I have fond memories of downloading alley cat over zmodem in the late 80's.  If someone ported zmodem to JS I'd consider hooking it into Secure Shell.


Rob.

--
You received this message because you are subscribed to the Google Groups "chromium-hterm" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-hterm/CAAbOSc%3Dgv4BD56fVg0ejcDjNAoUvbcYQJnw7_COW7kt_RzMbyw%40mail.gmail.com.

Message has been deleted
Message has been deleted

daozhi...@gmail.com

unread,
Jun 17, 2016, 6:00:52 AM6/17/16
to chromium-hterm, vap...@chromium.org
Hello, Mike Frysinger & Robert Ginda:

        Zmodem File Transmission  via Javascript is Practicable.  Javascript Html Xterm 实现Zmodem 文件传输。

I had just implemented Zmodem Protocol via Javascript.

With the help of Javascript, Html5 FileReader, Websocket and JSCH,I implemented the basic zmodem protocol, 

including : 

request handshake, 请求握手

finish handshake,  关闭握手

file info sending, 文件信息传输

data sending,      文件内容传输

data receiving,    文件内容接收

crc checksum,      CRC checksum 校验

network flowcontrol,流量控制

ascii escape,       二进制控制码转换

multil file support,多文件批量传输

...


and so on.





Main problem to solve:

1. z-modem protocol data packet.

2. convert websocket asynchronous io to ssh server's synchronized io.






It just work well. It is able to upload hundreds of file at a time and just allow files whos size is less then 4 GBytes, that is a limit of Zmodem protocol.


ScreenShot in text as below:

-----------------------------------------------------------------------------------------------------------------------------------------------

[yangyang.yyy@fly  /home/yangyang.yyy/test/rzfiledir] 

$rz                                                                                                                                            Starting to receive file: Press Ctrl + C to Terminate the transfer. 4 files, 5.57MB in Total.                           

文件传输开始:按 Ctrl + C 终止传输。4个文件,共5.57MB。                                    SentBytes/Total   Speed    Estime/Time Prog f/a APro

ExtJsNEw.rar [#####################################################################] 1.62MB(1701518)/1.62MB 1.58MB/S  00:00/00:01 100% 1/4  29%

TreeGridEditor_v1.4.0-rc1.rar [####################################################] 1.50MB(1574714)/1.50MB 1.60MB/S  00:00/00:00 100% 2/4  56%

Windows _updata.rar [##############################################################] 1.28MB(1345317)/1.28MB 1.52MB/S  00:00/00:00 100% 3/4  79%

nginx-1.5.2.zip [##################################################################] 1.17MB(1224127)/1.17MB 1.44MB/S  00:00/00:00 100% 4/4 100%

                                                                                                                                                                          

上传成功!,已上传:4。总大小:5.57MB,速度:1.48MB,耗时:00:03。感谢您的使用。                       

-----------------------------------------------------------------------------------------------------------------------------------------------



        You can email me or reply this post, my email is yangya...@163.com or  daozhi...@gmail.com  .

ScreenShot in gif as below:


  



Any question is welcome!

Mike Frysinger

unread,
Jun 24, 2016, 1:40:55 AM6/24/16
to daozhi...@gmail.com, chromium-hterm, yang_y...@163.com
you've implemented this in what exactly ?  do you have a github repo or something to look at ?
-mike

On Tuesday, October 7, 2014 at 12:32:02 AM UTC+8, Robert Ginda wrote:
Reply all
Reply to author
Forward
0 new messages