Hyper Terminal's init string???
Hyper Terminal's init string???
Hyper Terminal's init string???
Hyper Terminal's init string???
Hyper Terminal's init string???
Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string???
Hyper Terminal's init string??? Hyper Terminal's init string???
Hyper Terminal's init string???
Go Back  Xtreme Visual Basic Talk > > > Hyper Terminal's init string???


Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2002, 04:49 AM
dynamo
Guest
 
Posts: n/a
Thumbs up Need help for making a serial program


I need to have this kind of Visual Basic program:

I have a computer where is a modem in COM port 1. My computer will be running hyper terminal
and I will get calls from a system and the info that is coming, is in ASCII format. I have
to send this information into COM2 as it is.

So... ASCII-TEXT -> COM1 -> COM2

Sorry about bad language and thanks anyway!
Reply With Quote
  #2  
Old 04-03-2002, 04:58 AM
Flyguy's Avatar
FlyguyHyper Terminal's init string??? Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,160
Default

Have a look at the Microsoft Comm Control, it's used to do communication with the serial comm ports.
Reply With Quote
  #3  
Old 04-03-2002, 06:43 AM
dynamo
Guest
 
Posts: n/a
Default

could anybody make a quick example program? I'm very newbie... =)
Reply With Quote
  #4  
Old 04-03-2002, 11:29 AM
MTSkull's Avatar
MTSkull MTSkull is offline
Centurion
 
Join Date: Oct 2000
Location: base of the Flatirons
Posts: 133
Default Well... Its a little more complicated.

I am using a comm control as we speak, anouther enginner here has created a serial Class that works pretty well. I'll attach it. You should set up a Module that interfaces with the class to simplify things. Give the class a try.

What you will want to do is have a global Variable module and declare a new instance of the class module.

Public SerialControl As New SerialCommand

then in the code you would open a com port read and write then close the com port. I can't make any guaratees for this code but I use this class in at least 4 other Progs beside what I am workng on now. If this dosn't work then surf around and you will probubly find more examples.

Note: Dependent on form called frmMain, and MSComm Component on frmMain called MSComm1

MT
Attached Files
File Type: cls serialcommand.cls (15.3 KB, 51 views)
__________________
"Without deviation from the norm, 'progress' is not possible." Frank Zappa
Reply With Quote
  #5  
Old 04-04-2002, 01:09 PM
dynamo
Guest
 
Posts: n/a
Default

"What you will want to do is have a global Variable module and declare a new instance of the class module. " ???

Well... does this file read from com1 and write into com2?
Could you please modify it a bit because it's quite hard for me to understand as it is.... And how much there is "nonsense" included? I'm very new & confused with Visual Basic... =)

ThX!
Reply With Quote
  #6  
Old 04-04-2002, 04:26 PM
MTSkull's Avatar
MTSkull MTSkull is offline
Centurion
 
Join Date: Oct 2000
Location: base of the Flatirons
Posts: 133
Default

Alright, I think I can give you a guide line how to set this up, but give me a little time I am still tuning this class module as we speak.
Bri
__________________
"Without deviation from the norm, 'progress' is not possible." Frank Zappa
Reply With Quote
  #7  
Old 04-04-2002, 09:09 PM
T4ADeathWalker
Guest
 
Posts: n/a
Default

As a new vb prog. actualy I can't even call my self that but I like to see that better programers are willing to take a program that may not be understood by a lower level programer and modify it so that it could be better understood.

I praise you for your willingness to help persons around you.
Reply With Quote
  #8  
Old 04-04-2002, 09:47 PM
dynamo
Guest
 
Posts: n/a
Default

Quote:
Originally posted by MTSkull
Alright, I think I can give you a guide line how to set this up, but give me a little time I am still tuning this class module as we speak.
Bri

Big ThX! Take your time
Reply With Quote
  #9  
Old 04-09-2002, 02:47 AM
dynamo
Guest
 
Posts: n/a
Default

Quote:
Originally posted by MTSkull
Alright, I think I can give you a guide line how to set this up, but give me a little time I am still tuning this class module as we speak.
Bri
I'll be offline until next sunday. I'll have army "extra" service now for five days. I'm waiting for your answer very much...
Reply With Quote
  #10  
Old 04-09-2002, 11:15 AM
MTSkull's Avatar
MTSkull MTSkull is offline
Centurion
 
Join Date: Oct 2000
Location: base of the Flatirons
Posts: 133
Default

Alright here is a basic program that will read from Comm1 and write to Comm2. You will probubly have to modify this for your particular application. If you are doing this for a job you should see if there is someone around who knows VB to give you some 1 on 1 help. I will be happy to help as well, but you will have to do the hard work from here on out.

A good option is to check out the tutors corner and also the links area for online help at this site, that may have a better way to accomplish your goals. I learned VB from a class, I knew C and C++ and just need help with VB Commands. If you are going to be programing it is a good idea to take a couple of classes to learn the basic loops and if statments and such. I would also recommend getting a good book. Anouther helpfull thing is to download the source code to a simple program and step through the operation, this will give you an idea of program flow and stuff like that.

One other good way to get help here is to do a key word search on this site and just browse the threads. I would have well over 500 posts if I didn't do this. Plus I usually learn unrelated stuff that helps make my programs better.

Hope this helps..
Brian
Attached Files
File Type: zip serial 1 and 2.zip (3.8 KB, 51 views)
__________________
"Without deviation from the norm, 'progress' is not possible." Frank Zappa
Reply With Quote
  #11  
Old 04-14-2002, 02:49 PM
dynamo
Guest
 
Posts: n/a
Cool

