使用GSM调制解调器发送AT的问题 [英] Problem with AT send with GSM modem
问题描述
我有一个GSM调制解调器,Wavecom。
当我使用HyperTerminal连接它时,我可以发送带有标准AT命令的短信,如下所示:
AT + CMGS =" + 351nnnnnnnnn" < CR>
>要在短信中发送的文字< Control-Z>
和短信继续播放。
注意:< CR>表示输入
注意:< CR>是ASCII 13,Control-Z是ASCII 26.
当我使用VisualBasic时,SAME AT序列不起作用。
我得到一个错误(两次)。
手册说要执行以下操作:
MSComm.Output =" AT + CMGS =" &安培; chr(34)& ++351nnnnnnnnn &安培; chr(34)& chr(13)
MsComm.Output ="要在邮件中发送的文字 &安培; chr(26)。
注意:chr(34)是逗号()的字符。
有什么问题?
非常感谢任何帮助。
I have a GSM modem, Wavecom.
When I connect to it using HyperTerminal, i can send SMS with the standard AT comands, like this:
AT+CMGS="+351nnnnnnnnn" <CR>
> text to send in the message <Control-Z>
and the SMS goes on.
Note: <CR> means ENTER
Note: <CR> is ASCII 13, and Control-Z is ASCII 26.
When I use VisualBasic, the SAME AT sequence does not work.
And I get an ERROR (twice).
The manual says to do the following:
MSComm.Output = "AT+CMGS=" & chr(34) & "+ "+351nnnnnnnnn" & chr(34) & chr(13)
MsComm.Output = "text to send in the message" & chr(26).
Note: chr(34) is the character for the commas(").
What is wrong?
Many thanks for any help.
推荐答案
嗨。你可以尝试这个
Hi. You could try this
我有一个GSM调制解调器,Wavecom 。
当我使用HyperTerminal连接它时,我可以发送带有标准AT命令的短信,如下所示:
AT + CMGS =" + 351nnnnnnnnn" < CR>
> 要在短信中发送的文字< Control-Z>
,短信继续播放。
当我使用VisualBasic时,相同的AT序列不起作用。
我得到一个错误(两次)。
手册说要执行以下操作:
MSComm.Output =" AT + CMGS =" &安培; chr(34)& ++351nnnnnnnnn &安培; chr(34)& chr(13)
MsComm.Output ="要在邮件中发送的文字 &安培;字符(26)。
I have a GSM modem, Wavecom.
When I connect to it using HyperTerminal, i can send SMS with the standard AT comands, like this:
AT+CMGS="+351nnnnnnnnn" <CR>
> text to send in the message <Control-Z>
and the SMS goes on.
When I use VisualBasic, the SAME AT sequence does not work.
And I get an ERROR (twice).
The manual says to do the following:
MSComm.Output = "AT+CMGS=" & chr(34) & "+ "+351nnnnnnnnn" & chr(34) & chr(13)
MsComm.Output = "text to send in the message" & chr(26).
几个问题...
- 你确定它只是 发送的CR在AT命令之后?
- 你得到了什么错误?
- >是什么?代表在第二行? (我问主要是因为它不存在于VB版本中。)
- 你确定你处于命令模式吗?我似乎记得(从10多年前开始,我认为)你必须暂停至少一秒,然后发送+++。然后另一个暂停,进入命令模式。但这可能只适用于您当时在线的情况,对吗?
- 此代码是否已复制/粘贴或在此处输入?因为
MSComm.Output =AT + CMGS = &安培; chr(34)& ++351nnnnnnnnn &安培; chr(34)& chr(13)
似乎在错误的地方有引号。它应该是
MSComm.Output =" AT + CMGS =" &安培; chr(34)& " +&351nnnnnnnnn QUOT; &安培; chr(34)& chr(13) - Are you certain that it''s only a CR which is sent after the AT command?
- What error are you getting?
- What does the ">" represent on the second line? (I ask mainly because it is not present in the VB version.)
- Are you sure you''re in command mode? I seem to recall (from more than 10 years ago, I think) that you have to pause for at least a second, then send "+++" then another pause, to go into command mode. But this probably only applies if you are online at the time, right?
- Is this code copied/pasted, or typed in here? Because
MSComm.Output = "AT+CMGS=" & chr(34) & "+ "+351nnnnnnnnn" & chr(34) & chr(13)
seems to have quotes in the wrong places. It probably should have been
MSComm.Output = "AT+CMGS=" & chr(34) & "+351nnnnnnnnn" & chr(34) & chr(13)
A couple of questions...
是的。在那里得到它。你应该提前13个小时:)
Yeah. Get with it down there. You''re supposed to be 13 hours ahead of me :)
这篇关于使用GSM调制解调器发送AT的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!