Home

BIS L-870 handheld driver - User`s Manual v1.0

image

Contents

1. ERR UNLOAD USB 4 20 BIS ReLoadUSB Re opens the USB port accordingly the Connection Handle This function has to be called after the Pocket PC comes back from Suspended mode This function re opens the previously opened USB port thus user can communicate with the same BIS L 870 module without going through again the opening procedure Prototype int BIS ReLoadUSB CONNHND ConnHnd Parameters 1 ConnHnd the connection handle parameter Return value ERR NOERROR ERR RELOAD USB 4 21 BIS PowerOffRWHead This functions turns off the power on USB port thus powers off the BIS L 870 module Prototype int BIS PowerOffRWHead Parameters Return value ERR NOERROR 5 Usage of the driver examples In the following chapter the reader can find some code snippets how to use the driver properly 5 1 Preparation Include the main header BlSReader h which contains the driver related definitions and the driver function declarations include BISReader n Document date 02 25 2009 Page 10 12 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide Before user can use the driver he has to declare a variable type of CONNHND This is a connection handler which contains information about the opened device on the port CONNHND MyConnection 5 2 Open a BIS module on port Before user can use a BIS module he has to open the p
2. 4 16 BIS GetDllVersion Retrieves information about the driver such as date of release version BIS system type Prototype int BIS GetDLLVersion BISVERSION amp Version Parameters 1 Version pointer to the structure where the information will be stored Return value ERR DLL VERSION EXIST not an error 4 17 BIS GetLastError Gives back the last error number after a function fails Prototype int BIS GetLastError Parameters Return value The appropriate error number 4 18 BIS GetLastErrorText Gives back the last error as a character array after a function fails Prototype TCHAR BIS GetLastErrorText Parameters Return value The appropriate error with text Document date 02 25 2009 Page 9 12 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide 4 19 BIS UnLoadUSB Closes the USB port but keeps the Connection Handle for later use This function has to be called before the Pocket PC goes to Suspended mode because it powers off the USB port If the port stays opened Windows stores its handle and after the user turns on the PSION he can t access the previously opened port During a USB device enumeration user can find 2 devices although only 1 exists in the Windows system Prototype int BIS UnLoadUSB CONNHND ConnHnd Parameters 1 ConnHnd the connection handle parameter Return value ERR NOERROR
3. gets the state of the COM port open closed exist etc e OpenCOMPort opens the port e CloseCOMPort closes the port e OpenHeader initializes and tests the read write head e CloseReader closes the read write head e GetDLLVersion gets the version info of the driver version number release date BIS system type e GetLastError gets the error number of the last error within the driver e PowerOffRWHead turns off the power of the USB port thus the RW head e UnloadUSB close the USB port but keeps the connection handle to opened BIS e HeloadUSB re opens the USB port to use the original connection handle Document date 02 25 2009 Page 3 12 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide 2 Additional files to the project As it was mentioned before the driver uses USB driver from Silabs Thus the USB driver interface has to be added to the project e SIUSBXP LIB adll USB driver interface This driver is written specially for pocket PC from PSION Teklogix When user turns on the PC the USB port is not powered thus the driver has to power on the port In order to user can access the API collection of PSION WorkaboutPro he has to add the following file to the project as well e PixSdkCommon dll this is a library containing API functions of PSION WAP In order to user can use the functions of BIS L 870 reader he has to add the driver and the
4. appropriate headers to the project e BIS L WinCE DLL adll BIS L 870 driver for Windows CE 5 0 e BIS L WinCE DLL lib Static library to link the functions in the driver e BlSReader h Contains function type and return value declarations to BIS L 870 reader At runtime user needs only 4 files SIUSBXP LIB dll which is an API collection to SIUSBXP dll driver SIUSBXP dll has to be installed in Windows folder PtxSdkCommon dll and BIS L WinCE DLL dll SIUSBXP reg is the registration file to write the Registry This file will create the entries for the USB driver 3 Header files This chapter contains detailed information about the header and source files in the project 3 1 BlSReader h This header contains the function declarations to use BIS L 870 reader and all the BIS L 870 related types structures enumerations and macros definitions All Balluff Dialog error codes and driver related error codes are defined here User also has to add BIS L WinCE DLL lib static library to the project This library file links the declared functions to the driver 4 Driver functions in details The user communicates with the BIS module via the function calls of the driver The following chapter describes these functions In order to the user can use the drivers functionalities he has to open a port with BzS OpenCOMPort and open the BIS module with BIS_OpenReader When functions return without error user has a valid connection handler with which he
5. first 2 bytes of the new UID is not a valid CRC checksum and next time the reader is opened with CRC check every function call will fail with CRC error which tries to access the code tag Document date 02 25 2009 Page 12 12
6. sensors worldwide 1 Introduction BIS L WinCE DLL dll is a driver written for BIS L 870 which covers the user s command set of Balluff Dialog protocol and also provides some extra functionality to the user under Windows CE environment The driver is written in native C code and designed for Windows CE 5 0 The functions are exported in C format ignoring name mangling It is prepared for use of 2 virtual communication ports VCP which has the driver from Silabs https www silabs com The Read Write head module connects to the handheld via USB port thus the functions of the USB Host like open close read write etc is reached through function calls of the provided USB driver interface SIUSBXP LIB dll Implemented command set of Balluff Dialog e HeaaData read data from data carrier e WriteData write data to data carrier e WritePattern write a constant character to the data carrier e HeadTaglD read UID of the data carrier e dnitDataCarrier init data carrier for CRC16 e InitHeader set configuration of the processor e ResetReader reset read write processor e LOCKCodeTag locks the code tag changing it to read only e AntennaPowerOn turns on power of the antenna of the read write head e AntennaPowerOff turns off power of the antenna of the read write head There are other functions which are not part of the Balluff Dialog protocol but can be called via the driver e ComPortState
7. BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide BIS L 870 handheld driver for Windows CE 5 0 User s Manual BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide Table of content BM ies o Cio srt e a A E T 3 2 Additional files to the Project cccccesseeeneeeeeeeeeeeeeeeeeeeeeeeneeeeeeeeseeeeeeeeeeseeseeeeeees 4 Si Header OS rer 4 3t n iBISReaderciss e me toc e esci sun m met SR 4 4 Driver functions In details ciini ccc cust adn cudsoka cured a rxr Yo oct dover ain conabor eredi 4 4 1 BIS GombPortStale ede eet eo oe ne c e Ee hne A ee 5 42 BIS OpenGOMIPOILL it oe E rt x Eee rai ne ade a ted d E ance 5 4 3 BIS OBOnBssder cesa Dd on rer oberen ala pua onte rere focttie sae tt ean tse SEKAS oft 5 44 BIS CloseBeadet i ine t d NE ee 5 4 5 BIS CIOSCCOMPOMS ccccccccccscsssessesesececeeeceeceseesaeseseuseescseceeeeeeeesesseseseaeaeaseeeeeseeeeseeseeaes 6 46 BIS InitReader or i m o ert RU re teg ER Cft Pes 6 4 7 BlS ReadData ini v even Det e c eR deese Fe ea d 6 48 BiszhesdlagulD cssc ko ti aM E LAT e M 7 4 9 BIS WriteData iine iecit eee dere re PE Toe Urbes a reve ave kuin heed 7 4 10 BIS Write Pate ae aa aa eaen paaa raean tn aaa an aean nnne emen nennen nes Ea aaa Anaan Edieta ata KA taadaa nnas 7 4 41 BIS InitDataGarriet ann er a cce nr a r aa etian 8 4 2 BIS ResetReade hiewtii viet se
8. Buffer Parameters 1 ConnHnd pointer to a connection handle parameter 2 uiStartAddress start address of the data carrier to read from 3 Datalength number of bytes to read max size of the szDataBuffer 4 szDataBuffer pointer to the data buffer where the data arrives back Unicode characters Return value ERR NOERROR ERR READ Document date 02 25 2009 Page 6 12 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide 4 8 BIS ReadTagUID Reads the ID and type of the data carrier accordingly the Connection Handle It also indicates if the data carrier is not presented Prototype int BIS ReadTagID CONNHND ConnHnd DATACARRIERINFO amp DCInfo Parameters 1 ConnHnd pointer to a connection handle parameter 2 DCInfo reference to the structure where the data carrier information will be stored Return value ERR NOERROR ERR READ 4 9 BIS WriteData Writes data to the data carrier starting from the given address in the given length accordingly the Connection Handle Prototype int BIS WriteData CONNHND ConnHnd UINT uiStartAddr TCHAR DataToWrite UINT Datalength Parameters 1 ConnHnd pointer to a connection handle parameter 2 uiStartAddress start address of the data carrier to write from 3 DataToWrite user data to write onto the data carrier Unicode characters 4 Datalength the num
9. ED 4 4 BIS CloseReader Closes the opened BIS module accordingly the Connection Handle Prototype int BIS CloseReader CONNHND amp ConnHnd Parameters 1 ConnHnd pointer to a connection handle variable Document date 02 25 2009 Page 5 12 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide Return value ERR READER CLOSED ERR READER OPENED 4 5 BIS CloseCOMPort Closes the opened port accordingly the Connection Handle Prototype int BIS CloseCOMPort CONNHND amp ConnHnd Parameters 1 ConnHnd pointer to a connection handle parameter Return value ERR COMPORT CLOSED ERR COMPORT OPENED 4 6 BIS InitReader Sets some parameters of the given opened BIS module accordingly the Connection Handle Prototype int BIS InitReader CONNHND amp ConnHnd bool bCRC16 UINT uiDataCarrierType Parameters 1 ConnHnd pointer to a connection handle parameter 2 bCRC16 set the module to use CRC16 check 3 uiDataCarrierType set the module to use the chosen data carrier types Return value ERR NOERROR ERR READER INIT FAILED 4 7 BIS ReadData Reads data from the data carrier starting from the given address in the given length accordingly the Connection Handle Prototype int BIS ReadData CONNHND ConnHnd UINT uiStartAddr UINT Datalength TCHAR szData
10. ber of the desired bytes to write max size of DataToWrite Return value ERR NOERROR ERR WRITE 4 10 BIS WritePattern Writes a constant character to the data carrier starting from the given address in the given length accordingly the Connection Handle Prototype int BIS WritePattern CONNHND ConnHnd UINT uiStartAddr UINT Patternlength TCHAR Pattern Parameters 1 ConnHnd pointer to a connection handle parameter 2 uiStartAddress start address of the data carrier to write from 3 Patternlength the number of the bytes to write 4 Pattern pointer to a char array which contains the pattern Unicode Return value ERR NOERROR ERR WRITE Document date 02 25 2009 Page 7 12 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide 4 11 BIS InitDataCarrier Initializes a data carrier with all O hex values preparing it for use of CRC16 Starts from the given address in the given length accordingly the Connection Handle Prototype int BIS InitDataCarrier CONNHND ConnHnd Parameters 1 ConnHnd pointer to a connection handle parameter Return value ERR NOERROR ERR DATACARRIER INIT FAILED 4 12 BIS ResetReader Resets the given BIS module accordingly the Connection Handle Prototype int BIS ResetReader CONNHND ConnHnd Parameters 1 ConnHnd pointer to a connection handle variable Retur
11. can access the functions User should never change this connection handler manually because he can t call the other functions after that Document date 02 25 2009 Page 4 12 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide The following section contains the list of the exported functions 4 1 BIS ComPortState Checks the status of the given port Prototype int BIS ComPortState UINT PortNumber Parameters 1 PortNumber the number of the USB port virtual COM port Return value ERR COMPORT NOT EXIST ERR COMPORT USED ERR COMPORT CLOSED ERR UNKNOWN 4 2 BIS OpenCOMPort Opens the given port and gives back a Connection Handle Prototype int BIS OpenCOMPort UINT PortNumber CONNHND amp ConnHnd Parameters 1 PortNumber the number of the USB port 2 ConnHnd pointer to a connection handle parameter Return value ERR COMPORT CLOSED ERR COMPORT OPENED 4 3 BIS OpenReader Opens the BIS module on the previously opened port and sets the Connection Handle Prototype int BIS OpenReader CONNHND amp ConnHnd bool bCRC16 UINT uiDataCarrierType Parameters 1 ConnHnd pointer to a connection handle parameter 2 bCRC16 true if the BIS module is set to use CRC16 check 3 uiDataCarrierType defines which data carrier types can be used for the reader Return value ERR READER OPENED ERR READER CLOS
12. id sic eee tec e a E ECRIRE ERI RE ade 8 At BIS LOCKE OdGT AG cre 8 4 14 BIS AntennaPowerOn 3 lt ccccccccseccccsiccseescseceueccecscecscvcccecsbsedeasececsaedccaneccnevacdeeveseseedeveenteeces 8 4 15 BIS AntennaPowerOff ccccccccccscssssssscsecececeeeeeceessseeeeeesesececeeeeseseesesaeaeaeseaeaeasseseeeeeseeeees 9 4 16 BIS GetbDIIVersliol neto oet ee done a er e Et vedi er tt Ei 9 4 17 BIS GetkastEITOr iret Ea eie nee i dcbet at 9 4 18 BIS GetLastErrorText cccccccccessssssseseceeceeceecescesaeseesesseeceeceeeeeeeeseseesessaeaeseseseceseeeesesseeaes 9 4 19 BIS nLoadUSB e eR te tee vr ie REI wend enh ee Tene adi 10 4 20 BIS3ReLoadUSB Ree SU dae TA erus 10 4 21 BIS PowerOffRW Head esses nennen nennen nennen nnn nara nr nnn nnne nnne nnne 10 5 Usage of the driver examples eeeeeeeeeeee eere 10 53 PROD ARAM OM S e enun oue sent io edet aecenas oco dhl edes c occafu dae 10 5 2 Open a BIS module on port oto Lope tt e ELO MO seemed age ecient epe tuse 11 5 3 Read from the code ag oorr e eoo ep Feed ep xo Pane auno vean ae Coop te dean nie epe ddagad 11 5 4 Write to the code ag ascende tpe rea a o ape RETE Le x RUE Sd Hd ue RYE Lee EE nn ERN RAN an end 11 5 5 Read UID ofthe code tag cios asa cR Er oh ae re ae atone 11 5 6 Lock COGS NAG acier endo IERI b oce A Sca og eM ee Oa 11 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009
13. n value ERR NOERROR ERR UNKNOWN ERR HEAD COMMUNICATION ERR NO ANSWER ERR READ 4 13 BIS LOCKCodeTag Locks the code tag changing it to read only User has to give the new UID of the code tag If the user wants to lock the tag with CRC check he has to give only 3 byte long UID otherwise 5 bytes Prototype int BIS LOCKCodeTag CONNHND ConnHnd bool WithCRC BYTE newTagUID Parameters 1 ConnHnd pointer to a connection handle variable 2 WithCRC write the new code tag UID with CRC 3 newTagUID pointer to the new tag UID 3 or 5 bytes Return value ERR NOERROR ERR LOCK CODETAG 4 14 BIS AntennaPowerOn Turns on the power of the given BIS module accordingly the Connection Handle Prototype int BIS AntennaPowerOn CONNHND ConnHnd Parameters 1 ConnHnd pointer to a connection handle parameter Document date 02 25 2009 Page 8 12 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide Return value ERR_NOERROR ERR_TURN_ON_ANT 4 15 BIS AntennaPowerOff Turns off the power of the given BIS module accordingly the Connection Handle When user turns off the antenna the power consumption drops down dramatically thus saves energy Prototype int BIS AntennaPowerOff CONNHND ConnHnd Parameters 1 ConnHnd pointer to a connection handle parameter Return value ERR NOERROR ERR TURN OFF ANT
14. ort and the given device Open the device on port 1 as the USB port can be found on this BIS OpenCOMPort 1 MyConnection BIS OpenReader MyConnection CRC16 NO BIS CT AllTypes 5 3 Read from the code tag Create a DataBuffer type of TCHAR to store the retrieved data and then call the appropriate function TCHAR DataBuffer 192 BIS ReadData MyConnection 0 192 ReceivedData For parameter details see chapter 4 5 4 Write to the code tag BIS WriteData MyConnection 0 L Text to write 13 The data has to be Unicode character string The last parameter indicates how many characters are in the buffer less can be given but more may cause runtime errors 5 5 Read UID of the code tag Define and initialize a DC nfo buffer type of DATACARRIERINFO to store the tag information and then call the appropriate function DATACARRIERINFO DCInfo 0 BIS_ReadTagID MyConnection DCInfo For parameter details see chapter 4 5 6 Lock code tag Call the appropriate function with the new UID of the code tag If the user wants to generate CRC check for the new UID give 3 bytes and set the second parameter to true otherwise 5 bytes and the second parameter to false BYTE newUID 5 0x12 0x37 0x45 0x91 Ox57 Document date 02 25 2009 Page 11 12 BIS L 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 02 01 30 2009 sensors worldwide BIS_LOCKCodeTag MyConnection CRC16_NO newUID If the

Download Pdf Manuals

image

Related Search

Related Contents

prefecture du district de nyon arrete prefectoral  MANUEL D`UTILISATION  Cassaforte - Wall safes - Coffre-forts - Cajas - Tresor  NAD Electronics T 572 User's Manual  Samsung DVD-HR725 User Manual  Ceraphant T PTP35  コンパクトながら4000 lm※の高輝度。 エコ性能でも一歩先を行く  Suelos laminados Compact Loc  Manual de Instrucciones DILETTA 26000  

Copyright © All rights reserved.
Failed to retrieve file