How to use ISOUpdateBinary with a NTAG 424

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to use ISOUpdateBinary with a NTAG 424

1,276 次查看
zahnom
Contributor I

Hello everyone!

I try to write to the NDEF file of a NTAG 424 with ISOUpdateBinary using the NFC Tools Android app. I keep getting the error "Wrong or inconsistent APDU length.":

PCD → PICC00:A4:00:00:02:E1:10:00Select DF
PICC → PCD90:00Success response
PCD → PICC00:A4:02:00:02:E1:04:00Select the NDEF file
PICC → PCD90:00Success response
PCD → PICC00:D6:00:00:02:AB:CD:00Write "AB:CD" into the currently selected file
PICC → PCD67:00Error "Wrong or inconsistent APDU length."

 

Reading with ISOReadBinary works fine. I have write permissions and the communication mode should be plain. I have the feeling that I make a small mistake, but couldn't figure it out yet. Thanks in advance for every help!

标记 (2)
0 项奖励
回复
2 回复数

1,205 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @zahnom,

The command "ISOUpdateBinary" is described by chapter 10.2 (Supported commands and APDUs) under the NTAG 424's Datasheet as follows:

CLA

INS

P1

P2

Lc

Data

Le

Data

00

D6

XX

XX

XX

Data to write

-

-


Where "-" signifies to not fill the parameter and "XX" is dependent on the command. The full description of the command is located in chapter 10.9.3 (ISOUpdateBinary).

It seems you are writing into the "Le" parameter after Data. Please help me confirm you are filling the command following the documentation. Try writing the command without the last byte.

CLA

INS

P1

P2

Lc

Data

Le

Data

00

D6

00

00

02

ABCD

-

-

Unfortunately, I cannot deepen into much more details, but as the information of this product is under NDA (Non-Disclosure Agreement), the information is not public, and this is not a secure channel to share any information of this device.

Best regards,
Julián.

0 项奖励
回复

1,031 次查看
jbean
Contributor II

Julián,

I feel I should bring to your attention that in the 424 DNA Application Note, the example shown for ISOUpdateBinary (https://www.nxp.com/docs/en/application-note/AN12196.pdf?page=32) does include "Le" which is misleading. I was trying to follow the example and was getting the same error as OP. This cost me quite a bit of time.

0 项奖励
回复