Click here to Skip to main content
15,885,890 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hello Guys,

I am tring to read the information from PrehKeyTec Reader.

In the application that I am reading the input information is using the SerialPort Class.
The problem comes when I read the card and the output come in garbage input :
??x???????p'p\gyG:Ox?gvozovgvoz?~G????{??WrOz_gqzGu????O|??OzpG}\_os??O~p^\gv?q


Where seems to be the problem ?
Posted
Comments
lukeer 17-Apr-14 2:53am    
Have you checked the SerialPort.BaudRate value to be the same as the one used by the external device?
Herman<T>.Instance 17-Apr-14 3:15am    
which encoding is used?
Zhivko Kabaivanov 17-Apr-14 3:29am    
what encoding is using for example the TextBox control?
Herman<T>.Instance 17-Apr-14 4:59am    
it is about the encoding needed to read data from SerialPort in your application. The scanner will use some kind of Encoding, like UTF-8. So your do a SerialPort.ReadExisiting() to a string value but you should do that in combination with encoding

1 solution

You should check out the device documentation in order to:
  1. Set properly the serial communication parameters (speed, parity bits...).
  2. Understand the communication protocol.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900