By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,097 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,097 IT Pros & Developers. It's quick & easy.

MSCOMM error- 8020 error reading from comm port

P: 1
hi ,
i have developed a prog in vb to send sms , but i get an error error:8020
"Error reading from comm port"
my prog for mscomm_oncomm() is
Private Sub MSComm1_OnComm()

Dim strMessage As String
Select Case MSComm1.CommEvent
' Event messages.
Case comEvReceive
strMessage = StrConv(MSComm1.Input, vbUnicode) ' Error reading from comm port in mscomm1.input
'
' ,
' Case comEvSend
' Case comEvCTS
' strMessage = "[Change in CTS Detected]"
' Case comEvDSR
' strMessage = "[Change in DSR Detected]"
' Case comEvCD
' strMessage = "[Change in CD Detected]"
' Case comEvRing
' strMessage = "[The Phone is Ringing]"
' Case comEvEOF
' strMessage = "[End of File Detected]"

' Error messages.
Case comBreak
strMessage = "[Break Received]"
Case comCDTO
strMessage = "[Carrier Detect Timeout]"
Case comCTSTO
strMessage = "[CTS Timeout]"
Case comDCB
strMessage = "[Error retrieving DCB]"
Case comDSRTO
strMessage = "[DSR Timeout]"
Case comFrame
strMessage = "[Framing Error]"
Case comOverrun
strMessage = "[Overrun Error]"
Case comRxOver
strMessage = "[Receive Buffer Overflow]"
Case comRxParity
strMessage = "[Parity Error]"
Case comTxFull
strMessage = "[Transmit Buffer Full]"
' Case Else
' strMessage = "[Unknown error or event: " & MSComm1.CommEvent & "]"
End Select
strBuffer = strBuffer & strMessage

End sub

THE PARAMETERS THAT I HAVE SET IS

With MSComm1
.CommPort = 5
.Settings = "19200,N,8,1"
.Handshaking = comRTS
.RTSEnable = True
.DTREnable = True
.RThreshold = 1
.SThreshold = 1
.InputMode = comInputModeBinary
.InputLen = 1
.PortOpen = True 'must be the last
End With


PLZZZZ HELP ME WITH THIS.... I NEED IT URGENTLY...
THNX A LOT
Mar 27 '07 #1
Share this Question
Share on Google+
2 Replies


Cyberdyne
Expert 100+
P: 627
I will move this to the Visual Basic Forum where they will be able to assist you better.

Cyberdyne..

hi ,
i have developed a prog in vb to send sms , but i get an error error:8020
"Error reading from comm port"
my prog for mscomm_oncomm() is
Private Sub MSComm1_OnComm()

Dim strMessage As String
Select Case MSComm1.CommEvent
' Event messages.
Case comEvReceive
strMessage = StrConv(MSComm1.Input, vbUnicode) ' Error reading from comm port in mscomm1.input
'
' ,
' Case comEvSend
' Case comEvCTS
' strMessage = "[Change in CTS Detected]"
' Case comEvDSR
' strMessage = "[Change in DSR Detected]"
' Case comEvCD
' strMessage = "[Change in CD Detected]"
' Case comEvRing
' strMessage = "[The Phone is Ringing]"
' Case comEvEOF
' strMessage = "[End of File Detected]"

' Error messages.
Case comBreak
strMessage = "[Break Received]"
Case comCDTO
strMessage = "[Carrier Detect Timeout]"
Case comCTSTO
strMessage = "[CTS Timeout]"
Case comDCB
strMessage = "[Error retrieving DCB]"
Case comDSRTO
strMessage = "[DSR Timeout]"
Case comFrame
strMessage = "[Framing Error]"
Case comOverrun
strMessage = "[Overrun Error]"
Case comRxOver
strMessage = "[Receive Buffer Overflow]"
Case comRxParity
strMessage = "[Parity Error]"
Case comTxFull
strMessage = "[Transmit Buffer Full]"
' Case Else
' strMessage = "[Unknown error or event: " & MSComm1.CommEvent & "]"
End Select
strBuffer = strBuffer & strMessage

End sub

THE PARAMETERS THAT I HAVE SET IS

With MSComm1
.CommPort = 5
.Settings = "19200,N,8,1"
.Handshaking = comRTS
.RTSEnable = True
.DTREnable = True
.RThreshold = 1
.SThreshold = 1
.InputMode = comInputModeBinary
.InputLen = 1
.PortOpen = True 'must be the last
End With


PLZZZZ HELP ME WITH THIS.... I NEED IT URGENTLY...
THNX A LOT
Mar 28 '07 #2

P: 1
Hey, how are you.

Friend, help me please.... I have the same problem using mscom, Visual Basic 6 and a GSM NOKIA cell modem.

Help me please, how you corrected the problem ?
Oct 29 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.