문제

I working on a solution for device with Serial Port (with USB bridge). Everything is ok except the thing it causes Blue Screen on disconnecting device durin data transfer. And my app doesn't catch any exception about that. Is there any way to handle it? Ask users do not disconnect until data transferred completely is not a way.

I'm using System.IO.Ports.SerialPort class to read data from device.

도움이 되었습니까?

해결책

This is USB bridge problem. This will never happen with real serial port, with well written port driver. Serial port drivers in Windows, Linux and other OS are known as very stable and reliable. At the same time, buggy serial port emulations cause a lot of problems, from crashing a client application to blue screen.

The only thing you can do is to recommend to your customers to work with real serial port or stable port emulation (bridge), and avoid buggy serial port emulations like one you are working with.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top