PRB: CommCtl: No "OK" Received When Using Some Modems

ID: Q209077


The information in this article applies to:
  • Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0
  • Microsoft Windows CE Toolkit for Visual Basic 6.0, version 1.0


SYMPTOMS

Some modems may not respond with an OK in the Input string of the Communications control when an AT command has been sent.


CAUSE

Modems may not respond if the Data Terminal Ready (DTR) signal is low. You may need to raise the DTR signal before opening the Communications port.

Note that the Communication control only checks the DTREnable property when the port is being opened. If the DTREnable property is set to True after opening the port, the DTR signal does not change until the port is closed and reopened.


RESOLUTION

To get the modem to respond with an OK, set the DTREnable property of the Communication control to True prior to opening the communications port.

NOTE: This will not necessarily work for all modems.


STATUS

This behavior is by design.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows CE (HPC) Project in Visual Basic. Form1 is created by default.


  2. From the Project menu, choose Components. In the Components dialog box, click the Controls tab, then select the Microsoft CE Comm Control.


  3. Place a command button (named Command1), a text box (named Text1) and a Comm control (named Comm1) on Form1.


  4. Paste the following code into Form1:


  5. 
       Option Explicit
       Dim InBuff
    
       Private Sub Comm1_OnComm()
           If Comm1.CommEvent = comEvReceive Then
              InBuff = InBuff & Comm1.Input
              Text1.Text = InBuff
           End If
       End Sub
    
       Private Sub Command1_Click()
           Comm1.RTSEnable = True
           Comm1.Settings = "9600,n,8,1"
           Comm1.RThreshold = 1
           Comm1.SThreshold = 1
           Comm1.CommPort = 2
           Comm1.PortOpen = True
           Comm1.Output = "AT" & vbCrLf
       End Sub
    
       Private Sub Form_Unload(Cancel As Integer)
           Comm1.PortOpen = False
       End Sub 


  6. Run the project on the device.


RESULTS: The OK does not come back from the modem.


REFERENCES

Microsoft Windows CE Toolkit for Visual Basic 5.0 Books Online

Microsoft Windows CE Toolkit for Visual Basic 6.0 Online Help

Additional query words: kbdse vbce vbce5 vbce6

Keywords : kbToolkit kbVBp500 kbVBp600 kbWinCE kbGrpVB kbGrpVBDB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.