The text of a manual · part 5 of 5
HT660/PA96x/PA982/RH767 Programming Manual, pages 41 to 46
Pages 41 to 46 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 41
LRNOINIT LRCRDNOTOPEN LRINUSE LRAPPLICERR LRLINKLOST LRBADCOMPORT LRNOCRYPTBOX LRBADAPPACCES S LRNOMAIDFILE LRBOXREAD LRBOXWRITE LRBOXNOKEYS LRSECURE LRERRSELREADE R
-
0xff 0xfa 0xfb 0xfc 0xfd 0xfe 0xf8 0xf7
Reader has not been opened Card has not been opened Card in use by another applications API system error Link to Reader has been lost COM port cannot be accessed Key-Box not found Invalid Application access code
0xf6 0xf5 0xf4 0xf3 0xf2 0xf1
Cannot open MAID definition Cannot read from Key-Box Cannot write to Key-Box No of Keys in Box is zero or Comms MAC checking failed Cannot change to selected reader
Page 42
10. RH767 UHF reader To programming RH767 UHF reader, it need C# DLL “MPR DLL.dll”. Please get it from below URL. http://w3.tw.ute.com/pub/cs/sdk/RH767/RH767_UHF_SDK.zip
10.1. Class “MPRReader” 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 byte ActiveAntenna This parameter to set and get the active antenna on reader and this value should be 0 on RH767. byte TxPower This parameter to set and get the current antenna power and this value should between 18-30. int InvUpdateGap To set and get the time between two inventories. Please set this value to 0 to get good performance. TimeSpan PersistTime 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. bool Class0InventoryEnabled Whether to perform EPC Class 0 inventories. bool Class1InventoryEnabled Whether to perform EPC Class 1 inventories. bool Gen2InventoryEnabled Whether to perform EPC UHF Gen2 inventories. bool IsConnected To check the connection with reader. bool InvTimerEnabled To get or set inventory status.
-
Page 43
10.3. The Parameter in MPRReader 10.3.1. Connect to RFID Reader Function Description: To create a connection with the reader before control it. Function Call: bool Connect(string SerialPortName, string BaudRate) Parameter: SerialPortName: The reader’s COM port number (COM1: – COM255:) BaudRate: The baud rate with the reader, the default is “57600” Return code: True : Connect success. False : Connect fail.
10.3.2. Disconnect with RFID Reader Function Description: Close the connection and disable inventory with reader. Function Call: void Disconnect() Parameter: None. Return code: None.
10.3.3. Clear All Tags In The Reader Function Description: Remove all tags in the buffer of reader. Function Call: void ClearInventory() Parameter: None. Return code: None.
10.3.4. The Event in MPRReader EventHandler InvTimerEnabledChanged Fired when manufacturing information is read from the reader. TagEventHandler TagAdded Fired when a new tag is added to the inventory. TagEventHandler TagRemoved Fired when a tag expires, i.e. hasn’t been read for the persist time period.
-
Page 44
11. Useful function call – without include SysIOAPI.DLL Below API maybe useful for you to control HT660/PA96x
11.1.1. Warm-boot. Cold-boot and power off #include <pkfuncs.h> #include "oemioctl.h" // Warn boot KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL); // Cold boot KernelIoControl(IOCTL_COLD_BOOT, NULL, 0, NULL, 0, NULL); // Power off { DWORD dwExtraInfo=0; BYTE bScan=0; keybd_event( VK_OFF, bScan, KEYEVENTF_SILENT, dwExtraInfo ); keybd_event( VK_OFF, bScan, KEYEVENTF_KEYUP, dwExtraInfo ); }
-
Page 45
12. Get Device ID In HT660/PA96x, an unique ID had been burnt into terminal, user can check it by pressing “Func”+”9”. The sample code for read device ID as follow, //////////////////////////////////////////////////////////////// HWND hDeviceId = GetDlgItem(hWnd, IDC_DEVICEID); PDEVICE_ID pDeviceID = NULL; TCHAR outBuf[512], deviceID[200]; DWORD bytesReturned; char platformID[64]; pDeviceID = (PDEVICE_ID)outBuf; pDeviceID->dwSize = sizeof(outBuf); if (KernelIoControl(IOCTL_HAL_GET_DEVICEID, NULL, 0, outBuf, sizeof(outBuf), &bytesReturned)) { // Platform ID memcpy((PBYTE)platformID, (PBYTE)pDeviceID + pDeviceID->dwPlatformIDOffset, pDeviceID->dwPlatformIDBytes); // Device ID memcpy((PBYTE)deviceID, (PBYTE)pDeviceID + pDeviceID->dwPresetIDOffset, pDeviceID->dwPresetIDBytes); } ///////////////////////////////////////////////////////// The code will have platformID holds Platform ID, and deviceID holds Device ID.
13. Get OEM Info In HT660/PA96x, an OEM ID had been burnt into terminal, user can check it by pressing “Func”+”9”. The sample code for read OEM ID as follow, //////////////////////////////////////////////////////////////// { TCHAR szBuff[500]; ZeroMemory(szBuff, sizeof(szBuff)); SystemParametersInfo(SPI_GETOEMINFO, 500, (LPVOID)szBuff, 0); MessageBox(szBuff); } /////////////////////////////////////////////////////////
-
Page 46
14. Update notes V1.0 V1.1 V1.2 V1.3 V1.4 V1.6 V1.7
-
The first version Wrong URL link for C# on chapter 1.4 PA982 support Add RH767 HF/UHF programming on chapter 9 & 10 Modify RH767 HF programming on chapter 9. Change logo Modify SDK URL