Code readingHow-to

How to transfer barcode scans to a PC from a handheld reader

Four ways to transfer barcode scans to a PC from a handheld reader: USB keyboard wedge in real time, batch store-and-dump, serial COM and TCP socket.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01How does a scan get from a handheld reader to a PC?
  2. 02Which path puts scans into a spreadsheet in real time?
  3. 03How do you set up keyboard wedge mode step by step?
  4. 04When should you batch scans instead of streaming them?
  5. 05What if the PC side is a program, not a spreadsheet?
  6. 06Can a phone or tablet do the scanning instead?
  7. 07What goes wrong most often and how do you fix it?
  8. 08Which reader and path should you order?
  9. 09Questions

Set the reader's interface to USB keyboard (HID), program a carriage-return suffix, click the target cell and pull the trigger: each scan lands in the spreadsheet in about 0.2 s and commits itself with Enter. That is the fastest path for a desk, and no driver or application is needed on the PC. If the reader must leave the desk, switch it to batch mode and dump one file at the end of the shift; if the receiver is a program, use a virtual COM port or a TCP socket instead. This guide walks through each of the four paths with its set-up, its numbers and its failure modes, so you can wire a 500-scan session onto the desktop with about two minutes of transfer time.

How does a scan get from a handheld reader to a PC?

Four paths cover every case: USB HID keyboard wedge for real-time typing, batch mode that stores scans in the reader and dumps one file on docking, a serial or virtual COM stream, and a TCP socket over Ethernet or Wi-Fi. Timing picks the path more than volume does: 10,000 scans at 21 bytes each is only about 210 KB, a small file for any of the four. The real question is whether every scan must reach the PC the moment the trigger fires, or can wait for one dump at the end of the shift. Also ask whether the receiver is a person typing into a spreadsheet or a program that cannot lose keyboard focus.

Path Scans arrive Receiving side Distance limit Fits
USB keyboard wedge One scan per trigger, as keystrokes Any application with a cursor 5 m (USB 2.0 cable) A desk, real-time spreadsheet
Batch store-and-dump All at once, on dock or cable Reader transfer utility, CSV out Unlimited in the field Field work, no PC at the shelf
Serial or virtual COM One ASCII line per scan A program reading the port About 15 m at 9600 baud (RS-232) Software that cannot take focus
TCP socket One ASCII line per scan A program listening on a port 100 m per Ethernet run, more over Wi-Fi Fixed stations, shared hosts

Every handheld code reader in the shop speaks at least one of these. The code reader finder filters them by interface — USB, serial or Fast Ethernet — and by wired or wireless connection. The same choice wired to a controller is covered step by step in Barcode scanner input methods to a PLC: serial, USB and Ethernet.

Which path puts scans into a spreadsheet in real time?

Keyboard wedge: the reader identifies itself to the PC as a HID keyboard and types each decoded character into whatever field holds the cursor, finishing with Enter at roughly 10 ms per keystroke — so a 20-character code lands in about 0.2 s. The wedge needs no software on the receiving machine: HID keyboard is a device class the operating system already understands. The suffix that commits each cell is set out in Barcode scanner CR LF suffix: make Enter commit scans in your HMI. The focus problems that come with typing into windows are the same ones behind Barcode scanner keyboard wedge into an HMI: why scans drop over RDP.

The 10 ms figure is the conservative end of keyboard polling, one report per character. Each scan of a 20-character code costs 21 keystrokes including Enter:

time per scan = 21 keystrokes × 10 ms = 210 ms ≈ 0.2 s transfer time for 500 scans = 500 × 0.21 s = 105 s ≈ 1.8 min

An operator moving containers scans one every 2-3 s, so 500 scans take 17-25 minutes of handling. The 1.8 minutes of transfer hides inside that with room to spare. Add tens of milliseconds of decode on a clean label and the conclusion holds: at human pace the wedge never becomes the bottleneck.

For a desk that stays cabled, either of these wired USB readers covers the whole wedge path:

