Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 4 of 5

HT660/PA96x/PA982/RH767 Programming Manual, pages 31 to 40

Pages 31 to 40 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 31

7.2.5. Control trigger key’s key event. 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.

Return code: none Note: Trigger key activity will generate an event named EXT("KeybdTriggerChangeEvent"). Fast, repeated event generation may cause some trouble for AP By passing FALSE to this function can prevent upcoming event generation

-

Page 32

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 RIGHT_TRIGGER_KEY

: left trigger key : right trigger key.

Return code:

TRUE = trigger is pressed. FALSE = trigger is released. Example: #define kKeybdTriggerEventName TEXT("KeybdTriggerChangeEvent") #define kKeybdAlphaKeyEventName TEXT("KBDAlphaKeyChangeEvent") #define LEFT_TRIGGER_KEY 1 #define RIGHT_TRIGGER_KEY 2 gKeyEvents[0] = CreateEvent(NULL, TRUE, FALSE, kKeybdTriggerEventName); gKeyEvents[1] = CreateEvent(NULL, TRUE, FALSE, kKeybdAlphaKeyEventName); while (1) { WaitForMultipleObjects(2, gKeyEvents, FALSE, INFINITE); TriggerKeyStatus(LEFT_TRIGGER_KEY); TriggerKeyStatus(RIGHT_TRIGGER_KEY); }

7.3. LED related function Function Description:

There are two LEDs above the screen of HT660/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: Return code:

-

TRUE = turn on screen backlight. FALSE= turn off backlight.

Page 33

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 PA966/PA962/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.

Return code:

7.4.4. Get Keypad Backlight Status (For PA966/PA962/PA982 only) Function Description:

This function returns the status of keyoad backlight. Function call:

BOOL GetKeypadLightStatus(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: Return code:

-

BOOL:

TRUE = adjust one step up. FALSE = adjust one step down.

Page 34

7.5. 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.5.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.5.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. Function call:

void EnablePCMCIASlot(UINT uSocket, BOOL bEnable) Parameters(Input)

uSocket:

UINT:

bEnable :

BOOL:

0 = PCMCIA slot. (PA962/PA966/PA982 only) 1 = Compact flash slot. TRUE = enable specified slot. FALSE = disable specified slot.

7.5.3. Enable/Disable IO slots Function Description:

This function enables/disables IO slots. It is recommended to use with function GetPCMCIASlotID() for platform independent reason. Function call:

void EnablePCMCIASlot1(UINT uSocket, BOOL bEnable) Parameters(Input)

uSocket: bEnable :

UINT: BOOL:

slot to be applied. 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); -

Page 35

7.5.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. Function call:

BOOL GetPCMCIAStatus(UINT uSocket) Parameters(Input)

uSocket: UINT: 0 = PCMCIA slot. (PA966/PA962/PA982 only) 1 = Compact flash slot. Return bEnable :

BOOL:

TRUE = Slot is enabled. FALSE = Slot is disable.

7.5.5. Inquire IO slot status Function Description:

This function returns slot enable/disable status. It is recommended to use with function GetPCMCIASlotID() for platform independent reason. Function call:

BOOL GetPCMCIAStatus1(UINT uSocket) Parameters(Input)

uSocket:

UINT:

bEnable :

BOOL:

slot to be applied.

Return

Example

TRUE = specified slot is enabled. FALSE = specified slot is disable. To check PCMCIA slot status, #define PCMCIA_SOCKET 0 (PA966/PA962/PA982 only) #define CF_SOCKET 1 if (GetPCMCIAStatus1(GetPCMCIASlotID(PCMCIA_SLOT))) { }

7.5.6. Disable PCMCIA/CF slot when resume Function Description:

This function will disable the specified slot after resume even though that slot is enabled before suspend.. Function call:

void DisablePCMCIAUponResume( UINT uSocket, BOOL bDisable); Parameters(Input)

uSocket:

UINT:

bDisable: Return

- none

1 = physical socket 1 0 = for physical socket 0 BOOL: TRUE disable on resume FALSE enable on resume

Page 36

7.6. Check battery type Function Description: Check if HT660/PA96x/PA982 is installed smart battery and battery ID. Function call:

BYTE GetSmartBatteryID(void); Return 0 Other

: Not Smart Battery : Smart battery it

7.7. Enable/Disable LCD screen Function Description:

Turn on / off LCD screen Function call:

void PowerOnColorLCD(BOOL fON) Parameters(Input)

fON: BOOL: Return None

-

TRUE FALSE

= Power on LCD screen = Power off LCD screen

Page 37

8. BlueTooth relative API - BTAPI.DLL This DLL provide BlueTooth relative API. Two files are essential and provided in SDK, BTAPI.LIB and BTAPI.H. 8.1. Enable/Disable Bluetooth Power status Function Description:

Enable Bluetooth Module Power ON/OFF Function call:

void BT_PowerEnable ( BOOL bEnable ) Parameter (Input)

bON: BOOL: FALSE

TRUE

= Enable

= Disable

Return code:

