Thông báo

Collapse
No announcement yet.

Cần Giúp Đỡ Về Kết Nối Máy Tính Và Điện Thoại Sony T28s

Collapse
X
 
  • Lọc
  • Giờ
  • Show
Clear All
new posts

  • Cần Giúp Đỡ Về Kết Nối Máy Tính Và Điện Thoại Sony T28s

    Em muốn tạo kết nối giữa máy tính và điện thoại sony T28s, nhưng giờ tìm dòng điện thoại này khó lắm, em hiện đang có cái Nokia 1200 không biết có thay thế được cho T28s không ? Và kết nối như thế nào, pro nào làm qua xin chỉ giáo giúp đệ. Thanks các pro, chúc diễn đàn ngày càng phát triển.



    Dim SMSEngine As New SMSCOMMS("COM4")
    Dim i As Integer
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    SMSEngine.Open() 'open the port
    SMSEngine.SendSMS() 'send the SMS

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
    End Class
    Public Class SMSCOMMS
    Private WithEvents SMSPort As SerialPort
    Private SMSThread As Thread
    Private ReadThread As Thread
    Shared _Continue As Boolean = False
    Shared _ContSMS As Boolean = False
    Private _Wait As Boolean = False
    Shared _ReadPort As Boolean = False
    Public Event Sending(ByVal Done As Boolean)
    Public Event DataReceived(ByVal Message As String)

    Public Sub New(ByRef COMMPORT As String)
    'initialize all values
    SMSPort = New SerialPort
    With SMSPort
    .PortName = COMMPORT
    .BaudRate = 19200
    .Parity = Parity.None
    .DataBits = 8
    .StopBits = StopBits.One
    .Handshake = Handshake.RequestToSend
    .DtrEnable = True
    .RtsEnable = True
    .NewLine = vbCrLf
    End With
    End Sub
    Public Function SendSMS() As Boolean
    If SMSPort.IsOpen = True Then
    'sending AT commands
    SMSPort.WriteLine("AT")
    SMSPort.WriteLine("AT+CMGF=1" & vbCrLf) 'set command message format to text mode(1)
    SMSPort.WriteLine("AT+CSCA=""+841672870920""" & vbCrLf) 'set service center address (which varies for service providers (idea, airtel))
    SMSPort.WriteLine("AT+CMGS=" & "01674556130" & vbCrLf) ' enter the mobile number whom you want to send the SMS
    _ContSMS = False
    SMSPort.WriteLine("01674556130" & vbCrLf & Chr(26)) 'SMS sending
    MessageBox.Show("send")
    SMSPort.Close()
    End If
    End Function

    Public Sub Open()
    If Not (SMSPort.IsOpen = True) Then
    SMSPort.Open()
    End If
    End Sub

    Public Sub Close()
    If SMSPort.IsOpen = True Then
    SMSPort.Close()
    End If
    End Sub



    Hiếu thực hiện giống vậy mà không sms được, pro nào đã làm xin giúp đỡ Hiếu.
    Last edited by hieu101086; 30-08-2010, 23:24.

  • #2
    bác sang 4tech đi
    |

    Comment


    • #3
      Up lên cho anh em diện tử thấy, xin chân thành cảm ơn.

      Comment


      • #4
        Up lên nghĩ lễ nha hjhjhj.

        Comment


        • #5
          Thế pro nào đã thử với úb 3g viettel thì cũng giúp đỡ nhé.

          Comment

          Về tác giả

          Collapse

          hieu101086 Tìm hiểu thêm về hieu101086

          Bài viết mới nhất

          Collapse

          Đang tải...
          X