[Can't connect to Mobile Phone via com port] -



Can't connect to Mobile Phone via com port

Discuss Can't connect to Mobile Phone via com port



Posted by: nakarinl

Hi, All
I'm newbie for this topic,i used VB to connect Mobile Phone (Ericsson T39) via com port by MSComm Control that i can't,But when use my serial port ,it's OK. Anyone can suggest me.
Thanks.



Posted by: nakarinl

Hi,All
I wrote VB Code like this.

Private Sub Command1_Click()
MSComm.Output = "ATI3" & vbCrLf
End Sub

Private Sub Command2_Click()
MSComm.Output = "AT*" & vbCrLf
End Sub

Private Sub Form_Load()
MSComm.CommPort = 4
MSComm.Settings = "9600,n,8,1"
MSComm.Handshaking = comNone
MSComm.InputLen = 0
MSComm.RThreshold = 1
MSComm.SThreshold = 1
MSComm.InBufferCount = 0

' Open the port.
MSComm.PortOpen = True

MsgBox MSComm.PortOpen
End Sub

Private Sub Form_Unload(Cancel As Integer)
MSComm.PortOpen = False
End Sub

Private Sub MSComm_OnComm()
Dim buffer1 As Variant
Select Case MSComm.CommEvent
Case comEvReceive
buffer1 = MSComm.Input
Text1.Text = Text1.Text & buffer1
If InStr(buffer1, "OK") Then
MsgBox "OK"
ElseIf InStr(buffer1, "ERROR") Then
MsgBox "Error"
End If

Case Else
MsgBox "Not OK"

End Select
End Sub


Anyone can suggest me.
Thanks.