• Aucun résultat trouvé

NFC-Tools Api

N/A
N/A
Protected

Academic year: 2022

Partager "NFC-Tools Api"

Copied!
20
0
0

Texte intégral

(1)

&

NFC-Tools Api

(2)

Table of contents

• Mifare Classic 1k

• NFC-Tools Api

• Demo

• Exercises

(3)

Mifare Classic 1k description

• 16 sectors, each sector contains 4 blocks,

• 3 user blocks (block 0 to 2) and one key block (block 3)

• Sector 0 block 0 cannot be used (contains manufactory data)

• Each block contains 16 bytes.

(4)

Memory organization

(5)

Memory organization

(6)

Manufacturer block

• Programmed and write protected during production

• Non unique Identifier

(7)

User’s blocks

• Two types of user’s blocks (Data block and Value Block)

• Data block has no memory structure (read/write block)

• Value Block has a memory structure with a value and an address

(8)

Sector Trailer

• At chip delivery keys are set to FFFFFFFFFFFFh

(9)

Memory Access

(10)

Access conditions

(11)

Access conditions for sector trailer

(12)

Access conditions for data blocks

(13)

NFC-Tools Api

• Class TerminalHandler

• Methods

void addTerminal(Terminal)

Terminal getAvailableTerminal(String) Example:

(14)

NFC-Tools Api

• Class NfcAdapter

• Constructor NfcAdapter(Terminal, TerminalMode)

• Methods

void registerTagListener (NfcTagListener)

void startListening ()

void stopListening ()

(15)

NFC-Tools Api for Mifare

Class AbstractCardTool which implements

NfcTagListener (generally we inherit from this class and redefine the method “doWithReaderWriter”)

Class MfClassicAccess

Constructor MfClassicAccess(KeyValue, int sector, int block, int blocksToRead)

Class MfBlock

(16)

NFC-Tools Api

• Class MfClassicReaderWriter

• Methods

void writeBlock (MfClassicAccess , MfBlock)

MfBlock[] readBlock(MfClassicAccess )

(17)

NFC-Tools Api

(18)

Exercise 1

• Create an application which writes the value 2014 hex to the sector 4 block 0

• Modify the application that we saw in the demo to read only the sector 4 block 0

• The API (jar files) is accessible here:

http://cedric.cnam.fr/~bouzefra/cours/Api.zip

• The program that reads a Mifare tag is accessible

(19)

Exercise 2

• Modify the application of writing to write the

trailer sector of sector 4 (change the value of key A to FFFFFFFFFFFE hex) DO NOT CHANGE

THE ACCESS BYTES

• Run the application of reading (what do you see?)

• Modify the application of reading in order to

(20)

References

• [MF1] MF1S503x Manual

• [GRU] https://github.com/grundid/nfctools

• [ACR] ACR122 and ACR128 Manual

http://cedric.cnam.fr/~bouzefra/cours/Api.zip

http://cedric.cnam.fr/~bouzefra/cours/Tag_Lecture.zip

http://cedric.cnam.fr/~bouzefra/cours_smos.html

Références

Documents relatifs

In order to provide a general approximation of the capacity C e in (3), independently of the analytic expression of the used antenna gain pattern, we propose to approximate G li (θ)

56 Department of Physics, Hampton University, Hampton VA, United States of America 57 Laboratory for Particle Physics and Cosmology, Harvard University, Cambridge MA, United States

Keywords: Customer Satisfaction, Quality Services, Health Care Sector, MUSA, Multicriteria Analysis... 1

In comparison to related works, we analysed some important issues for the dynamic reconfiguration support at the ar- chitectural level: foreseen and unforeseen changes; instance

- Le lymphome gastrique à grandes cellules (haut grade de malignité) se présente sous la forme d’une tumeur généralement volumineuse et le plus souvent ulcéré à

For ciphers that do not satisfy the Markov assumption, fixed keys may exist for which the probability (resp. correlation) of the best differential (resp. linear) trail may

If we concentrate only on the central block on the first line and the fact that no block of the second line acts on cell 0 and ask what can then be the minimal size of the

In this study, we show that a lipopolysaccharide binding protein/bactericidal permeability increasing protein family member from the invertebrate Biomphalaria glabrata (BgLBP/BPI1)