FALSE PowerOFF Module 8.2. Get BT Power status Function Description: Get Bluetooth Module Power Status Function call: BYTE BT_PowerStatus ( void ) Return code: BYTE: 1 = Bluetooth Module is Power ON

0 = Bluetooth Module is Power OFF 8.3. DLL Version Function Description: Get BTAPI.dll Version Function call: DWORD BT_DllVersion ( void ) Return code:

DWORD:

-

Version number

Page 38

9. RH767 HF reader To programming RH767 HF reader, it need C++ DLL “RDINT.dll” and RDINT.h”. Please get it from below URL. http://w3.tw.ute.com/pub/cs/sdk/RH767/RH767_HF_SDK.zip

9.1. Get library version Function Description: To get the library version. Function Call: INT32 RDINTsys_GetAPIVersionString (LPWSTR strVersion); Parameter: strVersion: Get the library version. Return code: Please refer to section 9.10.

9.2. Connect to RFID reade Function Description: To create a connection with the reader before control it. Function Call: INT32 RDINTsys_OpenReader (BYTE u8COMPort,UINT32 u32Baudrate,CONST LPTSTR strAccessCode,BYTE u1SecurityMode,UINT32 u32OpenDelayMs,PUINT32 pu32Baudrate) Parameter: 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 baud rate, if it is NULL then it will not receive the value. Return code: Please refer to section 9.10.

9.3. 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. Function Call: INT32 RDINT_WorkingType (BYTE u8COMPort, BYTE u8Type); Parameter: u8COMPort: The reader’s COM port number (1 – 255) u8Type: WT_ISO14443_TypeA WT_ISO14443_TypeB WT_ISO15693 WT_SR176_SRIX4K Return code: Please refer to section 9.10.

9.4. Get Reader Information Function Description: Get the reader’s serial number and firmware version. Function Call: INT32 RDINTv2_ReaderInfo (BYTE u8COMPort, LPBYTE pu8SerialNum, LPBYTE -

Page 39

pu8FirmwareVer); Parameter: 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) Return code: Please refer to section 9.10.

9.5. Antenna Control Function Description: Enable/Disable antenna to save power. Function Call: INT32 RDINTv2_AntennaControl (BYTE u8COMPort, BYTE u1OnOff); Parameter: u8COMPort: The reader’s COM port number (1 – 255) u1OnOff: TURN_ON TURN_OFF Return code: Please refer to section 9.10.

9.6. 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.10.

9.7. Set ISO-15693 Inventory Parameter Function Description: Set inventory parameter for ISO-15693. Function Call: INT32 RDINT_ISO15693AutoInventoryParam (BYTE u8COMPort, BYTE u8Flag, BYTE u8Afi, BYTE u8MaskLen, LPBYTE pu8Mask); Parameter: 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. u8Afi: Application Family Identifier parameter. u8MaskLen: The mask length indicates the number of significant bits of the mask value. 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. pu8Mask: The mask value is contained in an integer number of bytes. LSB shall be transmitted first. Return code: Please refer to section 9.10.

9.8. ISO-15693 Inventory Function Description: Read ISO-15693 Tag. Function Call: INT32 RDINT_ISO15693AutoInventory4Antennas (BYTE u8COMPort, LPBYTE pu8GRLUid); Parameter: u8COMPort: The reader’s COM port number (1 – 255) -

Page 40

pu8GRLUid: Receive the read data’s length which in the reader’s buffer. Return code: Please refer to section 9.10.

9.9. Get Data From Reader Function Description: Get the data from the reader’s buffer. Function Call: INT32 RDINT_GetReturnDataArray (BYTE u8COMPort, BYTE u8Indx, BYTE u8Offset, LPBYTE pu8Data); Parameter: 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. Return code: Please refer to section 9.10.

9.10. Error Code Name LRSUCCESS LRSYSTEM LRLASTCARD LRNOCARD LRCTYPE LRPARAM LRACCESS LRREAD LRWRITE LRINCR LRDECR LRTRANSFER LRRESTORE LRPURSE LRMADERR LRFIXERR LRFIXED LRNOTOPEN LRNOFILE LRBADSIZE LRABORTED LRMANYCARD LRFORMAT LRCREATE LRDELETE LRALREADOPEN LRALREADCLOSED LRMSTRKEYLOAD LRAPPKEYLOAD LRKEYCARD LRUNFORMAT LRNOKBDCHAR LRNOTIMPL LRUNKNOWN LRCCRBUSY -

Value 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x20 0x7f 0x80 0xbb

Description Successful completion of request Unknown error Last Card Still Present Card is not present Card Type error Request Parameter error Card access error Card read error Card write error Purse increment error Purse decrement error Purse value transfer error Purse restore error Purse value corrupt Card Directory error Purse fix error Purse found corrupt but fixed Card not open File not found Bad file size Request aborted Too many card present Card format error Card file create error Card file delete error Card has been opened already Card has been closed already Cannot load master keys Cannot load application Keycard Error Card has files on it No keyboard character Function not implemented Unknown error Reader is busy