Re: Problems with Smartcard reader passthrough using Rdesktop

Peter Åstrand <[email protected]>
Newsgroups gmane.network.rdesktop.user
Message-ID <[email protected]>
I'm not surprised that the serial port redirection approach doesn't work; 
that implementation is little used and somewhat incomplete. Using the 
PC/SC redirection is a better approach. Still, other users have reported 
that there are issues, especially with Windows XP. You might want to take 
a look in the SF bug/patch tracker and see if you'll find a solution 
there.

Best regards,
Peter

On Tue, 8 Sep 2009, Moritz Mühlenhoff wrote:

> Hi,
> we're testing smart card passthrough from a Linux system to a virtual machine
> with Windows XP using Rdesktop, i.e. the application using the smart card
> runs inside the virtual machine.
>
> Two smart card readers need to be supported, one is a Omnikey 3121 USB reader
> and the other a Chipdrive Micro 120 using a serial line. Unfortunately, both
> approaches fail; the smart cards are not detected in the Windows hardware
> device management inside the virtual machine. See below for details.
>
> The drivers for the individual smart cards have been installed inside the
> Windows virtual machine and we've verified with a native Windows XP
> installation that they work (we used the Windows freeware tool "Chipcard
> Master" to read a German bank card). So, the problem must be somewhere in the
> way the smartcard devices are tunneled through rdesktop:
>
> We're using rdesktop 1.6 based on the package from Debian unstable. It has
> been compiled with the following configure invocation:
>
> ./configure --host=i486-linux-gnu --build=i486-linux-gnu --prefix=/usr --mandir=\${prefix}/share/man -
> -infodir=\${prefix}/share/info --with-ipv6 --enable-smartcard --with-debug-smartcard
>
> PS/SC Lite 1.5.5 was used on the Linux side with the CCID driver 1.3.8 as the
> PS/SC driver for the Omnikey reader.
>
> 1. Omnikey 3121 (USB)
> The smart card reader seems to be properly detected on the Linux side.
> pcsc_scan finds the reader and inserting the bank card shows status messages
> about "Card removed" and "Card inserted, Unresponsive card"
>
> We're starting rdesktop with the following command. The "Win name" is the name
> the card reader had by default in the native Windows installation.
>
> rdesktop -r scard:"OmniKey CardMan 3121 00 00"="Cardman 3x21"
> $IP_ADDRESS_OF_VM
>
> Static/aliased Device:
>   Lin name: [OmniKey CardMan 3121 00 00]
>   Win name: [Cardman 3x21]
>   Vendor  : []
> Autoselected keyboard map de
> SCARD: SCardAccessStartedEvent()
> SCARD: SCardEstablishContext()
> SCARD: -> Success (context: 0x010321d3)
> SCARD: SCardListReaders(context: 0x010321d3)
> SCARD: -> Success
> SCARD: SCardGetStatusChange(context: 0x010321d3, timeout: 0xffffffff, count:
> 2)
> SCARD:    "\\?PnP?\Notification"
> SCARD:        user: 0x00000000, state: 0x00000001, event: 0x00000000
> SCARD:            current state: 0x00000000
> SCARD:    "OmniKey CardMan 3121 00 00"
> SCARD:        user: 0x00000000, state: 0x00000010, event: 0x00000000
> SCARD:            current state: 0x00000010
> SCARD: SCardEstablishContext()
> SCARD: -> Success (context: 0x01038765)
> SCARD: SCardListReaders(context: 0x01038765)
> SCARD: -> Success
> SCARD: SCardListReaders(context: 0x01038765)
> SCARD: -> Success
>
> However, the Windows hardware detection doesn't detect the smart card reader
> and tools accessing the smart card reader (like the Omnikey test tool or
> Chipcard Master) don't find the reader either.
>
> Are we using incorrect parameters? Does the above output indicate that the
> tunneling generally works? Is more needed to detect the reader in Windows?
>
> 2. Chipdrive Micro
> rdesktop was launched with the following command:
>
> rdesktop -r 'comport:COM1=/dev/ttyS0' $IPADDRESS-OF-VM
>
> rdesktop emits a message "SERIAL COM1 to /dev/ttyS0".
>
> However, as with the PS/SC tunneling the Windows hardware detection doesn't
> detect the smart card reader and tools accessing the smart card reader (like
> the Chipcard Master) don't find the reader either.
>
> Are we using incorrect parameters? Should raw tunneling of the serial line
> work or is something else needed to detect the smart card reader in Windows?
>
> I tried to analyse the RDP session with Wireshark, but there doesn't seem to
> be a dissector yet, so I can't tell whether the respective channels are
> active at all.
>
> Thanks in advance for your help, if you need further information I can provide
> them on request.
>
> Cheers,
> Moritz
> -- 
> Moritz Mühlenhoff
> Open Source Software Engineer and Consultant
>
> Univention GmbH
> Linux for your business
> Mary-Somerville-Str.1
> 28359 Bremen
> Tel. : +49 421 22232-0
> Fax : +49 421 22232-99
>
> [email protected]
> http://www.univention.de
>
> Geschäftsführer: Peter H. Ganten
> HRB 20755 Amtsgericht Bremen
> Steuer-Nr.: 71-597-02876
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> rdesktop-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdesktop-users
>


---
Peter Åstrand		ThinLinc Chief Developer
Cendio AB		http://www.cendio.com
Wallenbergs gata 4
583 30 Linköping	Phone: +46-13-21 46 00

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
rdesktop-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdesktop-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.