Click here to Skip to main content
15,881,898 members
Articles / All Topics

Connecting a Bluetooth Barcode Scanner to WinXP with SP2

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
26 Feb 2010CPOL4 min read 16.6K   9  
How to connect a Bluetooth Barcode Scanner without additional software in Windows XP

How to connect a Bluetooth Barcode Scanner without additional software in Windows XP:

  • Incoming or outgoing connection
  • Pairing from SF51 as client with SPP
  • Using accessibility options to simulate keystrokes
  • Cleanup COM port usage
  • Installation of SF51 as HID device

There are several ways to connect your sf51 and your PC. If you have your own application, you should use a serial connection. If you paired the SF51 with an incoming connection on the PC, the scanner will be online, when you open the COM port.

If you don’t own the source of the target application(s), you have to use a solution, that translates the barcodes scanned into keystrokes.

Incoming or Outgoing Connection

In the following, I am talking always about a SF51. Replace this with your Bluetooth Barcode Scanner.

As soon as a connection is created from the host (your PC), the host is responsible for reconnecting the device, if it has gone offline or left the range of the BT waves. This is true for MS HID and outgoing serial connections. If the client (the SF51) initiates the connection, it will automatically reconnect.

If you use third party tools, like Keyport Lite or Keyport BT, these are responsible for reconnecting the SF51. These tools offer some options for auto reconnect. See there documentation for details.

Pairing from SF51 as Client with SPP

To pair a SF51 with your PC, you should follow these steps:

  1. Start EasySet
  2. Create an “administration reset factory defaults” barcode
  3. Create “´Bluetooth parameters – connect/disconnect – compose BT address” and enter the BT address of your PCs BT adapter

Your PC will now notify about the new connection ask for confirmation and the default PIN (0000)

Using Accessibility Options to Simulate Keystrokes

If you connected your SF51 as described in “Pairing from SF51 as client with SPP”, you can use the WinXP Accessibility options to connect the incoming COM port opened by the SF51 as keyboard wedge.

Click Start-Settings-Control Panel and select the Accessibility applet accessibilty1

In the Input Help dialog on the General tab, activate the option for external input help and click [Settings]:

acccessibilityoptions

In the dialog “Settings for SerialKeys …” select the com port, that is connected to your SF51.

acccessibilityoptions2

The com port can be seen in BT devices dialog.

btdevicescomports

If the SF51 is not connected to one of the ports COM1 to COM4, you have to cleanup the COM port usage.

Click [OK] to close and confirm all dialogs. If you now scan, the barcode’s text is sent as keystrokes to the active window. This also works with DOS windows.

Cleanup COM Port Usage

Windows will not free unused COM ports if they have been used in the past with BT devices. The accessibility external input options only allow com1 to com4. To cleanup com ports not in use, open the device manager and then expand the serial and parallel connectors tree.

Select the serial BT port(s) not in use and delete them except for the last!

devicemngrcomports

Right click this last BT serial entry and select properties.

In the properties window, select the connections setting dialog:

devicemngrcomports2

Now click [Advanced...]:

cleanup4

Now select one after the other with ‘(in use)’ except for the ones built in your computer (if any, maybe COM1 and/or COM2) and click OK and confirm the warning dialogs.

devicemngrcomports3

After all, only the hardware com ports should be listed as (in use).

Installation of SF51 as HID Device

First scan “administrator reset factory default” and “Bluetooth parameters – profile for communication – HID keyboard” barcodes created with EasySet either on screen (LCD or TFT) or from a printed config sheet.

Then right click on MS BT symbol in the lower right corner of your WinXP taskbar. Then Select “Add Bluetooth device”. Or open the dialog BT devices and click [Add...].

btdevices1

Your SF51 should not be listed there as here, where it is already installed.

Confirm the check box saying “the device is configured and ready to be recognized” and click [Next].

In the next window, the devices near your PC are searched and will be listed.

Your SF51 should be recognized and listed as here. Select it and then click [next].

btwizard3

With the admin reset, the sf51 uses security and a PIN of ‘0000'. Please check option “Let me choose my own passkey” and enter the PIN ‘0000'. Click [Next] to advance. The wizard will perform the installation and device manager installs the new device.

btwizard4

btwizard5

Now click [Finish] and you are done.

Every barcode you scan with your sf51 from now on will be sent as keystrokes followed by a return to the active WinXP window. This also works with DOS windows:

hid6

A disadvantage of the HID profile is that it does not support automatic reconnect, due to security concerns of Microsoft.

<!-- Social Bookmarks BEGIN --> <!-- Social Bookmarks END -->

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --