C# serial communication with u-blox gps

前端 未结 9 1866
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-06 11:12

I have a GPS from u-blox.com with a USB-connection and driver. The driver installs a virual COM port that pops up when you plug the USB in. Using a hyperterminal I can then

9条回答
  •  不要未来只要你来
    2021-01-06 11:41

    The problem is that there is a bug in either the USB Serial port drivers or in Microsofts implementation of their SerialPort classes. I have had the exact same issues with USB to Serial adapters using chips made by Prolific (and hence drivers by Prolific).

    I have not been able to narrow down the issue exactly but now that the .NET Framework source-code is available I will be trying to step into SerialPort and see what the problem is exactly.

    A work around is to use a different Serial access class. Before .Net 2.0 I had written a SerialStream class and for some reason it seems to work fine with these same USB to Serial Adapters that the SerialPort class will not work with.

    You can grab my class at http://www.6bit.com/download/SerialStream.zip I've provided this same code to some fellow GPS programmers over the years and they have also had success with it.

提交回复
热议问题