我正在尝试使用HSDPA 7.1 GSM调制解调器发送短信 [英] I am trying to send SMS using HSDPA 7.1 GSM Modem

查看:71
本文介绍了我正在尝试使用HSDPA 7.1 GSM调制解调器发送短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用Vb.net发送短信我有HSDPA 7.1 GSM调制解调器它的工作正常随着软件出现我​​也测试了HyperTerminal工作正常但是当我使用VB.NET发送相同命令时没有碰巧我发送Follwing系列的cammands

如果是SerialPort.IsOpen那么

SerialPort.Close()

结束如果

SerialPort.PortName = COM4

SerialPort.BaudRate = 9600

SerialPort.Parity = Parity.None

SerialPort.StopBits = StopBits.One

SerialPort.DataBits = 8

SerialPort.Handshake = Handshake.RequestToSend

SerialPort.DtrEnable = True

SerialPort .RtsEnable = True

SerialPort.NewLine = vbCrLf

昏暗消息为字符串

message = MsgRichTextBox.Text

SerialPort.Open()

如果是SerialPort.IsOpen()那么

SerialPort.Write(" AT"& vbCrLf)
SerialPort.Write(" AT + CMGF = 1" &安培; vbCrLf)

SerialPort.Write(" AT + CMGS =" Chr(34)& phoneNumBox.Text& Chr(34)& vbCrLf)

SerialPort.Write(message& Chr(26))

SentPicture.Visible = True

SentLabel.Visible = True

SentTimer.Start ()

Else

MsgBox(端口不可用)

结束如果



请建议任何其他更好的GSM MODEM接受AT命令

Thansk

Hi, I want to send SMS using Vb.net I have HSDPA 7.1 GSM Modem its works ok with software came along with it and I also have tested with HyperTerminal works fine but when I am sending same commands using VB.NET nothing happens I am sending Follwing series of cammands
If SerialPort.IsOpen Then
SerialPort.Close()
End If
SerialPort.PortName = COM4
SerialPort.BaudRate = 9600
SerialPort.Parity = Parity.None
SerialPort.StopBits = StopBits.One
SerialPort.DataBits = 8
SerialPort.Handshake = Handshake.RequestToSend
SerialPort.DtrEnable = True
SerialPort.RtsEnable = True
SerialPort.NewLine = vbCrLf
Dim message As String
message = MsgRichTextBox.Text
SerialPort.Open()
If SerialPort.IsOpen() Then
SerialPort.Write("AT" & vbCrLf)
SerialPort.Write("AT+CMGF=1" & vbCrLf)
SerialPort.Write("AT+CMGS=" & Chr(34) & phoneNumBox.Text & Chr(34) & vbCrLf)
SerialPort.Write(message & Chr(26))
SentPicture.Visible = True
SentLabel.Visible = True
SentTimer.Start()
Else
MsgBox("Port not available")
End If

Please suggest any other better GSM MODEM which accepts AT Commands
Thansk

推荐答案

这篇关于我正在尝试使用HSDPA 7.1 GSM调制解调器发送短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