Solved

Barcode scanner only works properly on hyperterminal

Posted on 2011-02-28
7
2,227 Views
Last Modified: 2012-05-11
My friend have symbol scanner that is being used to scan barcodes. Unfortunately it works properly on Hyper-terminal program (Classic windows xp). But on the program that i have implemented, The barcode reads some of the numbers and others are characters and does not recognize those numbers.
I also used some other appilcations that uses SerialComport to read data, and it also outputs the same bad data characters.
Below is the sample output

example:
Good result:  789001     << from hyperterminal (windows xp)
Bad result:     7?9??1    << from my program and other latest SerialCom reader software.

What could be the problem? thanks guys God Bless
0
Comment
Question by:stijohnforever
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 12

Assisted Solution

by:NormanMaina
NormanMaina earned 50 total points
ID: 34996475
If I were you ,i'd just get a rs232 to usb converter (they are cheap) and then you will not need to read the serial port.

But you can also check the port settings that the hyper terminal is using to connect to your serial port are the same as your program.
0
 
LVL 6

Assisted Solution

by:LeeeRussell
LeeeRussell earned 200 total points
ID: 34998200
I think you should check if the parity bit settings are the same in your software and the hyperterminal.
0
 
LVL 12

Accepted Solution

by:
Hairbrush earned 250 total points
ID: 35005526
NormanMaina - all an "rs232 to USB converter" does is add a serial port to a computer that (typically) does not have any serial ports.  The software still talks to the hardware device in the same way, and in the driver settings you'd still need to configure the baud rate, data bits, parity bits and stop bits to be compatible with the device.

I agree with Lee - if data is being lost or corrupted it is probably those settings that are incorrect in both your application and SerialCom (but correct in HyperTerminal).  I suggest you compare the settings in each application.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 6

Assisted Solution

by:LeeeRussell
LeeeRussell earned 200 total points
ID: 35005600
and I suggested parity bit because if the example you give is a real example - you appear to be only losing the transmissions of even numbers (although I suppose this could also be due to the difference between 7-bit and 8-bit transmission).

Fundamentally, you need to make sure that the settings for the serial connection are *exactly* the same in hyperterminal and your software.
0
 
LVL 1

Author Comment

by:stijohnforever
ID: 35005677
Thanks to all of you guys for your comments and suggestions, And yes that's the first thing i did, configure those settings before i made this thread, but still to no avail. Anyways after hours of configuring and downloading similar software. Ive created program code on my own, to sniff data on a textfile from the Hyperterminal Data log. Which works the same way. God bless to all Below is my simple program.


 The result
0
 
LVL 1

Author Closing Comment

by:stijohnforever
ID: 35005709
Ive managed on my own, and also i greatly considered the comments of the experts.
0
 
LVL 12

Expert Comment

by:NormanMaina
ID: 35009936
Hairbrush:>what a barcode scanner does is basically emulate the keyboard -most barcode scanners are usb and plub and play -in this case,the author had a serial port barcode scanner - with a serial to usb converter you will not have to read the serial port -you'll only have to make the text input box have focus and then point the scanner to the barcode -it will pick the barcode(most metrologic and symbol scanners do without having to press anything) and it will paste the barcode into the control.

stijohnforever:>reading the log is not 100% accurate and you'll find this out with time..you'll have to ensure that barcode numbers are unique in your database so that for any reason the log isnt written or HT is not running,you do not read the last record over and over again
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Nadia
Suppose you use Uber application as a rider and you request a ride to go from one place to another. Your driver just arrived at the parking lot of your place. The only thing you know about the ride is the license plate number. How do you find your U…
The greatest common divisor (gcd) of two positive integers is their largest common divisor. Let's consider two numbers 12 and 20. The divisors of 12 are 1, 2, 3, 4, 6, 12 The divisors of 20 are 1, 2, 4, 5, 10 20 The highest number among the c…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question