Ashesman

OK, this may not even be a .net issue, but someone may be able to help...

I am using SerialPort class to do data transfer between a PC and embedded device. When I use a direct serial connection everything works just grand, but when I use a USB-Serial converter it all turns sour. Basically it seems from my debugging that extra characters are appearing in the receive buffer... I use the DiscardInBuffer method before sending a request comand to the embedded device. Then I read received bytes... when using USB to serial converter, sometimes extra bytes appear ahead of my expected received bytes !!!

Anyone got any ideas


Re: .NET Base Class Library SerialPort doing sone funny stuff...

nobugz

You shouldn't use DiscardInBuffer(). Whether or not it will discard anything critically depends on timing. And the timing for the USB device is no doubt different...