Virtual COM in a barcode scanner
Virtual COM (VCOM, USB COM, USB CDC) is a mode in which a scanner connected by USB appears to the computer as a serial port (COM) — as if it were connected with an RS-232 cable. The program then reads scanned codes directly from that port instead of receiving them as keystrokes.
By default, HDWR scanners work in USB HID mode: they type the code like a keyboard into whatever field has the cursor. Switch to Virtual COM only if your software requires it.
When do you need Virtual COM?
- The program reads codes from a COM port — some pharmacy, warehouse (WMS), industrial and older POS programs expect data from a serial port. The settings of such a program usually have a "scanner on COM port" option and a port-number field.
- The computer has no RS-232 socket — Virtual COM replaces a scanner with an RS-232 cable, and the same USB scanner can still return to keyboard mode later.
- Codes must reach the program regardless of the cursor — in COM mode the scanned code goes only to the program listening on the port, even when another window is active.
If your program accepts codes typed from the keyboard (most invoicing, sales and spreadsheet programs), stay in USB HID — it needs no configuration.
In Virtual COM mode, the scanner does not type into Notepad, Excel or a browser. That is expected behaviour, not a fault.
Which HDWR scanners support Virtual COM?
The list of models that can be switched to Virtual COM is on the Which scanner model has...? page. The configuration code is on each model's page, in the interface section.
How to enable Virtual COM
- Open your scanner's page in the sidebar and find the interface code — depending on the model it is called USB Virtual COM, USB COM, USB CDC virtual COM port or Virtual RS232 Port.
- Scan that code. The scanner beeps and reconnects as a serial device.
- On Windows 10 and 11 the port usually works immediately with the system driver. If the device appears with a warning icon, install the driver from your model's page.
- Check the port number (see below) and select it in your program's settings.
To return to the normal mode, scan the USB HID (USB keyboard) code from the same page.
How to check the COM port number
- Windows: open Device Manager → Ports (COM & LPT). The scanner appears as e.g. USB Serial Device (COM3) — the number in brackets is the port you select in the program.
- macOS: the port is visible in Terminal as
/dev/cu.usbmodem…(commandls /dev/cu.*). - Linux: the port is usually
/dev/ttyACM0; the user needs permission to use serial ports (on many distributions thedialoutgroup).
The port number can change when you plug the scanner into a different USB socket. To keep it fixed on Windows: Device Manager → the scanner's port → Properties → Port Settings → Advanced → COM Port Number.
How to test the port
- Close the program that uses the scanner — only one application can open a COM port at a time.
- Open a serial terminal, e.g. PuTTY: connection type Serial, line COM3 (your number), speed 9600.
- Scan any barcode — the code should appear in the terminal window.
With a USB virtual port the speed setting usually does not matter, but if a program asks for serial parameters, start with 9600 baud, 8 data bits, no parity, 1 stop bit (8N1).
Example: a warehouse program reading from a COM port
In programs that read the scanner from a port, the setting usually looks similar. In Weaver WMS, for example: Settings → Application settings → Barcode scanner tab → option Use a barcode scanner connected to a COM port → port number → restart the program. After the restart, scan a product code on a new document to check that it works.
Common problems
- No COM port in Device Manager — the scanner is still in USB HID mode (scan the Virtual COM code again), the cable only charges, or the driver is missing.
- The program reports that the port is busy — another program (or an open terminal) is using the port. Close it and restart the program.
- Codes stopped arriving after replugging — the port number has changed; select the new number or fix it in the port settings.
- The code arrives, but the program does not accept it — the program expects a specific end-of-code character; add a CR (Enter) suffix with the configuration code of your model.
- You want the scanner to type into Notepad again — scan the USB HID code.
Virtual COM FAQ
What is Virtual COM in a barcode scanner?
Do I need a driver for Virtual COM?
Why doesn't the scanner type into Notepad after switching to Virtual COM?
Why did the COM port number change?
Is Virtual COM the same as RS-232?
:::tip Did you know? The RS-232 standard that Virtual COM emulates dates back to 1960 — decades before USB. :::