Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / May 2005



Tip: Looking for answers? Try searching our database.

Need to Mimic Hyperterminal

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Visintin - 27 May 2005 17:53 GMT
Hi!

A newbiew to Asynchronous Serial communications, I have been using
Hyperterminal to connect COM1 directly to a Personal Earth Station,
which acts like a PAD.

Using Hyperterminal, I have been able to connect to the sattelite in a
non-modem state and issue a command like

CALL HostNumber

At which time I communicate back and forth with a mainframe host.

I would like to perform this communication automatically in my VB6
program, but the MSCOMM control seems oriented towards using a modem.
When I activate the port using the NewVBTerm sample app and enter the
CALL command and hit the Send button, I get the INVALID COMMAND error.

Is there any MS control I can use in VB to emulate Hyperterminal in a
non-modem state?

Thanks for your help!

MichaelV
Dick Grier - 28 May 2005 17:32 GMT
Hi,

If I understand what you are doing, using the Call command will pre-pend
your command with "AT" for a modem.  Take a look at the actual code.

What you want to do is:

MSComm1.Output = WhateverStringINeed & vbCr

Or, just type it in, as you did with HyperTerminal.

For lots more information, take a look at my book (see below).

Dick

Signature

Richard Grier  (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2  (391 pages) published July 2004.  See
www.mabry.com/vbpgser4 to order.

Michael Visintin - 31 May 2005 14:51 GMT
Thanks so much for your reply, Dick!  I will be happy to look at your
book.

I wasn't aware that the AT prefix was being appended.  I am not actually
using a modem.  I have NewTermVB set to Null Modem Cable.  Same in
Hyperterminal.  I guess I am assuming that some other setting on the
Port Settings is different from what I have set in Hyperterminal.  My
main reason for posting to the newsgroup was to see if someone more
experienced could verify that the MSComm control could reproduce the
Hyperterminal functionality.  Since you appear to believe so, I will
continue on that path.
I am thinking that my Flow Control setting in Hyperterminal should
probably be equal to my Handshaking setting in NewTermVB.

Thanks again for responding!!  I appreciate your time and effort!

MichaelV
Dick Grier - 31 May 2005 16:17 GMT
Hi,

If you are attempting to provide ALL of HyperTerminal's capability, then...
No, MSComm cannot do it.  HyperTerminal uses TAPI for modem support, and
MSComm is not TAPI compliant.  HyperTerminal provides error corrected file
transfers, and MSComm does not.  HyperTerminal may be used as a Telnet
client, and MSComm has no networking capability.  HyperTerminal also
provides some terminal emulations, which are not "out of the box" using
MSComm.

All of these things may be done in a VB program, using MSComm AND lots of
code, or some other add-on components.  For example, XMCommCRC.ocx from my
homepage adds XMODEM file transfers.  Code and the Winsock control can be
used to do Telnet.  TAPI support may be done using pure code (though it is
VERY difficult), or one of several TAPI compliant commercial controls.
These commercial controls often provide one or more terminal emulation
modes, too.

However, if you want to create a simple terminal program, to send and
receive data -- then MSComm is fine, and the code required is straight
forward.

I have code examples and information on most of these things in my book.

Dick

Signature

Richard Grier  (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2  (391 pages) published July 2004.  See
www.mabry.com/vbpgser4 to order.

 
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



©2009 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.