• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

communicate with mscomms

I am doing this telephone system, but i need to communicate with msComms. Unfortunately, i am not that familiar with ms comms nor how to connect to it. i did download the mscomms32.ocx file but i dunno wot to do next....all i know is that i need a serial port (rs232) and a modem +phone+phoneline to test it...but to code up to mscomms i dunno.  is there some1 who can send me a sample of such code?or explain how?
thanking you so much
regards Naomi
0
grimaenriqueznaomi
Asked:
grimaenriqueznaomi
  • 5
  • 4
  • 2
  • +2
2 Solutions
 
SethiCommented:
See the following link for excellent code example on MSComm control. Also if you have access to MSDN you will all the documentation there.

http://www.freevbcode.com/ShowCode.Asp?ID=2236
0
 
grimaenriqueznaomiAuthor Commented:
is there an english site where i can see the example or not pls....10x so much
Naomi
0
 
SethiCommented:
I have given a link to an english site. You can also go to msdn.microsft.com and search for MSComm. You will get plently of material there.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
grimaenriqueznaomiAuthor Commented:
okie i thank u lots
regards Naomi
0
 
dwalfischCommented:
Dear Naomi,

What you want to do is not dificult, you just have to do the following:

1) Add an MsComm control in a form, and name it for example mscX.
2) View its properties, and change the Commport (you can do it in run time if you prefer), specifying the Serial Port where the modem is.
3) In run time, you first must open the port, using the property PortOpen and setting it to True.
4) Then, using the Comm Control property Output, you must assign what you want to send to the modem to configure or to execute. To do it, you should learn the AT commands, which are the commands the modems accept. For example, "AT L3" means put volume at maximun level. To dial, you must output "AT D ###", where ### is the number, etc.
5) You will receive the answer, in an event (mscX_OnComm). There, you should verify what the event is (see property CommEvent), and if it a response, you can use it consulting the property Input.
6) After the modem connects to the other, you can send info as if there would be a direct link.
7) You have a command to disconnect modem, I think it was +++, but I'm not sure...

I don't have a modem at hand... I prepared an example, but can't probe it right now... but if you want to test it, let me know and I will send it to you.

See you.
0
 
grimaenriqueznaomiAuthor Commented:
Dwalfisch

i thank you for your comment....i did find an at comand site....but by anychance since im pretty new to vb have u got a sample of mscomms?

thankz
Naomi
0
 
grimaenriqueznaomiAuthor Commented:
yeah basically my problem is that the pc has to record the data, it will just need to print it on screen! i did select the com port and the baud rate etc.....but i dont know how to continue! this is what i did...
Private Sub mscomx_OnComm()


If mscomx.CommEvent = comEvReceive Then
buff = buff & mscomx.Input

If Right(buff, 3) = Chr(13) & Chr(13) & Chr(13) Then

'If buff = comPortOpen Then
'mscomx.InBufferCount

If connection = True Then
mscomx.Input

End If
End If
End Sub

Private Sub connecting()
mscomx.InBufferCount = 0
receive = comEvReceive
connection = True
End Sub
0
 
CleanupPingCommented:
grimaenriqueznaomi:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
SethiCommented:
Recommendation: Split points between dwalfisch & Sethi
0
 
CleanupPingCommented:
grimaenriqueznaomi:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
SethiCommented:
Recommendation: Split points between dwalfisch & Sethi
0
 
DanRollinsCommented:
Moderator, my recommended disposition is:

    Split points between: Sethi and dwalfisch
    *** Thanks Sethi.   Sorry about the deja vu!

DanRollins -- EE database cleanup volunteer
0
 
SethiCommented:
;-)
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 5
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now