在Shell脚本中使用AT命令 [英] Use AT command in shell script

查看:656
本文介绍了在Shell脚本中使用AT命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用gsm调制解调器通过终端发送短信,没有问题,但是我想编写一个shell脚本(由php调用),并且我想知道如何在其中插入AT命令.

I'm using gsm modem to send sms, via a terminal there's no problem but i want to write a shell script (called by php) and i want to know how insert AT command in.

示例:

  • 调用脚本.sh
  • 脚本打开minicom(sudo ..)
  • 类型:AT + CMGS ="num" + ENTER +消息" + ctrl + Z 并将短信发送到号码.
  • call the script.sh
  • the script open minicom (sudo..)
  • type : AT+CMGS="num" + ENTER + "Message" + ctrl+Z and send the sms to the num.

谢谢 维克多

推荐答案

暂时 1 我认为您最好的选择是使用编程语言

atinout 程序的伴侣,我已经开始编写一个程序来发送命令AT + CMGS及其有效载荷正确.但是除非您非常非常有耐心,否则您不应该等待此操作完成.

1 As a companion to my atinout program, I have started to write a program to send the command AT+CMGS and its payload correctly. But unless you are very, very patient you should not wait for this to be finished.

这篇关于在Shell脚本中使用AT命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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