Modifications

Sauter à la navigation Sauter à la recherche
365 octets ajoutés ,  16 juillet 2017 à 16:35
Ligne 91 : Ligne 91 :  
{{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=Make sure that the 16-bit UUID is unique and does not conflict with bytes 3+4 of the 128-bit service UUID}}
   −
  <nowiki># Clear any previous custom services/characteristics
+
  <nowiki># Efface toutes les définitions antérieurs
 +
# de services/caractéristiques personnalisées
 
AT+GATTCLEAR
 
AT+GATTCLEAR
 
OK
 
OK
   −
# Add a battery service (UUID = 0x180F) to the peripheral
+
# Ajoute le service "battery" (UUID = 0x180F, état de la
 +
# batterie) sur le périphérique
 
AT+GATTADDSERVICE=UUID=0x180F
 
AT+GATTADDSERVICE=UUID=0x180F
 
1
 
1
 
OK
 
OK
 
    
 
    
# Add a battery measurement characteristic (UUID = 0x2A19), notify enabled
+
# Ajoute la caractéristique "battery measurement"
 +
# (UUID = 0x2A19, mesure de la batterie), notification activée
 
AT+GATTADDCHAR=UUID=0x2A19,PROPERTIES=0x10,MIN_LEN=1,VALUE=100
 
AT+GATTADDCHAR=UUID=0x2A19,PROPERTIES=0x10,MIN_LEN=1,VALUE=100
 
1
 
1
 
OK</nowiki>
 
OK</nowiki>
   −
  <nowiki># Clear any previous custom services/characteristics
+
  <nowiki># Efface toutes les définitions antérieurs
 +
# de services/caractéristiques personnalisées
 
AT+GATTCLEAR
 
AT+GATTCLEAR
 
OK
 
OK
   −
# Add a custom service to the peripheral
+
# Ajoute un service personnalisé sur le périphérique
 
AT+GATTADDSERVICE=UUID128=00-11-00-11-44-55-66-77-88-99-AA-BB-CC-DD-EE-FF
 
AT+GATTADDSERVICE=UUID128=00-11-00-11-44-55-66-77-88-99-AA-BB-CC-DD-EE-FF
 
1
 
1
 
OK
 
OK
   −
# Add a custom characteristic to the above service (making sure that there
+
# Ajouter une caractéristique personnalisée au
# is no conflict between the 16-bit UUID and bytes 3+4 of the 128-bit service UUID)
+
# service ci-dessus (s'assurer qu'il n'y a pas de conflit entre
 +
# le UUID 16-bit et les octets 3+4 d'un UUID service 128-bit)
 
AT+GATTADDCHAR=UUID=0x0002,PROPERTIES=0x02,MIN_LEN=1,VALUE=100
 
AT+GATTADDCHAR=UUID=0x0002,PROPERTIES=0x02,MIN_LEN=1,VALUE=100
 
1
 
1
 
OK</nowiki>
 
OK</nowiki>
   −
Version '''0.6.6''' of the Bluefruit LE firmware added the ability to use a new "'''UUID128'''" flag to add custom 128-bit UUIDs that aren't related to the parent service UUID (which is used when passing the 16-bit "'''UUID'''" flag).
+
La version '''0.6.6''' du firmware de Bluefruit LE est capable d'utiliser le drapeau  "nouveau '''UUID128'''" pour ajouter un des UUIDs 128-bit personnalisés qui ne sont pas relatifs à un service UUID parent (qui est utilisé lorsque l'on passe un drapeau "'''UUID''' 16-bit ").
   −
To specify a 128-bit UUID for your customer characteristic, enter a value resembling the following syntax:
+
Pour spécifier un UUID 128-bit pour votre caractéristique personnalisée, saisissez une valeur ressemblant à la syntaxe suivante:
   −
  <nowiki># Add a custom characteristic to the above service using a
+
  <nowiki># Ajouter une caractéristique personnalisée
# custom 128-bit UUID
+
# au service définit ci-dessous (en utilisant un
 +
# UUID 128-bit personalisé)
 
AT+GATTADDCHAR=UUID128=00-11-22-33-44-55-66-77-88-99-AA-BB-CC-DD-EE-FF,PROPERTIES=0x02,MIN_LEN=1,VALUE=100
 
AT+GATTADDCHAR=UUID128=00-11-22-33-44-55-66-77-88-99-AA-BB-CC-DD-EE-FF,PROPERTIES=0x02,MIN_LEN=1,VALUE=100
 
1
 
1
 
OK</nowiki>
 
OK</nowiki>
   −
Version '''0.7.0''' of the Bluefruit LE firmware added the new '''DESCRIPTION''' and '''PRESENTATION''' keywoards, corresponding the the GATT [https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_user_description.xml Characteristic User Description] and the GATT [https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml Characteristic Presentation Format] Descriptors.
+
La version  '''0.7.0''' du firmware de Bluefruit LE ajoute les nouveau mots clés '''DESCRIPTION''' et '''PRESENTATION''', correspondant aux spécifications GATT [https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_user_description.xml Characteristic User Description] et [https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml Characteristic Presentation Format].
   −
The '''DESCRIPTION''' field is a string that contains a short text description of the characteristic. Some apps may not display this data, but it should be visible using something like the Master Control Panel application from Nordic on iOS and Android.
+
Le champs '''DESCRIPTION''' est une chaîne de caractère qui contient une courte description textuelle de la caractéristique. Certaines Apps pourraient ignorer cette information, elle devrait néanmoins être visible en utilisant l'application "Master Control Panel" de Nordic sous iOS et Android.
 +
 
 +
{{traduction}}
    
The '''PRESENTATION''' field contains a 7-byte payload that encapsulates the characteristic presentation format data.  It requires a specific set of bytes and values to work properly. See the following link for details on how to format the payload: https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml
 
The '''PRESENTATION''' field contains a 7-byte payload that encapsulates the characteristic presentation format data.  It requires a specific set of bytes and values to work properly. See the following link for details on how to format the payload: https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml
29 917

modifications

Menu de navigation