通过调制解调器gsm cinterion mc55i发送短信 [英] send sms via modem gsm cinterion mc55i
本文介绍了通过调制解调器gsm cinterion mc55i发送短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将短信从调制解调器发送到手机但是总是得到同样的错误。
错误是没有从手机收到的数据等待30000ms
任何人都可以帮助我。
我使用的代码就是这个
i am trying to send a sms from a modem to a phone but a get always the same error.
the error is "No data received from phone afer waiting 30000ms"
can anyone help me.
the code i used was this
'Verificaçã se o modem está conectado e se as configurações estão correctas
Dim portName As String = ComboBox1.SelectedItem.ToString
Dim baudrate As Integer = "19200"
Dim timeout As Integer = "300"
Cursor.Current = Cursors.WaitCursor
Dim comm As New GsmCommMain(portName, baudrate, timeout)
Try
comm.Open()
While Not comm.IsConnected()
Cursor.Current = Cursors.[Default]
If MessageBox.Show(Me, "Não foi possivel comunicar com o modem, O modem encontra-se ligado?", "Teste ao modem", MessageBoxButtons.RetryCancel, MessageBoxIcon.Exclamation) = DialogResult.Cancel Then
comm.Close()
Return
End If
Cursor.Current = Cursors.WaitCursor
End While
comm.Close()
Catch ex As Exception
MessageBox.Show(Me, "Erro de conecção: " & ex.Message, "Teste ao modem", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return
End Try
commport = ComboBox1.SelectedItem.ToString
openn()
MessageBox.Show(Me, "As configurações estão correctas e o modem está OK.", "Teste ao modem", MessageBoxButtons.OK, MessageBoxIcon.Information)
连接到调制解调器
并发送
To connect to the modem
and to send
p_sms = txt_SMS.Text
telphone = CInt(txt_Telefone.Text)
sms_send1()
功能sms_send1是这个
the funtion sms_send1 is this
Try
'Send an SMS message
Dim pdu As SmsSubmitPdu = New SmsSubmitPdu(p_sms, telphone)
modem.SendMessage(pdu)
Catch ex As Exception
MsgBox(ex.Message)
End Try
推荐答案
这篇关于通过调制解调器gsm cinterion mc55i发送短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文