Handheld code readersHikrobot MV-IDH2000P/13NR/05RN/U Industial Wired Handheld Code ReaderMV-IDH2000P/13NR/05RN/U
Interface
USB
Connection
Wired
$179.00View part
Handheld code readersHikrobot MV-IDH5000P/13SR/04RN/U General-purpose wired industrial handheld code readerMV-IDH5000P/13SR/04RN/U
Interface
USB
Connection
Wired
$719.00View part

How do you set up keyboard wedge mode step by step?

Plug the reader into a USB port, put the cursor in the receiving cell or field, and pull the trigger. No driver and no application to install, because HID keyboard is a device class the operating system already understands. The set-up lives in the reader, not the PC, and it comes down to five checks.

  1. Set the interface. In the reader's own configuration — its setup utility or its printed configuration barcodes — select the USB keyboard interface. The reader re-enumerates as a keyboard within a second or two of the next plug-in.
  2. Set the suffix to Enter (carriage return). This is what commits the cell; add a line feed only when the target wants both bytes.
  3. Open the spreadsheet and click the first cell of the target column.
  4. Scan one label. The code should land in the cell and the cursor should step down one row.
  5. Scan ten labels in a row. Look for ten complete rows: no truncation, no doubles, no shifted punctuation.

When should you batch scans instead of streaming them?

Batch mode serves the shelf with no PC beside it: the reader writes every decode with its clock time to internal memory, and you dock or cable it later. One file lands on the desktop — 500 scans at 21 bytes each is about 10.5 KB, small enough to email. It is the path for cold rooms, racking aisles, loading docks and delivery rounds, where a cable would be dragged, tripped over or left behind.

Three reader settings decide whether a session survives. Set what happens when memory fills: choose stop, and empty the reader more often, rather than silently overwriting the oldest codes. Turn on duplicate suppression so a rescanned label does not become two rows. Set the reader's clock before the shift starts, because it stamps every decode.

The dump itself is uneventful: dock the reader or plug it in, run its transfer utility, and export the file as CSV — many readers also enumerate as a drive or serial device for the same job.

dump size = scans × (20 characters + 1 CR byte) = scans × 21 B 500 scans: 500 × 21 B = 10,500 B ≈ 10.5 KB 10,000 scans: 10,000 × 21 B = 210,000 B ≈ 210 KB

Ten thousand scans fit in an email attachment; the bottleneck is walking back to the desk, not the transfer. Field duty is also hard on housings, so reader covers and protective parts are worth a look in the code reader accessories.

A route or a store without a PC wants a wireless package built for exactly this:

Handheld code readersHikrobot MV-IDH9000B/13DP/04RP/LS Ultra-rugged Wireless Handheld Code Reader PackageMV-IDH9000B/13DP/04RP/LS
Connection
Wireless
$2,979.00 · quotedView and quote

That ultra-rugged wireless package is the pattern to look for: scan all shift in the field, upload once at the dock.

What if the PC side is a program, not a spreadsheet?

Pick serial or TCP when the receiver is a program. The reader sends one ASCII line per decode to a COM port or a socket, and your code owns the data with no keyboard focus to lose. Distance stretches from USB's 5 m to Ethernet's 100 m per run.

Over the same USB cable, most readers can enumerate as a virtual COM port instead of a keyboard: your program opens the port at the baud rate set in the reader and receives one clean line per scan. Over the network, the reader either connects out as a TCP client to your listener or listens as a server that you connect to, with lines ending in CR LF. Wi-Fi readers join existing access points, so the link reaches across the site without new cable. The client-server wiring is laid out for a controller in Barcode reader as TCP server: wire your PLC as the client. The interface wiring options are compared in Barcode scanner interface to a PLC: Ethernet, serial or USB.

A fixed station that feeds a program wants Ethernet, wired where a cable runs and wireless where it cannot:

Handheld code readersHikrobot MV-IDH3000/13NR/05RN/LE Industrial Wired Handheld Code Reader (IP LAN)MV-IDH3000/13NR/05RN/LE
Interface
Fast Ethernet
Connection
Wired
$379.00View part
Handheld code readersHandheld industrial barcode reader, 1.0 MP (LS-HCR-0002)LS-HCR-0002
Resolution
Up to 3 MP
Shutter
Global
$539.00View part

