Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / April 2007

Tip: Looking for answers? Try searching our database.

Emulate HyperTerminal

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
C a r l o s  A n t o n i o - 18 Apr 2007 15:29 GMT
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
Chakravarthy - 18 Apr 2007 16:16 GMT
Recommend you to create a windows service and schedule it for the regular
time that you want to run.

HTH
Signature

Every thing is perfect, as long as you share!!!

> Hello,
>
[quoted text clipped - 5 lines]
>
> C a r l o s  A n t o n i o
Newbie Coder - 18 Apr 2007 17:30 GMT
Chakravarthy,

Why would you want to create a service that may run for a few seconds in a
24-hour period?

Best idea would be to create an applicating & let Task Schedule handle the
time when it runs. At lease this way you are not using pointless Windows
resourses running a service

Signature

Newbie Coder
(It's just a name)

> Recommend you to create a windows service and schedule it for the regular
> time that you want to run.
[quoted text clipped - 10 lines]
> >
> > C a r l o s  A n t o n i o
Spam Catcher - 18 Apr 2007 17:43 GMT
> 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.
Dick Grier - 18 Apr 2007 17:58 GMT
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

Signature

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.

Carlos Antonio - 20 Apr 2007 06:30 GMT
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
> Hi,
>
[quoted text clipped - 7 lines]
>
> Dick
Dick Grier - 20 Apr 2007 20:25 GMT
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

Signature

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.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.