We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
我不知道有哪个库可以执行此操作,但您可以查看 Kannel 的源代码。它们是
rawtcp
或telent
调制解调器类型,可能会对您有所帮助。由于 AT 命令只是文本,您应该能够让您的程序建立 TCP 会话,然后直接发出命令。您的调制解调器使用的确切命令可能是制造商甚至型号特定的,这可能就是为什么没有这方面的库的原因,但应该在文档中列出。
I'm not aware of a library to do this, but you can checkout the source of Kannel. Their is a
rawtcp
ortelent
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.
我认为答案是“不”。我想不出任何通过 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.