-
Notifications
You must be signed in to change notification settings - Fork 200
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
COM Port with FILE_TYPE_DISK throwing exception #64
Comments
Thanks for the report. Can you please tell me the device? Why would a COM port say it's a disk? The purpose of this code is to avoid a user trying to open a non-COM device and causing potential damage. |
Does the device show up when using the GetPortNames API? |
I understand it's a little strange. The device is https://www.u-blox.com/en/product/neo-m8u-module. UBlox supplies a 'virtual com port' driver for it. Yes, it shows up when using the GetPortNames API. |
I too am working with a u-blox GPS receiver via a virtual COM port and would like to use SerialPortStream. Is there an ETA for an official fix for this issue? Is the only workaround to recompile the library without the file type check? |
Some devices, e.g. a uBlox is incorrectly registered in Windows as a file device. This prevents the port from being opened. In this case, check as a last resort that the port exists in the registry. If so, then open it anyway. Issue: #64, DOTNET-169
I've created a small patch. Can you please test the branch "feature/issue-64" that it solves your problem? If so, then I'll push it to the v2.x branch and prepare it for the next release. |
Many thanks @jcurl . I have tested the NET Standard 1.5 build of feature/issue-64 and it works fine with my u-blox receiver. |
Some devices, e.g. a uBlox is incorrectly registered in Windows as a file device. This prevents the port from being opened. In this case, check as a last resort that the port exists in the registry. If so, then open it anyway. Issue: jcurl#64, DOTNET-169
Hi, I have recently tried to use your library with a usb-serial converter I've got. I was getting an error when calling Open() 'Wrong file type: COM10'. This comes from here.
There is no problem reading the COM port in Putty, so I tried building the dll myself, with the check commented out and the data comes through fine in the library.
Is the file type being disk unusual, and just a quirk of this device?
Thanks.
The text was updated successfully, but these errors were encountered: