Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ZModem not working with Telnet

Status
Not open for further replies.

Brattam

IS-IT--Management
Nov 19, 2002
3
I have set up a unix box with several USRobotics 56K ISA modems connected to it and a raw telnet connection. In order to access this "Modem Pool", I simply telnet to that box's ip address and I am then immediately connected to a modem. So, I wrote a Procomm script that telnets to the modem pool and then types modem commands to dial up to a remote computer (also running UNIX). Here is an example:

set modem connection 5
connectmanual TELNET 123.123.123.123
waitfor "found a modem" 10
transmit "ATDT15125551212^M"

This part works perfectly. Once connected, I try to pull a file down using zmodem:

sz -y -e -b file1.txt

or just

sz file1.txt

This brings up the zmodem box, but it fails every time. I suspect that Procomm is trying to pull the file from my modem pool rather than having it pulled from the box we are dialed in to, but I'm not sure and I don't know how to fix it. I did the same thing using SecureCRT and it was able to download the file with zmodem. Does anyone have any ideas why this isn't working for me?

Thank you,
Matt
 
I don't have a Unix machine with sz installed on it, but what do the various flags in your command line do? I think I know what -b and -e do, but I'm not 100% certain on that.

Does your script start the transfer itself, or are you manually typing in the sz command? The first sample script I have at demonstrates how to script a Zmodem download in ASPECT if your script is performing the download.
aspect@aspectscripting.com
 
-e = Escape all control characters; normally XON, XOFF, DLE, CR-@-CR, and Ctrl-X are escaped.
-b = (ZMODEM) Binary override: transfer file without any translation.
-y = Instruct a ZMODEM receiving program to overwrite any existing file with the same name, and to skip any source files that do have a file with the same pathname on the destination system.

The script is not initiating the download, the remote computer is. When you type sz, it initiates the transfer from the remote machine and the download screen pops up in procomm. It then gets "Bad CRC" and hangs there and eventually ends up with a "file transfer error". I don't know why.

Consequently, I am able to use kermit to download the file instead of sz, but I'd rather use zmodem so that I don't have to re-write all my scripts.

Any ideas?

Thanks,
Matt
 
Do you know if you have a 7-bit or 8-bit telnet connection to the Unix machine? I seem to recall that you have to force an 8-bit connection somehow to get Zmodem to transfer binary files over a telnet connection (although I was thinking one of the command line flags would compensate for that). If you select the Options | Telnet Options menu item in Procomm, is the Set session to binary mode checkbox enabled? If not, check it, click OK, and try the download again.
aspect@aspectscripting.com
 
That was it! Thank you, thank you, thank you! You made my week!

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top