Modifications

Sauter à la navigation Sauter à la recherche
1 364 octets ajoutés ,  26 octobre 2015 à 09:18
aucun résumé de modification
Ligne 1 : Ligne 1 :  
{{PN532-RFID-NFC-NAV}}
 
{{PN532-RFID-NFC-NAV}}
  −
{{traduction}}
      
== NDEF ==
 
== NDEF ==
Ligne 263 : Ligne 261 :  
Pour pouvoir stocker un message NDEF dans une carte Mifare Classic, le message doit être inclus (englobé) dans un bloc TLV. Les fondements de la structure d'un bloc '''TLV''' est décrit ci-dessous.
 
Pour pouvoir stocker un message NDEF dans une carte Mifare Classic, le message doit être inclus (englobé) dans un bloc TLV. Les fondements de la structure d'un bloc '''TLV''' est décrit ci-dessous.
   −
== TLV Blocks ==
+
== Les blocs TLV ==
TLV is an abbreviation for three different fields: T for Tag Field, L for Length Field and V for Value Field. A TLV Block consist of one or more bytes, depending on which of these three fields is present. Note that the TLV Block will always be at least one byte since the T Field is mandatory in every case.  
+
TLV est l'abréviation correspondant à 3 champs différents:
 +
* '''T''' pour le champ Tag,  
 +
* '''L''' pour la longueur du champ,
 +
* '''V''' pour le champ valeur.  
   −
=== Tag Field ===
+
Un bloc TLV est constitué d'un ou plusieurs octets/bytes, en fonction de ces trois champs présents.<br />Note que le bloc TLV aura toujours au moins un byte/octet étant donné que le champ T est obligatoire dans tous les cas.
The Tag Field (or T Field) is the only mandatory field, and uses a single-byte to identify the type of TLV block accordingly to a pre-determined table of values:  
+
 
 +
=== Le champ Tag ===
 +
Le champ Tag (ou champ T) est le seul champ obligatoire et utilise un seul octet pour identifier le bloc TLV. La valeur de T est prédéterminé, voyez la table ci-dessous pour les différentes valeurs disponibles:  
    
  <nowiki>TLV Block Types
 
  <nowiki>TLV Block Types
 
    
 
    
   Block Type   Value Description
+
   Type de bloc  Valeur Description
   ------------- ----- --------------------------------------
+
   ------------- -----   --------------------------------------
   NULL          0x00   These blocks should be ignored
+
   NULL          0x00   Ces blocs devraient être ignorés
   NDEF Message  0x03   Block contains an NDEF message
+
   NDEF Message  0x03   Le bloc contient un message NDEF
   Proprietary  0xFD   Block contains proprietary information
+
   Proprietary  0xFD   Le bloc contient des information propriétaires
   Terminator    0xFE   Last TLV block in the data area</nowiki>
+
   Terminator    0xFE   Dernier bloc TLV dans cette zone de donnée</nowiki>
   −
=== Length Field ===
+
=== Le champ longueur ===
The Length Field (or L Field) contains the size (in bytes) of the value field. The Length Field can be organised in two different ways, using either one or three bytes.
+
Le champ longueur (''Length'' en anglais --ou-- champ L) contient la taille du champ valeur, taille exprimée en octets/bytes. Le champs longueur est organisé de deux façons différentes, en utilisant soit un ou 3 octets.
   −
The one byte format simple contains a single byte value from 0x00..0xFF.
+
Le format '''un octet''' contient une simple valeur entre 0x00 et 0xFE (soit pour une valeur 0 et 254 exprimé en base 10).
   −
The three byte format consists of the following format:
+
Le format '''trois octets''' est constitué du format suivant:
  <nowiki> Byte 0:      Always 0xFF to indicate that we are using the three byte format
+
  <nowiki> Octet 0:      Always 0xFF to indicate that we are using the three byte format
  Byte 1..2:    Can be a value between 0x00FF and 0xFFFE</nowiki>
+
Octet 1..2:    Peut être une valeur entre 0x00FF et 0xFFFE (soit entre 0 et 65534)</nowiki>
   −
Both the one byte and three byte format must be supported for NFC Forum and NDEF compatability.
+
Les deux formats (1 et 3 octets) doivent supporter la compatibilité pour NDEF et NFC Forum.
   −
=== Value Field ===
+
=== Champ valeur (value) ===
The Value Field (or V Field) is only present if the Length Field (described above) is present and not equal to 0x00. If the Length Field is not equal to 0, the Value Fields will contain N bytes of data in the format indicated by the T Field above.
+
Le champ valeur (''Value Field'' en anglais, ou encore 'V') est uniquement présent sur le champ longueur (''Length Field'', décrit ci-dessus) est présent and différent de 0x00.  
   −
The value field is where the payload (an '''NDEF Message''', for example) is stored.
+
Si le champs longueur n'est plus grand que 0 alors le champ valeur (''Value'') contient les N octets/bytes de données au format indiqué par le champs T (ci-dessus).
 +
 
 +
Le champs valeur est l'endroit où la charge de donnée (''payload'') est stockée. Par exemple, un '''message NDEF'''.
    
=== Terminator TLV ===
 
=== Terminator TLV ===
The Terminator TLV is the last TLV block in the data area, and consist of a single byte: 0x0FE (see the TLV Block Type table above). This TLV Block in mandatory.
+
Le terminateur TLV (le ''TLV terminator'') est le dernier bloc TLV dans la zone de donnée et est composé d'un simple octet/byte: 0x0FE (voyez la table des 'types de bloc TLV' ci-dessus). '''Ce bloc TLV est obligatoire'''.
    
== Dump mémoire d'une Mifare Classic NDEF ==
 
== Dump mémoire d'une Mifare Classic NDEF ==
Ligne 388 : Ligne 393 :     
=== Enregistrement 1 ===
 
=== Enregistrement 1 ===
The first record on the card can be identified by looking at the first byte of block 4 in sector 1.
+
Le premier enregistrement sur la carte peut être identifier en regardant le premier octet/byte du bloc 4 sur le secteur 1.
    
  <nowiki>Block  00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15  Char Value
 
  <nowiki>Block  00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15  Char Value
Ligne 394 : Ligne 399 :  
04    00 00                                            ..</nowiki>
 
04    00 00                                            ..</nowiki>
   −
Every record on the Mifare card starts with the '''TLV Block''' (described above), and the first byte of the TLV Block (the Tag Field) indicates that this is a '''NULL Block type (value 0x00)'''. The second byte is the Length Field, and is 0. Since there is no payload for this record (Length = 0), the third byte of the TLV block is not present (the Value Field).
+
Chaque enregistrement sur une carte MiFare commence avec un '''block TLV''' (décrit ci-avant dans le tutoriel).
 +
* Le premier octet/byte d'un block TLV (le champs 'Tag') indique qu'il s'agit d'un '''bloc de type NULL''' (valeur 0x00, ''NULL Block type '').  
 +
* Le second octet/byte indique la longueur du champ... qui est 0.
   −
This record was likely inserted when the card was first formatted to ensure that at least one record is present.
+
Etant donné qu'il n'y a pas de ''payload'' (charge de donnée) pour cet enregistrement (Longueur = 0), le troisième octet/byte du bloc TLV n'est pas présent (le champ valeur/value).
 +
 
 +
Cet enregistrement est 'insérer' lors du premier formatage de la carte pour assurer qu'il y ait au moins un enregistrement présent sur la carte.
    
=== Enregistrement 2 ===
 
=== Enregistrement 2 ===
The second record on the card starts at byte 0x02 of block 4 and continues into block 5.
+
Le second enregistrement de la carte commence à l'octet/byte 0x02 du bloc 4 et continue dans le bloc 5.
   −
  <nowiki>Block  00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15  Char Value
+
  <nowiki>Bloc  00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15  Valeur caractère/Char Value
 
-----  -----------------------------------------------  ------------
 
-----  -----------------------------------------------  ------------
 
04          03 11 D1 01 0D 55 01 61 64 61 66 72 75 69  Ñ..U.adafrui
 
04          03 11 D1 01 0D 55 01 61 64 61 66 72 75 69  Ñ..U.adafrui
 
05    74 2E 63 6F 6D                                  t.com</nowiki>
 
05    74 2E 63 6F 6D                                  t.com</nowiki>
   −
Starting with les données du '''bloc TLV''' in the first two bytes, we can determine the following:  
+
Il commence avec les données du '''bloc TLV''' dans les deux premiers octets/bytes, nous pouvons déterminer les informations suivante:  
   −
  <nowiki>Byte(s)   Value  Description
+
  <nowiki>octet(s) Valeur  Description
 
-------  -----  -----------
 
-------  -----  -----------
04:02    0x03    Field Type (0x03 = NDEF Message)
+
04:02    0x03    Type de champ (0x03 = Message NDEF)
04:03    0x11    Length Field (17 bytes)</nowiki>
+
04:03    0x11    Longueur du champ (17 octets/bytes)</nowiki>
 +
 
 +
Qui nous indique que l'enregistrement contient un '''message NDEF''' (valeur 0x03), et que le message fait 17 octets/bytes de long (0x11 en hexadécimal, soit la valeur 17 en décimal). Cela signifie que notre message NDEF est contenu dans les 17 octets/bytes suivants (de 04:04 à 05:04).
   −
This indicates to us that the record contains an '''NDEF Message''' (value 0x03), and that the message is 17 bytes long (0x11 in hexadecimal = 17 in decimal value). This means that our NDEF message is contained in the next 17 bytes (04:04..05:04). The NDEF record can then be analysed as follows:  
+
L'enregistrement NDEF peut alors être analysé comme suit:  
   −
  <nowiki>Byte(s)       Value  Description
+
  <nowiki>Octet(s)     Valeur Description
 
-------      -----  -----------
 
-------      -----  -----------
04:04        0xD1  This byte is the **NDEF Record Header**, and indicates that this is
+
04:04        0xD1  Cet octet/bytes est **l'entête d'enregistrement NDEF**,  
                     an NFC Forum Well Known Record (0x01 in the first 3 bits),  
+
                     et indique qu'il s'agit d'un enregistrement bien connu
                     and that this is the first and last record (MB=1, ME=1),
+
                    (Well Known Record) du Forum NDEF (0x01 dans les 3 premiers bits),  
                     and that this is a short record (SR = 1) meaning the payload
+
                     et il n'agit du premier et dernier enregistrement (MB=1, ME=1),
                     length is less than or equal to 255 chars (len=one byte).
+
                     et c'est un record "court" (short record, SR=1) signifiant que
 +
                    la charge de donnée (payload) fait moins de 256 caractères
 +
                     (longueur=un octet/byte).
 +
 
 
                     TNF = 0x01 (NFC Forum Well Known Type)
 
                     TNF = 0x01 (NFC Forum Well Known Type)
                     IL  = 0    (No ID present, meaning there is no ID Length or ID Field either)
+
                     IL  = 0    (Pas d'ID présent, donc pas de champs 'ID Length' et 'ID')
                     SR  = 1    (Short Record)
+
                     SR  = 1    (Enregistrement court, Short Record)
                     CF  = 0    (Record is not 'chunked')
+
                     CF  = 0    (L'enregistrement n'est pas coupé en morceau, record is not 'chunked')
                     ME  = 1    (End of message)
+
                     ME  = 1    (Fin de message, Message End)
                     MB  = 1    (Beginning of message)
+
                     MB  = 1    (Début de message, Message Begin)
04:05        0x01  This byte is the **Type Length** for the Record Type Indicator
+
04:05        0x01  Cet octet/byte est la longueur du type **Type Length**  
                     (see above for more information), which is 1 byte (0x55/'U' below)
+
                    pour le type d'enregistrement (Record Type)
04:06        0x0D  This is the payload length (13 bytes)
+
                     (voir ci-dessus pour plus d'information.
04:07        0x55  Record Type Indicator (0x55 or 'U' = URI Record)
+
                    Fait 1 octet/byte (0x55/'U' ci-dessous)
04:08        0x01  This is the **start of the record payload**, which contains the
+
04:06        0x0D  Longueur de la charge de donnée (payload), soit 13 octets/bytes
                     URI Identifier ("http://www.") since this is a URI Well-Defined
+
04:07        0x55  Type d'enregistrement (0x55 ou 'U' = enregistrement URI)
                     Record Type (see Well-Defined Records above).  This will be
+
04:08        0x01  Ceci est le **début de la charge de donnée (payload)**, qui contient
                     prepended to the rest of the URI that follows in the rest of the
+
                     l'identification d'URI ("http://www.") étant donné qu'il s'agit d'un
                    message payload
+
                    type d'enregistrement bien connu de type URI (URI Well-Defined
04:09..05:04  ...    The remainder of the URI ("adafruit.com"), which combined with the
+
                     Record Type, voir ci-avant pour les explications).  Le préfixe sera
                     pre-pended value from byte 04:08 yields: http://www.adafruit.com</nowiki>
+
                     ajouté au restant de l'URI contenu dans le reste du 'payload'
 +
04:09..05:04  ...    Le reste de l'URI ("adafruit.com"), qui est combiné avec le préfix
 +
                     ajouté suivant la valeur de l'octet/byte 04:08 .
 +
                    Cela donne: http://www.adafruit.com</nowiki>
   −
=== TLV Terminator ===
+
=== Le terminateur TLV ===
 +
Egalement appelé ''TLV Terminator'' en anglais.
   −
  <nowiki>Block  00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15  Char Value
+
  <nowiki>Bloc  00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15  Valeur en caractère
 
-----  -----------------------------------------------  ------------
 
-----  -----------------------------------------------  ------------
 
05                    FE                                þ</nowiki>
 
05                    FE                                þ</nowiki>
   −
The final byte (block 5, byte 5), with the value 0xFE, is the '''TLV Terminator''' and indicates that this is the end of the TLV Block.  
+
L'octet/byte final (bloc 5, octet/byte 5) qui à la valeur 0xFE est le '''TLV Terminator''' qui indique que ceci est la fin du bloc TLV.  
 
  −
{{traduction}}
  −
 
      
{{PN532-RFID-NFC-TRAILER}}
 
{{PN532-RFID-NFC-TRAILER}}
29 918

modifications

Menu de navigation