The first is the wired Fast Ethernet choice for a cabled station. The second pairs a wireless connection with an Ethernet interface, so the scanner roams while the socket stays put.

Can a phone or tablet do the scanning instead?

Yes, with a trade: an Android handheld running a scanning camera app types decodes straight into a sheet or notepad, and the file reaches the desktop by sync or email. But each scan costs a focus-and-decode beat that a purpose-built reader does not. Count on roughly half a second or more per scan once autofocus settles, against the reader's near-instant decode-and-type. At half a second, a 500-container session spends 500 × 0.5 s ≈ 4 minutes on focus alone, before retries on glare or curved surfaces. The camera path earns its keep for occasional scans of undamaged labels on a shared device. If you build the phone side yourself, Android barcode scanning without a scanner app: your own preview loop shows the camera route in code.

What goes wrong most often and how do you fix it?

Three faults cause most failed transfers: keystrokes landing in the wrong window because focus moved, scans concatenating inside one cell because the Enter suffix is missing, and doubled rows because the same label was scanned twice. All three are reader or focus settings, not spreadsheet problems. A ten-scan test before the shift catches every one of them.

Symptom Likely cause Test Fix
Scans concatenate in one cell Enter suffix missing Scan into a plain text editor, look for line breaks Set the suffix to CR (Enter)
Codes land in the wrong window Keyboard focus moved Watch the cursor while scanning Re-click the target cell; keep the window frontmost
Same code appears twice Duplicate suppression off Scan one label twice, quickly Turn on duplicate-code suppression in the reader
Punctuation arrives shifted Keyboard layout mismatch Scan a code containing dashes or slashes Match the reader's layout to the host's
Batch dump empty or short Reader still in streaming mode Check the active mode before the route starts Switch to batch and set the memory-full behavior

Which reader and path should you order?

Decide with two answers: real time or batch, and person or program. A desk spreadsheet takes a wired USB reader in keyboard mode. A field store takes a wireless reader with batch memory. A fixed program host takes Ethernet, wired or wireless.

  • Real time at one desk: the wired USB pair in the wedge section — keyboard mode, Enter suffix, the five-step set-up above.
  • Field store or delivery round, one upload per shift: the wireless package in the batch section — stop-on-full, duplicate suppression, clock set before the route.
  • Fixed station feeding software or a controller: the Ethernet pair in the program section — wired Fast Ethernet where a cable runs, wireless Ethernet where it does not.

Filter by interface and connection in the reader finder above, or ask the applications team with your scan count per shift and the software on the receiving end. More transfer and wiring recipes sit on the code reading topic page.

Questions

Do I need to install software before a handheld reader works with my spreadsheet?

No, not for the keyboard path. The reader presents itself as a USB HID keyboard, a device class Windows, Linux and macOS already carry, so you only set the interface mode and the Enter suffix in the reader itself. The batch, serial and TCP paths do need a program: the reader's transfer utility or whatever application listens for the data.

How do I capture the date and time of each scan?

In batch mode the reader stamps every decode with its own clock, so set that clock before the shift and the timestamps arrive inside the dump file. In real-time wedge mode the reader sends no time of day; the PC clock is the authority, and you stamp arrival with a worksheet formula or in the receiving program.

Can one handheld reader feed two PCs?

Not at the same time over one cable: a USB or serial reader talks to a single host. Swapping the cable between desks works but invites focus surprises. Two fixed stations each deserve their own reader, which also removes the walking, the re-pairing and the queue at a shared scanner.

What suffix should each scan end with?

A carriage return, which spreadsheets treat as Enter: the cell commits and the cursor steps down one row. Send CR LF instead when the target is a text file or a program that frames lines on both bytes. The suffix is a one-time setting in the reader, not in the spreadsheet, so program it once and leave it.

How long does a batch dump of a full shift take?

Seconds. Ten thousand 20-character codes with one line-ending byte each are about 210 KB, which crosses USB or Ethernet in well under a minute at any modern link speed. The real cost is walking the reader back to the desk, and that is exactly why scan frequency should decide between batch and real time.