USB 调制解调器的 PHP 命令
请问PHP中的AT命令与华为USB Modem兼容是什么?
我需要在脚本中使用这些命令,然后我可以使用华为 USB 调制解调器发送短信。
谢谢
Please what is the AT commands in PHP compatible with Huawei USB Modem ?
i need to use these commands in script then i can send sms using the Huawei USB Modem.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要做的第一件事是使用 PHP 打开串口。有一个类可以执行此操作: http://code.google.com/p/php- 显然
一旦打开,就这么简单:
,AT 命令可能因设备而异,因此您需要找出适合您的特定设备的命令。
The first thing you need to do is to open up the serial port with PHP. There is a class for doing this: http://code.google.com/p/php-serial/
Once open, it is as simple as this:
Obviously, the AT commands can vary from device to device, so you will need to find out the commands for your specific device.
更明智的方法是将 SMS 管理委托给专门的软件,因为根据我的经验,管理 SMS 发送需要做更多的事情,而不仅仅是向调制解调器
我建议最优秀的 SMSTools 它是一个与 Linux 兼容的服务器软件Windows,它通过特定目录(输入、输出、失败等)中的常规 ASCII 文件与您的应用程序进行对话,并具有许多其他高级功能。
要使用默认选项发送基本短信,您只需
在 out-spool 目录中创建一个像这样的文本文件,在 Linux 上,除非您重新配置该路径,否则该文件为
/var/spool/sms/outgoing
。最重要的是它是免费且开源的。
A saner approach would be to delegate SMS management to a specialized software, because in my experience there's more to do to manage SMS sends than just throwing a couple of bytes to a modem
I suggest the most excellent SMSTools it's a server software compatible with Linux and Windows, it talks with your application via regular ASCII files in specific directories (in, out, failed, ...) and has a host of other advanced functions.
To send a basic sms with default options you just have to create a text file like this one
in the out-spool directory, on Linux that's
/var/spool/sms/outgoing
unless you reconfigure that path.Best of all it's free and open source.