Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PySerial slow when setting timeout #391

Open
BrendanSimon opened this issue Nov 14, 2018 · 0 comments
Open

PySerial slow when setting timeout #391

BrendanSimon opened this issue Nov 14, 2018 · 0 comments

Comments

@BrendanSimon
Copy link
Contributor

I have been setting the timeout attribute on my serial object when I know certain operations take longer (e.g. command to erase flash in my device). My API is always setting the timeout attribute, even for small/standard timeout periods.

It seems that setting the timeout attributes takes quite a while on my Win7 box -- approx 0.01 seconds (10ms) !!. Why does it take so long? Is it completely reconstructing the object? Even so, isn't 10ms a long time?

It is double trouble, as I reset the timeout to a default value after the receiving the expected data, which gain introduces another ~10ms delay.

Note: On my Win10 box, setting the timeout attribute takes approx 0.001 seconds (1ms)

Comms on my Win7 box takes x10 longer (i.e. x10 slower) that my Win10 box. It might be driver related perhaps? (STMicroelctronics VCP Driver - for an STM32F4 CDC device)

Does setting the timeout attribute have anything to do with USB Serial Drivers or not. I'm assuming not, but have no idea.

Am I misusing PySerial or is there a bug somewhere?

Thanks, Brendan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant