Pyserial buffer fills faster than I can read(Pyserial 缓冲区的填充速度比我读的快)
问题描述
我正在以 921600 的波特率通过串行从微控制器读取数据.我正在读取大量 ASCII csv 数据,由于它来得如此之快,因此缓冲区已被填满,其余的数据也已填满在我阅读之前迷路了.我知道我可以手动编辑 serialwin32 的 pyserial 源代码以增加缓冲区大小,但我想知道是否有其他方法?
I am reading data from a microcontroller via serial, at a baudrate of 921600. I'm reading a large amount of ASCII csv data, and since it comes in so fast, the buffer get's filled and all the rest of the data gets lost before I can read it. I know I could manually edit the pyserial source code for serialwin32 to increase the buffer size, but I was wondering if there is another way around it?
我只能估计我将收到的数据量,但大约是 200kB 的数据量.
I can only estimate the amount of data I will receive, but it is somewhere around 200kB of data.
推荐答案
有一个接收缓冲区"滑块,可从设备管理器中的 com 端口属性页面访问.它可以通过端口设置"选项卡上的高级"按钮找到.
There's a "Receive Buffer" slider that's accessible from the com port's Properties Page in Device Manager. It is found by following the Advanced button on the "Port Settings" tab.
更多信息:
http://support.microsoft.com/kb/131016 在标题 接收缓冲区
http://tldp.org/HOWTO/Serial-HOWTO-4.html 在标题中断
试着把它降低一两个档次.
Try knocking it down a notch or two.
这篇关于Pyserial 缓冲区的填充速度比我读的快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Pyserial 缓冲区的填充速度比我读的快


基础教程推荐
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 筛选NumPy数组 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01