The text of a manual · part 3 of 5
HT660/PA96x/PA982/RH767 Programming Manual, pages 21 to 30
Pages 21 to 30 of 46
The original document is the PDF (173 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Unitech PA966
Page 21
EAN128Brace Remove AimingTime
Esc,0,4,92,m,S1,BCC 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 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 Code 2 EAN 13 3 UPC A 4 EAN 8 5 UPC E 6 I25 7 Codabar 8 Code 128 9 Code 93 10 S25 11 MSI 12 EAN 128 13 Code 32 14 Delta 15 Label 16 Plessey 17 Code 11 18 Toshiba 19 reserved 20 Track 1 21 Track 2 22 Track 3 23 More than 1 track 24 reserved 25 RS232 26 reserved 27 reserved 28 reserved 29 reserved 30 reserved 31 reserved 32 reserved 33 reserved
-
Page 22
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 =2 =3 =4 =0
Create new thread fail Cannot re-enable Cannot open COM2 Upload parameter from Hamster fail 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.
-
Page 23
4.4. Read barcode data Function Description: Get input barcode data and its type from system buffer. Function call: BOOL PT_GetBarcode( TCHAR *szBarcodeBuffer,TCHAR *cType); Parameter: (output) szBarcodeBuffer : string buffer for storing input data cType : Type of Input data =00H Full Code 39 =01H STD Code 39 =02H EAN-13 =03H UPC-A =04H EAN-8 =05H UPC-E =06H I-25 =07H CODABAR =08H Code 128 =09H Code 93 =0Ah STD 25 =0BH MSI =0CH EAN-128 =0DH Code 32 =0EH DELTA =0FH LABEL =10H PLESSEY =11H Code 11 =12H TOSHIBA Return code: 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
-
Page 24
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
-
Page 25
6. UnitechAPI.DLL In HT660/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 HT660/PA96x/PA982. However, it will make RS232 port useless if user want to connect HT660/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 \programming\UnitechAPI from
HT660/PA96x/PA982 technical binder zip files from
6.1. Disable ActiveSync Function Description: After called this function, HT660/PA96x/PA982 will not automatically execute ActiveSync program( “repllog.exe”) when user plug RS232 cable into HT660/PA96x/PA982. Function call: BOOL RS232EventEnable (VOID); Return code: =TRUE OK =FALSE Fail
6.2. Enable ActiveSync Function Description: After called this function, HT660/PA96x/PA982 will automatically execute ActiveSync program ( “repllog.exe”) again when user plug RS232 cable into HT660/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, HT660/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: -
Page 26
=TRUE =FALSE
OK 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 =FALSE
OK 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 =FALSE
OK 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 =FALSE
OK 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 =FALSE
-
OK Fail
Page 27
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
-
Page 28
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 HT660/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:
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. Function call:
int
GetKeypadType (void)
Return code: 0 = no keypad 1 = 22-key keypad (For PA962/PA966/PA982 using) 2 = 36-kwy keypad (For PA966/HT660 using)
-
Page 29
7.1.4. Disable/enable power button Function Description:
To enable / disable power button Function call:
VOID DisablePowerButton (BOOL) Parameter (Input)
TRUE = Disable power button. FALSE = Enable power button. Return code: None
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 function. Function call:
void SetGetVKWorkingMode(int) Parameter (input)
For HT660 : 0 = normal 1 = lower case. 2 = upper case. For PA962/PA966/PA982 0 = hide the selection window. 1 = show lower case selection window. 2 = show upper case selection window. Return code: None
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 PA962/PA966/PA982 only) Function Description:
This function is used to check if alpha key is pressed or not. Function call:
BOOL GetKeypadAlphaKeyStatus(void); Return code:
TRUE = Alpha key is pressed. FALSE = Alpha key is released.
-
Page 30
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.
Return code:
7.2.2. Turn on/off Scan Engine Function Description:
This function emulates trigger keys to turn scan engine on or off. functions even if trigger keys are disabled. Function call:
void SetScannerOn(BOOL fON) Parameter(Input)
fON: BOOL: Return code:
TRUE = turn scan engine on. False= turn scan engine off.
none
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.
-
It