How to fix a Barcode scanner not working on CF-H2 Toughbook laptop

By | February 7, 2014
Share

H2BarcodeScanner

The Barcode module on the CF-H2 is hard-coded to use COM3. In some cases, this port is occupied by another device, which are soft assignment to COM3 (can be re-assigned to another port). In those cases, the Barcode scanner does not work.  Here is a way to address this issue via a script/batch.

Download Links:

Com3Fix-x64.zip: https://panaconsulting.egnyte.com/h-s/20140207/46IDZOYT7r
Com3Fix-x86.zip: https://panaconsulting.egnyte.com/h-s/20140207/DkjJJy8jSk

Source Code of Batch Script (GitHub Link):

@echo off
If "%PROCESSOR_ARCHITECTURE%" EQU "x86" (
If exist "%SystemRoot%\SysWOW64" (
"%SystemRoot%\sysnative\cmd.exe" /C "%~dpnx0" %1 %2 %3 %4 %5 %6 %7 %8 %9
exit
)
)

cd /d "%~dp0"

REM devcon.exe pulled from "GRMWDK_EN_7600_1.ISO" (WDK)
REM Perform Devcon Remove on AMT device.
"%~dp0devcon.exe" remove "PCI\VEN_8086&DEV_1C3D"

REM Perform Devcon Remove of Serial to USB device
"%~dp0devcon.exe" remove "USB\VID_10C4&PID_EA60*"
"%~dp0devcon.exe" remove "USB\VID_10C4&PID_EA70*"
REM "%~dp0devcon-x86.exe" remove "PCI\VEN_8086&DEV_1C3D"

REM Import Reg that forces Com3 to inUse state.
"%WinDir%\system32\reg.exe" import "%~dp0COM3-InUse.reg"

REM Timeout for 5 seconds to allow device to be fully removed.
timeout /T 5

REM Perform Device Scan to re-Discover AMT device.
"%~dp0devcon.exe" rescan

 

Steps taken by script to fix issue with Com3 conflict:

  1. Utilize devcon.exe to “remove” the device that is occupying Com3, the port hard tied to the barcode scanner.
  2. Import the provided COM3-InUse.REG to force Windows 7 to label Com3 as “InUse”.
  3. Delay the script to allow the system time to fully execute step 1(remove device).
  4. Lately, again utilize devcon.exe to perform a “RESCAN” to pull back any removed devices, which should now assign itself to a different ComPort.

 

/BG

One thought on “How to fix a Barcode scanner not working on CF-H2 Toughbook laptop

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.