OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Laurent Boulard (laurent.boulardlouveciennes.tt.slb.com)
Date: Mon Sep 24 2001 - 09:37:16 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Hi,

    I am using two GCR410P on my PC (COM1 and COM2). They work quite well on
    the other OS put I am in trouble with Linux.

    I have tried pcsc 0.93 and 1.0.0B, the drivers libgmecore-1.0.0 and
    Gp-core-2.3.1.
    The librairy seems to be deisgned to run only with ONE reader.
    The first reader is always recognise and initiliased but the second is not.
     If I set the COM1 reader first, it works and not the COM2 reader.
    If I set the COM2 reader first, it works and not the COM1 reader.

    here is the syslog output of one of my tries:
    Sep 24 16:17:03 debian pcscd: pcscdaemon.c 131: /var/run/pcscd.pid
    Sep 24 16:17:03 debian pcscd: readerfactory.c 991: RFInitializeReader:
    Attempting startup of GCR410:0 0 0.
    Sep 24 16:17:03 debian pcscd: readerfactory.c 780: RFBindFunctions:
    Loading IFD Handler 2.0
    Sep 24 16:17:06 debian pcscd: readerfactory.c 991: RFInitializeReader:
    Attempting startup of GCR410:1 0 0.
    Sep 24 16:17:06 debian pcscd: readerfactory.c 780: RFBindFunctions:
    Loading IFD Handler 2.0
    Sep 24 16:17:06 debian pcscd: readerfactory.c 1021: RFInitializeReader:
    Open Port 102f8 Failed
    Sep 24 16:17:06 debian pcscd: readerfactory.c 181: RFAddReader: GCR410:1
    init failed.
    Sep 24 16:17:06 debian pcscd: pcscdaemon.c 151: main: PC/SC Lite
    Daemon Ready.
    Sep 24 16:17:06 debian pcscd: hotplug_linux.c 146: No bundle files in
    pcsc drivers directory
    Sep 24 16:17:06 debian pcscd: hotplug_linux.c 147: Disabling USB support
    for pcscd

    Quickly digging inside the driver, I found in file "gserial.c" (both
    libgemcore and gp-core).

    // .... jump code ....

    static int port_fd = -1;

    /// .... jump code ....

    // New G_SerPortOpen provided by Ludovic Rousseau.
    // THis function avoid EXPORT COM1= xxxxxx using.
    INT16 G_DECL G_SerPortOpen(const TGTSER_PORT G_FAR * Param)
    {
        INT16 handle;

        // used to set parameters in the device control block.
        struct termios current_termios;
        int x;

        if (port_fd >= 0)
        {
            return GE_HOST_PORT_OPEN;
        }
    // .... jump code ....

            port_fd = open(dev_name, O_RDWR); // O_NOCTTY was used

    /// ... jump the remaining code ...

    Argh ! If I am not mistaking once a serial port is open, the driver
    refuse to open another one for another reader (bouhouh !).

    If think I could make the both readers works by making a copy of the
    driver file and renaming it for the second reader but this an ugly and
    ashamed trick :(

    Do I miss something in order to be able to run both readers nicely or do
    I need hacking the drivers and send you the patch ?

    thanks for your help and the quality of your work.

    -- 
    Laurent Boulard
    Research Engineer
    Advanced Research
    SchlumbergerSema (Louveciennes)
    Tel: +33 (0)1 30 08 45 97
    Fax: +33 (0)1 30 08 45 24
    perl -e 'print(pack("h38","34f6e67627164757c6164796f6e63702b3d292"))'
    

    *************************************************************** Unix Smart Card Developers - M.U.S.C.L.E. (Movement for the Use of Smart Cards in a Linux Environment) http://www.linuxnet.com/ To unsubscribe send an email to majordomolinuxnet.com with unsubscribe sclinux ***************************************************************