JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
javacard ndef applet
Moderator: Ellisun
-
- Posts: 19
- Joined: Thu Oct 06, 2016 10:05 pm
- Points :226
- Contact:
Re: javacard ndef applet
Hello.
Thanks to your confirmation.
Please let me ask about cap file size.
Depending on Javacard kit, the cap file size is different.
JavaCard Kit 304 - 18KB
222 - 9KB
wiht JCIDE.
Could you let me know how to build JavaCard Kit 212/221 beause I may have resoucue limitation ?
Regards,
Shige
Thanks to your confirmation.
Please let me ask about cap file size.
Depending on Javacard kit, the cap file size is different.
JavaCard Kit 304 - 18KB
222 - 9KB
wiht JCIDE.
Could you let me know how to build JavaCard Kit 212/221 beause I may have resoucue limitation ?
Regards,
Shige
Re: javacard ndef applet
In JCIDE, from the menu, select " Build-> Property ", a dialog box "Property Sheet" will pop up. Click "Local JCKit Configuration" in the side bar, and unfold "JCKit Option" and for first item "Java Card kit version", select java_card_kit version from dropdown list.
You do not have the required permissions to view the files attached to this post. Please login first.
Re: javacard ndef applet
Compare JC222 with JC304:
Label 1 and 2: The size of CAP component in CAP file is same.
Label 3: CAP file of JC304 has one more file - APPLET-INF than JC222.
So we can get that the content size uploaded to card of JC222 CAP file is the same with the size of JC304 CAP file.
Label 1 and 2: The size of CAP component in CAP file is same.
Label 3: CAP file of JC304 has one more file - APPLET-INF than JC222.
So we can get that the content size uploaded to card of JC222 CAP file is the same with the size of JC304 CAP file.
You do not have the required permissions to view the files attached to this post. Please login first.
-
- Posts: 19
- Joined: Thu Oct 06, 2016 10:05 pm
- Points :226
- Contact:
Re: javacard ndef applet
Hello.
Please see the attached image.
SELECT command is no problem.
>> /send 00a4040007D2760000850101
>> 00 A4 04 00 07 D2 76 00 00 85 01 01
<< 90 00
But, please see the next command
>> /send 00a4000c02e103
>> 00 A4 00 0C 02 E1 03
and see the buffer from apdu.getBuffer(),
buffer[0] = 0x00
buffer[1] = 0xA4
buffer[2] = 0x00
buffer[3] = 0x0C
buffer[4] = 0x02
buffer[5] = 0x00 <------- Why ??
buffer[6] = 0x00 <------- Why ??
.....
As a result, cannot get fileId and reply 6A82 = SW_FILE_NOT_FOUND.
This result of simulator is same as applet on my RealCard.
Please let me know the reason..
Regards,
Shige
Please see the attached image.
SELECT command is no problem.
>> /send 00a4040007D2760000850101
>> 00 A4 04 00 07 D2 76 00 00 85 01 01
<< 90 00
But, please see the next command
>> /send 00a4000c02e103
>> 00 A4 00 0C 02 E1 03
and see the buffer from apdu.getBuffer(),
buffer[0] = 0x00
buffer[1] = 0xA4
buffer[2] = 0x00
buffer[3] = 0x0C
buffer[4] = 0x02
buffer[5] = 0x00 <------- Why ??
buffer[6] = 0x00 <------- Why ??
.....
As a result, cannot get fileId and reply 6A82 = SW_FILE_NOT_FOUND.
This result of simulator is same as applet on my RealCard.
Please let me know the reason..
Regards,
Shige
You do not have the required permissions to view the files attached to this post. Please login first.
Re: javacard ndef applet
If you use T=0 protocol, you need to add apdu.setIncomingAndReceive() in your code.
"This method gets as many bytes as will fit without buffer overflow in the APDU buffer following the header. It gets all the incoming bytes if they fit."
"This method gets as many bytes as will fit without buffer overflow in the APDU buffer following the header. It gets all the incoming bytes if they fit."
Code: Select all
private void processSelect(APDU apdu) throws ISOException {
byte[] buffer = apdu.getBuffer();
apdu.setIncomingAndReceive(); //Add this command
byte p1 = buffer[ISO7816.OFFSET_P1];
byte p2 = buffer[ISO7816.OFFSET_P2];
byte lc = buffer[ISO7816.OFFSET_LC];
// we only support what the NDEF spec prescribes
if(p1 != SELECT_P1_BY_FILEID) {
ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
}
if(p2 != SELECT_P2_FIRST_OR_ONLY) {
ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
}
// check length, must be for a file ID
if(lc != 2) {
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
}
// retrieve the file ID
short fileId = Util.getShort(buffer, ISO7816.OFFSET_CDATA);
// perform selection if the ID is valid
switch(fileId) {
case FILEID_NDEF_CAPABILITIES:
case FILEID_NDEF_DATA:
selectedFile = fileId;
break;
default:
ISOException.throwIt(ISO7816.SW_FILE_NOT_FOUND);
}
}
-
- Posts: 19
- Joined: Thu Oct 06, 2016 10:05 pm
- Points :226
- Contact:
Re: javacard ndef applet
Hello.
Yes! applet start to work on real card, thanks!!
But I have another problem about tool - APDU - differnece between pyApdutool (Success) and GP tool (Error).
I will create new topic in appropriate room.
I really appreciate your kind advice and help.
Regards,
Shige
Yes! applet start to work on real card, thanks!!
But I have another problem about tool - APDU - differnece between pyApdutool (Success) and GP tool (Error).
I will create new topic in appropriate room.
I really appreciate your kind advice and help.
Regards,
Shige
Re: javacard ndef applet
Not at all.
Re: javacard ndef applet
Hi,
I've a similar error but the card is this one: https://www.javacardos.com/store/products/10002
It should be compliant with the NDEF.
Any suggestion ?
I've a similar error but the card is this one: https://www.javacardos.com/store/products/10002
It should be compliant with the NDEF.
Any suggestion ?
Re: javacard ndef applet
Solved. The problem was the wrong AID.
But I need support on a different point: how to install the STUB version on a javacard?
I suppose I've to create two applet, one is the NDEF Stub and the second is my applet. But how my applet can call the STUB ?
In addition, the STUP version has two java file. How I have to manage the second (the service)?
Thanks, Stefao
But I need support on a different point: how to install the STUB version on a javacard?
I suppose I've to create two applet, one is the NDEF Stub and the second is my applet. But how my applet can call the STUB ?
In addition, the STUP version has two java file. How I have to manage the second (the service)?
Thanks, Stefao
Who is online
Users browsing this forum: No registered users and 0 guests