Comms Control with internal modem

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
GavinSAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Computer101Connect With a Mentor Commented:
Points refunded and placed in PAQ

Computer101
E-E Moderator
0
 
barendbCommented:
Have you tried to set it to COM 3?

Barend
0
 
GavinSAuthor Commented:
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
barendbCommented:
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
 
GavinSAuthor Commented:
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
 
barendbCommented:
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
 
GavinSAuthor Commented:
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
 
barendbCommented:
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
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
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
 
GavinSAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.