Connecting Tech Pros Worldwide Help | Site Map

System.IO.Ports.SerialPort Read Issue

  #1  
Old November 21st, 2008, 04:35 PM
Scott McNair
Guest
 
Posts: n/a
I have an external RFID/keypad device that uses a serial port for
communication. Whenever I attempt to read input from the keypad, I run
into the following problem.

Press 1: Nothing appears
Press 2: One appears
Press 3: Two appears
[etc]

I've adjusted the ReceivedBytesThreshold to various things between 0 and
20; 1 works the best but it's still giving me this issue. I also changed
the ReadBufferSize around from its original value of 4096 to numbers as
high as 65536, but with no luck.

Does anybody have any additional suggestions?

Oh, it should be noted for the sake of posterity that when I used the RFID
portion to read an 8-digit code off my RFID card, it correctly reads and
reports the 8-digit code.

Regards,
Scott
  #2  
Old November 21st, 2008, 05:35 PM
Dick Grier
Guest
 
Posts: n/a

re: System.IO.Ports.SerialPort Read Issue


Show your code. There are a couple of things that might be happening. Is
the data binary or ASCII text?

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphics help Ringo answers 2 March 1st, 2007 03:05 PM
Aborting a worker thread with pending IO: safe handle...disposed e =?Utf-8?B?aGVyYmVydA==?= answers 0 January 22nd, 2007 11:05 AM
Simple Example of How to Implement SerialPort Class Ben Kim answers 4 January 10th, 2006 02:35 PM
SerialPort c# .NET 2.0 Joshua Moore answers 0 January 5th, 2006 05:45 PM