Menu

smart card through usbip

2011-03-02
2018-02-02
1 2 > >> (Page 1 of 2)
  • oliva13 alex

    oliva13 alex - 2011-03-02

    Tell me, why not forwarding an smart card through usbip. Specifically between the Linux (server) and Windows (client). Device Manager to see and the driver installed, but user program via the Smart Card Api not working? Event log messages appear:
    Message 1:
    Source: ScardSvr
    Type: Error code (ID): 602
    During initialization, the reader WDM driver can not open reader device: Access is denied.
    Message 2:
    Source: ScardSvr
    Type: Error code (ID): 514
    Resource Manager Smart Card Reader is not able to add \ \? \ USB # Vid_08e6 & Pid_3437 # 1 & 431a56f & 11 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}: Access is denied.

    In the process of investigating the problem found that when the service starts the smart card and access to the drivers function CreateFileA (see log below) pops up an error INVALID_HANDLE_VALUE (5 = Access is denied). Tell us where to dig next?
    Problem in Virtual USB bus (busenum.sys)?
    ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ///////
    log 1
    ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ///////
    # TID Module API Return Error
    1970 3788 SCardSvr.exe CreateFileA ("\ \? \ USB # Vid_08e6 & Pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL) INVALID_HANDLE_VALUE 5 = Rejected access.
    1971 3788 kernel32.dll RtlInitAnsiString (0x0006fa90, "\ \? \ USB # Vid_08e6 & Pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}")
    1972 3788 kernel32.dll RtlAnsiStringToUnicodeString (0x7ffdfbf8, 0x0006fa90, FALSE) STATUS_SUCCESS
    1973 3788 kernel32.dll RtlInitUnicodeString (0x0006fa68, "\ \? \ USB # Vid_08e6 & Pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}")
    1974 3788 kernel32.dll RtlIsDosDeviceName_U ("\ \? \ USB # Vid_08e6 & Pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}") 0 0x00000000 = STATUS_WAIT_0
    1975 3788 kernel32.dll RtlEqualUnicodeString (0x0006f9ec, 0x7c885340, TRUE) FALSE
    1976 3788 kernel32.dll RtlEqualUnicodeString (0x0006f9ec, 0x7c88504c, TRUE) FALSE
    1977 3788 kernel32.dll RtlEqualUnicodeString (0x0006f9ec, 0x7c885384, TRUE) FALSE
    1978 3788 kernel32.dll RtlDosPathNameToNtPathName_U ("\ \? \ USB # Vid_08e6 & Pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}", 0x0006fa68, NULL, 0x0006fa40) TRUE
    1979 3788 kernel32.dll NtCreateFile (0x0006fa88, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE | 128, 0x0006fa28, 0x0006fa60, NULL, 0, 0, FILE_OPEN, FILE_NON_DIRECTORY_FILE, NULL, 0) STATUS_ACCESS_DENIED 0xc0000022 = {} denied access process has requested access to the object, but the law Access is not granted.
    1980 3788 kernel32.dll RtlFreeHeap (0x00080000, 0, 0x00085d18) TRUE
    1981 3788 kernel32.dll RtlFreeHeap (0x00080000, 0, NULL) TRUE
    1982 3788 kernel32.dll RtlNtStatusToDosError (STATUS_ACCESS_DENIED) 5
    ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ///////
    In a direct address to the driver through its own programs RfReaderTest.exe, a bottleneck (see Log 2).
    ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ///////
    log 2
    ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// ///////
    TID Module API Return Error
    841 2700 RfReaderTest.exe CreateFileA ("\ \? \ Usb # vid_08e6 & pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL) 0x00000064
    842 2700 kernel32.dll RtlInitAnsiString (0x0012fe48, "\ \? \ Usb # vid_08e6 & pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}")
    843 2700 kernel32.dll RtlAnsiStringToUnicodeString (0x7ffdebf8, 0x0012fe48, FALSE) STATUS_SUCCESS
    844 2700 kernel32.dll RtlInitUnicodeString (0x0012fe20, "\ \? \ Usb # vid_08e6 & pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}")
    845 2700 kernel32.dll RtlIsDosDeviceName_U ("\ \? \ Usb # vid_08e6 & pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}") 0 0x00000000 = STATUS_WAIT_0
    846 2700 kernel32.dll RtlEqualUnicodeString (0x0012fda4, 0x7c885340, TRUE) FALSE
    847 2700 kernel32.dll RtlEqualUnicodeString (0x0012fda4, 0x7c88504c, TRUE) FALSE
    848 2700 kernel32.dll RtlEqualUnicodeString (0x0012fda4, 0x7c885384, TRUE) FALSE
    849 2700 kernel32.dll RtlDosPathNameToNtPathName_U ("\ \? \ Usb # vid_08e6 & pid_3437 # 1 & 431a56f & 10 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}", 0x0012fe20, NULL, 0x0012fdf8) TRUE
    850 2700 kernel32.dll NtCreateFile (0x0012fe40, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE | 128, 0x0012fde0, 0x0012fe18, NULL, 0, 0, FILE_OPEN, FILE_NON_DIRECTORY_FILE, NULL, 0) STATUS_SUCCESS
    851 2700 kernel32.dll RtlFreeHeap (0x00140000, 0, 0x001527f0) TRUE
    852 2700 kernel32.dll RtlFreeHeap (0x00140000, 0, NULL) TRUE

     
  • giplikan

    giplikan - 2011-03-02

    Which version of Windows do you have? Are you connecting device from an admin account? Are other devices working through usbip?

     
  • oliva13 alex

    oliva13 alex - 2011-03-02

    I am using Windows SP3. Other USB devices work fine!

     
  • oliva13 alex

    oliva13 alex - 2011-03-02

    I connect the device with an administrator account. None of the devices, smart card does not work. With direct access to the driver smart card from my application using the function DeviceIoControl works fine.

     
  • oliva13 alex

    oliva13 alex - 2011-03-05

    Please help me solve this problem? Does anyone forwarding an smart card through usbip (Windows client)?

     
  • giplikan

    giplikan - 2011-03-05

    I have no problems with smartcard forwarding. The only problem that I can't use it while work through RDP, because RDP "block" them

     
  • oliva13 alex

    oliva13 alex - 2011-03-09

    You can connect to the smart cards through the Smart Card API?

     
  • giplikan

    giplikan - 2011-03-09

    I'm not sure what is Smart Card API, but in my case I just installed drivers for that smart card and then, after attaching it, I can use it with application from smart card vendor

     
  • oliva13 alex

    oliva13 alex - 2011-03-15

    Dear Mr. giplikan give me a link to you use a driver for Windows Xp and program usbip.exe

     
  • oliva13 alex

    oliva13 alex - 2011-03-15

    I never understood where to look for the cause? Windows or Linux?

     
  • oliva13 alex

    oliva13 alex - 2011-03-15

    Which company you use Smart Card?

     
  • giplikan

    giplikan - 2011-03-16

    I tested etoken and another one but don't know a vendor

     
  • Arjan Mels

    Arjan Mels - 2011-03-16

    It could be an issue with user accounts: I found a problem in the windows driver which makes that the  driver can only be accessed from an administrative account.

    Are you using an admin account or a regular user account? (And if you are using a regular user account can you give an admin account a try.)

    (I am busy fixing a number of issues and will try to release a new version in some time.)

    Best Regards,

    Arjan

     
  • oliva13 alex

    oliva13 alex - 2011-03-17

    I again forwarded a smart card under admin account.

    Event Viewer appear:

    Message 1:
    Source: ScardSvr
    Type: Error Event ID: 602
    WDM Reader driver initialization cannot Open reader device. Access is denied.

    Message 2:
    Source: ScardSvr
    Type: Error Event ID: 514
    Smart Card Resource Manager failed to add reader \ \? \ USB # Vid_08e6 & Pid_3437 # 1 & 431a56f & 11 & 01 # {50dd5230-ba8a-11d1-bf5d-0000f805f530}: Access is denied.

     
  • oliva13 alex

    oliva13 alex - 2011-03-17

    What does this mean?

    Best Regards,

    oliva13 

     
  • Stas

    Stas - 2011-03-31

    I have same problem.
    Event Viewer:
    Source: ScardSvr Type: Error Event ID: 602 WDM Reader driver initialization cannot Open reader device. Access is denied.
    I have smartcard reader "SMART IC Card Reader EZ100PU". I can see card reader but can't access to smart card.

     
  • Arjan Mels

    Arjan Mels - 2011-04-02

    Could you give the latest version I just commited to the SVN repositry a try? I fixed a lot of issues and it might address your problem, but I am not certain.

     
  • oliva13 alex

    oliva13 alex - 2011-04-13

    The latest version works! Thank you!

     
  • Stas

    Stas - 2011-04-14

    With the latest version i got BSOD on Windows XP SP3 eng:
    DRIVER_IRQL_NOT_LESS_OR_EQUAL
    STOP: 0x000000D1(0x00000028, 0x00000002, 0x00000000, 0xF92F53F2)
    USBIPEnum.sys
    When i disconnect device.
    And my smart card does not  work( I see it in Device Manager, but software generate error, when try to access to smartCard.

     
  • Arjan Mels

    Arjan Mels - 2011-04-14

    oliva13, thank you for the positive feedback.

    archer85,
    I will try to look into it one of these days. Some questions however:
    - how do you disconnect the device? (physical removal form the host, stop teh connection from host side or from client side?
    - What error does the software generate? Please provide as much specifics as possible.

     
  • Stas

    Stas - 2011-04-14

    1) From client (ctrl+C or usbip -d) and from server (linux) by resetting device.
    2) I use ibank2 software. Ibank2 writes that can't read info about keys. If i have no smartcard inserted, than ibank2 do nothing, only blank list of keys.

     
  • giplikan

    giplikan - 2011-04-14

    2 Archer85
    2. Ibank2 writes that can't read info about keys if it hasn't got a key on token. It is ok. Just generate one and you will see it.

     
  • Stas

    Stas - 2011-04-14

    Ibank2 can use tokens, file on disk and smartcard. I have smarcard, and it's working through usb-over-network. But with usbip it's message that can't read info about keys on smartcard.

     
  • Arjan Mels

    Arjan Mels - 2011-04-14

    Hi Archer85,

    I cannot reproduce the BSOD on my setup (WinXP SP3 32-bit under VMWARE). Are you actually using the latest version from the SVN repository (http://usbip.svn.sourceforge.net/viewvc/usbip/windows/trunk/output/) or did you download an earlier version from the files section (v0.1.0.0)?

     
  • Stas

    Stas - 2011-04-14

    Yes, i use ((http://usbip.svn.sourceforge.net/viewvc/usbip/windows/trunk/output/) precompiled  files from svn.
    I'm using hyper-v virtual machine.
    Tomorrow i'll install clear windows xp sp3 and try again.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.