Announcement

Collapse
No announcement yet.

Cummunication Problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cummunication Problems

    I just recently upgraded my computer which now only has 1 com port. So I purchased a USB to RS232 converter. I can get the Temp08 to communicate to hyperterminal no problems. But when I use the plugin I get the following error.
    12/17/2004 10:50:16 PM~!~mcsTemperature~!~Closed Comm Port 4 on line 20 The device is not open
    12/17/2004 10:50:16 PM~!~mcsTemperature~!~Open Comm Port 4 Error on line 100 Port already open

    Any Ideas?

    Thanks in advance

    #2
    The plugin used the MSComm control to deal with the interface to the serial ports. It is in the ...\System32\mcscomm32.ocx folder. Mine is date June '1998 so it is not likey you have a problem in that area. I suspect that mcscomm32.ocx interacts with the driver for the serial port which is now redirected to the USB interface.

    The code segment of interest is the following:

    Function OpenCommPort(p As String, s As String) As Boolean
    10 On Error GoTo Error_Exit
    20 If Not CommAndTimer.Com1.PortOpen Then
    30 With CommAndTimer.Com1
    40 .InputLen = 0
    50 .RThreshold = 1
    60 .SThreshold = 0
    70 .Handshaking = comNone
    80 .Settings = s
    90 .CommPort = val(p)
    100 .PortOpen = True
    110 End With
    120 End If

    130 OpenCommPort = True
    Normal_Exit:
    140 Exit Function
    Error_Exit:
    150 hsWritelog PLUGIN_NAME, "Open Comm Port " & CStr(p) & " Error"
    160 OpenCommPort = False
    170 Resume Normal_Exit
    End Function


    Note that in lline 20 a check is made if the port is open and the remainder of the code is bypassed if it is opened. In your case it reports status that it is not open. When it gets down to line 100 and an attempt is made to open it then it throws an error indicating that it is already open. This seems like a problem with the USB/Serial Port driver.

    I would go to their web site an make certain you have the latest available. I know I have used Byterunner units in the past with good luck.

    When you use hyperterminal then make certain that you disconnect form the call so it free's up the port. Likewise try things in a deliverate manner from a known good starting point. i.e. do a reboot after using hyperterminal.

    If you get nowhere there I can send you a build that ignores the port open logic and justs tries to use the port independent of how it reports is open status.

    Comment


      #3
      Communication Problems

      Thanks Michael for getting back to me. The device I am using is made by Prolific. I down loaded the new drive tonight and am still having the same problem. You said you could give me code to ignore this. I think I'm going to need it

      Thanks in advance

      Ken

      Comment


        #4
        I unconditionally return an open status when trying to open the port. You should open the IO Window and observe both the data stream and the status codes to know if anything is working.
        Attached Files

        Comment


          #5
          Communication Problems

          Hi Michael

          I Tryied what you asked and am having more problems.

          11:40:52 PM~!~mcsTemperature~!~DoSendQueue: on line 220 Operation valid only when the port is open

          No sure what to do next?

          Thanks

          Ken

          Comment

          Working...
          X