April 8, 2010
Page 16
Document#: 6410-00147 K
Revision 2.28
ActivePairing and Permanent Pair features
The ActivePairing feature works only for Socket Bluetooth barcode scanners. When this feature is
activated, ScanAPI listens for an incoming connection from a Socket Bluetooth barcode scanner. The
device scans a special barcode which contains the Bluetooth address of the host computer and tries to
connect to the host.
If the ActivePairing feature cannot start, a wmInsertion message will be sent by ScanAPI with its wParam
set to 1. If this happens, the application should check for this wParam and will not need to open a device
if the wParam value is not 0.
In addition to the ActivePairing feature, a Permanent Pair feature can be used in order to have the
Socket Bluetooth barcode scanner automatically reconnect to the host computer each time the device is
powered on.
The Permanent Pair feature can be turned on by using the new Scanner property APIs
ScanOpenScannerProperty, ScanCloseScannerProperty, ScanGetScannerProperty and
ScanSetScannerProperty, described later in this document.
The property identifier for the Permanent Pair feature is SCAN_PROP_ID_PERMANENT_PAIR and it
accepts a DWORD value that can be 0 to disable Permanent Pair or 1 to enable it.
If a Socket Bluetooth barcode scanner connects to a host computer running ScanAPI that is configured
with Permanent Pair enabled, the device will then be permanently paired to this host. Each time the
device is powered on, it will try to reconnect to this host.
This permanent pair can be broken by several ways. The first way is to disable the Permanent Pair using
the new Scanner property APIs while the device is connected. The second way is to scan a special barcode
with the device to reset its operational mode back into acceptor mode. In acceptor mode, the device
doesn’t try to connect to any host but instead waits for a host to connect.