views:

664

answers:

4

My task appears simple at first: dial into a terminal over a modem, login, possibly send some other characters, and then receive file(s) via ZMODEM or KERMIT .. or send a file via ZMODEM or KERMIT.

I've been tearing my hair out trying to get this working correctly. Mostly I'm stuck on the ZMODEM protocol. I have a working implementation of XMODEM and YMODEM, which are simple enough. But ZMODEM is obviously a bit more complex.

I'm tired of dealing with all this. Especially with modems in general. Currently I just send an ATDT command and hope for the best.

A terminal program which is easily scriptable may suffice as well. Currently I'm looking into Tera Term. But some necessary logic while connected might make this a less desirable solution, or a temporary one.

I'm curious if anyone knows of a free library for serial communication for Windows, which supports the ZMODEM or KERMIT protocols.

Ideally, something that can look into the modem properties and get initialization and connection strings would be amazing. I tried using TAPI to dial out and get a handle to the port, but it never worked very reliably.

I am not afraid of integrating various approaches into my own code!

My current and preferred platform is C++, but I am open to anything.

Thanks for any help, advice, suggestions, etc.

A: 

Since you're using windows you could just shell out to a command prompt and use rasdial to connect. Once connected you can then use either a kermit script or the Windows ftp to move your files. It's a kludge but it works for us in those cases. The manufacturer of your modem should be able to tell you the proper AT commands that you can add in for initialzation and connections, it's not the same on all modems.

Jeff Schmidt
A: 

lrzsz is available for unix. You might be able to use it as a reference or port it to Windows.

Judge Maygarden
A: 

sexyz is available as a cross platform *Modem protocol implementation. IIRC you can connect, then call sexyz passing the socket descriptor and some additional information. It's available as part of synchronet, but you should be able to use it separately. see you can ask questions in dovenet's synchronet programming from my bbs

Tracker1
A: 

sexyz was a great reference, and will probably come in handy in the future.

However for a temporary solution, and a quick and inexpensive one, I ended up scripting with Tara Term. ( http://hp.vector.co.jp/authors/VA002416/teraterm.html ) This was actually quite simple and easy -- and finally I can go back to working with modern technology ;)

adzm