Multos Forums

   

Unknown error 0x8010002f

RankRankRank

Total Posts: 74

Joined 2012-02-21

PM

I’m posting this after a recent support query as it may be useful to others…

The application in question was resulting in the error “javax.smartcardio.CardException: sun.security.smartcardio.PCSCException: Unknown error 0x8010002f” when trying to store random numbers into RAM.

The APDU in question executed correctly in the debugger but not in the developer card being used.

The problem was that the application was being loaded from an ALU file using MUtil’s “Load Test” tab, but no session data size was specified (the buffer used to store random numbers was defined in melsession). Once an amount of of session data was specified, the application worked.

The reason it worked in the debugger was that the debugger knows from the debug object file (.hzx file) how much session memory is required. This information is not contained in a “release” Application Load Unit file (ALU) file. Instead, that information appears in the Application Load Certificate (ALC). In order for MUtil to include the correct amount of session data in the ALC that it generates, you need to tell it. The command

hls -t myapp.hzx 

will tell you how much session data your application uses. For example

start     stop    size  decimal  name
00000000 00000413     414     1044  
.text
00000000 000004e1     4e2     1250  
.SB
00000000 00000031      32       50  
.DB
00000000 000000ff     100      256  
.PB 

here it is 50 bytes (the .DB figure).

Alternatively you can load applications to developer cards (those with test keys) using hterm in a similar way to this:

hterm -pcsc 0 -cardtype MI-M4 -load myapp.hzx 

hterm creates the ALU and ALC using the information in the debug file.