串口Modem拨号问题,请教AT指令高手

ChangeMyHead 2004-12-06 11:30:25
我使用AT指令通过串口拨号。
可是不知道怎么建立连接和发送/接收数据。

下面是我的步骤,请您指教:

1、在串口建立和Modem连接;
2、发送: AT
3、发送:ATDT96600 //此处拨号
拨号成功
下面怎么发送数据?是不是直接发送就可以了?(我用自己的手机试了一下,结果马上就断了)
...全文
280 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhjie374 2004-12-18
  • 打赏
  • 举报
回复
不同MODEM的AT指令有不同,看厂家的说明
onestation 2004-12-07
  • 打赏
  • 举报
回复
http://www.china-askpro.com/download/athelp.zip
ChangeMyHead 2004-12-07
  • 打赏
  • 举报
回复
谢谢onestation(新手)。

请继续
onestation 2004-12-07
  • 打赏
  • 举报
回复
//TP-LINK——ET5668 初始化

if(bRemote){

//remote
str += "&D0"; //Ignore DTR
str += "E0"; //Disable echo.
str += "Q1"; //Disable modem from sending result codes.
str += "&K0"; //Disabe flow control.

}else{
//
str += "E1"; //Enable echo.
str += "Q0"; //Enable modem from sending result codes.
str += "X4"; //Result Code Selection and Progress detection.
str += "W2"; //返回的CONNECT信息使用DCE速率而不是DTE速率。
}
str += "S0="+strAA; //Auto answer ring number is 3.
str += "&W0"; //Stores active configuration profile in configuration profit 0.
str += "&Y0"; //Select stored profile 0 for Power On or Reset.
str += char(0x0d);
//命令结束标志为回车符<CR>.
onestation 2004-12-07
  • 打赏
  • 举报
回复
我是这样写的:tplink的modem,不同modem会有差别的
拨号
str = "ATDT";
str += "12345678"; //号码
str += char(0x0d);
Comm1->WriteCom(str);

然后Comm1->GetModemStatus();

连通了直接Comm1->WriteCom(str);就可以发送了
mixtrue 2004-12-07
  • 打赏
  • 举报
回复
1首先你的设置好波特率,校验位长度,起止位。

2 向端口写数据即可。
一条晚起的虫 2004-12-07
  • 打赏
  • 举报
回复
找AT指令集看去

2,640

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