• Aucun résultat trouvé

Course 2 Programming NFC Technology & Android

N/A
N/A
Protected

Academic year: 2022

Partager "Course 2 Programming NFC Technology & Android"

Copied!
24
0
0

Texte intégral

(1)

NFC Technology & Android Programming

Course 2

Nour EL MADHOUN [email protected]

1

(2)

Outline

• NFC Technology Overview

• APDU & AID

• Android Project

2

(3)

NFC Technology Overview

3

- Le NFC (Near Field Communication) est une technologie permettant d'échanger des données à une distances très faible (moins de 5cm), entre deux appareils équipés de NFC sans contact

- Le NFC est intégré dans certains téléphones portables sous forme d’une antenne, ainsi que sur certaines cartes de transport ou de paiement (permettant le paiement sans contact)

(4)

NFC Technology Overview

4

Antenne NFC

Carte NFC

Smartphone NFC

Antenne NFC

(5)

5

NFC Technology Overview

Point Of Sale Machine

(6)

6

NFC Technology Overview

(7)

7

NFC Technology Overview

(8)

8

NFC Technology Overview

(9)

9

NFC Technology Overview

(10)

10

NFC Technology Overview

(11)

11

NFC Technology Overview

(12)

12

NFC Technology Overview

* Une communication NFC se fait entre:

- Un initiateur (émetteur du champ magnétique, Target ou Initiator)

&

- Une cible (tag, récepteur)

* Le tag est interrogé et l'émetteur interroge.

* La communication entre eux peut être soit active soit passive.

(13)

13

NFC Technology Overview

* Lors d'une communication active:

Le récepteur et l'initiateur disposent de leur propre source d'énergie communiquent en alternant le champ électromagnétiqueet qu'ils génèrent.

* Lors d'une communication passive:

L'initiateur génère un champ électromagnétique à partir duquel le récepteur va être alimentée en énergie.

(14)

14

NFC Technology Overview

NFC Communication Modes

1) Reader/Writer Mode:

An NFC device can interact (read/write data) with an NFC card.

Passive Active

(15)

15

NFC Technology Overview

NFC Communication Modes

2) Card Emmulation Mode (Host Card Emulation):

It simulates an NFC device as an NFC card.

Active Originally it is active,

but it emulates an NFC card

‘Passive’

(16)

16

NFC Technology Overview

NFC Communication Modes

3) Peer to Peer Mode

Two NFC devices communicate with each other to exchange data.

Active Active

(17)

17

APDU & AID

- The reader identifies the content of an NFC card/HCE thanks to:

AID (Application IDentifier) - AIDs are in hexadecimal.

- Examples:

a Visa Card has an international sepecfic AID1 AID1: A0000000031010

a Master Card has another AID2 != AID1 AID2: A0000000041010

a Navigo Card has another AID3!=AID2!=AID1 an HCE application has another AID4

(18)

18

APDU & AID

- The reader and an NFC card/HCE communicate together through:

APDU Commands and APDU Responses

- APDU (Application Protocol Data Unit) has a standard format

- Bank cards Visa, Master are read any where in the worlds thanks to this standardization

(19)

19

APDU & AID

The First APDU command between a reader & an NFC Card/HCE SELECT AIDis

(20)

20

APDU & AID

(21)

21

APDU & AID

(22)

22

APDU & AID

Example Select AID:

0x00, 0xA4, 0x04, 0x00, aid, 0x00

(23)

23

Android Project

We will focus on two NFC modes:

* The Reader/Writer mode:

- Sender: your NFC phone acting as an NFC reader (Select AID1, Select AID2,…)

- Receiver: any NFC card: navigo, or NFC bank card

* The Card Emulation mode:

- Sender: your NFC phone acting as an NFC reader (Select AID4)

- Receiver: your second NFC phone acting as an NFC card (Attribute to your phone application HCE AID4)

(24)

24

Android Project

- AID of your choice: F0 52 55 4C …….

private static final byte[] myAID= {0xF0, 0x52,

0x55, 0x4c,………..};

Références

Documents relatifs

- onStart() : est exécutée après chaque onCreate() ou onRestart(), elle permet de charger les données lorsque l’activité est visible par l’utilisateur. - onRestart() : est

Ainsi, un téléphone portable peut également être un tag NFC dans le cas d’un fonctionnement en pair-à-pair.. • Un tag est composé de trois

Dans le cas, rencontré très souvent en RFID, où les étiquettes sont batteryless (sans source d'énergie embarquée), il est clair que la première chose à faire pour l'interrogateur

Toutes les caractéristiques techniques des tags NFC ont fait l’objet d’une norma- lisation internationale pour faire en sorte qu’ils fonctionnent avec un large spectre

October 31st 2013, Google introduced its mobile Operating System, Android 4.4 KitKat including a new NFC - Near Field Communication feature: Host-based Card Emulation (HCE).

Quand la tension aux bornes du condensateur devient supérieure à une tension seuil, notée U S , le composant électronique P (qui correspond au circuit intégré de réponse

Par une application mobile, n'importe quel utilisateur pourrait localiser les vélos à       proximité et emprunter un vélo disponible pour une certaine durée. Le préteur,

 Transferring and Receiving the "Hello World!" ASCII Text Using the LLCP Stack (Connection-Oriented) Note: The Symbian implementation for NFC does not support Card