9.3
S
CAN
S
END
C
MDTO
CHS()
Prototype:
SCANAPI_API SCAN_RESULT ScanSendCmdtoCHS(HANDLE hScanner, PBYTE paramIn, UINT
paramInLen, DWORD Timeout)
Purpose:
Send Configuration commands to CHS – Battery status inquiry, Self test inquiry (CHS version
information), Friendly Name inquiry, Set Friendly Name, Set Security (PIN, Authentication), Delete
Pairing & Bonding and Set Device configuration. Refer to later sections for more details on
command options.
Arguments:
[in] hScanner is the value received by the client application in lParam of the WM_INSERTION
message specified when ScanInit() was called.
[in] paramIn is a 8 bit buffer containing the parameter number that will be retrieved. In this buffer
the first byte contains the CHS configuration command opcode. The following byte(s) contain the
parameter value. The SCANAPI opcodes for CHS commands are:
#define SET_SECURITY_MODE_CMD
0
#define SET_FRIENDLY_NAME_CMD
1
#define
SET_PIN_CODE_CMD
4
#define SET_DEVICE_CONFIG_CMD
5
#define SET_INDICATORS_CMD
6
#define BATT_CHRG_STATE_INQ_CMD
8
#define FRIENDLY_NAME_INQ_CMD
10
#define DEL_PAIRING_BONDING_CMD
11
For Example to issue a Set Security mode command check the following sample code:
paramIn[0] = SET_SECURITY_MODE_CMD;
paramIn[1] = 0 or 1 or 2;
paramInLen = 2;
Timeout = 3;
ScanSendCmdtoCHS (hScanner, paramIn, paramInLen, Timeout);
[in] paramInLen is the length of the paramIn buffer in bytes
[in] Timeout is the timeout for CHS configuration command response, specified in seconds
Returns:
Upon exit, this will be set to 0 if an error occurs, non-zero value otherwise.
SR_SUCCESS
The operation completed successfully.
April 8, 2010
Page 63
Document#: 6410-00147 K
Revision 2.28