473,503 Members | 7,823 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you read data from a USB port?

Is there a good source of information on how to read a USB port, in
particular reading data from a BarCode reader?
Nov 21 '05 #1
5 18178
reffer to the BarCode readers documentation.

If I had to wager , windows should recognize the BCR as an input device &
may simply 'type' the codes in as if they came from a keyboard when
scanned..........


"Darrell Wesley" <Da***********@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
Is there a good source of information on how to read a USB port, in
particular reading data from a BarCode reader?

Nov 21 '05 #2
reffer to the BarCode readers documentation.

If I had to wager , windows should recognize the BCR as an input device &
may simply 'type' the codes in as if they came from a keyboard when
scanned..........


"Darrell Wesley" <Da***********@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
Is there a good source of information on how to read a USB port, in
particular reading data from a BarCode reader?

Nov 21 '05 #3
You cannot read from a USB port the way you can from a serial or parallel
port. You must open a handle to the device attached to the USB. To do that
you need to know information about the device from the manufacturer or what
standard interface class it uses.

Marc Reinig
System Solutions

"Darrell Wesley" <Da***********@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
Is there a good source of information on how to read a USB port, in
particular reading data from a BarCode reader?

Nov 21 '05 #4
You cannot read from a USB port the way you can from a serial or parallel
port. You must open a handle to the device attached to the USB. To do that
you need to know information about the device from the manufacturer or what
standard interface class it uses.

Marc Reinig
System Solutions

"Darrell Wesley" <Da***********@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
Is there a good source of information on how to read a USB port, in
particular reading data from a BarCode reader?

Nov 21 '05 #5
Bar code scanners that have a USB interface normally work one of two
ways.
The first is that the scanner will identify itself as a "keyboard"
device to Windows and when you scan a bar code, the data will go into
the PC as if it were being typed in on the keyboard.
The second way that they can work is to emulate a COM port. If your
bar code scanner came with a "driver" disk, then this is most likely
how it works. After you install the driver and connect the scanner to
the PC, Windows will think that it has another COM port. The COM port
will actually be a "virtual" com port that was created by the driver
and you would then need to run software that open the new virtual COM
port to read in the data from the scanner. One product that is
designed for this is called BC-Wedge and you can download a demo
version of it from:
http://www.taltech.com/products/bcwedge.html

BCWedge is a "software wedge" program that runs in the background and
opens up a COM port (either a real COM port or a Virtual COM port) and
when it receives data from the COM port (i.e. when you scan a bar code
with your bar code scanner) it feeds the data to other Windows
programs by stuffing the keyboard buffer so that the data appears as
if it is being typed in on the keyboard.

You may want to check the documentation that came with your USB bar
code scanner to find out exactly how it is designed to work.

On Wed, 10 Nov 2004 12:53:03 -0800, "Darrell Wesley"
<Da***********@discussions.microsoft.com> wrote:
Is there a good source of information on how to read a USB port, in
particular reading data from a BarCode reader?


Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1675
by: dreamvigile | last post by:
Hi, when recv is used in C to download large (several megabyte) textfiles from an FTP data port, there tend to be discrepancies in the amount of data downloaded (too much, too little...) One of...
6
16997
by: DraguVaso | last post by:
Hi, I'm experimenting with the Serial Port in VB.NET 2005. Although it isn't that easy to get any feedback from my COM-port as I thought it would be... How can I read all the Data that the...
1
8564
by: Tolgay Gül | last post by:
I need some codes that able to send and read data by serialport in VB.Net 2005 beta 2. I wrote some codes and It can send data via serialport but It cannot read what I send. I have looked up on...
6
3575
by: Casey Bralla | last post by:
I'd like to read ASCII data from a serial port, but (once again) I'm having trouble getting started. (Can't seem to find the basic level of docs to get going <sigh>) I'd like to use only...
5
2612
by: Jens | last post by:
Hello, I have been looking for some C-code which listens on a user-defined port for incoming data traffic. When data is received, the data is written to a file. I found some C-code (server)...
4
4612
by: chenatcr | last post by:
Hello, I added a serial-USB converter to my laptop, it appear as USB serial port COM4, and I wrote an application to read 78k data from this port. In my VC++ express code, I defined...
1
3632
by: ghjk | last post by:
I'm write code to read data from GSM modem. but it couldn't read modem response. Could you please help me? I'll post my code. using System; using System.Collections.Generic; using...
2
10389
by: mmrasheed | last post by:
Hi, I am newbie in python. I am working on Telit GM862 GPS/GPRS module which has python interpreter built in. But it seems this problem is pretty much related to general python structure. I...
3
4362
by: cmdolcet69 | last post by:
Im trying to raed data over a com port. The data comes over the serial port as such reading CRLF reading CRLF and so on. The code below only sees the first reading CRLF and then only added that...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4992
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.