Computer ForumsComputers  

Go Back   Computer Forums > PC Technology Zone > Phones – PDA’s – Bluetooth – Other handhelds

Reply
 
LinkBack Thread Tools Display Modes
Old 12-20-2004, 11:42 PM   #1 (permalink)
Newb Techie
 
Join Date: Nov 2004
Posts: 3
Default Can't connect to Mobile Phone via com port

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.
nakarinl is offline   Reply With Quote
Old 12-22-2004, 12:29 AM   #2 (permalink)
Newb Techie
 
Join Date: Nov 2004
Posts: 3
Default

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.
nakarinl is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:49 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0