Christmas is coming!

To celebrate the new year and thank for the support from all our dear customers, Christmas promotional activity is being held in JavaCardOS online store.

During the event, you can enjoy many promotional activities - High Discount on JavaCardOS products,Lucky Draw,Double forum Points.

Come to choose your own Christmas gift and try your luck now!

Error 68 81 when sending apdu(BFDEP1P2..)to card

JavaCard Applet Development Related Questions and Answers.
hcxtecusn
Posts: 4
Joined: Thu Oct 12, 2017 10:25 pm
Points: 152
Contact:

Error 68 81 when sending apdu(BFDEP1P2..)to card

Postby hcxtecusn » Thu Nov 09, 2017 9:57 pm

Hi,

In my applet, i define an ins=(byte)0xDE,and the cla=(byte)0xBF. when i test the apdu, the JCIDE return an error code:6881.

how can i fix the problem?

scplatform
Posts: 3
Joined: Wed Aug 31, 2016 9:55 pm
Points: 116
Contact:

Re: Error 68 81 when sending apdu(BFDEP1P2..)to card

Postby scplatform » Wed Nov 15, 2017 4:56 am

Error code 6881 means 'Logical channel not supported', see ISO/IEC 7816-4 2013 Table 6 for more information.
CLA 0xBF=0b1011 1111, lowest 2 bits are logical channel number, see ISO/IEC 7816-4 2013 Table 2 for more information.

1.If your command send on logical channel, send command MANAGE_CHANNEL to open the channel, and then send your command.
2.If don't care the logical channel, set the lowest 2 bits of CLA with ZERO.

hcxtecusn
Posts: 4
Joined: Thu Oct 12, 2017 10:25 pm
Points: 152
Contact:

Re: Error 68 81 when sending apdu(BFDEP1P2..)to card

Postby hcxtecusn » Thu Nov 16, 2017 9:59 pm

scplatform wrote:Error code 6881 means 'Logical channel not supported', see ISO/IEC 7816-4 2013 Table 6 for more information.
CLA 0xBF=0b1011 1111, lowest 2 bits are logical channel number, see ISO/IEC 7816-4 2013 Table 2 for more information.

1.If your command send on logical channel, send command MANAGE_CHANNEL to open the channel, and then send your command.
2.If don't care the logical channel, set the lowest 2 bits of CLA with ZERO.



Hi,
Thank you for your reply.

I test the BFDE apdu again acorrding to your answer, but also gets an error code 6D00.

the detail APDU undering :
>> /send 00A40000020019
>> 00 A4 00 00 02 00 19
<< 90 00

>> /send 00D600000400000001
>> 00 D6 00 00 04 00 00 00 01
<< 90 00

>> /send 80700100247FECA3530003000000000000000000000000322003112210101001008649511100000001
>> 80 70 01 00 24 7F EC A3 53 00 03 00 00 00 00 00 00 00 00 00 00 00 00 32 20 03 11 22 10 10 10 01 00 86 49 51 11 00 00 00 01
<< 00 00 00 01 36 ED F0 09 90 00

>> /manage-channel open
>> 00 70 00 00 01
<< 01 90 00

>> /manage-channel open
>> 01 70 00 00 01
<< 02 90 00

>> /manage-channel open
>> 02 70 00 00 01
<< 03 90 00

>> /send BFDE27411086495111000000012233445566778899
>> BF DE 27 41 10 86 49 51 11 00 00 00 01 22 33 44 55 66 77 88 99
<< 6D 00 Instruction code not supported or invalid

please help me. thank you

roundtable
Posts: 8
Joined: Mon Sep 18, 2017 9:52 pm
Points: 74
Contact:

Re: Error 68 81 when sending apdu(BFDEP1P2..)to card

Postby roundtable » Tue Nov 21, 2017 5:23 am

Maybe you should select your applet again on logical channel 3 again,
03 A4 04 00 XXXXX
then send the command and check if SW is still 6D00

hcxtecusn
Posts: 4
Joined: Thu Oct 12, 2017 10:25 pm
Points: 152
Contact:

Re: Error 68 81 when sending apdu(BFDEP1P2..)to card

Postby hcxtecusn » Tue Nov 21, 2017 9:27 pm

Hi,
Thanks for your reply.

I tested the applet again after recevieing your email.

the detail apdus are:

>> /select A000000000435001
>> 00 A4 04 00 08 A0 00 00 00 00 43 50 01 00
<< 6F 0F 84 08 A0 00 00 00 00 43 50 01 A5 03 88 01 01 90 00

