通过 IP 连接设备发送 SMS 消息的库

发布于 2024-08-16 13:06:09 字数 1539 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

愁以何悠 2024-08-23 13:06:09

我不知道有哪个库可以执行此操作,但您可以查看 Kannel 的源代码。它们是 rawtcptelent 调制解调器类型,可能会对您有所帮助。

由于 AT 命令只是文本,您应该能够让您的程序建立 TCP 会话,然后直接发出命令。您的调制解调器使用的确切命令可能是制造商甚至型号特定的,这可能就是为什么没有这方面的库的原因,但应该在文档中列出。

I'm not aware of a library to do this, but you can checkout the source of Kannel. Their is a rawtcp or telent modem type that might help you.

Since AT commands are just text you should be able to have your program establish a TCP session and then issue the commands directly. The exact commands your modem uses may be manufacturer or even model specific, which may be why there are no libraries for this, but should be listed in the documentation.

谁许谁一生繁华 2024-08-23 13:06:09

我认为答案是“不”。我想不出任何通过 IP 添加到 PC 的 GSM 设备,它们总是串行通信,所以您实际上正在寻找一个库,它接受以太网命令并将它们作为串行写入设备(实际上是一个包装器) )。我怀疑您会发现这一点,所有此类包装器都将被编写为公开更高级别的编程语言功能(例如 C# 类或 C 库),并且您进行的调用将通过该语言构造 - 而不是 IP。

因此,您最好使用串行->IP转换器,它们工作得非常好(我们使用它们将串行设备连接到计算机,其距离对于串行电缆来说太长)并且它们是完全透明的。

I think the answer will be 'no'. I can't think of any GSM device that is added to a PC via IP, they're always serial comms, so really you're looking for a library that takes ethernet commands and writes them to the device as serial (effectively a wrapper). I doubt you'll find this, all such wrappers will be written to expose a higher-level programming language functionality (eg a C# class or a C lib), and the calls you make will be via that language constructs - not IP.

As a result, you'll be best off with a Serial->IP converter, they work remarkably well (we use them to connect a serial device to a computer over distances too long for serial cables) and they're completely transparent.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文