Hello Gunnar,

Gunnar Osterode wrote:
> The only "bugfix" that I know is disconnecting  and
> reconnecting the power-supply of the reader. But that's not a
> solution!!!
> 
> Has anybody an idea what other reasons can provoke this error, or
> better how to avoid it??

I'm not sure exactly whether this is the cause of your problem
(as it works all the time for me), but there is a chance...

The fact is that the GemPC410 has two modes for its OS: one is the
GemCore more, the current version of the OS, and another one is the
OROS mode, the previous version that used to run on GCR400 readers
(the version before GCR410). Now, there is a special command to set
the reader to this mode, and sometimes this command is sent by
other applications such as those that are using the Gemplus GCRAPI 4
or even the PC/SC API. So the next time you are using a Java
application with the pure-java CardTerminal, you have to switch the
reader back in GemCore mode, and the only way to do this is to reset
it, i.e., unplug it and plug it again.

Now, if you are *only* using Java and OCF, this is obviously not the
reason and there are other problems, but then it seems really strange.

Maybe when it appears, you could try to test the Comm API. One good
test is to run the javax.comm SerialDemo (see below) to get all the
listed ports in a menu (auto-discovered by the Comm API driver).

        $ cd commapi/samples/SerialDemo
        $ java SerialDemo

which will open a GUI with a menu containing all known ports (if this
menu is empty, Comm is not well installed!). Try to select the one
you want to use, Open, then Close the port.

You should also check that the opencard.properties file really
specifies the right Comm port name, e.g., in Linux it could be
/dev/sttyS0 is you use the Sun or blackdown Java or COM1 if you use
the IBM Java! In order to be sure of what opencard.properties is
loaded, you can run the small Java program attached (contributed by
somebody from IBM, I have just replaced the '\' by '/' on platforms
which prefer this way :-).

Hope it'll help to find where is the problem.

Cheers,
Christophe.

 = "If there is a better solution... find it." -- Thomas Edison =
--
-------------------------------------------------------------
[EMAIL PROTECTED] - Gemplus Research Lab
Phone: +33 4-42-36-57-83 | Disclaimer: I don't speak for Gemplus
Gemplus doesn't speak for me... it is better that way!
-------------------------------------------------------------
import java.io.File;
import java.util.Properties;

public class findOCP {
    public static void main(String[] argv) {
        final String sep = File.separator;
        Properties props = System.getProperties();
        String JavaHome  = props.getProperty("java.home");
        String UserHome  = props.getProperty("user.home");
        String UserDir   = props.getProperty("user.dir");

        System.out.println("Looking for OpenCard Properties file in:\n\t"
                           + JavaHome + sep + "lib" + sep 
                           + "opencard.properties\n\t"
                           + UserHome + sep + ".opencard.properties\n\t"
                           + UserDir  + sep + "opencard.properties\n\t"
                           + UserDir  + sep + ".opencard.properties\n");
    }
}

Reply via email to