Connecting Tech Pros Worldwide Forums | Help | Site Map

System.IO.Ports.SerialPort Read Issue

Scott McNair
Guest
 
Posts: n/a
#1: Nov 21 '08
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

Dick Grier
Guest
 
Posts: n/a
#2: Nov 21 '08

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