Ligne 62 : |
Ligne 62 : |
| | | |
| == AT+GATTADDCHAR == | | == AT+GATTADDCHAR == |
− | Adds a custom characteristic to the last service that was added to the peripheral (via AT+GATTADDSERVICE).
| + | Ajouter une caractéristique personnalisée au dernier service ajouté sur le périphérique (via AT+GATTADDSERVICE). |
| | | |
− | {{ambox-stop|text= AT+GATTADDCHAR must be run AFTER AT+GATTADDSERVICE, and will add the new characteristic to the last service definition that was added.}} | + | {{ambox-stop|text= AT+GATTADDCHAR doit être exécuté APRES AT+GATTADDSERVICE et ajoutera une nouvelle caractéristique à la dernière définition de service ajouté sur le périphérique.}} |
− | {{ambox|text= As of version 0.6.6 of the Bluefruit LE firmware you can now use custom 128-bit UUIDs with this command. See the example at the bottom of this command description.}} | + | {{ambox|text= Depuis la version 0.6.6 du firmware, il est également possible d'utiliser des UUIDs 128-bit personnalisés avec cette commande. Voyez les exemple ci-dessous pour plus d'information.}} |
| | | |
| * Codebase Revision : 0.3.0 | | * Codebase Revision : 0.3.0 |
− | * Parameters : This command accepts a set of comma-separated key-value pairs that are used to define the characteristic properties. The following key-value pais can be used: | + | * Paramètres : cette commande accepte un ensemble de paires clé-valeur (séparées par des virgules) pour définir les propriétés de la caractéristique. Les paires clé-valeur suivantes peuvent être utilisés: |
− | ** '''UUID''' : The 16-bit UUID to use for the characteristic (which will be insert in the 3rd and 4th bytes of the parent services 128-bit UUID). This value should be entered in hexadecimal format (ex. 'UUID=0x1234'). This value must be unique, and should not conflict with bytes 3+4 of the parent service's 128-bit UUID. | + | ** '''UUID''' : L'UUID 16-bit de la caractéristique (qui sera inséré dans les 3ième et 4ièmes octets des UUID 128-bit des services parent). Cette valeur devrait être encodée au format hexadécimal au format (ex. 'UUID=0x1234'). Cette valeur doit être unique, et ne doit pas entrer en conflit avec les octets 3+4 de l'UUID 128-bit du service parent. |
− | ** '''PROPERTIES''' : The 8-bit characteristic properties field, as defined by the Bluetooth SIG. The following values can be used: | + | ** '''PROPERTIES''' : Le champs propriétés 8-bit de la caractéristique, tel que définit dans Bluetooth SIG. Les valeurs suivantes peuvent être utilisées: |
− | *** 0x02 - Read | + | *** 0x02 - Read (lecture) |
− | *** 0x04 - Write Without Response | + | *** 0x04 - Write Without Response (écriture sans réponse) |
− | *** 0x08 - Write | + | *** 0x08 - Write (écriture) |
− | *** 0x10 - Notify | + | *** 0x10 - Notify (notification) |
− | *** 0x20 - Indicate | + | *** 0x20 - Indicate (désigner) |
− | ** '''MIN_LEN''' : The minimum size of the values for this characteristic (in bytes, min = 1, max = 20, default = 1) | + | ** '''MIN_LEN''' : La taille minimale des valeurs pour cette caractéristique (en octets, min = 1, max = 20, défaut = 1) |
− | ** '''MAX_LEN''' : The maximum size of the values for the characteristic (in bytes, min = 1, max = 20, default = 1) | + | ** '''MAX_LEN''' : La taille minimale des valeurs pour cette caractéristique (in octets, min = 1, max = 20, défaut = 1) |
− | ** '''VALUE''' : The initial value to assign to this characteristic (within the limits of 'MIN_LEN' and 'MAX_LEN'). Value can be an integer ("-100", "27"), a hexadecimal value ("0xABCD"), a byte array ("aa-bb-cc-dd") or a string ("GATT!"). | + | ** '''VALUE''' : Valeur initiale assignée à la caractéristique (dans les limites de 'MIN_LEN' et 'MAX_LEN'). La valeur peut être un entier ("-100", "27"), un hexadécimal ("0xABCD"), ou un tableau d'octet ("aa-bb-cc-dd") ou une chaâine de caractère ("GATT!"). |
− | ** '''>=0.7.0 - DATATYPE''' : This argument indicates the data type stored in the characteristic, and is used to help parse data properly. It can be one of the following values: | + | ** '''>=0.7.0 - DATATYPE''' : cet argument indique le type de données stockée dans la caractéristique et est utilisé pour aider le parsing des données. DATATYPE peut avoir l'une des valeurs suivantes: |
− | *** AUTO (0, default) | + | *** AUTO (0, défaut) |
− | *** STRING (1) | + | *** STRING (1, chaîne de caractère) |
− | *** BYTEARRAY (2) | + | *** BYTEARRAY (2, tableau d'octets) |
− | *** INTEGER (3) | + | *** INTEGER (3, entier) |
− | ** '''>=0.7.0 - DESCRIPTION''': Adds the specified string as the characteristic description entry | + | ** '''>=0.7.0 - DESCRIPTION''': Ajoute la chaîne de caractère en argument comme description (''description entry'') de la caractéristique |
− | ** '''>=0.7.0 - PRESENTATION''': Adds the specified value as the characteristic presentation format entry | + | ** '''>=0.7.0 - PRESENTATION''': Ajoute la chaîne de caractère en argument comme format de présentation (''presentation format entry'') de la caractéristique. |
− | * '''Response''': The index value of the characteristic in the custom GATT characteristic lookup table. (It's important to keep track of these characteristic index values to work with the characteristic later.) | + | * '''Réponse''': La valeur d'index de la caractéristique dans la table lookup des caractéristiques GATT personnalisées. (Il est important de mémoriser cette index pour travailler ensuite avec les caractéristiques.) |
| | | |
− | {{ambox-stop|text=Note: Key values are not case-sensitive}} | + | {{ambox-stop|text=Note: Les valeurs des clés ne sont pas sensible à la case}} |
− | {{ambox-stop|text=Make sure that the 16-bit UUID is unique and does not conflict with bytes 3+4 of the 128-bit service UUID}} | + | {{ambox-stop|text=Assurez-vous de l'unicité du UUID 16-bit et qu'il n'entre pas en conflit avec les octets 3+4 de l'UUID service 128-bit}} |
| | | |
| <nowiki># Efface toutes les définitions antérieurs | | <nowiki># Efface toutes les définitions antérieurs |