Quote:
Originally posted by MTSkull
Alright here is a basic program that will read from Comm1 and write to Comm2. You will probubly have to modify this for your particular application. If you are doing this for a job you should see if there is someone around who knows VB to give you some 1 on 1 help. I will be happy to help as well, but you will have to do the hard work from here on out.

A good option is to check out the tutors corner and also the links area for online help at this site, that may have a better way to accomplish your goals. I learned VB from a class, I knew C and C++ and just need help with VB Commands. If you are going to be programing it is a good idea to take a couple of classes to learn the basic loops and if statments and such. I would also recommend getting a good book. Anouther helpfull thing is to download the source code to a simple program and step through the operation, this will give you an idea of program flow and stuff like that.

One other good way to get help here is to do a key word search on this site and just browse the threads. I would have well over 500 posts if I didn't do this. Plus I usually learn unrelated stuff that helps make my programs better.

Hope this helps..
Brian


Thanks! U'r the man! Thanks a zillion, really Now I will go and try this piece of code
Reply With Quote
  #12  
Old 04-21-2002, 10:19 AM
dynamo
Guest
 
Posts: n/a
Default

I 'm getting compile error when I try to compile this code.
"Compile error: Sub or function not defined". It complains about line: Delay (400) . Is there error? I have tried:"Delay 400" but -> same thing....
I¨m using VB6 sp5... What could be wrong?
Reply With Quote
  #13  
Old 04-22-2002, 09:53 AM
MTSkull's Avatar
MTSkull MTSkull is offline
Centurion
 
Join Date: Oct 2000
Location: base of the Flatirons
Posts: 133
Default

Here is the corrected code.

Bri
Attached Files
File Type: zip serial 1 and 2.zip (4.4 KB, 37 views)
__________________
"Without deviation from the norm, 'progress' is not possible." Frank Zappa
Reply With Quote
  #14  
Old 04-26-2002, 07:02 AM
dynamo
Guest
 
Posts: n/a
Default

Well I have little modified your program. There are some things I need help about.

First: When I press "start program" button It should put my modem into "Auto Answer" state that it will be ready for calls that are coming to my modem, conneced to COM1. When using Hyper Terminal, command "A" put s it to state that modem will be "Answering automatically" and works fine... I need same state to my program. Do I need command "AT" or "ATS0=0 -> answer mode) ? And where to put that?

Second: I have inserted a box (Text2) that should show ASCII-rows that are readed from COM1. I inserted command: "frmMain.Text2.Text = Buffer" into class module SerialCOM1. Is that enough? Info that is readed from COM1 will be in many rows. I need to transfer them all until the text "SV" will that be hard to do?

I attached my program as attachement. Should anybody look it and help me some. Thank you!

-Dynamo
Reply With Quote
  #15  
Old 04-26-2002, 07:09 AM
dynamo
Guest
 
Posts: n/a
Default

Attachment
Attached Files
File Type: zip serial program.zip (6.0 KB, 30 views)
Reply With Quote
  #16  
Old 05-23-2002, 09:21 AM
dynamo
Guest
 
Posts: n/a
Default

Could anyone help me with this problem?

When I press "start program" button in my program It should put my modem into "Auto Answer" state that it will be ready for calls that are coming to my modem, conneced to COM1. When using Hyper Terminal, pressing any key puts it to state that modem will be "Answering automatically" and works fine... I need same state to my program. Do I need command "AT" or "ATS0=0 -> answer mode) ? And where to put that?

(In nutshell, i need to have my modem to keep on modem's TR-light. Now my program only blinks it once)

In what module..... or....?

Last edited by dynamo; 05-23-2002 at 09:51 AM.
Reply With Quote
  #17  
Old 05-23-2002, 09:51 AM
dynamo
Guest
 
Posts: n/a
Default

Does it come after these lines: (mdlSerialFunctions.bas -module)

Public Sub subOpenComm1()
'you may need to modify the init string to work with your particular app.
Serial1.Init_COM 1, "9600", "N", "8", "1"
Serial1.Open_COM
'here ?????:


End Sub
Reply With Quote
  #18  
Old 05-23-2002, 09:56 AM
BillSoo's Avatar
BillSooHyper Terminal's init string??? BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

Yes, after you open the SERIAL PORT, you initialize the modem. As part of that initialization, you send it the AT command to autoanswer.

Just dump the AT commands out the port to the modem....
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #19  
Old 05-23-2002, 01:47 PM
dynamo
Guest
 
Posts: n/a
Default

Well...what command would you suggest? I tried many commands getting errors. Could you give me one example. How to add command: "AT" for example?

I zipped my newest code as attachment. Could you or anyone look at it and give me some suggestions?

This program should be running all the time without anyone having to click buttons to transfer the data to COM2. I don't need hyper terminal running if this program works. The problem is, modem isn't in answer-mode and wont accept calls that are coming to COM1.

Thx!
Attached Files
File Type: zip new serial program.zip (14.6 KB, 23 views)
Reply With Quote
  #20  
Old 05-23-2002, 02:15 PM
BillSoo's Avatar
BillSooHyper Terminal's init string??? BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

Try something like:

Serial1.Write_COM "ATF0" & vbCRLF

But use the AT Command for autoanswer. I don't happen to have a modem manual on me that lists the hayes AT command set....
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Hyper Terminal's init string???
Hyper Terminal's init string???
Hyper Terminal's init string??? Hyper Terminal's init string???
Hyper Terminal's init string???
Hyper Terminal's init string???
Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string??? Hyper Terminal's init string???
Hyper Terminal's init string???
Hyper Terminal's init string???
 
Hyper Terminal's init string???
Hyper Terminal's init string???
 
-->