The text of a manual · part 2 of 11
HT Series/PA Series/RH Series Programming Manual, pages 7 to 16
Pages 7 to 16 of 98
The original document is the PDF (1.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Unitech HT660 and Unitech HT680
Page 7
8.22
Get Reader’s Firmware Version ........................................................................................................................... 70
8.23
Get Reader’s LBT Setting ...................................................................................................................................... 70
8.24
Set Reader’s LBT Setting....................................................................................................................................... 70
9
UHF READER FOR KITTY .................................................................................................. 71
9.1
Kitty RFID Reader API Reference............................................................................................................................. 71
9.2 Interface Management ................................................................................................................................................ 71 9.2.1 Initializing the RFID Reader Interface ................................................................................................................. 71 9.2.2 Shutting Down the RFID Reader Interface ......................................................................................................... 71 9.3 RFID Reader Configuration ....................................................................................................................................... 72 9.3.1 Open RFID Reader ................................................................................................................................................ 72 9.3.2 Close RFID Reader ............................................................................................................................................... 72 9.3.3 Set the Operation Mode for the RFID Reader ................................................................................................... 72 9.3.4 Get the Operation Mode for the RFID Reader ................................................................................................... 72 9.3.5 Set the Response Data’s Mode of the RFID Reader ........................................................................................ 73 9.3.6 Get the Response Data’s Mode of the RFID Reader ....................................................................................... 73 9.3.7 Set the RFID Reaer’s Power State ...................................................................................................................... 73 9.3.8 Get the RFID Reader’s Power State ................................................................................................................... 73 9.3.9 Set the RFID Reader’s Low-Level Parameter.................................................................................................... 73 9.3.10 Get the RFID Reader’s Low-Level Parameter ................................................................................................... 74 9.4 Antenna Port Configuration ...................................................................................................................................... 74 9.4.1 Enabling and Disabling Anennas ......................................................................................................................... 74 9.4.2 Get the RFID Reader’s Antenna-Port Status ..................................................................................................... 74 9.4.3 Configuring Antenna-Port Parameters ................................................................................................................ 74 9.4.4 Retrieving Antenna-Port Configuration ............................................................................................................... 75 9.5 ISO 18000-6C Tag Access.......................................................................................................................................... 75 9.5.1 Callback function .................................................................................................................................................... 75 9.5.2 Get Antenna’s Response Status .......................................................................................................................... 76 9.5.3 Get Tag Access Response Data ......................................................................................................................... 76 9.5.4 Set Tag Operation Stop Count ............................................................................................................................. 76 9.5.5 Get Tag Operation Stop Count ............................................................................................................................ 76 9.5.6 Tag Inventory Operation ....................................................................................................................................... 77 9.5.7 Tag Read Operation .............................................................................................................................................. 77 9.5.8 Tag Write Operation .............................................................................................................................................. 77 9.5.9 Modify EPC Operation ........................................................................................................................................... 78 9.5.10 Tag Kill Operation .................................................................................................................................................. 78 9.5.11 Tag Lock Operation ............................................................................................................................................... 78 9.5.12 Tag Pre-singulation Operation ............................................................................................................................. 78 9.5.13 Tag Post Singulation Operation ........................................................................................................................... 79 9.5.14 Tag Query Group Operation ................................................................................................................................. 79 9.5.15 Set Current Singulation Algorithm ....................................................................................................................... 79 9.5.16 Specifying Singulation Algorithm Parameters .................................................................................................... 79 9.5.17 Cancelling a Tag Operation .................................................................................................................................. 80 9.5.18 Aborting a Tag Operation...................................................................................................................................... 80 9.5.19 Clear RFID Reader Module’s Error State ........................................................................................................... 80 9.5.20 Ability of Hold or Discard the Duplicate Tags ..................................................................................................... 80 9.6 Other APIs...................................................................................................................................................................... 80 9.6.1 Get RFID Reader’s Firmware Version ................................................................................................................ 80 -7 -
Page 8
9.7 Structure of the Library .............................................................................................................................................. 81 9.7.1 RFID_ANTENNA_PORT_CONFIG ..................................................................................................................... 81 9.7.2 ACCESS_STATUS ................................................................................................................................................ 82 9.7.3 ANTENNA_STATUS ............................................................................................................................................. 82 9.7.4 ACCESS_DATA ..................................................................................................................................................... 83 9.7.5 RFID_INVENTORY ............................................................................................................................................... 83 9.7.6 RFID_READ ........................................................................................................................................................... 84 9.7.7 RFID_READ_EX .................................................................................................................................................... 84 9.7.8 RFID_WRITE ......................................................................................................................................................... 85 9.7.9 RFID_WRITE_EX .................................................................................................................................................. 86 9.7.10 RFID_WRITE_EPC ............................................................................................................................................... 86 9.7.11 RFID_KILL .............................................................................................................................................................. 87 9.7.12 RFID_KILL_EX ....................................................................................................................................................... 87 9.7.13 RFID_LOCK ............................................................................................................................................................ 88 9.7.14 RFID_LOCK_EX .................................................................................................................................................... 89 9.7.15 RFID_SELECT_CRITERIA .................................................................................................................................. 89 9.7.16 RFID_POST_SINGULATION............................................................................................................................... 90 9.8
Error Code ..................................................................................................................................................................... 91
9.9 Support Dot Net Compact Framework ................................................................................................................... 93 9.9.1 Class “R1000Reader” ............................................................................................................................................ 93 9.9.2 Programming Model .............................................................................................................................................. 93
10
USEFUL FUNCTION CALL – WITHOUT INCLUDE SYSIOAPI.DLL ............................... 94
10.1.1
Warm-boot. Cold-boot and power off .................................................................................................................. 94
11
GET DEVICE ID ................................................................................................................ 94
12
GET OEM INFO ................................................................................................................ 95
13
GET FIRMWARE AND BOOTLOADER VERSION INFO ................................................. 95
14
CAMERA SDK .................................................................................................................. 96
15
FINGERPRINT RELATED FUNCTIONS .......................................................................... 96
16
GPS RELATED FUNCTIONS ........................................................................................... 96
17
USI .NET COMPACT FRAMEWORK COMPONENT ....................................................... 96
18
USI ACTIVEX CONTROL ................................................................................................. 97
18.1
Register Control ....................................................................................................................................................... 97
18.2
Embedded to html ................................................................................................................................................... 97
18.3
Operate control by script language .................................................................................................................... 97
19
32WAN GPRS LIBRARY .................................................................................................. 97 -8 -
Page 9
20
UPDATE NOTES .............................................................................................................. 98
-9 -
Page 10
1
Introduction Note : This manual only supports WinCE and Windows Mobile System.
1.1 How to download data from scanner The major difference between the HT_Series/PA_Series/RH_Series and a standard HPC/PalmPC is barcode input capability. The WinCE Reference Manual contains no information regarding barcode input. This section will introduce the programming structure of the barcode sub-system and the programming utility library for the device. Inside the device there is an advanced decoding chip to control SE900 laser engine and to handle barcode decoding. Below is system diagram for the device’s barcode: Laser Engine
Advanced Decoder Chip
COM Port
CPU
According to the above diagram, the device communicates with Decoder Chip by mean of serial port. Its communication parameter is fixed on 38400,N,8.1. Normally, the Decoder Chip is in sleep mode when COM port is not activated. When COM port is activated, the Decoder Chip will start working, and it will decode the barcode “signal” from the laser engine when the trigger key is pressed. After decoding, barcode data and its symbology type will be sent directly to the device. Many programmers find it difficult to control the Decoder Chip via programming language alone, especially if they are not familiar with barcode and serial port controls. Because of this, Unitech provides the following utility library and program for the user or application programmer to control the Decoder Chip: 1. Application program “Scan2Key.exe” is a useful application program that can read input data from the laser scanner and then directly input the data into device’s keyboard buffer. “Scan2Key.exe” makes barcode data input simple, and can be especially valuable to those programmers not familiar with COM port programming. User program simply reads the barcode data from the keyboard. For barcode symbologies setting, you can run Scanner Setting from Control Panel to define all of supporting symbologies and delimiter. 2. Utility library: For programming control, HT6xx/PA96x/PA982 provides USI.DLL to let user control scanner input, symbologies setting and profile controlling. Please refer to 2 for detail API lists. USI.DLL is Unitech’s new scanner function library on the device. For backward compatible issue, Unitech still provide Scanner3.DLL and ScanKey3.DLL for existing PT930/PT930SA user to port their software into the device, but several APIs on Scanner3.DLL and ScanKey3.DLL have already been removed on the other devices.
10 -
Page 11
1.2 COM definition for HT Series/PA Series/RH Series General: COM 1 Physical full RS232 port (ActiveSync) COM 2 Scanner (Hamster) or RFID reader COM 3 IrComm COM 4 USB client COM 5 IrDA or Bluetooth COM 6 Reserve COM 7 Bluetooth Printer COM 8 Bluetooth Modem COM 9 Bluetooth ActiveSync PA968: COM 0 USB modem COM 1 Bluetooth COM 2 Scanner (Hamster) or RFID reader COM 3 Reserve COM 4 Reserve COM 5 GPS COM 6 Reserve COM 7 Bluetooth Printer COM 8 Bluetooth Modem COM 9 Bluetooth ActiveSync HT680: COM 1 Bluetooth COM 2 Scanner (Hamster) COM 3 Reserve COM 4 USB Client COM 5 Reserve COM 6 GPRS COM 7 Bluetooth Printer COM 8 Bluetooth Modem COM 9 Bluetooth ActiveSync
11 -
Page 12
PA600 : Mobile Version: COM 0 USB to serial COM 1 Reserve COM 2 Bluetooth COM 3 IrDAComm COM 4 Scanner (Hamster) COM 5 BTModem COM 6 USB client COM 7 Reserve COM 8 Reserve COM 9 RawIR / RFID CE Version: COM 0 COM 1 COM 2 COM 3 COM 4 COM 5 COM 6 COM 7 COM 8 COM 9 PA968II/PA690 : COM 0 COM 1 COM 2 COM 3 COM 4 COM 5 COM 6 COM 7 COM 8 COM 9
USB to serial Bluetooth RFID/Scanner (Hamster) IrDAComm USBClient RawIR Reserve BT Modem BT Printer BT ActiveSync Scanner (Hamster) USB to serial Bluetooth Reserve GPS(Virtual Port) BT Modem USB client Bluetooth BTHATCI server Reserve Reserve
PA550 : COM 0 COM 1 COM 2 COM 3 COM 4 COM 5 COM 6 COM 7 COM 8 COM 9
Scanner (Hamster) USB to serial Bluetooth GPS GPS(Virtual Port) BT Modem USB Client Bluetooth BTHATCI server Reserve Reserve 12 -
Page 13
PA500II: COM 0 COM 1 COM 2 COM 3 COM 4 COM 5 COM 6 COM 7 COM 8 COM 9
Scanner (Hamster) USB to serial Bluetooth Reserve Reserve BT Modem USB Client Bluetooth BTHATCI server Reserve Reserve
13 -
Page 14
1.3 Get SDK from unitech? You can get WinCE SDK from below URL HT660 HT680 HT660II/660e HT660IICore PA962/963 PA966/967 PA968 PA982 RH767 PA600
SDK http://w3.tw.ute.com/pub/cs/sdk/ht660/HT660SDK.zip SDK http://w3.tw.ute.com/pub/cs/sdk/HT680/HT680SDK.zip SDK http://w3.tw.ute.com/pub/cs/SDK/HT660II/HT660eSDK.zip SDK http://w3.tw.ute.com/pub/cs/SDK/HT660II/HT660IICore.zip SDK http://w3.tw.ute.com/pub/cs/sdk/pa962/pa962sdk.zip SDK http://w3.tw.ute.com/pub/cs/sdk/pa966/pa966sdk.zip SDK http://w3.tw.ute.com/pub/cs/sdk/pa968/pa968sdk.zip SDK http://w3.tw.ute.com/pub/cs/sdk/pa982/Pa982SDK.zip SDK http://w3.tw.ute.com/pub/cs/sdk/RH767/RH767_CE5_SDK.zip SDK http://w3.tw.ute.com/pub/cs/SDK/PA600/PA600_CE5_SDK.zip
14 -
Page 15
2 USI.DLL – Unitech Scanner Interface DLL The link includes the sample program and SDK for USI. http://w3.tw.ute.com/pub/cs/SDK/USI/USISDK.zip Note : For programming, it need to dynamically load DLL for using Unitech built-in DLL (Unitech will not provide *.H and *.LIB for compiler for Windows Mobile OS), please refer to Chapter 5 for programming guide.
2.1 Register the application to the USI DLL Function Description: Register the application to the USI DLL, so that the DLL can communicate with the application. It will also open and initial scanner port (COM2, for example) and set the scanner to the working mode. The application should call USI_Unregister to unregister from the DLL after done with the scanner. Function call: BOOL USI_Register(HWND hwnd, UINT msgID); Parameter: (input)
hwnd: Handle of the window to which USI DLL will send messages to report all activities, including error messages, scan data ready, etc. msgID: Specifies the message to be posted. DLL will post messages by calling: PostMessage(hwnd, msgID, msg, param). The window procedure will receive custom message about msgID and wParam parameter can be one of the followings: SM_ERROR_SYS: Indicates a system error, which is caused by a call to the system function. Param contains the error code from GetLastEror(). SM_ERROR
Indicates an error. Param contains the cause of error, which can be on of followings:
SERR_INVALID_HWND: SERR_INVALID_MSGID: SERR_OPEN_SCANNER: SERR_CHECKSUM: SERR_DATALOST:
Invalid window handle. msgID cannot be 0. Open or initial scanner port failed. Checksum error in received packet. New scan data is lost because data buffer is not empty. SERR_BUFFEROVERFLOW: Data buffer overflow. The default size is 4K bytes. SM_REPLY Indicates received a reply. All the responses from the scanner except the scan data will be notified by this message. SM_DATAREADY
Indicates that scan data is successfully decoded and ready to retrieve.
SM_ACK
Indicates received a ACK.
SM_NAK
Indicates received a NAK.
SM_NOREAD
Indicates received a No-Read packet.
Note: Scanner port settings are defined in registry as described below: [HKEY_LOCAL_MACHINE\SOFTWARE\Unitech America Inc.\Scanner\Settings] "COMPORT"="COM2:" "BAUDRATE"="38400" "STOPBITS"="1" "PARITY"="None" "CHECKPARITY"="1" Return: BOOL:
TRUE : OK FALSE : Failure 15 -
Page 16
2.2 Unregister the application from the USI.DLL Function Description: Unregister the application from the DLL. It will close the scanner port, and by default it will disable the scanner. Function call: void USI_Unregister(); Return code: None
2.3 Enable / Disable Scanner Function Description: To start or stop USI function. This function is useful for application to temporarily stop scanner function if it is only need keypad input or keep clear input buffer. Function call: BOOL USI_EnableScan(BOOL bStatus); Parameter: (input)
bStatus: Return: BOOL :
TRUE FALSE
: Enable Scanner : Disable Scanner
TRUE : OK FALSE : Failure
2.4 Reset Scanner Function Description: Set the scanner to the working mode, and reset the communication control. Function call: BOOL USI_Reset(); Return: Always TRUE
2.5 Get error code Function Description: Returns the error code (SERR_***). Function call: DWORD USI_GetError(); Return: Returns the error code (SERR_***), which has been described in USI_Register function.
16 -