| Electronic Components Datasheet Search |
|
AN3224 Datasheet(PDF) 20 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3224 Datasheet(HTML) 20 Page - STMicroelectronics |
|
20 / 49 page ![]() PR101-USB and MR101-USB reader detection AN3224 20/49 Doc ID 17559 Rev 2 4.2 Detection and connection sequence The sequence required to perform reader detection and connection is the following: 1. Call the FEUSB_ClearScanList function to re-initialize the USB detection process. 2. Call the FEUSB_Scan function to create the list of USB readers connected to the host ports. The list is stored in the oSearch variable. An error code is sent back if no reader have been detected. 3. Call the FEUSB_GetScanListSize function to obtain the number of detected readers. 4. Call the FEUSB_GetScanListPara function to retrieve the data related to the detected readers, together with the identifiers (Device-ID) assigned to each detected reader. 5. Call the FEUSB_OpenDevice function to open a communication channel between an USB reader, identified by Device-ID, and the FEUSB dll. The function sends back the USB handle that will be used to manage further FEUSB communication with the reader. 6. Call the FEISC_NewReader function to open a communication channel between an USB reader, identified by its USB handle, and the FEISC dll. The function sends back the attached device handle (lngAttachedDeviceHandle variable) that will be used to manage further FEISC communication with the reader. The detect_FEIG_USB_reader() function returns TRUE if a FEIG USB reader is detected and FALSE otherwise. 7. When data transmissions and receptions have completed, call the FEUSB_CloseDevice function to close USB communication. Hereafter are source code examples of reader detection and connection examples in Visual Basic and C/C++. 4.3 Visual Basic source code example ‘--- global variable to manage FEUSB handle Public glngFEUSBhandle as long ‘--- global variable to manage FEISC handle Public lngAttachedDeviceHandle() as long '--- Detect FEIG USB readers (detected=true, non-detected=false) --- Private Function detect_USB_FEIG_reader() As Boolean Dim Back As Long Dim i As Long Dim Cnt As Integer Dim Char As String Dim CharCnt As Integer Dim oSearch As FEUSB_SCANSEARCH Dim lngReaderNumber As Long Dim error As Long Dim DeviceHnd As Long Dim lngDeviceId(0 To 15) As Long Dim strFamilyName(0 To 15) As String Dim strDeviceName(0 To 15) As String Dim lngPresent(0 To 15) As Long |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |