无法将诺基亚 supernova 7210 与 gsmcomm 库连接
我已将 7210 电话连接到 com4。但是当我运行使用 gsmcomm 库的项目时,它给出了没有电话连接的错误。 7210与gsmcomm兼容吗?
I have connected my 7210 phone to com4. But when i run my project which uses gsmcomm library, it gives an error that no phone connected. is 7210 compatible with gsmcomm??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GSMComm(以及所有类似的库)是为某些串行端口执行 AT 命令的库。所以与 GSMComm 库的兼容性问题就是与某些 AT 命令的兼容性问题。
换句话说,GSMComm 拥有使用 SMS 所需的所有方法,但您的手机(在您的情况下连接到串行端口 COM4)不能支持它们(方法)实现的所有 AT 命令。这取决于手机制造商,他决定设备应该支持哪些AT命令。据我所知,制造商可以设置自己的 AT 命令集(但我不确定)。
您出现“未连接手机”的问题可能是由于波特率和超时时间选择不当造成的。在超时之前,您的计算机不会收到电话的任何响应。 (您应该查看 GSMComm 库主页的常见问题解答以获取更多详细信息。)
我的项目中出现了这样的错误消息。不幸的是,我仍然无法解决这个问题,因为我无法为我的华为调制解调器选择正确的波特率和超时组合。
GSMComm (and all similar libraries) is library, that execute AT commands for certain serial port. So question about compatibility with GSMComm library is question of compatibility with certain AT commands.
Other words, GSMComm have all methods you need to work with SMS, but your mobile phone (connected in your case to serial port COM4) can support not all AT commands which they (methods) implements. It depends on phone manufacturer, he decides which AT commands devise should to support. As I know, manufacturer can set their own set of AT commands (but I'm not sure about that).
Your trouble about "No phone connected" may be caused because of inappropriate options of baud rate and timeout. Your computer don't get any response from phone before reaching timeout. (You should look in FAQ at the homepage of GSMComm library for more details.)
I had such error message in my project. Unfortunately, I still can't resolve it, because I can't choose correct combination of baud rate and timeout for my Huawei modem.