I’m developing an JC2.2.1 applet. I’m facing a really strange problem. I have my system setup both in Win7 and linux. The weird thing is that when converting and uploading the CAP file in Linux it works fine. However when using the windows converter over the same class file, GPSHELL after successfull authentication reports 6985 when loading the first block.
Analysing the bytecode of both CAP files using the unwrapped version of the command I have notice there is a slight difference (see below).
Why is JC2.2.1 converter creating different bytecode? any idea? I wasted lot of time trying to figure out such a problem.
My windows OS is Win7 64bits, running both Java 1.6 32bit and 64bit (I have tested with both)
Package AID: 01 02 03 04 05 06
Applet AID: 01 02 03 04 05 06 00
I’ve highlighted the bytes different **
First load command (not working)
80E80000EFC48211CF010010DECAFFED01020400010601020304050602001F0010001F000B0028010600120BD30020016D000002D700140002001004010004002804020107A0000000620101020107A0000000620102020107A0000000620201*05*0106A0000001510003000B01070102030405060000010600120080030600020404000000BCFFFF00B800BF070BD30005308F00073D181D1E8C00063B7A0640188C00221F10096D0A1167001F418D00231E04191E254141311E04191E25414131191E2510116A11191E25600C116700191E25418D00231060058D00277F00281808900C87001810F2900B870105110080038D00
First load command (working)
80E80000EFC48211CF010010DECAFFED01020400010601020304050602001F0010001F000B0028010600120BD30020016D000002D700140002001004010004002804020107A0000000620101020107A0000000620102020107A0000000620201*00*0106A0000001510003000B01070102030405060000010600120080030600020404000000BCFFFF00B800BF070BD30005308F00073D181D1E8C00063B7A0640188C00221F10096D0A1167001F418D00231E04191E254141311E04191E25414131191E2510116A11191E25600C116700191E25418D00231060058D00277F00281808900C87001810F2900B870105110080038D00
The problems was I was using the incorrect export files for GlobalPlatform. I was using GP2.2.1 v1.5 and my card is GP2.1.1. I misread the download page.