NDEF vs APDU NFC Android
Asked Answered
L

1

12

Can you tell me please what is the difference between NDEF (NFC Data Exchange Format) and APDU (Application Protocol Data Unit).

I have developed an Android application that reads NDEF messages, and I want to know if it can work for APDU data too.

Lockjaw answered 28/4, 2015 at 16:38 Comment(0)
L
33

NFC Data Exchange Format (NDEF)

NDEF is a wrapper format that allows you to package a data payload together with meta information (such as a data type identification), and that permits combining multiple such packages (so-called "records") in one "message" that can be stored on NFC tags and transfered across an NFC link.

NDEF itself does not define how such data (messages) should be exchanged between NFC devices (i.e. it does not define the communication protocol and commands to read or store such data).

Application Protocol Data Unit (APDU)

APDUs are the command and response packets for communication with smartcards. A command APDU consists of an instruction code and associated parameter data. A resonse APDU consists of response data and a response status code (in response to a preceding command APDU).

What's the difference?

NDEF is data container for storing structured data on NFC tags and transfering such data over peer-to-peer links while APDUs are commands and responses of a communication protocol for smartcards.

Are APDUs and NDEF somehow related?

With NFC Forum Type 4 tags, APDU commands (like READ BINARY and STORE BINARY) are used to read and store NDEF data into a file on that tag type. Other NFC Forum tag types do not rely on APDUs but use other command sets.

Lally answered 29/4, 2015 at 7:10 Comment(1)
Than you for your response, but I stil have some confusion with apdu aids, how can i define them and why?Lockjaw

© 2022 - 2024 — McMap. All rights reserved.