I am running a Java Card applet on Eclipse. I am using JCWDE to run/debug it. When I select the applet it is selected and then it goes into powerdown state which causes the program to terminate and stop the application. My sequence of steps and log is below.
jcwde is listening for T=0 Apdu's on TCP/IP port 9,025.
O: 0x00 0xA4 0x04 0x00 0x0b 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x00 0x00 0x7F
jcwde exiting on receipt of power down command.
Can any one help that why my applet terminates, why do I go in powerdown mode, what is powerdown mode?
Thank you so much,
The script you are running has a call to both powerup and powerdown. You need to put everything you want to do between these two statements. I have not tried running JCWDE for longer periods to test interaction with an applet so cannot help further. You may be able to use CREF for that.
I understood your point that I need to put everything I want to do between these two(powerup, powerdown) statements. I tried using CREF and JCWDE but I dont know why powerdown() is called. Actually, I am using JavaCardManager tool to send the APDU's. Is it the one who calls powerdown? Or is there any other way I can send apdu so that powerdown() will not be called?
As I don't use NetBeans, I cannot comment on the JC manager plugin (I assume that is the one you mean?). There would be some way to run your APDU scripts and the manager may handle the power up/down automatically for you.
It sounds like you want to simulate a long running session. From memory, there may be a way with the OpenCard Framework to communicate to CREF from Java. This is an old library and I have not used it in some time.
I am using https://www.msec.be/jorn/SEC10/Setup%20of%20the%20environment%20required%20for%20Programming%20smartcards%20in%20eclipse.pdf for the startup. For starting I just want to run any applet with proper sequence of apdu's on eclipse.
@963195: How did you solve your problem? I have tried by putting breakpoint on select() but I cant debug power down mode. It jumps into a class file, not a java file.