通过 GSM 调制解调器接收和发送短信
我如何通过 GSM 调制解调器接收短信,以便我可以使用该短信进行进一步处理并发回回复短信。 我对如何实现这一目标没有特别的想法...... 我更喜欢在这个项目中使用 java 语言,并且我使用的是 Linux 操作系统。
How can I receive SMS through a GSM modem so that I can use this SMS for further processing and send back a reply SMS.
I do not have particular idea on how to achieve this.......
I prefer using java language for this project and I am using Linux OS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
您可能想看看 SMSLib:
You might want to give a look at SMSLib:
要使用 3G 调制解调器发送短信,您需要使用适当的
AT
命令。首先,您需要将调制解调器设置为文本模式:然后发送消息:
其中
是回车符 (ASCII 13),
是您要发送的消息,
是 ASCII 26,
是您要将消息发送到的号码。要读取收到的消息,请执行以下操作:
其中
是以下之一:"ALL"
、"REC UNREAD"
、“REC READ”
(带引号),分别表示所有消息、未读消息和已读消息。要在 Java 中执行此操作,您需要使用 Java 通信 API。这是一个简短的例子:
http://java.sun.com/products/javacomm/reference/docs /API_users_guide_3.html
To send an SMS using a 3G modem, you need to use the appropriate
AT
commands. First you need to set the modem to text mode:Then you send your message:
Where
<CR>
is a carriage return (ASCII 13), and<message>
is the message you want to send,<CTRL-Z>
is ASCII 26, and<number>
is the number you want to send your message to.To read received messages, you do this:
Where
<stat>
is one of:"ALL"
,"REC UNREAD"
,"REC READ"
(with the quotes), meaning all messages, unread messages, and read messages respectively.To do this in Java you'll need to use the Java communications API. Here's a short example:
http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html
嗨,我正在使用 RXTX 库,代码在这里!..它对我来说工作得很好,我搜索了很多东西来获得正确的方法,最终得到了短信的关键!..:D
hi i'm using RXTX library the code goes here!.. and its works fine for me , i searched a lot of things to get correct method finaly got the key to sms!.. :D
看看 SMSJ:一个功能齐全的库,允许使用 GSM 调制解调器或几种流行的网络发送和接收短信服务。
Take a look on SMSJ: a fully functional library that allows sending and receiving SMS using either GSM modem or several popular web services.
查看 Java SMSLib API。
来自该网站:“SMSLib 是一个程序员的库,用于通过 GSM 调制解调器或移动电话发送和接收 SMS 消息。SMSLib 还支持一些批量 SMS 运营商。”
Take a look at the Java SMSLib API.
From the web site : "SMSLib is a programmer's library for sending and receiving SMS messages via a GSM modem or mobile phone. SMSLib also supports a few bulk SMS operators."
您应该查看调制解调器手册。有些设备支持telnet连接,您可以通过命令行发送AT命令。
如果这是您的情况,您必须了解(有时针对每种设备)并编写一个使用 telnet 与调制解调器通信的应用程序。
Apache Commons Net 项目 可能很有用。
一些 AT 命令指南:
http://www.portech.com.tw /data/Siemens%20TC35I_AT.pdf
http://www.sierrawireless.com/resources/faq/AirLink/Redwing/Redwing_GPRS_UsersGuide.pdf
或者,您可以尝试使用其他人建议的库之一。
You shoud take a look at your modem manual. Some devices support telnet connection and you can sent AT commands via command line.
If this is your case you have to learn about (sometimes specific for each device), and code an application that uses telnet to communicate with your modem.
Apache Commons Net project can be useful.
Some AT commands guides:
http://www.portech.com.tw/data/Siemens%20TC35I_AT.pdf
http://www.sierrawireless.com/resources/faq/AirLink/Redwing/Redwing_GPRS_UsersGuide.pdf
Alternatively you can try to use one of the libraries suggested by others.
你可以使用很多方法...
用于接收短信的最佳和简单的解决方案将是
SMSenabler 它将立即将您的短信保存到文件或数据库中,您可以检索它
免费版本最多支持 12 个字符
如果您想发送短信,那么您可以使用[在此处输入链接描述][Ozeki] Ozeki 短信服务器网关
U can use many methods ...
For recieving SMS best and simple solution will be
SMSenabler it will save your SMS instantly to file or database and u can retrieve it
Free version supports upto 12 characters
and if you want to send sms then you can use [enter link description here][Ozeki] Ozeki sms server gateway