2.1 Register the application to the USI DLL ................................................................................................................13
2.2 Unregister the application from the USI.DLL.......................................................................................................14
2.5 Get error code ..............................................................................................................................................................14
2.6 Returns the system err o r cod e................................................................................................................................15
2.7 Get scan data................................................................................................................................................................15
2.8 Get length of scanned data.......................................................................................................................................16
2.9 Get Symbology name.................................................................................................................................................16
2.10 Clear scan data system buffer .............................................................................................................................18
2.11 Good read indicator................................................................................................................................................18
2.12 Wait for acknowledgement of the last sent command ..................................................................................18
2.13 Save setting to profiles..........................................................................................................................................18
2.14 Save scanner setting into specified file.............................................................................................................19
2.15 Change scanner setting from specified setting profile.................................................................................19
2.16 Automatically enable scanner beam with pressing trigger key..................................................................19
2.17 Stop auto scanning function................................................................................................................................20
2.18 Check if auto scanning is enable........................................................................................................................20
2.19 Check if Scan2Key.exe program is running or not.........................................................................................20
2.20 Test if Scan2Key is en abled..................................................................................................................................20
4.5 Get DLL version no.....................................................................................................................................................29
4.6 Reset all symbologies to default.............................................................................................................................29
5 SCANKEY3.DLL – BACKWARD COMPATIBLE API FOR PT930/PT930S’S
5.3 Get DLL version no.....................................................................................................................................................30
5.6 Reset all symbologies to default.............................................................................................................................31
6.8 Disable toolbar on windows explorer....................................................................................................................34
6.9 Enable toolbar on windows explorer .....................................................................................................................34
7.1 Keypad Related Functions........................................................................................................................................35
7.1.1 Get CAPS lock status (This function call is reserved for OS using, it is not suggested to be used on
application if you are not fully understand OS operation behavior) ...............................................................................35
7.1.2 Get SHIFT status (This function call is reserved for OS using, it is not suggested to be used on
application if you are not fully understand OS operation behavior) ...............................................................................35
7.1.3 Get keypad type (This function call is reserved for OS using, it is not suggested to be used on
application if you are not fully understand OS operation behavior) ...............................................................................35
7.1.4 Disable/enable power button...............................................................................................................................36
7.1.5 Set keypad utility input mode...............................................................................................................................36
7.1.6 Get keypad utility input mode (For HT660 only) ...............................................................................................36
7.1.7 Check Alpha key is pressing (For HT680/PA96x/PA982 only).......................................................................36
7.1.8 Check Function key status (For HT680 only)....................................................................................................37
7.1.9 Enable/Disable Function key (For HT680 only)................................................................................................37
7.2 Scanner Related Functions.......................................................................................................................................38
7.2.3 Get Trigger keys Status........................................................................................................................................ 38
7.2.4 Get Scanner Status............................................................................................................................................... 38
7.2.5 Control trigger key’s key event. ...........................................................................................................................39
7.2.6 Check Trigger key is pressing .............................................................................................................................39
7.3 LED related function...................................................................................................................................................40
7.4 Backlight related function.........................................................................................................................................40
7.4.2 Get Screen Backlight Status................................................................................................................................40
7.4.3 Keypad Backlight Control (For HT680/PA96x/PA982 only)............................................................................40
7.4.4 Get Keypad Backlight Status (For HT680/PA966/PA962/PA982 only).........................................................41
PCMCIA/CF slot related functions ..........................................................................................................................42
7.8.1 Get physical slot ID................................................................................................................................................42
7.8.2 Enable/Disable PCMCIA or CF slot....................................................................................................................43
8 BLUETOOTH RELATIVE API - BTAPI.DLL................ .. .. ... .. .. .......................... .. .. .. ... .. .. ......46
8.1 Enable/Disable Bluetooth Power status.................................................................................................................46
8.2 Get BT Power status.................................................................................................................................................46
9.1 General Function.........................................................................................................................................................47
9.1.1 Get library version..................................................................................................................................................47
9.1.2 Connect to RFID reader........................................................................................................................................47
9.1.3 Close Reader ......................................................................................................................................................... 47
9.1.4 Select Card type ....................................................................................................................................................48
9.1.5 Get Reader Information........................................................................................................................................ 48
9.2.2 Set StayQuiet Mode .............................................................................................................................................. 49
9.2.3 Set Select Mode..................................................................................................................................................... 49
9.2.4 Set Ready Mode.................................................................................................................................................... 50
9.2.5 Read The Block Data form ISO15693 Tag........................................................................................................50
9.2.6 Write The Block Data to ISO15693 Tag.............................................................................................................50
9.2.12 Get Data From Reader .........................................................................................................................................52
9.3.2 ISO-14443A Open Card....................................................................................................................................... 53
9.3.3 ISO-14443A Close Card....................................................................................................................................... 54
9.4.1 Select ST Card.......................................................................................................................................................56
9.4.2 Release ST Card ................................................................................................................................................... 56
10 RH767 UHF READER FOR WJ........................................................................................60
10.1
Class “MPRReader”................................................................................................................................................60
10.2
The Parameter in MPRReader..............................................................................................................................60
10.3
The Function in MPRReader.................................................................................................................................61
10.3.1 Connect to RFID Reader......................................................................................................................................61
10.3.2 Disconnect with RFID Read er.............................................................................................................................61
10.3.3 Clear All Tags In The Reader .............................................................................................................................. 61
10.3.4 The Event in MPRReader.....................................................................................................................................61
11 RH767 UHF READER FOR SKYETEK ............................................................................62
11.1
Connect to RFID reader .........................................................................................................................................62
11.2
Disconnect with RFID reader................................................................................................................................62
Read Data from Gen2 Tag’s Blocks....................................................................................................................63
11.6
Write Data to Gen2 Tag’s Blocks.........................................................................................................................63
Read Data from ISO18000-6B Tag’s Block........................................................................................................64
11.9
Write Block Data to ISO18000-6B Tag................................................................................................................64
11.10 Select All Tags of Any Type..................................................................................................................................65
11.11 Get The tags from Command InventoryTag .....................................................................................................65
11.12 Send a Tag Password.............................................................................................................................................65
11.15 Get Reader’s Power Level.....................................................................................................................................66
11.16 Set Reader’s Power Level .....................................................................................................................................67
11.17 Get the library version............................................................................................................................................67
11.18 Get Reader’s Frequency........................................................................................................................................67
- 6
11.19
Set Reader’s Frequency.........................................................................................................................................68
11.20 Get Reader’s Hop Channel Spacing...................................................................................................................68
11.21 Set Reader’s Hop Channel Spacing....................................................................................................................68
11.22 Get Reader’s Firmware Version...........................................................................................................................69
11.23 Get Reader’s LBT Setting......................................................................................................................................69
11.24 Set Reader’s LBT Setting ......................................................................................................................................69
12 RH767 UHF READER FOR KITTY...................................................................................70
12.1
Kitty RFID Reader API Reference........................................................................................................................70
12.2.1 Initializing the RFID Reader Interface.................................................................................................................70
12.2.2 Shutting Down the RFID Reader Interface........................................................................................................70
12.3
RFID Reader Configuration...................................................................................................................................71
12.3.1 Open RFID Reader................................................................................................................................................ 71
12.3.2 Close RFID Reader............................................................................................................................................... 71
12.3.3 Set the Operation Mode for the RFID Reader...................................................................................................71
12.3.4 Get the Operation Mode for the RFID Reader..................................................................................................71
12.3.5 Set the Response Data’s Mode of the RFID Reader.......................................................................................72
12.3.6 Get the Response Data’s Mode of the RFID Reader.......................................................................................72
12.3.7 Set the RFID Reaer’s Power State .....................................................................................................................72
12.3.8 Get the RFID Reader’s Power State................................................................................................................... 72
12.3.9 Set the RFID Reader’s Low-Level Parameter...................................................................................................72
12.3.10 Get the RFID Reader’s Low-Level Parameter...............................................................................................73
12.4
Antenna Port Configuration..................................................................................................................................73
12.4.1 Enabling and Disabling Anennas ........................................................................................................................73
12.4.2 Get the RFID Reader’s Antenna-Port Status.....................................................................................................73
ISO 18000-6C Tag Access.....................................................................................................................................74
12.5.2 Get Antenna’s Response Status ......................................................................................................................... 75
12.5.3 Get Tag Access Response Data.........................................................................................................................75
12.5.4 Set Tag Operation Stop Count ............................................................................................................................ 75
12.5.5 Get Tag Operation Stop Count............................................................................................................................75
12.5.6 Tag Inventory Operation.......................................................................................................................................76
12.5.7 Tag Read Operation..............................................................................................................................................76
12.5.8 Tag Write Operation..............................................................................................................................................76
12.5.10 Tag Kill Operation..............................................................................................................................................77
12.5.11 Tag Lock Operation........................................................................................................................................... 77
12.5.12 Tag Pre-singulation Operation.........................................................................................................................77
12.5.13 Tag Post Singulation Operation.......................................................................................................................79
12.5.14 Tag Query Group Operation............................................................................................................................79
12.5.15 Set Current Singulation Algorithm...................................................................................................................79
12.5.17 Cancelling a Tag Operation .............................................................................................................................80
12.5.18 Aborting a Tag Operation .................................................................................................................................80
- 7
12.5.19
12.5.20 Ability of Hold or Discard the Duplicate Tags................................................................................................80
12.6
12.6.1 Get RFID Reader’s Firmware Version................................................................................................................ 80
Clear RFID Reader Module’s Error State ...................................................................................................... 80
Other APIs.................................................................................................................................................................80
Structure of the Library..........................................................................................................................................81
Support Dot Net Compact Framework...............................................................................................................93
12.9.1 Class “R1000Reader”...........................................................................................................................................93
13 USEFUL FUNCTION CALL – WITHOUT INCLUDE SYSIOAPI.DLL............ .. ................. 94
13.1.1 Warm-boot. Cold-boot and power off.................................................................................................................. 94
14 GET DEVICE ID................................................................................................................ 95
15 GET OEM INFO ................................................................................................................ 95
16 GET FIRMWARE AND BOOTLOADER VERSION INFO................................................. 95
17 CAMERA RELATED FUNCTIONS (C#)........................................................................... 96
17.1
Open Camera............................................................................................................................................................96
Get transparent color key......................................................................................................................................97
Embedded to html.................................................................................................................................................103
21.3
Operate control by script language..................................................................................................................103
The major difference between the HT6xx/PA96x/PA982 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 subsystem and the programming utility library for the HT6xx/PA96x/PA982. Inside the
HT6xx/PA96x/PA982 there is an advanced decoding chip to control SE900 laser engine and
to handle barcode decoding. Below is system diagram for the HT6xx/PA96x/PA982
barcode:
Laser
Engine
Decoder
Chip
COM2Advanced
CPU
According to the above diagram, the HT6xx/PA96x/PA982 communicates with Decoder Chip
by mean of serial port COM2. Its communication parameter is fixed on 38400,N,8.1.
Normally, the Decoder Chip is in sleep mode when COM2 is not activated. When COM2 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 HT6xx/PA96x/PA982.
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
HT6XX/PA96x/PA982’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 HT6xx/PA96x/PA982. For
backward compatible issue, Unitech still provide Scanner3.DLL and ScanKey3.DLL for
existing PT930/PT930SA user to port their software into HT6xx/PA96x/PA982, but
several APIs on Scanner3.DLL and ScanKey3.DLL have already been removed on
HT6xx/PA96x/PA982. User can refer to 0and 5 for detail supporting API.
-
1.2 COM definition for HT6xx/PA96x/PA982/RH767
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
1.3 Useful Sample program
You can get useful sample program for VC, C# and VB.NET from below URL
HT6xx series
C# http://w3.tw.ute.com/pub/cs/software/Sample_Program/HT660/c_sharp/c_sharp_sample.zip
Vb.net http://w3.tw.ute.com/pub/CS/software/Sample_Program/HT660/VB.NET/VB.NET_sample.zip
C++ http://w3.tw.ute.com/pub/CS/software/Sample_Program/HT660/evc/evc_sample.zip
PA96x/PA982 series
C# http://w3.tw.ute.com/pub/cs/software/Sample_Program/PA962/c_sharp/c_sharp_sample.zip
Vb.net http://w3.tw.ute.com/pub/CS/software/Sample_Program/PA962/VB.NET/VB.NET_sample.zip
C++ http://w3.tw.ute.com/pub/CS/software/Sample_Program/PA962/evc/evc_sample.zip
-
1.4 Get SDK from Unitech?
You can get SDK from below URL
HT660 SDK http://w3.tw.ute.com/pub/cs/sdk/ht660/HT660SDK.zip
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:
BOOLUSI_Register(HWNDhwnd, UINTmsgID);
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: Invalid window handle.
SERR_INVALID_MSGID: msgID cannot be 0.
SERR_OPEN_SCANNER: Open or initial scanner port failed.
SERR_CHECKSUM: Checksum error in received packet.
SERR_DATALOST: New scan data is lost because data
SERR_BUFFEROVERFLOW: Data buffer overflow. The default size
SM_REPLYIndicates received a reply. All the responses from the scanner
except the scan data will be notified by this message.
SM_DATAREADYIndicates that scan data is successfully decoded and ready to
retrieve.
SM_ACKIndicates received a ACK.
SM_NAKIndicates received a NAK.
SM_NOREADIndicates 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]
Unregister the application from the DLL. It will close the scanner port, and by default it will disable
the scanner.
Function call:
voidUSI_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.
Set the scanner to the working mode, and reset the communication co ntrol.
Function call:
BOOLUSI_Reset();
Return:
Always TRUE
2.5 Get error code
Function Description:
Returns the error code (SERR_***).
Function call:
DWORDUSI_GetError();
Return:
Returns the error code (SERR_***), which has been described in USI_Register function.
-
2.6 Returns the system error code
Function Description:
Returns the system error code, which is returned by GetLastError. It will also return the description
of the error in buffer if it is not NULL.
Function call:
DWORDUSI_GetLastSysError(LPTSTRbuffer, intlen);
Parameter: (output)
buffer: LPTSTR: Data buffer for error message
len: int: Length of error message.
Return:
Returns the system error code, which is returned by system function GetLastError. It will also return
the description of the error in buffer retrieved by system function FormatMessage if it is not NULL.
For a complete list of error codes, refer to the SDK header file WINERROR.H.
2.7 Get scan data
Function Description:
Retrieves the scan data into the buffer. Returns the length of characters. It also returns the barcode
type if type is not NULL. Return 0 means that the buffer is too short to hold the data.
USI_GetData should be called when SM_DATAREADY message is received. Or call
USI_ResetData to discard the data. Both of them will reset the data buffer so that next scan data
can come in.
If the data buffer is not empty and a new scan data occurs, it will be discarded and an error
message SM_ERROR with code of SERR_DATALOST will be sent.
type: UINT: barcode type. (refer to 0 for type definition
buffer: LPBYTE : Please refer to below table
Type Buffer
BCT_CODE_39 Code 39
BCT_CODABAR Codabar
BCT_CODE_128 Code 128
BCT_INTERLEAVED_2OF5 Interleaved 2 of 5
BCT_CODE_93 Code 93
BCT_UPC_A UPC A
BCT_UPC_A_2SUPPS UPC A with 2 Supps.
BCT_UPC_A_5SUPPS UPC A with 5 Supps.
BCT_UPC_E0 UPC E
BCT_UPC_E0_2SUPPS UPC E with 2 Supps.
BCT_UPC_E0_5SUPPS UPC E with 5 Supps.
BCT_EAN_8 EAN 8
BCT_EAN_8_2SUPPS EAN 8 with 2 Supps.
BCT_EAN_8_5SUPPS EAN 8 with 5 Supps.
BCT_EAN_13 EAN 13
BCT_EAN_13_2SUPPS EAN 13 with 2 Supps.
-
BCT_EAN_13_5SUPPS EAN 13 with 5 Supps.
BCT_MSI_PLESSEY MSI Plessey
BCT_EAN_128 EAN 128
BCT_TRIOPTIC_CODE_39 Trioptic Code 39
BCT_BOOKLAND_EAN Bookland EAN
BCT_COUPON_CODE Coupon Code
BCT_STANDARD_2OF5 Standard 2 of 5
BCT_CODE_11_TELPEN Code 11 or Telpen
BCT_CODE_32 Code 32 (Pharmacy Code)
BCT_DELTA_CODE Delta Code
BCT_LABEL_CODE Label Code IV & V
BCT_PLESSEY_CODE Plessey Code
BCT_TOSHIBA_CODE Toshiba Code (China Postal Code), Matrix 25
len: UINT: length of string on the 2
Return:
TRUE: if it found name for the barcode type,
FALSE: if not (type may be wrong
nd
parameter buffer
-
2.10 Clear scan data system buffer
Function Description:
Reset the data buffer so that next new scan data can come in.
Function call:
voidUSI_ResetData();
2.11 Good read indicator
Function Description:
Inform a good receiving of scan data, this will play a sound (wave file scanok.wav) and light the
LED lasting for 1 second.
Function call:
voidUSI_ReadOK();
Note:
USI will call the function GoodReadLEDOn function exported by the DLL defined in the registry
described below (UPI300.DLL is an example) to turn on and off the LED. If the DLL is not defined or
the function is not found, USI will bypass the call of GoodReadLEDOn.
[HKEY_LOCAL_MACHINE\SOFTWARE\Unitech America Inc.\Scanner\Settings]
"DLLLEDCONTROL"="UPI300.DLL"
The function prototype of GoodReadLEDOn is:
VOID WINAPI GoodReadLEDOn(BOOL fon);
Turn on when fon is TRUE, and turn off when fon is FALSE.
2.12 Wait for acknowledgement of the last sent command
Function Description:
Wait for acknowledgement of the last sent command until timeout. It is useful when a serial of
commands needs to be sent at a time. Before call USI_SendCommand, call
USI_WaitForSendEchoTO to make sure that the previous command is done.
Function call:
BOOLUSI_WaitForSendEchoTO(DWORDtimeout);
Parameter: (input)
timeout: DWORD : Specifies the timeout in millisecond.
Return:
Returns FALSE if timeout.
2.13 Save setting to profiles
Function Description:
Save current settings of scanner so that the settings will be persistent when the unit get power off
and on again.
Function call:
BOOLUSI_SaveCurrentSettings();
Return :
TRUE: Success,
FALSE: Fail
-
2.14 Save scanner setting into specified file
Function Description:
Save the current settings to file. The file takes “*.USI” as extension name.
Function call:
BOOLUSI_SaveSettingsToFile(LPCTSTRfilename)
Parameter: (input)
filename : LPCTSTR: file name for setting profile
Return:
TRUE: Success,
FALSE: Fail
2.15 Change scanner setting from specified setting profile
filename: LPCTSTR : name of scanner setting profile (*.USI)
formulaOnly: BOOL: if TRUE, only data editing formulas are load. The other settings
remain unchanged
Return:
TRUE: Success,
FALSE: Fail
2.16 Automatically enable scanner beam with pressing trigger key
Function Description:
Start auto scanning. Scan engine will be automatically triggerrd on.
Function call:
BOOLUSI_StartAutoScan(DWORDinterval);
Parameter: (input)
interval: DWORD: Specifies the interval in milli-second
Return:
TRUE: Success,
FALSE: Fail
Note:
USI will call the function SetScannerOn function exported by the DLL defined in the registry
described below (UPI300.DLL is an example) to start and stop the scanner. If the DLL is not
defined or the function is not fou nd, then auto scanning is not available.
[HKEY_LOCAL_MACHINE\SOFTWARE\Unitech America Inc.\Scanner\Settings]
"DLLSCANNERCONTROL"="UPI300.DLL"
The function prototype of SetScannerOn is:
VOID WINAPI SetScannerOn(BOOL fon);
Start when fon is TRUE, and stop when fon is FALSE.
-
2.17 Stop auto scanning function
Function Description:
Stop auto scanning
Function call:
voidUSI_StopAutoScan();
2.18 Check if auto scanning is enable
Function Description:
Check if auto scanning function is enabled or not
Function call:
BOOLUSI_IsAutoScanning()
Return:
BOOL: TRUE: auto-scanning is running
FALSE: auto-scanning is disabled.
2.19 Check if Scan2Key.exe program is running or not
Function Description:
Test whether Scan2Key application is running at background. (It doesn’t mean Scan2Key is routing
scanner input to keyboard, please call S2K_IsEnabled() to check if routing function is enable or not)
Function call:
HWNDS2K_IsLoaded();
Return:
NULL: Scan2Key is not running
Non-NULL: Indicates scan2key is running. It actually returns window handle for scan2key, but
it is for internal use – send messages.
2.20 Test if Scan2Key is enabled
Function Description:
Test whether Scan2Key is enabled. Scan2Key routes scan ning inp ut fr om s cann er to k eypad buffe r,
so that barcode data can be input as like from keystrokes on keypad.
Function call:
BOOLS2K_IsEnabled();
Return:
TRUE: Enabled.
FALSE: Disabled
-
2.21 Load/Unload Scan2Key.exe
Function Description:
Load or unload Scan2Key
Function call:
BOOLS2K_Load(BOOLload, DWORDtimeout);
Parameter: (input)
load: BOOL: TRUE = load Scan2Key
FALSE = unload Scan2Key
timeout: DWORD: when unload Scan2Key, it will wait until Scan2Key has been
removed from memory or timeout specified by this parameter.
Return:
TRUE = successfully loaded.
2.22 Enable/Disable Scan2Key
Function Description:
Enable or disable Scan2Key to p ut scanned data to standard keyboard input buffer. Scan2Key is
enabled by default.
Function call:
BOOLS2K_Enable(BOOLenable, DWORDtimeout);
Parameter: (input)
enable: BOOL: TRUE = Enable scanned data to keyboard buffer
FALSE = Disable scanned data to keyboard
timeout: DWORD: when enable or disable Scan2Key, it will wait until Scan2Key has
been removed from memory or timeout specified by this parameter.
Return:
TRUE: if successfully enabled Scan2K ey, otherwise FALSE
2.23 Send scanner command to decoding chip
Function Description:
Send scanner command to decoder chip. This command will send a serial of bytes to decoder chip
as following: (Esc and BCC will be calculated and added automatically)
highlen: BYTE: high byte of command length
lowlen: BYTE: low byte of command length
cmdID: BYTE: command ID
op: BYTE: operation mode for this command
set: BYTE: operand for this command
Return:
TRUE = Indicates the command has been successfully sent to queue to output.
-
2.24 Only send single command decoding chip
Function Description:
Send command to decoder chip. This is a variation of comma nd HAM_SendCommand. It sends
following command to Hamster: (note, only two bytes without BCC)
Esc, 0x80+cmd
Function call:
BOOLHAM_SendCommand1(BYTE cmd);
Parameter: (input)
cmd: BYTE: command
Return:
TRUE = indicates the command has been successfully sent to queue to output.
2.25 Send command to decoding chip
Function Description:
Send command to decoder chip. This is a variation of comma nd HAM_SendCommand. It will read
a number of parameters and packet them as in following format and send it to decoder chip.
Esc, parameter1, parameter2, …, BCC
The total number of parameters is specified by first parameter num.
3 Control command for decoder chip (Hamser: 1D only)
Important: This chapter describes low level command for scanner control function. If you already USI
to do scanner programming, you don’t need to care about this chapter. In general, it is not suggested to
use level command to control scanner, because there are timing issue on serial communication
programming , and it is always need communication expert to do that and it is hard to explain it on
document.
When Host prepare to sen d a command to hamster, it must first check CTS, if CTS is high, then Host
must set the RTS to high then clear RTS to low to wake up the Hamster.
Special Command for control
command Format Comment
Control Esc,80H+SOH(01H) Let Hamster enter slaving status. At this
Release Esc,80H+EOT(04H) Let Hamster exit from slaving status.
Execute/
Enquiry
ACK Esc,80H+ACK(06H) It is from Hamster to Host. If Hamster receive
NAK Esc,80H+NAK(15H) It is from Hamster to Host. Hamster require
Esc,80H+ENQ(05H) Let Hamster execute the previous saved command
COMMAND FROM HOST TO HMASTER
Command format:Esc,Lh,Ll,n,m,S1,...,Si,BCC
Here: Esc is Escape code(H'1B)
Conventions: S1.bj means the number j bit of byte S1.
Notice: Any interval in a command transmit can not exceed 1 second.
Command Format Comment
Initial/
Warm start
Default Esc,0,2,1,BCC Reset setting in RAM and initialize
Mpu_idle Esc,0,4,2,m,S1,BCC S1 is 0~3:0 is sleep mode,1 is watch mode,
Lh/Ll is command's length when the Lh.b7 is 0, Lh is high byte, Ll is low
byte, count from n to BCC. When Lh.b7=1 it is a two bytes special command.
n is command ID
m is operation: Normally for setting commands the 0 means setting, 1
default, 2 read current setting, 3 special operation. When m=1 or 2, the S1
should be 0 for bits or one character setting. If the setting is a string,
like pre_amble, the read or default command should not contain any Si byte.
The special meaning in a command please refers the command definition.
Si is setting/read data.
BCC: it equals to XOR of all the bytes before the BCC.
The expression 1~64:2 means that the number is between 1 and 64, the
default is 2.
Esc,0,2,0,BCC Hamster initializes the ports and flags
status Hamster just receives commands and
executes it until it receives Release command
or timeout (about 10s). Otherwise, the timeout
is about 1s as the interval of commands.
and check hamster if there is a result of
previous executed command to send to Host. If
previous saved command have already executed
and no result to send, hamster do not reply
until there is a result. If Host receive a
result but the BCC is wrong, it can re-send
ENQ to re-send result again.
a command and this command do not need send
message back, Hamster reply the ACK.
the Host to re-send command again, normally
when received a wrong BCC, it can send the
NAK. The Hamster sends back NAK whenever it
receives a no sense command.
French,9 Alt Key Mode,A Danish
Baud_rate Esc,0,4,0D,m,S1,BCC
No meaning for you
Parity Esc,0,4,0E,m,S1,BCC
Data_bits Esc,0,4,0F,m,S1,BCC
No meaning for you
Handshake Esc,0,4,10,m,S1,BCC
No meaning for you
No meaning for you
Ack_nak Esc,0,4,11,m,S1,BCC
BCC_char Esc,0,4,12,m,S1,BCC
No meaning for you
Data_direction
No meaning for you
Esc,0,4,13,m,S1,BCC
No meaning for you
Time_out Esc,0,4,14,m,S1,BCC
No meaning for you
S1 is 0 300,1 600,2 1200,3 2400,4 4800,
5 9600,6 19200,7_38400
S1 is 0 EVEN,1 ODD,2 MARK,3 SPACE,4_NONE
S1 is 0 7,1_8BIT
S1 is 0_IGNORE,1 RTS ENABLE AT POWERUP,2 RTS
ENABLE IN COMMUNICATION
S1 is 0_OFF,1 ON
S1 is 0_OFF,1 ON
S1 is =0_SEND TO HOST,1 SEND TO HOST AND
TERMINAL,2 SEND TO TERMINAL
S1 is 0_1S,1 3S,2 10S,3 UNLIMITED
Terminator Esc,0,4,15,m,S1,BCC S1 is B1B0=0_ENTER(CR/LF),1 FIELD EXIT(CR),2
RETURN(LF),3 NONE
Code_id Esc,0,4,16,m,S1,BCC S1 is 0_OFF,1 ON
Verification
Esc,0,4,17,m,S1,BCC S1 is 0_OFF,1~7 1 to 7 times verification
Scan_mode Esc,0,4,18,m,S1,BCC S1 is 0_TRIGGER MODE,1 FLASH_MODE,2 MULTISCAN
MODE,3 ONE PRESS ONE SCAN,4~7 reserved
Label_type Esc,0,4,19,m,S1,BCC S1 is 0_POSITIVE,1 POSITIVE AND NEGATIVE
Aim_fuction Esc,0,4,1a,m,S1,BCC S1 is 0_DISABLE,1 ENABLE
Esc,0,4,1d,m,S1,BCC define Code 39 full ASCII ID:Here S1 is 1
Si can be 1 to 8 CHARACTERS
Si can be 1 to 8 CHARACTERS
CHARACTER
Define_code39s
Esc,0,4,1e,m,S1,BCC define Code 39 standard ID:Here S1 is 1
CHARACTER
Define_EAN13
Esc,0,4,1f,m,S1,BCC define EAN13 ID:Here S1 is 1 CHARACTER
Define_UPCA Esc,0,4,20,m,S1,BCC define UPC A ID: Here S1 is 1 CHARACTER
Define_EAN8 Esc,0,4,21,m,S1,BCC define EAN8 ID:Here S1 is 1 CHARACTER
Define_UPCE Esc,0,4,22,m,S1,BCC define UPC E ID:Here S1 is 1 CHARACTER
Define_I25 Esc,0,4,23,m,S1,BCC define I25 ID:Here S1 is 1 CHARACTER
Define_CDB Esc,0,4,24,m,S1,BCC define Codabar ID:Here S1 is 1 CHARACTER
Define_C128 Esc,0,4,25,m,S1,BCC define Code128 ID:Here S1 is 1 CHARACTER
Define_C93 Esc,0,4,26,m,S1,BCC define Code93 ID:Here S1 is 1 CHARACTER
Define_S25 Esc,0,4,27,m,S1,BCC define S25 ID:Here S1 is 1 CHARACTER
Define_MSI Esc,0,4,28,m,S1,BCC define MSI ID:Here S1 is 1 CHARACTER
Define_C11 Esc,0,4,29,m,S1,BCC define Code11 ID:Here S1 is 1 CHARACTER
Define_C32 Esc,0,4,2a,m,S1,BCC define Code32 ID:Here S1 is 1 CHARACTER
Esc,0,4,2b,m,S1,BCC define Delta ID:Here S1 is 1 CHARACTER
Esc,0,4,2c,m,S1,BCC define Label code ID:Here S1 is 1 CHARACTER
Esc,0,4,2d,m,S1,BCC define Plessey ID:Here S1 is 1 CHARACTER
Esc,0,4,2e,m,S1,BCC define Telepen ID:Here S1 is 1 CHARACTER
Esc,0,4,2f,m,S1,BCC define Toshiba ID:Here S1 is 1 CHARACTER
Esc,0,4,30,m,S1,BCC define EAN128 ID:Here S1 is 1 CHARACTER;IF
H'FF, THEN USE "]C1"
Mterminator Esc,0,4,31,m,S1,BCC
Sentinal Esc,0,4,32,m,S1,BCC
No meaning for you
Track_selection
No meaning for you
Esc,0,4,33,m,S1,BCC
No meaning for you
Here S1 is 0_ENTER,1 NONE
S1 is 0 not send,1 send
Here S1 is =0_ALL TRACKS,1 TRACK1 AND TRACK2,2
TRACK1 AND TRACK3,3 TRACK2 AND TRACK3,4
TRACK1,5 TRACK2,6 TRACK3
-
T2_account_only
Separator Esc,0,4,35,m,S1,BCC
Must_have_data
Track1_sequence Esc,0,L,37,m,S1,…Si,BCC
Track2_sequence Esc,0,L,38,m,S1,…Si,BCC
Code39_set
Esc,0,4,34,m,S1,BCC
No meaning for you
No meaning for you
Esc,0,4,36,m,S1,BCC
No meaning for you
No meaning for you
No meaning for you
S1 is 0_NO,1 YES
S1 is 1 CHARACTER
S1 is 0 YES,1_NO
Si can be 1 to 16 CHARACTERS
Si can be 1 to 8 CHARACTERS
Esc,0,4,39,m,S1,BCC S1.B0 is for Code39_enable,S1.B1 is for
Code39_standard,S1.B3B2 for Code39_cd,S1.B4
Code39_ss
Code39_enable
Code39_sandard
Esc,0,4,3a,m,S1,BCC S1 is 0 disable,1_enable
Esc,0,4,3b,m,S1,BCC S1 is 0_full ASCII,1 standard
Code39_cd: Esc,0,4,3c,m,S1,BCC S1 is 0 calculate&send,1 calculate¬
send,2_not calculate
Code39_ss Esc,0,4,3d,m,S1,BCC Here S1 is 0 SS send,1_SS not send
Code39_min Esc,0,4,3e,m,S1,BCC S1 is 0~48:0 (min<=data len)
Code39_max Esc,0,4,3f,m,S1,BCC S1 is 0~48:48 (data len<=max)
I2of5_set
Esc,0,4,40,m,S1,BCC S1 is S1.B0 is for I2of5_enable,S1.B1 is for
I2of5_fixlength,S1.B3B2 is for
I2of5_cd,S1.B5B4 is for I2of5_ss
I2of5_enable
I2of5_fixlength
Esc,0,4,41,m,S1,BCC S1 is =0 disable,1_enable
Esc,0,4,42,m,S1,BCC S1 is =0 on,1_off (record first 3 record len)
I2of5_cd Esc,0,4,43,m,S1,BCC S1 is =0 calculate&send,1 calculate¬
send,2_no calculation
I2of5_ss Esc,0,4,44,m,S1,BCC S1 is 0 first digit suppressed,1 last digit
suppressed,2_not supressed
I25_min Esc,0,4,45,m,S1,BCC S1 is 2~64:10 (min<=data len)
I25_max Esc,0,4,46,m,S1,BCC S1 is 2~64:64 (data len<=max)
S2of5_set
Esc,0,4,47,m,S1,BCC S1 is S1.b0 is for S2of5_enable,S1.b1 is for
S2of5_fixlength,S1.b3b2 is for S2of5_cd
S2of5_enable
S2of5_fixlength
Esc,0,4,48,m,S1,BCC S1 is 0_disable,1 enable
Esc,0,4,49,m,S1,BCC S1 is 0_on,1 off (record first 3 record len)
S2of5_cd Esc,0,4,4a,m,S1,BCC S1 is 0 calculate&send,1 calculate¬ send,
2_not calculate
S25_min Esc,0,4,4b,m,S1,BCC S1 is 1~48:4 (min<=data len)
S25_max Esc,0,4,4c,m,S1,BCC S1 is 1~48:48 (data len<=max)
Code32_set Esc,0,4,4d,m,S1,BCC S1 is S1.b0 is for Code32_enable,S1.b1 is for
Code32_sc,S1.b2 is for Code32_lc
Code32_enable
Esc,0,4,4e,m,S1,BCC S1 is 0_disable,1 enable
Code32_sc Esc,0,4,4f,m,S1,BCC S1 is 0_leading char send,1 not send
Code32_lc Esc,0,4,50,m,S1,BCC S1 is 0_tailing char send,1 not send
Telepen Esc,0,4,51,m,S1,BCC
Telepen_enable
Telepen_charset
Esc,0,4,52,m,S1,BCC S1 is 0_disable,1 enable
Esc,0,4,53,m,S1,BCC S1 is 0_standard,1 numeric
S1 is S1.b0 is for Telepen_enable,S1.b1 is for
Telepen_charset
Ean128 Esc,0,4,54,m,S1,BCC S1 is S1.b0 is for Ean128_id, S1.b1 is for
Ean128_id
Ean128_enable
Esc,0,4,55,m,S1,BCC S1 is 0 disable,1_enable
Ean128_id Esc,0,4,56,m,S1,BCC S1 is 0 ID disable,1_ID enable
Ean128_func1
Esc,0,4,57,m,S1,BCC S1 is 1 char
Code128 Esc,0,4,58,m,S1,BCC S1 is 0 disable,1_enable
Code128_min Esc,0,4,59,m,S1,BCC S1 is 1~64:1 (min<=data len)
Code128_max Esc,0,4,5a,m,S1,BCC S1 is 1~64:64 (data len<=max)
Msi_pleasey
Esc,0,4,5b,m,S1,BCC S1 is S1.b0 is for Msi_p_enable,S1.b1 is for
Msi_pleasey_cd, S1.b3b2 is for Msi_p_cdmode
Msi_p_enable
Esc,0,4,5c,m,S1,BCC S1 is 0_disable,1 enable
Msi_pleasey_cd
Msi_p_cdmode
Esc,0,4,5d,m,S1,BCC S1 is 0 check digit send,1_not send
Esc,0,4,5e,m,S1,BCC S1 is 0 check digit double module 10,1 check
digit module 11 plus 10,2 check digit single
module 10
Msi_pleasey_min
Msi_pleasey_max
Code93
Esc,0,4,5f,m,S1,BCC S1 is 1~64:1 (min<=data len)
Esc,0,4,60,m,S1,BCC S1 is 1~64:64 (data len<=max)
Esc,0,4,61,m,S1,BCC S1 is 0 disable,1_enable
-
Code93_min Esc,0,4,62,m,S1,BCC S1 is 1~48:1 (min<=data len)
Code93_max Esc,0,4,63,m,S1,BCC S1 is 1~48:48 (data len<=max)
Code11
Esc,0,4,64,m,S1,BCC S1 is S1.b0 is for Code11_enable,S1.b1 is for
Code11_cdnumber,S1.b2 Code11_cdsend
Code11_enable
Code11_cdnumber
Code11_cdsend
Esc,0,4,65,m,S1,BCC S1 is 0_disable, 1 enable
Esc,0,4,66,m,S1,BCC S1 is 0 one check digit,1_two check digits
Esc,0,4,67,m,S1,BCC S1 is 0 check digit send,1_not send
Code11_min Esc,0,4,68,m,S1,BCC S1 is 1~48:1 (min<=data len)
Code11_max Esc,0,4,69,m,S1,BCC S1 is 1~48:48 (data len<=max)
Codabar_set Esc,0,4,6a,m,S1,BCC S1 is S1.b0 is for Codabar_enable, S1.b1 is
for Codabar_ss, S1.b3b2 is for Codabar_cd,
S1.b4 is for Codabar_CLSI
Codabar_enable
Esc,0,4,6b,m,S1,BCC S1 is 0_disable,1 enable
Codabar_ss Esc,0,4,6c,m,S1,BCC S1 is 0 start&stop char send,1_not send
Codabar_cd Esc,0,4,6d,m,S1,BCC S1 is 0 check digit calculate&send,1 check
digit calculate but not send,2_check digit not
calculate
Codabar_CLSI
Esc,0,4,6e,m,S1,BCC S1 is 0 CLSI format on,1_off
Codabar_min Esc,0,4,6f,m,S1,BCC S1 is 3~48:3 (min<=data len)
Codabar_max Esc,0,4,70,m,S1,BCC S1 is 3~48:48
Label_code Esc,0,4,71,m,S1,BCC S1 is S1.b0 is for Label_c_enable,S1.b1 is for
Label_code_cd
Label_c_enable
Label_code_cd
Esc,0,4,72,m,S1,BCC S1 is 0_disable,1 enable
Esc,0,4,73,m,S1,BCC S1 is 0 check digit send,1 not send
Upc_a_set Esc,0,4,74,m,S1,BCC S1 is S1.b0 is for Upc_a_enable,S1.b1 is for
Upc_a_ld,S1.b2 is for Upc_a_cd
Upc_a_enable
Esc,0,4,75,m,S1,BCC S1 is 0 disable,1_enable
Upc_a_ld Esc,0,4,76,m,S1,BCC S1 is 0_leading digit send,1 not send
Upc_a_cd Esc,0,4,77,m,S1,BCC S1 is 0_check digit send,1 not send
Upc_e_set Esc,0,4,78,m,S1,BCC S1 is S1.b1 is for Upc_e_enable,S1.b2 is for
Upc_e_ld,S1.b3 is for Upc_e_cd,S1.b4 is for
Upc_e_expand,S1.b0 is for Upc_e_nsc
Upc_e_enable
Esc,0,4,79,m,S1,BCC S1 is 0 disable,1_enable
Upc_e_ld Esc,0,4,7a,m,S1,BCC S1 is 0_leading digit send,1 not send
Upc_e_cd Esc,0,4,7b,m,S1,BCC S1 is 0 check digit send,1_not send
Upc_e_expand
Esc,0,4,7c,m,S1,BCC S1 is 0 zero expansion on,1_off
Upc_e_nsc Esc,0,4,7d,m,S1,BCC S1 is 0_disable,1 enable
Ean_13_set Esc,0,4,7e,m,S1,BCC S1 is S1.b0 is for Ean_13_enable,S1.b1 is for
Ean_13_ld,S1.b2 is for Ean_13_cd,S1.b3 is for
Ean_13_bookland
Ean_13_enable
Esc,0,4,7f,m,S1,BCC S1 is 0 disable,1_enable
Ean_13_ld Esc,0,4,80,m,S1,BCC S1 is 0_leading digit send,1 not send
Ean_13_cd Esc,0,4,81,m,S1,BCC S1 is 0_check digit send,1 not send
Ean_13_bookland
Esc,0,4,82,m,S1,BCC S1 is 0 bookland EAN enable,1_ disable
Ean_8_set Esc,0,4,83,m,S1,BCC S1 is S1.b0 is for Ean_8_enable,S1.b1 is for
Ean_8_ld,S1.b2 is for Ean_8_cd
Ean_8_enable
Esc,0,4,84,m,S1,BCC S1 is 0 disable,1_enable
Ean_8_ld Esc,0,4,85,m,S1,BCC S1 is 0_leading digit send,1 not send
Ean_8_cd Esc,0,4,86,m,S1,BCC S1 is 0_check digit send,1 not send
Supplement_set
Esc,0,4,87,m,S1,BCC S1 is S1.b0 is for Supplement_two, s1.b1 is
Supplement_mh, S1.b3 is for
Esc,0,4,88,m,S1,BCC S1 is 0_off,1 on
Esc,0,4,89,m,S1,BCC S1 is 0_off,1 on
Esc,0,4,8a,m,S1,BCC S1 is 0_transmit if present,1 must present
Esc,0,4,8b,m,S1,BCC S1 is 0 Space been inserted, 1_Space not been
Supplement_ssi.
inserted
Delta_code_set
Esc,0,4,8c,m,S1,BCC S1 is S1.b0 is for Delta_c_enable,S1.b1 is for
Delta_code_cdc,S1.b2 is for Delta_code_cds
Delta_c_enable
Delta_code_cdc
Delta_code_cds
Esc,0,4,8d,m,S1,BCC S1 is 0_disable,1 enable
Esc,0,4,8e,m,S1,BCC S1 is 0_check digit calculate,1 not calculate
Esc,0,4,8f,m,S1,BCC S1 is =0 check digit send,1_not send
Get_version Esc,0,3,90,2,BCC Get firmware version.
DumpSetting Esc,Lh,Ll,91,m,S1..
.Si,BCC
Lh/Ll is command length. Si is in the range of
s1 to S255.m=0 is download setting, m=1 is
-
reset the setting area into FF. m=2 is upload
setting.
Actually you just need the format as bellow:
Download:
Esc,1,02,91,0,s1,...,s255,BCC
Upload:
Esc,0,3,91,2,BCC
EAN128Brace
Remove
AimingTime
Esc,0,4,92,m,S1,BCC S1 is =0_disable,1 enable(Remove the brace)
Esc,0,4,93,m,S1,BCC S1 is =0 0.5s,1_1s,2 1.5s 3 2s
Exchange data Esc,Lh,Ll,a3,S1,S2,....,Sn,
BCC
• Expect Acknowledge (Esc,80H+ACK(06H))
• Exchange the data between the host and the
ICC.
•Expected return after issuing
Execute/Enquiry command are:
Esc,Lh,Ll,0xa3,AH,data,BCC
Here: AH=0 Success
=1 Timeout
=2 No card present
data: Response data and status word
Note: Hamster save these commands to buffer and do not execute until it receives
an Execute command (Esc,ENQ). Hamster execute the command after receive an
“Esc,ENQ” then send back a reply. The Max. Length of data is 264. The m and the
reply define as following:
DATA TO HOST FROM HAMSTER
Data format: Code_number,Lh,Ll,string
Here: The Lh/Ll is string length, Lh is high byte, Ll is low byte, The string
length is excluded the Code_number and Lh/Ll. The string contains the Code ID,
pre_amble, scanned data,post_amble, and terminator. Code_number is equal to
following number plus H’80.
0 Code 39 full ASCII 1 Code 39 standard or EDP Code2 EAN 13 3 UPC A
4 Scanner3.DLL – Backward compatible API for PT930/PT930S’s Scanner3.dll
“Scanner3.lib” and “scanner3.h” are necessary files for VC programming to compile
application. You can find it from standard LIB and INCLUDE folder after installed SDK.
4.1 Enable Decoder
Function Description:
This function will open COM2 port, create a thread to get any barcode input from Decoder Chip,
and then store input data in the system buffer. Application can use function call PT_GetBarcode()
to get input data from the system buffer.
Function call:
INT PT_EnableBarcode(VOID);
Return code:
=1 Create new thread fail
=2 Cannot re-enable
=3 Cannot open COM2
=4 Upload parameter from Hamster fail
=0 OK
4.2 Disable Decoder
Function Description:
This function will close COM2 port and then remove thread which is created by
PT_EnableBarcode()
Function call:
VOID PT_DisableBarcode( VOID );
4.3 Check barcode input
Function Description:
This function is used to check whether there is available barcode data on system buffer which is
successfully decoded by decoder chip.
Function call:
BOOL PT_CheckBarcode( VOID );
Return code:
TRUE = There is input data on system buffer.
FALSE = There is no data on system buffer.
-
4.4 Read barcode data
Function Description:
Get input barcode data and its type from system buffer.
TRUE = There is barcode input
FALSE = No Barcode Input
4.5 Get DLL version no
Function description:
This function is used to get DLL version no.
Function call:
INT PT_DllVersion(void);
Return :
Integer
4.6 Reset all symbologies to default
Function Description:
This function call will reset decoder chip's symbologies setting to system default value
Function call for VC:
int PT_ SetToDefault (VOID)
Function call for VB:
PT_ SetToDefault
-
5 ScanKey3.DLL – Backward compatible API for PT930/PT930S’s ScanKey3.dll
In Technical Binder CD, you can get this file from folder \Programming\scankey. In this
folder can also find extra 3 files.
"Scankey3.lib" Used for VC programming
"Scankey3.h" Used for VC programming
5.1 Enable Decoder
Function Description:
This function will open COM2 port, create a thread to get any barcode input from Decoder Chip,
and then send scanner data to keyboard buffer. User application can get input data just like
standard keyboard input.
Function call for VC:
int PT_EnableBarToKey(VOID)
Return code:
=1 Create new thread fail
=2 Can not re-enable
=3 Can not open COM2
=4 Upload parameter from Hamster fail
=0 OK
5.2 Disable Decoder
Function Description:
This function will close COM2 port and then remove thread which is created by
PT_EnableBarToKey()
Function call for VC:
VOID PT_DisableBarToKey ( VOID )
5.3 Get DLL version no
Function description:
This function is used to get DLL version number.
Function call for VC:
int PT_Version(void);
Return :
Integer
5.4 Disable laser trigger key
Function Description:
This function only stop trigger key to activate laser beam, so COM2 port is still open. This function
call is useful when some fields is only allow keyboard input.
Function call for VC:
int PT_StopScan (VOID)
5.5 Enable laser trigger key
Function Description:
This function only stop trigger key to activate laser beam, so COM2 port is still open. This function
call is useful when some fields is only allow keyboard input..
Function call for VC:
-
int PT_StartScan (VOID)
5.6 Reset all symbologies to default
Function Description:
This function call will reset decoder chip's symbologies setting to system default value
Function call for VC:
int PT_ SetToDefault (VOID)
Function call for VB:
PT_ SetToDefault
-
6 UnitechAPI.DLL
In HT6XX/PA96x/PA982, Unitech create UnitechAPI.DLL to provide some special function
call which are different from standard Microsoft API. For example, RS232 is defined as host
communication port with PC via ActiveSync, so it will automatically envoke ActiveSync
program to do communication with PC when RS232 cable is plugged into
HT6XX/PA96x/PA982. However, it will make RS232 port useless if user want to connect
HT6XX/PA96x/PA982 with any device with RS232 interface. RS232Event.DLL provides
function call for user to disable ActiveSync function over RS232 port to let user directly
control RS232 port.
Unitech also provide several function to enable/disable several system icon and task bar.
For WinCE system, it just like Windows OS platform, user can directly tap “Start” button
from task bar to setup terminal or execute any application on WinCE terminal, so it mean
that operator can change, modify or delete any setting. If system developer don’t want
operator to do any extra operation beside application, Unitech provide function call to
provides ability to disable/enable task bar, keyboard and etc.
You can get demo program from HT6XX/PA96x/PA982 technical binder zip files from
\programming\UnitechAPI
6.1 Disable ActiveSync
Function Description:
After called this function, HT6XX/PA96x/PA982 will not automatically execute ActiveSync
program( “repllog.exe”) when user plug RS232 cable into HT6XX/PA96x/PA982.
Function call:
BOOL RS232EventEnable (VOID);
Return code:
=TRUE OK
=FALSE Fail
6.2 Enable ActiveSync
Function Description:
After called this function, HT6XX/PA96x/PA982 will automatically execute ActiveSync program
( “repllog.exe”) again when user plug RS232 cable into HT6XX/PA96x/PA982.
Function call:
BOOL RS232EventEnable (LPTSTR);
Parameter (Input):
String buffer and content should be “REPLLOG.EXE”. If user assign other program, it will invoke
user defined program rather than “REPLLOG.EXE”
Return code:
=1 OK
=2 File not found
-
6.3 Suspend
Function Description:
After called this function, HT6XX/PA96x/PA982 will automatically suspend itself.
Function call:
void Suspend (void);
6.4 Disable TaskBar
Function Description:
This function will hide “TaskBar” and it doesn’t like “Auto Hide” function which is set from Start Æ
Settings Æ TaskBar. “TaskBar” can not be show again when tap button of LCD screen. It need to
execute “Enable_TaskBar()” to enable it again
Function call:
BOOL DisableTaskbar (VOID);
Return code:
=TRUE OK
=FALSE Fail
6.5 Enable TaskBar
Function Description:
This function will show “TaskBar” again after ”Disable_TaskBar()” was executed to hide taskbar.
Function call:
BOOL EnableTaskbar (VOID);
Return code:
=TRUE OK
=FALSE Fail
6.6 Disable Desktop
Function Description:
This function will hide all icons on desktop, it mean that any short-cut or files cannot be accessed or
executed.
Function call:
BOOL DisableDesktop (VOID);
Return code:
=TRUE OK
=FALSE Fail
6.7 Enable Desktop
Function Description:
This function will show all icons which had already showed on desktop before executed
DisableDesktop().
Function call:
BOOL EnsableDesktop (VOID);
Return code:
=TRUE OK
=FALSE Fail
-
6.8 Disable toolbar on windows explorer
Function Description:
This function will hide windows explorer’s toolbar
Function call:
BOOL DisableExploreToolbar (VOID);
Return code:
=TRUE OK
=FALSE Fail
6.9 Enable toolbar on windows explorer
Function Description:
This function will enable windows explorer’s toolbar again
Function call:
BOOL EnsableExploreToolbar (VOID);
Return code:
=TRUE OK
=FALSE Fail
6.10 Disable Connection
Function Description:
This function will disable the specify connection in “Settings\Network and Dial-up Connections”.
Function call:
BOOL DisableConnection (LPTSTR);
Parameter (Input):
Specify the connection name in parameter.
Return code:
=TRUE Success
=FAULE Fail
6.11 Enable Connection
Function Description:
This function will enable the specify connection in “Settings\Network and Dial-up Connections”.
Function call:
BOOL EnableConnection (LPTSTR);
Parameter (Input):
Specify the connection name in parameter.
Return code:
=TRUE Success
=FAULE Fail
-
7 SysIOAPI.DLL
This DLL provide hardware relative API for user to control scanner, LED, back-light and PC
card slot. API functions are provided through DLL to assist programmer to write application
for HT6XX/PA96x/PA982. Two files are essential and provided in SDK, SysIOAPI.LIB and
SysIOAPI.H.
7.1 Keypad Related Functions
7.1.1 Get CAPS lock status (This function call is reserved for OS using, it is not
suggested to be used on application if you are not fully understand OS
operation behavior)
Function Description:
To check if CAPS is lock or unlock
Function call:
BOOL GetCapsLock(void)
Return code:
BOOL: TRUE: CAPS lock
FALSE: CAPS unlock
7.1.2 Get SHIFT status (This function call is reserved for OS using, it is not
suggested to be used on application if you are not fully understand OS
operation behavior)
Function Description:
To check if SHIFT key is lock or not
Function call:
BOOL GetShift(void)
Return code:
TRUE: Shift lock
FALSE: Shift unlock
7.1.3 Get keypad type (This function call is reserved for OS using, it is not
suggested to be used on application if you are not fully understand OS
operation behavior)
Function Description:
HT680/PA962/PA982 only have 22 keys configuration, PA96x will have two keypad type, 22 keys
and 36 keys. In HT660, there is only 36 keys configuration.The following function returns current
keypad type.
TRUE = Disable power button.
FALSE = Enable power button.
7.1.5 Set keypad utility input mode
Function Description:
In terminal, there is a utility to emulate full alpha key input, called GetVK. The input mode can be
switched by pressing “alpha” key, or by following functio n.
Function call:
void SetGetVKWorkingMode(int)
Parameter (input)
For HT660 :
0 = normal
1 = lower case.
2 = upper case.
For HT680/PA96x/PA982
0 = hide the selection window.
1 = show lower case selection window.
2 = show upper case selection window.
7.1.6 Get keypad utility input mode (For HT660 only)
Function Description:
This function is used to check alpha key input mode.
Function call:
BYTE GetAlphaKeyWorkingMode(void);
Return code:
0 = normal .
1 = lower case.
2 = upper case.
7.1.7 Check Alpha key is pressing (For HT680/PA96x/PA982 only)
Function Description:
This function is used to check if alpha key is pressed or not.
Function call:
BOOL GetKeypadAlphaStatu s(v oid);
Return code:
TRUE = Alpha key is pressed.
FALSE = Alpha key is released.
-
7.1.8 Check Function key status (For HT680/PA968 only)
Function Description:
This function is used to check if function key is enabled or not.
Function call:
BOOL GetFnKeyStatus(void);
Return code:
TRUE = Function key is enabled.
FALSE = Function key is enabled.
7.1.9 Enable/Disable Function key (For HT680/PA968 only)
Function Description:
This function is used to enabled/disable function key.
Function call:
void SetFnKeyDisable(BOOL bOff);
Return code:
TRUE = Disable function key.
FALSE = Enable function key.
-
7.2 Scanner Related Functions
To save power, the decoder IC is disabled when scanner is not in use. It can be enabled
through USI functions. Following functions are meaningful only if decode IC is enabled.
7.2.1 Enable/Disable Scanner trigger key
Function Description:
This function enables/disables trigger keys.
Function call:
void EnableScannerTrigger(BOOL fOn)
Parameter (Input)
fON: BOOL: TRUE = enable trigger keys.
FALSE = disable trigger keys.
7.2.2 Turn on/off Scan Engine
Function Description:
This function emulates trigger keys to turn scan engine on or off. It functions even if trigger keys
are disabled.
Function call:
void SetScannerOn(BOOL fON)
Parameter(Input)
fON: BOOL: TRUE = turn scan engine on.
FALSE = turn scan engine off.
7.2.3 Get Trigger keys Status
Function Description:
This function returns enable/disable status of trigger keys.
Function call:
BOOL GetScannerTrigger(void)
Return code:
TRUE = trigger keys are enabled.
FALSE = trigger keys are disabled.
7.2.4 Get Scanner Status
Function Description:
This function returns the status of scan engine, or trigger key.
Function call:
BOOL GetScannerStatus(void)
Return code:
TRUE = scan engine is on, or trigger key is pressed.
FALSE = scan engine is off, or trigger key is released.
-
7.2.5 Control trigger key’s key event. (FOR PA96x/PA982 Only)
Function Description:
This function is used to inform system if necessary to generate key event for trigger key.
Function call:
void EnableTriggerKeyEvent(BOOL fON)
Parameter(Input)
fON: BOOL: TRUE = Enable key event.
False = Don’t generate key event.
Note:
Trigger key activity will generate an event named TEXT("KeybdTriggerChangeEvent"). Fast,
repeated event generation may cause some trouble for AP By passing FALSE to this
function can prevent upcoming event generation.
7.2.6 Check Trigger key is pressing
Function Description:
This function is used to check if left or right trigger key is pressed or not.
Function call:
BOOL TriggerKeyStatus( int key);
Parameter(Input)
key: int: LEFT_TRIGGER_KEY : left trigger key
RIGHT_TRIGGER_KEY : right trigger key.
Return code:
TRUE = trigger is pressed.
FALSE = trigger is released.
There are two LEDs above the screen of HT6XX/PA96x/PA982, red and green LEDs. Only the
green LED can be controlled by programmer.
Function call:
void GoodReadLEDOn(BOOL fON)
Parameter(Input)
fON: BOOL: TRUE = turn on LED.
FALSE = turn off green LED
.
7.4 Backlight related function
There are two backlight controls, screen backlight and keypad backlight. They are controlled
separately. For screen backlight, you can adjust brightness of backlight also.
7.4.1 Screen Backlight Control
Function Description:
This function turns screen backlight on or off.
Function call:
void BacklightOn(BOOL fON)
Parameter(Input)
fON: BOOL: TRUE = turn on screen backlight.
FALSE= turn off backlight.
7.4.2 Get Screen Backlight Status
Function Description:
This function returns the status of screen backlight.
Function call:
BOOL GetBacklightStatus(void)
Return code:
TRUE = screen backlight is on.
FALSE = screen backlight is off.
7.4.3 Keypad Backlight Control (For HT680/PA96x/PA982 only)
Function Description:
This function turns keyoad backlight on or off.
Function call:
void KeypadLightOn(BOOL fON)
Parameter(Input)
fON: BOOL: TRUE = turn on keypad backlight.
FALSE = turn off backlight.
-
7.4.4 Get Keypad Backlight Status (For HT680/PA966/PA962/PA982 only)
Function Description:
This function returns the status of keyoad backlight.
Function call:
BOOL GetKeypadLightSt atus(void)
Return code:
TRUE = keypad backlight is on.
FALSE = keypad backlight is off.
7.4.5 Screen Backlight Brightness Control
Function Description:
This function adjusts screen backlight brightness.
Function call:
void BrightnessUp(BOOL fup)
Parameters(Input)
Fup: BOOL: TRUE = adjust one step up.
FALSE = adjust one step down.
7.5 SD slot related functions (For HT680/Pa968 Only)
7.5.1 Inquire SD slot status
Function Description:
This function returns SD slot enable/disable status.
This function returns wireless module enable/disable status.
Function call:
BOOL GetWLANStatus()
Return code:
TRUE = Module is enabled.
FALSE = Module is disabled.
7.7.2 Enable/Disable wireless module
Function Description:
This function enables/disables wireless module.
Function call:
void WLANPowerEnable(BOOL bOn);
Parameters(Input)
bOn: BOOL: TRUE = Enable module.
FALSE = Disable module.
7.8 PCMCIA/CF slot related functions
In HT660, it only support CF slot and PA96x/ PA982 can support both CF and PCMCIA
slot. So, please note that PCMCIA function is not work on following API in this
section.
7.8.1 Get physical slot ID
Function Description:
PA96x/PA982 has two PC card slots, slot 0 and slot 1, for PCMCIA and CF. this function return
which slot for PCMCIA or CF
Function call:
UINT GetPCMCIASlotID(UINT)
Parameters(Input)
0 = PCMCIA. (For PA962/PA966/PA982 only)
1 = CF.
Return code:
Physical slot ID.
-
7.8.2 Enable/Disable PCMCIA or CF slot
Function Description:
This function enables/disables PCMCIA or CF slot. PA96x/PA982 assigns physical slot 0 to CF and
slot1 to PCMCIA, which is reversed compared with previous products. The following function is kept
for compatible reason. It takes the same uSocket value as previous products, but reversed
internally.
uSocket: UINT: slot to be applied.
bEnable : BOOL: TRUE = enable specified slot.
FALSE = disable specified slot.
Example
To disable PCMCIA slot and enable CF slot,
#define PCMCIA_SOCKET 0 (PA966/PA962/PA982 only)
#define CF_SOCKET 1
EnablePCMCIASlot1(GetPCMCIASlotID(PCMCIA_SLOT),FALSE);
EnablePCMCIASlot1(GetPCMCIASlotID(CF_SLOT),TRUE);
7.8.4 Inquire PCMCIA/CF slot status
Function Description:
This function returns PCMCIA/CF slot enable/disable status. Terminal assigns physical slot 0 to CF
and slot1 to PCMCIA, which is reversed compared with previous products. The following function is
kept for compatible reason. It takes the same uSocket value as previous products, but reversed
internally.
u8COMPort: The reader’s COM port number (1 – 255)
u32Baudrate: The reader’s baud rate and the defualt is 19200.It supports 9600, 19200,
38400 and 115200.
strAccessCode: The reader’s access code, default is “00000000 ”
u1SecurityMode: To set use security mode or not.
TURN_ON : Open.
TURN_OFF : Close.
u32OpenDelayMs: The delay time for wait reader initial, we suggest this value is 700.
pu32Baudrate: Receive the current reader’s ba ud rate, if it is NULL then it will not receive
the value.
Return code:
Please refer to section 9.5.
9.1.3 Close Reader
Function Description:
To finish controlling the reader.
Function Call:
INT32 RDINTsys_CloseReader (BYTE u8COMPort);
Parameter:
u8COMPort: The reader’s COM port number (1 – 255)
Return code:
Please refer to chapter 9.5.
-
9.1.4 Select Card type
Function Description:
This API change the reader working type with different card type and this should be called before
read the card.
u8COMPort: The reader’s COM port number (1 – 255)
pu8SerialNum: Get reader’s serial number (Length: READER_SERIAL_LEN)
pu8FirmwareVer: Get reader’s firmware version (Length: FIRMWARE_VER_LEN)
u8COMPort: The reader’s COM port number (1 – 255)
u8Select: ANTENNA_ON Open the antenna
ANTENNA_OFF Close the antenna
AUTO_POWER_LOW Auto turn to low power mode.
POWER_LOW Manually turn to low power mode.
Return code:
Please refer to section 9.5.
-
9.2 ISO-15693
9.2.1 Inventory
Function Description:
Set the card to StayQuiet mode and return the card ID.
u8COMPort: The reader’s COM port number (1 – 255)
u8Flag: It specifies the actions to be performed by the VICC and whether
u8Afi: Application Family Identifier parameter, please refer to ISO15693
u8MaskLen: The mask length indicates the number of significant bits of the mask value.
pu8Mask: The mask value is contained in an integer number of bytes. LSB shall be
pu8Dsfid: The Data Storage Format Identifier parameter, please refer to ISO15693
pu8Uid: The point of the buffer which to receive the tag ID.
Return code:
Please refer to section 9.5.
9.2.2 Set StayQuiet Mode
corresponding fields are present or not.
document
It can have any value between 0 and 60 when 16 slots are used and any
value between 0 and 64 when 1 slot is used. LSB shall be transmitted first.
u8COMPort: The reader’s COM port number (1 – 255)
u8Flag: It specifies the actions to be performed by the VICC and whether
corresponding fields are present or not.
pu8Uid: The point of the buffer which contains the tag ID.
u8BlockStart: The first block which you want to read(ex : 0, 1, 2…).
u8BlockCount: The number of blocks which you want to read.
pu8Data: The point of the buffer which receive the block data.
Return code:
Please refer to section 9.5.
9.2.6 Write The Block Data to ISO15693 Tag
Function Description:
Write the block data to the specific ISO15693 tag.
u8COMPort: The reader’s COM port number (1 – 255)
u8Flag: It specifies the actions to be performed by the VICC and whether
corresponding fields are present or not.
pu8Uid: The point of the buffer which contains the tag ID.
u8Block: The block which you want to write(ex : 0, 1, 2…).
pu8Data: The point of the buffer which contains the data.
u8COMPort: The reader’s COM port number (1 – 255)
u8Flag: It specifies the actions to be performed by the VICC and whether
corresponding fields are present or not.
pu8Uid: The point of the buffer which contains the tag ID.
u8Block: The block which you want to write(ex : 0, 1, 2…).
u8COMPort: The reader’s COM port number (1 – 255)
u8Flag: It specifies the actions to be performed by the VICC and whether
corresponding fields are present or not.
pu8Uid: The point of the buffer which contains the tag ID.
u8AfiValue: The value of AFI and about this value please refer to ISO15693 document.
u8COMPort: The reader’s COM port number (1 – 255)
u8Flag: It specifies the actions to be performed by the VICC and whether
corresponding fields are present or not.
pu8Uid: The point of the buffer which contains the tag ID.
u8DsfidValue: The value of DSFID and about this value please refer to ISO15693
u8COMPort: The reader’s COM port number (1 – 255)
u8Indx: The start index of pu8Data.
u8Offset: The data’s length which get from ISO15693AutoInventory4Antennas
pu8Data: The point which will receive the data from reader. The front four bytes
mean which antenna get how many tags, the others are the data.
u8COMPort: The reader’s COM port number (1 – 255)
u8DefaultKeyIndx: The default key index in the reader
pu8DefaultKey: The point of the buffer which contain key.
Please refer to section 9.5.
Lock the ISO-14443A tag and get the tag ID. After select card type, user should call this API before
control the ISO-14443A tag.
u8COMPort: The reader’s COM port number (1 – 255)
u1AutoFind: Auto search card.
TURN_ON
TURN_OFF
pu8Uid: Receive the tag ID.
pu8Atqa: Return the ATQA card type.
ATQA_MIFAER_S50
ATQA_MIFAER_S70
ATQA_ULTRA_LIGHT
pu8Sak: Return the SAK card type.
SAK_ISO14443_3
SAK_ISO14443_4
Please refer to section 9.5.
-
9.3.3 ISO-14443A Close Card
Function Description:
Unlock the ISO-14443A tag. After control the ISO-14443A tag, user should call this API to unlock
the tag.
u8COMPort: The reader’s COM port number (1 – 255)
u1KeyType: The private key type.
CARD_KEY_A
CARD_KEY_B
u1DefaultKey: Use the default password in the reader.
TURN_ON
TURN_OFF
u8DefaultKeyIndx: The index of the default key which in the reader.
u8Block: The block which you want to read (Ex : 0, 1, 2…).
pu8Key: The user defines key value.
pu8Data: Receive the data.
u8COMPort: The reader’s COM port number (1 – 255)
u1KeyType: The private key type.
CARD_KEY_A
CARD_KEY_B
u1DefaultKey: Use the default password in the reader.
TURN_ON
TURN_OFF
u8DefaultKeyIndx: The index of the default key which in the reader.
u8Sector: The sector which you want to read (Ex: 0, 1, 2…).
pu8Key: The user defines key value.
pu8Data: Receive the data.
u8COMPort: The reader’s COM port number (1 – 255)
u1KeyType: The private key type.
CARD_KEY_A
CARD_KEY_B
u1DefaultKey: Use the default password in the reader.
TURN_ON
TURN_OFF
u8DefaultKeyIndx: The index of the default key which in the reader.
u8Block: The block which you want to read (Ex: 0, 1, 2…).
pu8Key: The user defines key value.
pu8Data: The data which user wants to write.
u8COMPort: The reader’s COM port number (1 – 255)
u8BlkNo: The block number which user wants to read (Ex: 0, 1, 2…).
pu8Data: The data which user wants to write to the block.
u8COMPort: The reader’s COM port number (1 – 255)
u8BlkNo: The block number which user wants to read (Ex: 0, 1, 2…).
pu8Data: The data which user wants to write to the block.
u8COMPort: The reader’s COM port number (1 – 255)
pu8Uid: Receive the card ID.
Return code:
Please refer to section 9.5.
-
9.5 Error Code
LRSUCCESS 0x00 Successful completion of request
LRSYSTEM 0x01 Unknown error
LRLASTCARD 0x02 Last Card Still Present
LRNOCARD 0x03 Card is not present
LRCTYPE 0x04 Card Type error
LRPARAM 0x05 Request Parameter error
LRACCESS 0x06 Card access error
LRREAD 0x07 Card read error
LRWRITE 0x08 Card write error
LRINCR 0x09 Purse increment error
LRDECR 0x0a Purse decrement error
LRTRANSFER 0x0b Purse value transfer error
LRRESTORE 0x0c Purse restore error
LRPURSE 0x0d Purse value corrupt
LRMADERR 0x0e Card Directory error
LRFIXERR 0x0f Purse fix error
LRFIXED 0x10 Purse found corrupt but fixed
LRNOTOPEN 0x11 Card not open
LRNOFILE 0x12 File not found
LRBADSIZE 0x13 Bad file size
LRABORTED 0x14 Request aborted
LRMANYCARD 0x15 Too many card present
LRFORMAT 0x16 Card format error
LRCREATE 0x17 Card file create error
LRDELETE 0x18 Card file delete error
LRALREADOPEN 0x19 Card has been opened already
LRALREADCLOSED 0x1a Card has been closed already
LRMSTRKEYLOAD 0x1b Cannot load master keys
LRAPPKEYLOAD 0x1c Cannot load application
LRKEYCARD 0x1d Keycard Error
LRUNFORMAT 0x1e Card has files on it
LRNOKBDCHAR 0x20 No keyboard character
LRNOTIMPL 0x7f Function not implemented
LRUNKNOWN 0x80 Unknown error
LRCCRBUSY 0xbb Reader is busy
LRNOINIT 0xff Reader has not been opened
LRCRDNOTOPEN 0xfa Card has not been opened
LRINUSE 0xfb Card in use by another applications
LRAPPLICERR 0xfc API system error
LRLINKLOST 0xfd Link to Reader has been lost
LRBADCOMPORT 0xfe COM port cannot be accessed
LRNOCRYPTBOX 0xf8 Key-Box not found
LRBADAPPACCES
S
LRNOMAIDFILE 0xf6 Cannot open MAID definition
LRBOXREAD 0xf5 Cannot read from Key-Box
LRBOXWRITE 0xf4 Cannot write to Key-Box
LRBOXNOKEYS 0xf3 No of Keys in Box is zero or
LRSECURE 0xf2 Comms MAC checking failed
LRERRSELREADE
R
Name Value Description
0xf7 Invalid Application access code
0xf1 Cannot change to selected reader
-
10 RH767 UHF reader for WJ
To programming RH767 UHF reader, it need C# DLL “MPR DLL.dll”. Please get it from
below URL.
This is the main class instantiated by Applications. Manages a single WJ Multi-Protocol Reader. Provides
properties and methods for accessing features of the MPR. Talks to the MPR via an MPRComm object.
Generates request frame payloads for MPR API commands. Parses response frame payloads from MPR API
commands. Fires events when MPR public properties change.
10.2 The Parameter in MPRReader
y byteActiveAntenna
This parameter to set and get the active antenna on reader and this value should be 0 on RH767.
y byteTxPower
This parameter to set and get the current antenna power and this value should between 18-30.
y intInvUpdateGap
To set and get the time between two inventories. Please set this value to 0 to get good
performance.
y TimeSpanPersistTime
How long a tag that has been read will persist in the inventory, without being read, while an
inventory is running. If an inventory is stopped, tags do not expire. If a tag is re-read, it will live at
least another PersistTime.
y boolClass0InventoryEnabled
Whether to perform EPC Class 0 inventories.
y boolClass1InventoryEnabled
Whether to perform EPC Class 1 inventories.
y boolGen2InventoryEnabled
Whether to perform EPC UHF Gen2 inventories.
y boolIsConnected
To check the connection with reader.
y boolInvTimerEnabled
To get or set inventory status.
-
10.3 The Function in MPRReader
10.3.1 Connect to RFID Reader
Function Description:
To create a connection with the reader before control it.
BOOL ReadGen2Block (char *szAddress, int nBlock, char *szData);
Parameter:
szAddress: The start address to read blocks.(For example : To address block #2 of the
EPC memory bank, the szAddress is “1002”, the “1” specifies the EPC memory bank and “002”
specifies the block memory(0x002))
nBlock: The number of blocks which user wants to read.
szData: Receive the block’s data.
BOOL WriteGen2Block (char *szAddress, int nBlock, char *szData);
Parameter:
szAddress: The block’s address.
nBlock: The number of blocks which user want to write.
szData: The data which user wants to write in the block and 1 block for 2 – bytes
data.
Return code:
TRUE: Write block data success.
FALSE: Write block data fail.
-
11.7 Select ISO18000-6B Tag
Function Description:
To only detect an ISO18000-6B tag.
Function Call:
BOOL SelectISO180006BTags (char *szData);
Parameter:
szData: Receive the Tag ID.
Return code:
TRUE: Select tag success.
FALSE: Select tag fail.
11.8 Read Data from ISO18000-6B Tag’s Block
Function Description:
To read the data form ISO18000-6B tag’s block.
Function Call:
BOOL ReadISO180006BBlock (char *szAddress, int nBlock, char *szTagID, char *szData);
Parameter:
szAddress: The start address to read blocks.
nBlock: The number of blocks which user wants to read.
szTagID: The tag ID which user wants to read.
szData: Receive the block’s data.
Return code:
TRUE: Read block success.
FALSE: Read block fail.
11.9 Write Block Data to ISO18000-6B Tag
Function Description:
To write data to ISO18000-6B tag's block .
Function Call:
BOOL WriteISO180006BBlock (char *szAddress, int nBlock, char *szTagID, char *szData);
Parameter:
szAddress: The start address of the written blocks.
nBlock: The number of blocks which user want to write.
szTagID: The tag ID which user wants to write.
szData: The data which user wants to write in the block and 1 block for 1-byte data.
Return code:
T RU E : Write block data success.
F AL SE : Write block data fail.
-
11.10 Select All Tags of Any Type
Function Description:
Selecting all supported tags in field.
Function Call:
BOOL InventoryTag (int *nIndex);
Parameter:
nIndex: Return the number of tags.
Return code:
TRUE: Select tag success.
FALSE: Select tag fail.
11.11 Get The tags from Command InventoryTag
Function Description:
Get the tags which read by command InventoryTag.
Function Call:
void GetTags(TAG_DATA *TagData);
Parameter:
TagData : The structure of tag information.
typedef struct TAG_DATA
{
char szTag[50];
TAG_TYPE TagType;
} TAG_DATA;
11.12 Send a Tag Password
Function Description:
After assigned an access password to a tag that support passwords, you must send the password
to the reader before the reader can execute any other Secure State operations for that tag. This
remains a requirement until the password is changed or the password value is reset to zero.
To Build the project copy all header file and RFID186KCReader.lib to you project folder, and then
include rfidstruct.h and RFID18K6CReaderAPI.h to your project.
Steps of how to use RFID reader interface :
1.Initialize the RFID reader interface
2.Open an RFID reader for control
3.Configure RFID reader
such as Operation mode, response data mode, reader's power
state, etc.
4.Configure and enable Antenna
5.Execute Tag Access
such as inventory, read, write, etc.
6.Close the RFID reader
7.Shut down the RFID reader interface.
Note : Before the RFID Reader interface can be used, it must be explicitly initialized. And it must be
properly shuts down before an application exits in order to release any internally-held resources.
If an application fails to shut down the RFID Reader interface, the RFID Reader interface will not be
available for other applications, it may necessary to reset the RFID Reader module and/or reboot the
device.
12.2 Interface Management
12.2.1 Initializing the RFID Reader Interface
Description:
Allows the RFID Reader Interface to properly initialize any internal data structures and put
itself into a well-known ready state. This function must be called before any other RFID
Reader Interface function.
Function Call:
RFID_STATUS RFIDCreate(char *pszVer);
Parameters:
pszVer - A pointer to a character string, contains the version of the RFID Reader Interface.
Returns: RFID_STATUS.
12.2.2 Shutting Down the RFID Reader Interface
Description:
Allows the RFID Reader Interface to properly clean up any internally-held resources. To
prevent resource leaks, an application must ensure that RFID Reader is shut down before the
application exits
Function Call:
RFID_STATUS RFIDDestroy();
Returns: RFID_STATUS.
-
12.3 RFID Reader Configuration
After RFID Reader Interface has been successfully initialized, Developer must open a RFID Reader and
then Configure parameters of RFID Reader for the current operation environment. Such as the operation
mode, data response format, the power state of RFID Reader and other parameters.
12.3.1 Open RFID Reader
Description:
Open a RFID Reader for control. An application must call this function before
control the RFID Reader.
Function Call:
RFID_STATUS RFIDOpen(int nRadio = 0);
Parameters:
nRadio - Reserved for future use.
Returns: RFID_STATUS.
12.3.2 Close RFID Reader
Description:
Release control of a RFID Reader.
Function Call:
RFID_STATUS RFIDClose (int nRadio = 0);
Parameters:
nRadio - Reserved for future use.
Returns: RFID_STATUS.
12.3.3 Set the Operation Mode for the RFID Reader
Description:
The RFID Reader module may operate either in continuous or non-continuous mode. In
continuous mode, when a tag-protocol-operation cycle (i.e. one iteration through all enabled
antenna ports) has completed, the RFID Reader module begins a new tag protocol-operation
cycle with the first enabled antenna port and continues to do so until the operation is
explicitly cancelled by the application. In non-continuous mode, only a single tag-protocoloperation cycle is executed upon the RFID radio module.
12.3.5 Set the Response Data’s Mode of the RFID Reader
Description:
Allows the application to control the mode of data reporting for tag-access operations. By
default, the reporting mode is set to "normal". RFID18K6CReaderAPI.dll only support
“Compact” and “Normal” format. Compact mode contains the minimum amount of data
necessary to return the results of tag-protocol operations to the applicatio n; Normal mode
augments compact mode by interleaving additional status/contextual information in the
operation results, so that the application can detect. For example, the start of invent ory rounds ,
when a new antenna is being used etc.
pValue – pointer to variable that contain the value of configuration parameter.
Returns: RFID_STATUS.
12.4 Antenna Port Configuration
The RFID Reader module supports active use of one or more logical antenna ports, each mapped to a
physical transmit and a physical receive antenna port. An application may retrieve status and configure
several parameters. These include: Enable/Disable RFID Reader module, Power Level, Dwell Time,
Number of Inventory Cycles, Logical-to-Physical Antenna Port Mapping. Please refer to below function
description.
12.4.1 Enabling and Disabling Anennas
Description:
Set the state of a RFID Reader module's antenna port.
antennaPort – the logical antenna port for which status is to be retrieved.
pStatus – pointer to the structure which will contain the antenna port's status. Must not be
NULL.
Returns: RFID_STATUS.
12.4.3 Configuring Antenna-Port Parameters
When configuring or retrieving the configuration for logical antenna port, an application has several
parameters that it can set/retrieve. See RFID_ANTENNA_PORT_CONFIG structure.
Description:
Allows an application to configure several parameters for a single logical antenna port – for
example, dwell time, power level. The application should first retrieve the antenna port's
current settings and then, update the values in the structure that are to be changed.
antennaPort – The logical antenna port to cnfigue.
pConfig – A pointer to the structure th at contains the antenna-port configuration parameters.
Must not be NULL.
Returns: RFID_STATUS.
-
12.4.4 Retrieving Antenna-Port Configuration
Description:
Retrieve a single logical antenna port's configuration parameters – for example, dwell
time, power level, and number of inventory cycles. Even the logical antenna port is disabled.
antennaPort – The logical antenna port to configure.
pConfig – A pointer to a structure that contains the antenna-port configuration parameter.
Returns: RFID_STATUS.
12.5 ISO 18000-6C Tag Access
The interface support the following Tag access operations:
.Inventory
.Read
.Write
.Kill
.Lock
Tag accesses are comprised of three operations:
Specifying Tag-selection Criteria(pre-singualtion): An application may require that the tag population
be logically partitioned into disjoint groups before issuing an access command. After the tags are
partitioned, the specified operation may then be applied to one of the groups. An application may specify
tag-selection criteria to perform the tag partitioning before tags are singulated.
Apply post-singulation match mask: After the RFID Reader module has singulated a tag, it can
optionally apply an application-supplied post-singulation match mask to the singulated tag's EPC to
further filter the singulated tag.
Apply ISO 18000-6C access command: Only tags that match the optionally-supplied selection criteria
and post-singulation match mask have the access command applied to them.
Note: when perform tag read, write, kill, lock operation, the RFID Reader module uses only the first
enabled logical antenna.
Tag Operation Functions
When the application issues a tag operation (i.e. Iventory, read, etc.) to the interface, it also
provides a pointer to an application-define callback function. The interface in turn issues the
request to the RFID Reader and then returns the operation result via the application-defined
callback. Tag operation functions can execute either in Block or Non-block m ode. In Block mode,
the function will waiting for the tag operation to finish and, LPACCESS_STATUS field will contain
the operation result. If the timeout lapse this access operation will fail; In Non-block mode, this
function will return immediately and the operation result will return by the application-defined
callback function.
HWND – The window issue the tag operation.
UNIT – Undefine reserve for future use
WPARAM – Undefine reserve for future use
LPARAM – a pointer to the structure of ACCESS_S TA T US whic h cont a in the
operation result.
Returns: None
-
12.5.2 Get Antenna’s Response Status
Description:
After the tag access operation executed call this function to retrieve the Antenna's
status. In Block mode call this function follow the tag access function; In Non-block
mode call this function in application-defined callback function.
nAntnna – Indicate which antenna's status to be retrieve.
lpAntennaStatus –A pointer to the structure of ANTENN A_S TA TUS that con ta in the
antenna's status.
Returns: True/False
12.5.3 Get Tag Access Response Data
Description:
After the tag access operation executed call this function to retrieve the access
response data. In Block mode, call this function follow the tag access function; In
Non-block mode call this function in application-defined callback function.
Function Call:
BOOL RFIDGetAccessData(int nAntenna, int nIndex, LPACCESS_DATA
lpAccessData);
Parameters:
nAntenna – Indicate which antenna's access data to be retrieve.
nIndex – Index of the access's data
lpAccessData – A pointer to the structure of ACCESS_DATA that contain the access's
data.
Returns: True/False
12.5.4 Set Tag Operation Stop Count
Description:
Set the maximum number of tags to which the tag operation will be applied. If this
number is zero, then the operation is applied to all selected tags. If this number is nonzero, the antenna-port dwell time and inventory-round-cycles still apply.(For version
1.0, this field may have a maximum value of 1.).
Function Call:
void RFIDSetStopCount(int nStopCount);
Parameters:
nStopCount – the maximum number of tag to which tag operation are applied. Default
value is zero.
Returns: None
12.5.5 Get Tag Operation Stop Count
Description:
Get the maximum number of tags to which the tag operation will be applied. For more
information see “12.5.4 Set Tag Operation Stop Count”.
Function Call:
int RFIDGetStopCount();
Parameters:
None.
Returns: int – the maximum number of tag.
-
12.5.6 Tag Inventory Operation
Description:
Executes a tag inventory for all tags of interest. If the selection Criteria and postsingulation is specified, tags will be partitioned first.
stInventory – Inventory operation parameters.
lpAccessStatus - Contain the operation result, use in block mode;
bBlock – Block mode.
nTimeout – Timeout for the access operation, use in block mode.
Returns: None
12.5.7 Tag Read Operation
Description:
Read one or more 16-bit words from any of a tag's memory banks. While a read may
be used to retrieve a set of tags EPC data, if the EPC is the only desired data,
performing an inventory operation is more efficient. (Read may only be performed on
16-bit word boundaries and for multiples of 16-bit words) if one or more of the memory
words specified by the offset/count combinaion do not exist or are read-locked, the
read from the tag fails.
stRead/stReadEx – read operation parameters
lpAccessStatus - Contain the operation result. Use in block mode;
bBlock - Block mode.
nTimeout - Timeout for the access operation, use in block mode.
Returns: None
12.5.8 Tag Write Operation
Description:
Write one or more 16-bit words to he specified memory bank. (Write could only
beginning at the specified 16-bit offset. maximum number of 16-b it word to be written
is 8).
If wants to write more than eight 16-bit words data to a tag a one time, please use
RFIDTagWriteEx.
stWrite/stWriteEx – write operation parameters
lpAccessStatus - Contain the operation result. Use in block mode;
bBlock - Block mode.
nTimeout - Timeout for the access operation, use in block mode.
Returns: None
-
12.5.9 Modify EPC Operation
Description:
Modify the target tag's EPC.
Function Call:
void RFIDTagWriteEPC(RFID_WRITE_EPC stEPC, LPACCESS_STATUS
lpAccessStatus, int nTimeout = 3000);
Parameters:
stEPC – Contain Modify EPC operation parameters .
lpAccessStatus - Contain the operation result.
nTimeout - Timeout for the access operation.
stKill/stKillEx – Kill operation parameter.
lpAccessStatus - Contain the operation result. Use in block mode;
bBlock - Block mode.
nTimeout - Timeout for the access operation, use in block mode.
Returns: RFID_STATUS
12.5.11 Tag Lock Operation
Description:
Execute a tag lock(setting a tag's access permissions).
stLock/stLockEx – Lock operation parameter.
lpAccessStatus - Contain the operation result. Use in block mode;
bBlock - Block mode.
nTimeout - Timeout for the access operation, use in block mode.
Returns: RFID_STATUS
12.5.12 Tag Pre-singulation Operation
Description:
Configures the tag-selection criteria for the ISO 18000-6C select command, this
command should be issued prior to any tag access operation. The tag-selection
criteria will stay in effect until the next call of tag-selection criteria.
Function Call:
RFID_STATUS RFIDTagSelectCriteria(RFID_SELECT_CRITERIA *pCriteria, int
*pnCount, BOOL bSet = TRUE);
Parameters:
pCriteria – Contain the tag-selection criteria parameters
pnCount – The number of criteria. This value must be between 0 and 8, inclusive.
When set to 0 the tag-selection criteria will be deleted.
bSet – TRUE set the tag-selection criteria parameters;
FALSE retrieve the tag-select criteria parameters.
-
Returns: RFID_STATUS
-
12.5.13 Tag Post Singulation Operation
Description:
Configures the post-singulation match criteria to be used by the RFID radio module.
An application can use post-singulation to filter tags, based upon all or part of the tag's
EPC. The post-singualtion match criteria will stay in effect until the next call of postsingulation.(All the tag's access operation will apply to the which has been singulated
only.)
Function Call:
RFID_STATUS RFIDTagPostSingulation(RFID_POST_SINGULATION *pCriteria, int
*pnCount, BOOL bSet = TRUE);
Parameters:
pCriteria – Contain post-singulation match criteria parameters.
pnCount – The number of criteria. When set the post-singulation match criteria this
value must be 1; When delete the post-singulation match criteria this value must be 0;
bSet – TRUE set the post-singulation parameters;
FALSE retrieve the post-singulation parameters.
Returns: RFID_STATUS
12.5.14 Tag Query Group Operation
Description:
Specifies which tag group will have subsequent access operations applied to it.
algorithm – The singulation algorithm to be configured.
pParms – A pointer to a structure that contains the singulation algorithm parameters.
bSet – Set or Retrieve the specify singulation alogrithm parameters.
Returns: RFID_STATUS
-
12.5.17 Cancelling a Tag Operation
Description:
Stops a currently-executing tag operation on a RFID Reader.
Function Call:
RFID_STATUS RFIDCancelOperation ();
Parameters: None
Returns: RFID_STATUS
12.5.18 Aborting a Tag Operation
Description:
Terminate a tag operation immediately. Any response packet will be discarded.
Function Call:
RFID_STATUS RFIDAbortOperation ();
Parameters: None
Returns: RFID_STATUS
12.5.19 Clear RFID Reader Module’s Error State
Description:
Clear the error state for the RFID Reader module MAC firmware.
Function Call:
RFID_STATUS RFIDClearError ();
Parameters: None
Returns: RFID_STATUS
12.5.20 Ability of Hold or Discard the Duplicate Tags
Description:
Hold or discard the duplicate tags when inventory. Call this function before inventory.
length - The length of the structure in bytes. Must be set to by the application to
sizeof(RFID_ANTENNA_PORT_CONFIG)
powerLevel - The power level for the logical antenna port's physical transmit antenna.
This value is specified in 0.1 (i.e., 1/10th) dBm. the value must between 0 and 300 and,
280 is The most appropriate valu e.
dwellTime - The number of milliseconds to spend on this antenna port during a cycle.
Zero indicates that antenna usage will be ontrolled by the numberInventoryCycles field.
numberInventoryCycles - The number of inventory rounds to perform with this antenna
port. Zero indicates that the antenna usage will be controlled by the dwellTime field.
physicalRxPort - he underlying physical receive antenna port associated with the
logical antenna port. Must be between 0 and 3, inclusive.
physicalTxPort - The underlying physical transmit antenna port associated with the
logical antenna port. Must be between 0 and 3, inclusive.
antennaSenseThreshold - The measured resistance, specified in ohms.
Note: *In version 1.0 physicalRxPort and physicalTxPort's value must be the same.
*dwellTime and numberInventoryCycles can not both be zero. *length field must be fill
with the length of the structure before call the config function.
-
12.7.2 ACCESS_STATUS
Description:
Contain the information of the tag operation result.
ftStartTime – Time of the Tag operation start
ftEndTime – Time of the Tag operation end
dwResponseMode – Operation Response data reporting mode can be Compat or
Normal.
dwOperationMode – Working mode of the RFID Reader module can be continuous or
non-continuous.
dwErrorCode – If tag operation failed this field contains the error code. Zero indicates
no error.
dwStatus – Return by the Tag operation function indicate the library status and error
codes. Zero indicates no error.
unAntennas – The amount of antennas.
12.7.3 ANTENNA_STATUS
Description:
Contains the information of the antenna that take effect in the tag operation executed.
ftStartTime – Time of this antenna start to execute Tag operation.
ftEndTime – Time of this antenna finish execute Tag operation.
unAntenna – Antenna No.
unCount – The number of tag this antenna returns.
-
12.7.4 ACCESS_DATA
Description:
Contain access data of the tag return by the antenna.
Define:
typedef struct ACCESS_ DATA _TAG{
INT16U unEPCLength;
INT16U unRSSI; //The receive signal strength
BYTE pnEPC[68]; //PC + EPC + CRC
INT16U unDataLength;
BYTE pnData[256]; //Access data or access Status
} ACCESS_DATA, *LPACCESS_DATA;
Fields:
unEPCLength–The length of the EPC(include PC and CRC)
unRSSI – The receive signal strength.
pnEPC[68] – Data of EPC(2 bytes PC + EPC + 2 bytes CRC).
unDataLength – Access Data length.
pnData[256] – Data retrieve from Tag of write to Tag.
hWnd - The Parent window which issue the Tag operation.
lpfnStartProc - Application-defined callback function. The RFID Reader Interface call
this function before execute Tag operation.
lpfnStopProc - Application-defined callback function. The RFID Reader Interface call
this function after finished Tag operation.
bank – The memory bank from which to read.
offset – The offset of the first 16-bit word to read from the specified memory bank.
count – The number of 16-bit words to read.(If this value zero and bank is EPC, the
read returns the contents of the EPC starting at the 16-bit word specified by offset
through the end of the EPC.This value must be in the range 1 to 255, inclusive.)
accessPassword – The access passowrd for the tags. A value of zero indicates no
hWnd - the same as RFID_READ.
lpfnStartProc – the same as RFID_READ;
lpfnStopProc – the same as RFID_READ;
bank – the same as RFID_READ;
offset – the same as RFID_READ;
count – the same as RFID_READ;
accessPassword[8] – The access passowrd for the tags. It’s 8 bytes' hex char(0~f).
hWnd – The parent window which issue the Tag operation.
lpfnStartProc - Application-defined callback function. The RFID Reader Interface call
this function before execute Tag operation.
lpfnStopProc - Application-defined callback function. The RFID Reader Interface call
this function after finished Tag operation.
verify – A flag that indicates if the data written to the tag should be read back from the
tag to verify that it was successfully written. A non-zero value indicates that the tag's
memory should be read to verify.
verifyRetryCount – The maximum number of times the write should be retried if the
write-verify failure. This value must be between 0 and 7.
accessPassword – The access password for the tags. A value of zero indicates no
access password.
bank – The memory bank from which to read.
offset – The offset of the first 16-bit word to read from the specified memory bank.
count – The number of 16-bit words to read.(If this value zero and bank is EPC, the
read returns the contents of the EPC starting at the 16-bit word specified by offset
through the end of the EPC.This value must be in the range 1 to 8, inclusive.)
pnData[8] – Contains the data to be written to the tag's specified memory bank. The
high-order byte of pnData[n] is written to the tag's memory-bank byte at 16-bit
offset(offset + n). The low-order byte is write to the next byte.
hWnd – the same as RFID_WRITE
lpfnStartProc - the same as RFID_WRITE
lpfnStopProc - the same as RFID_WRITE
verify – the same as RFID_WRITE
verifyRetryCount – the same as RFID_WRITE
accessPassword[8] – The access passowrd for the tags. It’s 8 bytes' hex char(0~f)
pnEPC[64] – EPC of the specify tag to be writed to. If this parameter is NULL, the data
will be written to the tags in the field. Otherwise data will be written to the tag specify
by the EPC.
bank – the same as RFID_WRITE
offset – the same as RFID_WRITE
count – the same as RFID_WRITE
pnData[256] – Contains the data to be written to the tag's specified memory bank(HEX
hWnd - the same as RFID_WRITE.
lpfnStartProc – the same as RFID_WRITE
lpfnStopProc – the same as RFID_WRITE
verify – the same as RFID_WRITE
verifyRetryCount – the same as RFID_WRITE
accessPassword[8] – the same as RFID_WRITE_EX
pnOldEPC[64] – the old EPC of the tag to be modify
tagType – Reserve for future use.
PnNewEPC[64] – the new EPC of the target tag.
hWnd - the same as RFID_ KILL.
lpfnStartProc – the same as RFID_KILL.
lpfnStopProc – the same as RFID_KILL.
accessPassword[8] – The access passowrd for the tags. It’s 8 bytes' hex char(0~f). killPassword[8] – The kill passowrd for the tags. It’s 8bytes' hex char(0~f).
hWnd –The Parent window which issue the Tag operation.
lpfnStartProc – Application-defined callback function. The RFID Reader Interface call
this function before execute Tag operation.
lpfnStopProc – Application-defined callback function. The RFID Reader Interface call
this function after finished Tag operation.
accessPassword - Access password for the tags(zero indicates no access password).
killPasswordPermissions - The access permissions for the tag's kill password.
accessPasswordPermissions - The access permissions for the tag's access password.
epcBankPermissions - The access permissions for the tag's EPC memory bank.
tidBankPermissions - The access permissions for the tag's TID memory bank.
userBankPermissions - The access permissions for the tag's USER memory bank.
The access permissions can be set as below:
Name Value Description
Allow 0 Password permission: Can be read and write.
Bank permission: The memory bank is writeable.
Always Allow 1 Password permission: Can be read and write.
Bank permission: The memory bank is writeable.
This permission is set permanently.
Password protected 2 Password permission: Need password to read and write.
Bank permission: Need password to write to the memory
bank.
Always Deny 3 Password permission: Can not be read and write.
When the kill password permission is set to be this value,
the tag can not be killed.
Bank permission: The memory bank can not be written.
This permission is set permanently.
No Change 4 The permission should remain unchanged.
hWnd –The same as RFID_LOCK.
lpfnStartProc –The same as RFID_LOCK.
lpfnStopProc –The same as RFID_LOCK..
accessPassword[8] - The access passowrd for the tags. It’s 8 bytes' hex char(0~f).
killPasswordPermissions - The same as RFID_LOCK.
accessPasswordPermissions - The same as RFID_LOCK.
epcBankPermissions - The same as RFID_LOCK.
tidBankPermissions - The same as RFID_LOCK.
userBankPermissions - The same as RFID_LOCK.
12.7.15 RFID_SELECT_CRITERIA
Description:
The structure of pre-singulation matches criteria.
bank - The memory bank to match against
offset - The offset of the first bit to match
count - The number of bits in the mask
mask[RFID_18K6C_SELECT_MASK_BYTE_LEN] - The bit pattern to match.
target - What will be affected by the action(S0~S4,SL)
action - The action which will be performed upon the tag populations (i.e, matching
and non-matching) during the selection.
enableTruncate – Should the EPC be truncated when the tag is singulated? Non-zero
value indicate that the EPC is truncated. If enableTruncate is true: bank must be EPC;
Target must be RFID_18K6C_TARGET_SELECTED_FLAG
-
12.7.16 RFID_POST_SINGULATION
Description:
The structure of post-singulation matches criteria.
offset – offset in bits, from the start of the EPC.
count –The number of bits in the mask.Alength of zero causes all EPC to match. If
(offset + count) falls beyond the end of the mask, the tag is considered nonmatching.(valid values are 0 to 396).
mask[RFID_18K6C_SINGULATION_MASK_BYTE_LEN] – the bit pattern to
match.(hex chars).
match – Determines if the associated tag operation will be applied to tags that match
the maskor not.
-
12.8 Error Code
There are two types of error codes. One is returned by RFID Library interface indicates RFID library
status and the other is return by the RFID module’s firmware contains access operation result.
RFID Library status and error codes:
Name Value
RFID_STATUS_OK 0 Success
RFID_ERROR_ALREADY_OPEN -9999 Attempted to open a radio that is already open
RFID_ERROR_BUFFER_TOO_SMALL -9998 Buffer supplied is too small
RFID_ERROR_FAILURE -9997 General failure
RFID_ERROR_DRIVER_LOAD -9996 Failed to load radio bus driver
RFID_ERROR_DRIVER_MISMATCH -9995 Library cannot use version of radio bus driver present
on system
RFID_ERROR_EMULATION_MODE -9994 Operation cannot be performed while library is in
emulation mode
RFID_ERROR_INVALID_ANTENNA -9993 Antenna number is invalid
RFID_ERROR_INVALID_HANDLE -9992 Radio handle provided is invalid
RFID_ERROR_INVALID_PARAMETER -9991 One of the parameters to the function is invalid
RFID_ERROR_NO_SUCH_RADIO -9990 Attempted to open a non-existent radio
RFID_ERROR_NOT_INITIALIZED -9989 Library has not been successfully initialized
RFID_ERROR_NOT_SUPPORTED -9988 Function not supported
RFID_ERROR_OPERATION_CANCELL
ED
RFID_ERROR_OUT_OF_MEMORY -9986 Library encountered an error allocating memory
RFID_ERROR_RADIO_BUSY -9985 The operation cannot be performed because the
RFID_ERROR_RADIO_FAILURE -9984 The underlying radio module encountered an error
RFID_ERROR_RADIO_NOT_PRESENT -9983 The radio has been detached from the system
RFID_ERROR_CURRENTLY_NOT_ALL
OWED
RFID_ERROR_RADIO_NOT_RESPON
DING
RFID_ERROR_NONVOLATILE_INIT_F
AILED
RFID_ERROR_NONVOLATILE_OUT_O
F_BOUNDS
RFID_ERROR_NONVOLATILE_WRITE
_FAILED
RFID_ERROR_RECEIVE_OVERFLOW -9977 The underlying transport layer detected that there
-9987 Operatio n was cancelled by call to cancel op eration,
close radio, or shut down the library
radio is currently busy
-9982 The RFID library function is not allowed at this time
-9981 The radio module's MAC firmware is not responding
to requests
-9980 The MA C firmware encountered an error while
initiating the nonvolatile memory update. The MAC
firmware will return to its normal idle state without
resetting the radio module
-9979 An attempt was made to write data to an address that
is not in the valid range of radio module nonvolatile
memory addresses.
-9978 The MA C firmware encountered an error while trying
to write to the radio module's nonvolatile memory
region.
was an overflow error resulting in one or more bytes
of the incoming data being dropped. The operation
was aborted and all data in the pipeline was flushed.
-
Access Operation Result:
Value Description
0x00 Success
0x01 Read after write verify failed.
0x02 problem transmitting tag command
0x03 CRC error on tag response to a write
0x04 CRC error on the read packet when verifying the write
0x05 Maximum retry's on the write exceeded
0x06 Failed waiting for read data from tag, possible timeout.
0x07 Failure requesting a new tag handle.
0x0A error waiting for tag response, possible timeout
0x0B CRC error on tag response to a kill
0x0C Problem transmitting 2nd half of tag kill.
0x0D tag responded with an invalid handle on first kill command
0xFA tag has insufficient power to perform the memory write
0xFB specified memory location is locked and/ or permalocked
0xFC specified memory location does not exist
0xFD Tag failed to response within timeout
0xFE CRC was invalid
0xFF general error
-
12.9 Support Dot Net Compact Framework
R1000ReaderCF.dll is a C# wrap of Native C/C++ DLL of RFID18k6cReader.dll. It provides APIs for Dot
Net Compact Framework programmer to control the RFID Reader.
12.9.1 Class “R1000Reader”
This is main class instantiated by applications. It provides properties and methods for accessing the
RFID Reader. The methods in R1000ReaderC F ha ve the same name as their Native impleme ntatio n.
12.9.2 Programming Model
The first is add reference of R1000ReaderCF.dll to your project.
C# example:
using Unitech.R1000.Reader;
using Unitech.R1000.Reader.Con stants ;
using Unitech.R1000.Reader.St ructu res;
//Create and Initialize the RFID Library
String strVersion = S trin g. Emp ty ;
R1000Reader.RFIDCreate(ref strVersion);
//Open the RFID Reader
R1000Reader.RFIDOpen(0);
//Inventory & retrieve the tag's epc
RFID_INVENTORY stI nven tor y = n ew RF ID_I NVE NTO RY();
ACCESS_STATUS stAccessStatus = new ACCESS_STATUS();
//operation in blocking mode
R1000Reader.RFIDInventory(stInventory, ref stAccessStatus, true, 3000);
if (stAccessStatus .dwS t atus == 0 & & stA ccessS tat us. dwErro rCod e == 0)
{
for (int i = 0; i < stAccessStatus.unAntenna s; i++)
{
ANTENNA_STATUS stAntennaStatus = new ANTENNA_STATUS();
R1000Reader.RFIDGetAntennaStatus(i, ref stAntennaStatus);
for (int j = 0; j < stAntennaStatus.unCount; j++)
{
ACCESS_DATA accessData = new ACCESS_DATA();
UInt32 nRet = R1000Reader.RFIDGetAccessData(i, j, ref accessData);
if (nRet == 1 && accessData.unEPCLength > 0)
{
//Get EPC from accessData.pnEPC;
}
}
}
}
//Close the RFID Reader
R1000Reader.RFIDClose(0);
//Destroy RFID Library
R1000Reader.RFIDDestroy();
-
13 Useful function call – without include SysIOAPI.DLL
Below API maybe useful for you to control HT6xx/PA96x
Open camera and initial video resource for encoding / decoding processes. This must be called
before any other functions.
Function Call:
bool OpenCamera();
Return code:
TRUE: Success.
FALSE: Fail
17.2 Release Camera
Function Description:
Close camera and release video resource. This must be called after using the camera.
Function Call:
void ReleaseCamera();
17.3 Start Preview
Function Description:
Start preview within a rectangle area as given in the parameters. Using screen coordinates. Actual
displaying area can be a little smaller than the rectangle for hardware reasons. Preview is camera
real time image. This must be called before capturing image or recording video.
Function Call:
bool StartPreview(int left, int top, int width, int height);
Parameter:
left: Left of preview position.
top: Top of preview position.
width: Width of preview size.
height: Height of preview size.
Return code:
TRUE: Success.
FALSE: Fail.
17.4 Stop Preview
Function Description:
Finish the preview. This must be called before starting playback
Function Call:
void StopPreview();
-
17.5 Get transparent color key
Function Description:
Get which color is transparent of display context. The transparent pixels will be replaced by camera
image.
Function Call:
int GetColorKey();
Return code:
The color key is described by ARGB value.
17.6 Capture Image
Function Description:
Capture a photo with the specified reso lution and store in JPEG file format. This must be called
within StartPreview() and StopPreview().
Function Call:
bool CaptureImage(string filename, int width, int height);
Parameter:
filename: Storing path.
width: Width of resolution.
height: Height of resolution.
Return code:
TRUE: Success.
FALSE: Fail.
17.7 Start Capture Video
Function Description:
Start video capturing with the specified resolution and frame rate. This will record video in “m4v” file
format continuously until called EndVideoCapture(). This must be called within StartPreview() and
StopPreview().
Function Call:
bool StartVideoCapture(string filename, int width, int height,int fps);
Parameter:
filename: Storing path.
width: Width of resolution.
height: Height of resolution.
fps: Frame rate of recording video.
Return code:
TRUE: Success.
FALSE: Fail.
-
17.8 Stop Capture Video
Function Description:
Stop video capturing.
Function Call:
bool EndVideoCapture()
Return code:
TRUE: Success.
FALSE: Fail.
17.9 Initial Playback Decoder
Function Description:
Initial the playback decoder.
Function Call:
bool InitializeDecoder(string filename, int left, int top, int width, int height);
Parameter:
filename: Video file path.
left: Left of playback position.
top: Top of playback position.
width: Width of playback size.
height: Height of playback size.
Return code:
TRUE: Success.
FALSE: Fail.
17.10 Release Playback Decoder
Function Description:
Release the playback decoder.
Function Call:
void UnInitializeDecoder();
17.11 Start Playback
Function Description:
Start playing video. Playback will be displayed in the same screen as the preview screen.
Function Call:
bool StartPlayback();
Return code:
TRUE: Success.
FALSE: Fail.
-
17.12 Stop Playback
Function Description:
Stop playing video.
Function Call:
void ReleaseAudio();
-
18 Fingerprint related functions
Please get sample program and manual from below URL.