RFID CF Type Reader User’s Guide Model Name: SLC-10100 Version: 1.0 Date: 2007.04.
Content No. Item Page 1 Hardware 3 2 Demo software 6 3 API user’s guide 15 4 Source code of demo program 36 5 Disk information 42 6 Package list 42 7 How to contact us 42 Notice: In order to avoid misuse or any unexpected damage, please read this guide first. This device complies with Part 15 of FCC Rules.
1. Hardware environment (1) Product introduction Sunlit’s RFID CF type reader is based on Hitachi µ-solution to develop. It was operated at microwave 2.45GHz frequency band. This is small and light, can be easily install to PDA, tablet PC. (2) Specification Power Supply DC 3V from PDA or PC Operating Environment 0°C ~40°C Storage Environment 0°C ~60°C Power Consumption Max. 0.6 W Dimensions 56 x 43 x 6.1 (mm x mm x mm) RF Output Power 36.307 mW Frequency Range 2.402GHZ~2.
(3) Hardware structure Tag RFID CF reader CF interface WindowCE Platform PDA or other compatible device (4) Hardware appearance introduction Antenna inside CF interface connecter (5) System requirement Item Condition Quantity Hardware requirement PDA support CF interface 1 Platform requirement 1 Windows Pocket PC 2003 -4
(6) How to install reader Face the side with LED up, and insert it into PDA CF slot as shown in picture. Normally always insert CF reader by put LED side up, but some PDA put CF slot at reverse side, it means user needs to insert CF reader at back side.
2. Demo software environment (1) Demo software introduction This demo program can build a database include TAG ID、TAG information and picture. It can be use to demo ex. material manager、In/out control for people… etc.
Demo software contents Item Development tool File contents Description Microsoft Visual Studio 2005 Traditional Edition WinceDEMO.exe Main program sunlitrfidppc.dll Dynamic Link Library file Database.txt ID database file after ID saved PIC [Folder] A picture file includes different pictures which correlated with each individual ID Main Program Window Function Description Function ID Display Tag ID when Tag be read.
Demo program operation (a) Copy demo program files “WinceDEMO.exe” & “sunlitrfidppc.dll” to PDA and store at same directory. ※About the file transmissions please refer to PDA user’s manual.
(c) Click file “WinceDEMO.exe” and click “Open” to open device(Reader) It mean open device successful (d) Create a ID data base Be sure the Mode is “Passive” Put the tag on front side of reader, click “Read” to scan Tag ID and checking ID number is showing on ID window. Mark the ID number in Tag DataBase field . Click “Picture”→ “Folder” to open location of picture that you want to correct with Tag ID.
(e) Editing information about the ID number on “Information” window. Click “Updata” and check “Tag DataBase” window to complete the data base created procedure. 1 2 It mean database created successful (f) You can follow the step (d) (e) to create some data base that you want.
When you created the data base, the system was created 1 folder and 1 text file (h) Set Mute function Follow the figure click the” Mute” function check box, the mute function will enable.
(i) Set Operation mode Mode: Active Click the “Mode” combo box and select “Active” item to enable active function Click “Read”, if tag scanned by reader and the scan procedures will continuously. 2 1 Continue Scanning Mode: Passive Click “Mode” combo box select “Passive” item to enable passive function Click “Read” and the reader scanning just only once.
(j) Delete data base Click data you want to delete on Tag DataBase window Click “Delete” and select “Yes” to delete data. 3 2 1 (k) Clear function If click “Clear” than the text message on the Message window will be clear.
(l) Disable device(Reader) To confirm device is open. Click “Close” to disable device.
3.
ONE、Structure of Sunlit RFID DLL for PPC The Sunlit RFID DLL has 18 functions. They can separate into 3 groups:Comport operation、Device operation and Device information: Comport operation functions includes following 5 functions: SUNLITRFID_CFExist SUNLITRFID_Open SUNLITRFID_OpenII SUNLITRFID_IsOpen SUNLITRFID_Close. Most functions of SUNLITRFID_Open and SUNLITRFID_OpenII are the same, except using different parameters.
The following table lists all DLL FUNCTION and FUNCTION parameter. For more information, Please see FUNCTION Introduction.
The following picture represents how the DLL works with your program.
TWO、Program Declaration (1) Constant Definition The following table lists all constant definition that TYPE definition used. Definition #define PRODUCT_NAME_LENGTH Introduction 32 Define the length of product name information. (Unit:byte) #define MODEL_NAME_LENGTH 16 Define the length of model name information. (Unit:byte) #define HARDWARE_LENGTH 8 Define the length of hardware version information. (Unit:byte) #define FIRMWARE_LENGTH 8 Define the length of firmware version information.
(2) TYPE Definition The following table lists all TYPE definition that function used. Definition typedef struct { unsigned char data[TAG_LENGTH]; } SUNLITRFID_TAGID; Introduction Type definition of tag ID Since Mu-ID data is represented by 128 bits format, so we condense this 128 bit information by byte format. And every 8 bits data is respectively each byte, for example, data[0] represents bit120~bit127; data[1] represents bit112~bit119; data[TAG_LENGTH-1] represents bit0~bit7.
(3) MESSAGE Definition The following table lists all DLL function message and how to solve it. No. 1 Name HANDLE_SUCCESS Value 0x00 Introduction This message will happen when the function you called was executed successfully. 2 HANDLE_ERR_TAG_PASSIVE 0x20 This message will happen when you call “SUNLITRFID_ScanTag” in passive mode,and device found a tag. 3 HANDLE_ERR_TAG_NOT_FOUND 0x22 This message will happen when you call “SUNLITRFID_ScanTag” in passive mode,but device does’t found a tag.
11 HANDLE_ERR_UNKNOW 0xff Undefined error. Please record how this message happened and contact with us 〈www.sunlitcorp.com〉. 12 Others ? Unknow message. Please record how this message happened and contact with us 〈www.sunlitcorp.com〉.
THREE、FUNCTION Introduction 1. bool SUNLITRFID_CFExist ( TCHAR *CFName ); SUNLITRFID_ComportNumGet is used to find the CF card in your PPC. Parameters: CFName:The parameter is shown as TCHAR array format, when this function is executed successfully, the array will show each COMPORT name that inserted CF card. For example, your PPC has 2 different CF card, insert into COM 1 and COM 4, then CFName will show as “COM1\0x00COM4\0x00”.
2. BYTE SUNLITRFID_Open ( HWND hWnd, LPCWSTR PortName, DWORD BaudRate, SUNLITRFID_ENVIRONMENT *Environment ); SUNLITRFID_Open is used to open the comport Parameters: hWnd:The program’s HANDLE as a parameter that send thru the Function. If you don’t know what’s your program’s HANDLE, use NULL. PortName:The comport name you want to open. BaudRate:The comport baud rate that you want to open with. Environment:Please see 「TYPE」 definition.
3. BYTE SUNLITRFID_OpenII( HWND hWnd, LPCWSTR PortName, DWORD BaudRate, HANDLE *haEvent, SUNLITRFID_TAGID *ActiveTagID ); SUNLITRFID_OpenII is used to open the comport. Parameters: hWnd:The program’s HANDLE as a parameter that send thru the Function. If you don’t know what’s your program’s HANDLE, use NULL. PortName:The comport name you want to open. BaudRate:The comport baud rate that you want to open with. haEvent:Please see 「TYPE」 definition. ActiveTagID:Please see 「TYPE」 definition.
4. bool SUNLITRFID_IsOpen(void); SUNLITRFID_IsOpen can check the comport status that is opened or not. Parameters: No parameter needed. Return Values: The function will return a boolean value. If comport was opened,it will return true,otherwise false. For example: if(SUNLITRFID_IsOpen()) {} //Comport is open else //Comport is closed {} 5. bool SUNLITRFID_Close(void); SUNLITRFID_Close is used for close comport. Parameters: No parameter needed.
6. BYTE SUNLITRFID_Echo(void); SUNLITRFID_Echo request device to reply message. Parameters: No parameter needed. Return Values: The function will return byte value that indicate the execution result.Please see 「MESSAGE」 definition for byte value For example: if(SUNLITRFID_Echo()==HANDLE_SUCCESS) {} //The device was reply message successfully else {} 7. BYTE SUNLITRFID_SoftwareReset(void); SUNLITRFID_SoftwareReset reset device by software. Parameters: No parameter needed.
8. BYTE SUNLITRFID_HardwareReset(void); SUNLITRFID_HardwareReset reset device by hardware.〈Depend on device〉 Parameters: No parameter needed. Return Values: The function will return byte value that indicate the execution result.Please see 「MESSAGE」 definition for byte value For example: if(SUNLITRFID_HardwareReset()==HANDLE_SUCCESS) {} //The device was reset by hardware successfully else {} 9. BYTE SUNLITRFID_Pause(void); SUNLITRFID_Pause pauses the device from any operation mode.
10. BYTE SUNLITRFID_OpModeSet( BYTE Data ); SUNLITRFID_OpModeSet is used to set dvice’s operation mode, “Active Mode” or “Passive Mode”.
11. BYTE SUNLITRFID_OpModeGet( BYTE *Data ); SUNLITRFID_OpModeGet is used to get dvice’s operation mode. Parameters: Data:After executing the function ,The value 0x00 represents that the device was in passive mode,other values represent that the device was in active mode. Return Values: The function will return byte value that indicate the execution result, please see 「MESSAGE」 definition for byte value.
12. BYTE SUNLITRFID_ActiveScanIntervalSet( BYTE Data ); SUNLITRFID_ActiveScanIntervalSet is used to set the scan interval time for active mode. Parameters: Data:The value represents scan interval time,bwtween 5 ~ 255 (Uint:10mS) Return Values: The function will return byte value that indicate the execution result, please see 「MESSAGE」 definition for byte value.
14. BYTE SUNLITRFID_ScanTag( SUNLITRFID_TAGID *TagID ); SUNLITRFID_ScanTag for scan tag. When it passive mode, reader will read tag once, when it is active mode, reader will start to read tag continuously. Parameters: TagID:Please see 「TYPE」 definition. Return Values: The function will return byte value that indicate the execution result, please see 「MESSAGE」 definition for byte value.
15. BYTE SUNLITRFID_ProductNameGet( SUNLITRFID_PRODUCT_NAME *ProductName ); SUNLITRFID_ProductNameGet is used to get the product name information form the device. Parameters: ProductName:Please see 「TYPE」 definition. Return Values: The function will return byte value that indicate the execution result, please see 「MESSAGE」 definition for byte value.
17. BYTE SUNLITRFID_HardwareVersionGet( SUNLITRFID_HARDWARE_VER *HardwareVer ); SUNLITRFID_HardwareVersionGet is used to get the hardware version from the device. Parameters: HardwareVer:Please see 「TYPE」 definition. Return Values: The function will return byte value that indicate the execution result, please see 「MESSAGE」 definition for byte value.
FOUR、EVENTS Introduction 1. Environment.haEvent[ENVIRONMENT_EVENT_ACTIVE_READ_TAG] The event happened when the device read a tag in active mode. 2. Environment.haEvent[ENVIRONMENT_EVENT_COMPORT_ERROR] The event happened when comport or hardware error that DLL can’t communicate with device. 3. Environment.haEvent[ENVIRONMENT_EVENT_PORT_CLOSE] The event happened when comport closed.
4. Demo program source code ONE、The Main Framework of the Demo Program The following picture represents the main framework of the demo program.
TWO、Program Code Explanation ※There are many subroutines, following are the source code of to subroutines. The explanation is in accordance with user interface. (1) Open Comport Click “Open” button to open comport. The “Open” button executes the following code. void CWinceDEMODlg::OnBnClickedButtonOpen() { // TODO: 在此加入控制項告知處理常式程式碼 CString sTemp; TCHAR CFName[1024]; ZeroMemory(CFName, sizeof(CFName)); ButtonOpen.EnableWindow(false); if(!SUNLITRFID_IsOpen()) { ListMsg.
if(SUNLITRFID_Open(this->m_hWnd ,CFName,4800,&Environment)==HANDLE_SUCCESS) { Sleep(10); SUNLITRFID_Pause(); ButtonOpen.SetWindowTextW(CString("Close")); DrawEnvironment.ClearPicture(); sTemp.Format(CString("Open Comport <%s> Successed!!!"),CFName); ListMsg.InsertString(0,sTemp); if(ButtonMute.GetCheck()==BST_UNCHECKED) MessageBeep(MB_ICONASTERISK); } else { sTemp.Format(CString("Open Comport <%s> Fail..."),CFName); ListMsg.InsertString(0,sTemp); } } else ListMsg.
(2) Select Operation Mode “Operation Mode:” selects “passive” or “active”. Then click “Apply” button to apply setting. “Mode:” selects “passive” or “active”, it executes the following code. void CWinceDEMODlg::OnCbnSelchangeComboOpmode() { // TODO: 在此加入控制項告知處理常式程式碼 CString sTemp,sTemp2; BYTE byTemp=0; if(SUNLITRFID_IsOpen()) { SUNLITRFID_Pause(); ListMsg.
(3) Read Tag Click “Read” button to read tag. When it passive mode, reader will read tag once, when it is active mode, reader will start to read tag continuously. The “Read” button executes the following code. void CWinceDEMODlg::OnBnClickedButtonRead() { // TODO: 在此加入控制項告知處理常式程式碼 CString sTemp,sTemp2; BYTE byTemp=0; SUNLITRFID_TAGID TagID; ButtonRead.EnableWindow(false); SUNLITRFID_Pause(); byTemp=SUNLITRFID_ScanTag(&TagID); DrawEnvironment.
break; case HANDLE_ERR_NO_RESPONSE: ListMsg.InsertString(0,CString("Device has no response???")); break; default: sTemp.Format(CString("Undefined value:%d..."),byTemp); ListMsg.InsertString(0,sTemp); break; } SetEvent(hEventFlip); ButtonRead.EnableWindow(true); } APPENDIX:Development Environment Hardware Environment: Product Name:RFID CF Type Reader V3.0 Model Name:SLC-10200 Firmware Version:V1.0 or later Hardware Version:V1.
5. Disk information Folder File sunlitrfidppc.dll.(V1.1.0.1)2006-12-22 Description Include API sunlitrfidppc.h Header file sunlitrfidppc.dll Dynamic Link Library file sunlitrfidppc.lib Library file Demo software(V1.1.0.1) Demo Software WinceDEMO.exe Main program file sunlitrfidppc.dll Dynamic Link Library file CFR_SLC-10100_ User Guide_V1_ENG.pdf PDF file of user guide 6. Package list Item Quantity CF type reader 1 Application CD 1 7.
Warning: In order to avoid misuse or any unexpected damage, please read this guide first. FCC Statement Regulatory Approvals This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation.