Socket ScanAPI Reference
If the scanner is a 2D Imager scanner, 7X series, the connect barcode can be scanned
directly from the device screen. This can be accomplished through the use of Socket
EZ Pair which is a separate application released with the SDK.
If the scanner is a 1D Laser scanner, 7 series, the connect barcode must be printed
out on paper. Socket EZ Pair can configure the scanner to have it connect back to the
host without the need to scan a connect barcode. In this case, the 1D scanner must
be paired with the host first using the Bluetooth functionality present on the host.
The connect barcode contains the Bluetooth Device Address of the host. It could be a
Data Matrix 2D barcode for the 2D Imager scanner 7x series, or it could be a Code
128 1D barcode for the 1D Laser scanner 7 series. The 1D connect barcode can also
be used by the 2D Imager scanner 7x series. Refer to the scanner documentation for
more information about the connect barcode.
Some hosts require having their Bluetooth mode set to discoverable in order to
accept the first initial connection.
If the host is an iOS device, the connect barcode doesn't contain the host Bluetooth
address, as iOS does not provide an API to retrieve the Bluetooth address, but
instead contains a command to switch the CHS into 'iOS mode'. The initial
connection can be then started from the iOS Bluetooth manager by tapping on the
desired CHS listed in the Bluetooth discovered devices list. This will initiate the
pairing process and the CHS will connect back to the iOS device as soon as it is
powered on and do this until its connection information is cleared.
8.2 Subsequent Connection
Once the initial connection is made between the scanner and the host, the scanner
will automatically reconnect to the host each time it powers on. If the host doesn't
have a ScanAPI application running at the time the scanner connects, the scanner
will try a certain number of times before aborting the connection process.
ScanAPI sends a device arrival notification to the application each time a scanner
connects to the host.
8.3 Reconnection
If the connection between the scanner and host is lost for any reason, such as the
scanner moving out of range of the host, the host suspending or going to sleep, the
scanner will try to reconnect to the host for a period of time (45 seconds for a 7X
CHS) or a fixed number of times (30 times for a 7(E,M,P)CHS) before going to idle
mode.
8.4 Disconnection
The disconnection process usually only happens when the scanner powers off. This
occurs when the user presses the scanner power button to shut it down, or if the
© 2013 Socket Mobile, Inc.
39/152
Need help?
Do you have a question about the ScanAPI and is the answer not in the manual?