Emulate HyperTerminal

  • Thread starter Thread starter C a r l o s A n t o n i o
  • Start date Start date
C

C a r l o s A n t o n i o

Hello,

I have to submit a file via HyperTerminal using my PC's internal modem on a
daily basis. Does anybodoy know how to accomplish this in VS2005? Any
language is good, VB preferred. Thanks.


Regards,


C a r l o s A n t o n i o
 
C a r l o s A n t o n i o said:
I have to submit a file via HyperTerminal using my PC's internal modem on
a daily basis. Does anybodoy know how to accomplish this in VS2005? Any
language is good, VB preferred. Thanks.

You have at least a couple of options. You can search the web for the specs
of the protocol (Z Modem?) you are using with Hyperterminal and roll your
own solution. Or you can buy an ActiveX control or .Net class library with
file transfer support. Google is your friend - this product (which I know
NOTHING about) came up when I searched

http://www.softplatz.com/Soft/Development/Components-Libraries/MegaPipe-Net-Control.html

Regards,
Will
www.ivrforbeginners.com
 
Hello,

I have to submit a file via HyperTerminal using my PC's internal modem
on a daily basis. Does anybodoy know how to accomplish this in
VS2005? Any language is good, VB preferred. Thanks.


What protocol are you using? Xmodem? Z-Modem? Straight ASCII, etc?

..NET 2.0 has a Serial Port class, but I don't think it handles file
transfers ... you'll need a 3rd party class if you're using some sort of
file transfer protocol.
 
Hi,

By "submit" do you mean to implement an error-checked file transfer (via
modem or direct serial connection)? If so, I have examples of this in my
book (see below). The examples that I have employ my XMCommNET control,
derived from the built-in SerialPort class. It uses XMODEM/CRC (or
checksum). If you need something like Zmodem, I suggest SaxComm 2005
(www.sax.net). Automating the process involves knowing the dialing, logon-
and authentication process, which varies from system to system.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
By "submit" I mean I create a text file with code i wrote. Once it is
created, I click on START, ALL PROGRAMS, ACCESORIES, COMMUNICATIONS,
HYPERTERMINAL...

Then I open the connection, dial-it and when i'm connected i send the file
to the remote computer. what i want to do is to code an applicaton that i
may be able to execute with the Task Scheduler and perform thi operation
without human intervention. I do not now nothing about protocols or Zmodem
and all that stuff. I just want to be able to dial, connect send the file,
disconnect and send myself a confirmation e-mail.

Regards,


Carlos


I just go to
 
Carlos Antonio said:
By "submit" I mean I create a text file with code i wrote. Once it is
created, I click on START, ALL PROGRAMS, ACCESORIES, COMMUNICATIONS,
HYPERTERMINAL...

Then I open the connection, dial-it and when i'm connected i send the file
to the remote computer. what i want to do is to code an applicaton that i
may be able to execute with the Task Scheduler and perform thi operation
without human intervention. I do not now nothing about protocols or
Zmodem and all that stuff. I just want to be able to dial, connect send
the file, disconnect and send myself a confirmation e-mail.

That's a hokey and brittle way of solving a problem. To pursue you'd need to
launch hyperterminal and then send window messages to controls. You need to
use a tool like Spy++ to determine the IDs of the controls which are
necessary to get handles that you'd use to send messages.

Regards,
Will
 
Hi,

What I said applies. I have example code that sends and receives simple
(non-error corrected) files. These are more complex than error-corrected
file transfers for two reasons. 1, you have no way to know if the data have
been received correctly (obvious?). 2, you have to make some assumptions
about how long it takes to send the data (and for it to be received)... You
cannot just blast it out and hope.

Certainly, you could use TaskScheduler to start your program. You also
could simply write your program to set its own schedule. This program could
be a standard desktop applicaton (add to the Startup group, perhaps), or it
could be a written as a Windows Service.

The devil is in the details. Nothing you want to do is difficult
(sheduling, dialing and monitoring the connection, log-in (which, btw, is
the trickiest part), sending the file, sending an email and either exiting,
or waiting for the the next sheduled time to start the process again.
Getting it together might take a few hours, days, or weeks, depending on
"stuff."

Personally, I might do this as a Windows Serivce, perhaps. It could be set
to auto-start, and simply run in the background.

Task Scheduler is a Windows Service that will start up a standard
applicaton, so you could actually use it more simply than writing your own
service. So it is your choice.

You cannot automate HyperTerminal for this purpose, in any reasoable way.
The only "good way," IMO is to write your own application that does what you
want. If it is as simple as you state, I suspect that it might take me a
day to write and test -- so you might want to plan on spending a little more
time, and effort, than that.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Back
Top