Hi,Michael!Thanks your hints!

I have try read smart card,this is my program:
"
Tag tagFromIntent = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
IsoDep tag = IsoDep.get(tagFromIntent);
try{
tag.connect();
tag.setTimeout(20);
byte[] commandAPDU= new byte[]{
(byte)0x00, (byte)0xA4, (byte)0x04, (byte)0x00, (byte)7,
(byte)0xAB, (byte)0xE5, (byte)0xBC, (byte)0x08, (byte)0x85,
(byte)0x01, (byte)0x00};
byte[] responseAPDU = tag.transceive(commandAPDU);
String m1=Hex.byteArrayToHex(responseAPDU);
mText.setText(m1);
"

But the result is wrong. It is :"6A82". IS it meaning the file can't
found?
As a response i get 9000 if the applet was right. I can't find the
problem.


The command APDU come from "Type 4 Tag Operation Technical
Specification". It says :
"select:00 A4 04 00 07h D27600008501000h
       00 A4 04 00 02h E103h
ReadBinary :00 B0 00 07
Update write:00h D6h Offset Length Lc  Data to be written in the NDEF
file
"
Have some wrongs in this commands ? What should I change my program?
Where the command APDU come from?

Thanks your any hints!

On 9月10日, 下午2时27分, Michael Roland <[email protected]> wrote:
> Hallo,
>
> > I  need to read and write ISO 14443-4 smart card .
>
> In this case you won't need NfcA at all. You only need theIsoDepclass.
> In general you shouldn't care whether yourIsoDepcard uses NfcA or NfcB
> as low-level technology.
>
> > I had used
> > "mTechLists = new String[][] { new String[]
> > { NfcA.class.getName() } }"
> > "NfcA tag=NfcA.get(tagFromIntent)".How to useIsoDep?
>
> Just replace NfcA withIsoDep.
>
> > Next, What I should do? Can give me some hints?
>
> You can then connect to theIsoDepobject:
> tag.connect();
>
> Then you can transmit ISO 7816-4 APDU commands with the transceive() method:
>
> byte[] responseAPDU = tag.transceive(commandAPDU);
>
> br,
> Michael

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to