>> /send 80E001000A00000018030018050000
>> 80 E0 01 00 0A 00 00 00 18 03 00 18 05 00 00
<< 90 00

>> /send 00D4010018000000000000000011111111111111111111111111111111
>> 00 D4 01 00 18 00 00 00 00 00 00 00 00 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
<< 90 00

>> /send 80E0010110DF012000022F80040000D15600000590
>> 80 E0 01 01 10 DF 01 20 00 02 2F 80 04 00 00 D1 56 00 00 05 90
<< 90 00

>> /send 80E001000A00160100041600050000
>> 80 E0 01 00 0A 00 16 01 00 04 16 00 05 00 00
<< 90 00

>> /send 00A40000020016
>> 00 A4 00 00 02 00 16
<< 90 00

>> /send 00D6000006000000010011
>> 00 D6 00 00 06 00 00 00 01 00 11
<< 90 00

>> /send 00A4040006D15600000590
>> 00 A4 04 00 06 D1 56 00 00 05 90
<< 6F 08 84 06 D1 56 00 00 05 90 90 00

>> /send 80E001000A00000018030018050000
>> 80 E0 01 00 0A 00 00 00 18 03 00 18 05 00 00
<< 90 00

>> /send 00D4010018000000000000000011111111111111111111111111111111
>> 00 D4 01 00 18 00 00 00 00 00 00 00 00 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
<< 90 00

>> /send 80E001000A00190004041900050000
>> 80 E0 01 00 0A 00 19 00 04 04 19 00 05 00 00
<< 90 00

>> /send 00A40000020019
>> 00 A4 00 00 02 00 19
<< 90 00

>> /send 00D600000400000001
>> 00 D6 00 00 04 00 00 00 01
<< 90 00

>> /send 80E001000A00130100031300050000
>> 80 E0 01 00 0A 00 13 01 00 03 13 00 05 00 00
<< 90 00

>> /send 00D4000018274100000000000011111111111111111111111111111111
>> 00 D4 00 00 18 27 41 00 00 00 00 00 00 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
<< 90 00

>> /send 00D4000018220100000000000011111111111111111111111111111111
>> 00 D4 00 00 18 22 01 00 00 00 00 00 00 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
<< 90 00

>> /send 80700100247FECA3530003000000000000000000000000322003112210101001008649511100000001
>> 80 70 01 00 24 7F EC A3 53 00 03 00 00 00 00 00 00 00 00 00 00 00 00 32 20 03 11 22 10 10 10 01 00 86 49 51 11 00 00 00 01
<< 00 00 00 01 36 ED F0 09 90 00
>> /manage-channel open
>> 00 70 00 00 01
<< 01 90 00

>> /manage-channel open
>> 01 70 00 00 01
<< 02 90 00

>> /manage-channel open
>> 02 70 00 00 01
<< 03 90 00

>> /select A000000000435001
>> 03 A4 04 00 08 A0 00 00 00 00 43 50 01 00
<< 69 85 Conditions of use not satisfied

>> /send 00A4040006D15600000590

the CLA indicates that it should communicate in channel 0.
But in JCIDE,We had made sure that the CLA is the right one in current channel.So we help you change the CLA .You can send common /my_channel open to get rid of this restriction

>> 03 A4 04 00 06 D1 56 00 00 05 90
<< 69 99 Applet selection failed

>> /select A000000000435001
>> 03 A4 04 00 08 A0 00 00 00 00 43 50 01 00
<< 69 85 Conditions of use not satisfied

please help me, thank you!

scplatform
Posts: 3
Joined: Wed Aug 31, 2016 9:55 pm
Points: 116
Contact:

Re: Error 68 81 when sending apdu(BFDEP1P2..)to card

Postby scplatform » Tue Nov 28, 2017 5:33 am

1.Firstly, the reason of the SW="6999" is that your applet not support mult selection.

Code: Select all

>> 03 A4 04 00 06 D1 56 00 00 05 90
<< 69 99 Applet selection failed

2.According to your APDUs, maybe you can use the base logical channel only, and change 'BF' lowest 2bits with '00'.
3.If the CLA 'BF' can't be changed, OPEN channel firstly, and then send all of the APDU sequence.


Return to “Questions & Answers”

Who is online

Users browsing this forum: No registered users and 2 guests

JavaCard OS : Disclaimer