Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Comms Control with internal modem

Posted on 2002-05-21
10
Medium Priority
?
232 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 52

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

618 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