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

Bytes to Read is always 0 #149

Open
Michael-Biernacki opened this issue Aug 6, 2024 · 2 comments
Open

Bytes to Read is always 0 #149

Michael-Biernacki opened this issue Aug 6, 2024 · 2 comments

Comments

@Michael-Biernacki
Copy link

Michael-Biernacki commented Aug 6, 2024

I'm working with an Arduino and attempting to read it in through a COM Port. I have it transmitting a bytes array constantly through the COM port. I have given the same baud rate and the correct COM port to the SerialPortStream() constructor. However, it is showing that there are 0 bytes to read.

I'm working with .NET standard 2.1 and Windows 11. I am also working under version 3.0.0 of this package

@jcurl
Copy link
Owner

jcurl commented Aug 22, 2024

Do you have any logs being captured? As you're using .NET Core, you'll have to programmatically enable the logs. You'll need to read the README.md that tells you how to do this.

You can also try using tools from SysInternals to see the results of the driver APIs.

Also note, that .NET Standard 2.1 isn't the version of the .NET Core you've installed (it's an API revision implemented by all versions of .NET Core 2.1, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0).

@jcurl
Copy link
Owner

jcurl commented Aug 27, 2024

In another comment, note there is no fix as the root cause is unknown. My analysis then was a badly behaving driver that reported a fatal error.

You will need to collect at a minimum .NET logs (see previous comment). You should also use SysInternal tools and look at the device events (e.g. you f there were any unplug events observed or other behaviour).

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

No branches or pull requests

2 participants