Solved

Comms Control with internal modem

Posted on 2002-05-21
10
223 Views
Last Modified: 2012-05-04
Hi, I'm having trouble getting the MScomm32 control to work with my internal Swann modem. My Modem thinks it's on com3(atleast the modem driver does anyway), however a quick look in the ports section of the device manager tells me that physically com3 doesn't actually exsist, but there is a Swann internal modem Emulator.

So the question is, what do I set the MSComm1.Commport property to get it to work with the modem?  -Thanks

Regards
/GavinS
0
Comment
Question by:GavinS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 1

Expert Comment

by:barendb
ID: 7026520
Have you tried to set it to COM 3?

Barend
0
 

Author Comment

by:GavinS
ID: 7028388
Yeh, I've tried com3, but modem doesn't respond to any AT commands. Here's the program I used to test the modem.

Private Sub Command1_Click()
   Dim strCommand as string

   Comm1.Commport=3
   Comm1.portopen=TRUE
   strString="ATDT12345"
   Comm1.output=strString
   strString=ATH
   comm1.output=strString
   Comm1.portopen=FALSE
end sub

I suspected that because there was no comm3 port listed in the device manager, this maybe why the MScomm control was not working?

/GavinS
0
 
LVL 1

Expert Comment

by:barendb
ID: 7029022
Try testing the port with Hyperterminal, connect directly to the port and type the AT commands, you will see the response.  I don't see any code in there that checks your in buffer.  Are you using the OnComm event, if so are you sure that your properties are set right so that the event fires.
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:GavinS
ID: 7031915
Hi barendb, I tried hyperterminal and I can send AT commands to the modem on Comm3 OK and the modem reponds correctly.

As a point of interest, it has occured to me that if the MSComm control didn't recognise comm3 then it would generate an error when I called the portopen method. Since this is not happening then I should assume that the Comm3 port is being opened successfully.  Which raises the question, why doesn't modem respond to the above test app? Hhmmm

/GavinS
0
 
LVL 1

Expert Comment

by:barendb
ID: 7032234
Set your RThreshold property to 0 and Inputlen property to 0.  Send the AT command using output property, wait for about a second and then query input.  see if you get anything back.
0
 

Author Comment

by:GavinS
ID: 7057766
Hi barendb,
Sorry I took so long to reply, I've been away for a while. I tried setting RThreshold to 0 and trapped the comEvReceive in the OnComm event, but the modem is definately not replying with anything. I also check the InBufferCount, but this was set to 0, indicating that so data was received by the comms control

/GavinS
0
 
LVL 1

Expert Comment

by:barendb
ID: 7058649
Gavin,

I'll have to go look at my code at home, I remember having the same kind of problem talking to some other hardware, but I cannot remember how I solved it.  It was a couple of years ago, I'll go have a look and let you know.

Barend
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 7162493
Hi GavinS,

Ensure that you have this properties values set for your MSComm object:

.Handshaking = 0
.RThreshold = 1
.SThreshold = 1
.NullDiscard = True
.RTSEnable = True
.DTREnable = True

Good luck,

Vitor Montalvao
0
 

Author Comment

by:GavinS
ID: 7173223
Hi All, I've been a bit distracted from this problem lately, but I finally fixed it. All I needed to do was terminate the dialing string with a carrige return.

  strString="ATDT12345" & vbCrLf
  Comm1.output=strString

Thanks to all for your advice/assistance. What do I do with this question now?

/GavinS
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 7278331
Points refunded and placed in PAQ

Computer101
E-E Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question