Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

A strange problem with my applet

JCIDE related questions and answers.

Moderators: product, kuafu

trgorce
Posts: 17
Joined: Mon Feb 29, 2016 2:44 am
Points :146
Contact:

A strange problem with my applet

Post by trgorce » Wed Mar 30, 2016 11:31 pm

I have completed an applet recently. But I am stuck on a problem.
When I used JCIDE to debug my applet, I found that no matter which protocol I selected, my applet never entered into the line
"if (protocol == apdu.PROTOCOL_MEDIA_CONTACTLESS_TYPE_A)" , I don't know why this happened. Could somebody help me solve this issue? Thanks!

Here is part of my code.

Code: Select all

byte protocol = apdu.getProtocol();
         if (protocol  == apdu.PROTOCOL_MEDIA_CONTACTLESS_TYPE_A)
         {
            ;
         }
         else if (protocol == apdu.PROTOCOL_T1)
         {
            ;
         }
         else if (protocol == apdu.PROTOCOL_T1)
         {
            ;
         }

popmun09
Posts: 36
Joined: Tue Feb 16, 2016 9:49 pm
Points :230
Contact:

Re: A strange problem with my applet

Post by popmun09 » Thu Mar 31, 2016 1:20 am

What is the value of protocol?
Last edited by popmun09 on Fri Apr 01, 2016 3:27 am, edited 1 time in total.

trgorce
Posts: 17
Joined: Mon Feb 29, 2016 2:44 am
Points :146
Contact:

Re: A strange problem with my applet

Post by trgorce » Thu Mar 31, 2016 1:37 am

popmun09 wrote:What is the value of PROTOCOL_MEDIA_CONTACTLESS_TYPE_A?


0x81
Last edited by trgorce on Fri Apr 01, 2016 3:27 am, edited 1 time in total.

User avatar
mabel
Posts: 237
Joined: Mon May 18, 2015 3:09 am
Points :1705
Contact:

Re: A strange problem with my applet

Post by mabel » Fri Apr 01, 2016 3:01 am

ISO 7816 transport protocol type T=1. This constant is also used to denote the T=CL variant for contactless cards defined in ISO14443-4.


According to the spec says, you should do the following operation:
PROTOCOL_MEDIA_CONTACTLESS_TYPE_A|apdu.PROTOCOL_T1

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 14 guests

JavaCard OS : Disclaimer