[Mono-list] Invalid data from CP2102 USB device

James Boulton j.boulton at veritide.com
Mon Apr 12 18:33:25 EDT 2010


I used BytesToRead to set up a loop then used

tmpByte[i] =(byte) comport.ReadByte();

This worked for me. I may have tried Read() but for some reason ( that I
can't remember ) settled for ReadByte.


On Mon, 2010-04-12 at 12:09 -0800, Steve Ricketts wrote:
> Makes sense... However, I changed comport.Read(buffer, 0, bytes); where
> buffer is byte[] to comport.Read(cBuffer, 0, bytes); where cBuffer is
> char[].  Now, I get 8 bytes to be read but they are all 0's!  What have I
> messed up now? ;-)
> sr

James Boulton
Electronics Engineer

Veritide Ltd
Kenton Chambers
Suite 407/408, Level 4
190 Hereford St,
Christchurch 8011
New Zealand

PO Box 13-769
Christchurch 8141
New Zealand

Phone: +64 3 3723506
Fax: +64 3 3723508
Email: j.boulton at veritide.com
Web: www.veritide.com

Important: This email contains information which is confidential and 
that may be subject to legal privilege. If you are not the intended 
recipient, you must not read, use, disseminate, distribute or copy this 
email or its attachments. If you have received this in error, please 
inform us immediately by return email, facsimile or by telephone and 
delete this email.

More information about the Mono-list mailing list