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 和您的相关数据。
发布评论
评论(4)
博客文章 串行Python 中的 RS232 连接
Blog post Serial RS232 connections in Python
使用 https://pythonhosted.org/pyserial/ 获取更多示例
use https://pythonhosted.org/pyserial/ for more examples
http://web.archive.org/web/20131107050923/http://www.roman10.net/serial-port-communication-in-python/comment-page-1/
http://web.archive.org/web/20131107050923/http://www.roman10.net/serial-port-communication-in-python/comment-page-1/
我没有使用过 pyserial,而是基于 https://pyserial.readthedocs 上的 API 文档。 io/en/latest/shortintro.html 看起来是一个非常好的界面。 可能值得仔细检查设备/无线电/您正在处理的任何内容的 AT 命令规范。
具体来说,有些需要在 AT 命令之前和/或之后一段时间的静默才能进入命令模式。 我遇到过一些不喜欢首先立即读取响应的人。
I have not used pyserial but based on the API documentation at https://pyserial.readthedocs.io/en/latest/shortintro.html it seems like a very nice interface. It might be worth double-checking the specification for AT commands of the device/radio/whatever you are dealing with.
Specifically, some require some period of silence before and/or after the AT command for it to enter into command mode. I have encountered some which do not like reads of the response without some delay first.