Ligne 201 : |
Ligne 201 : |
| | | |
| == AT+GATTLIST == | | == AT+GATTLIST == |
− | Lists all custom GATT services and characteristics that have been defined on the device.
| + | Liste tous les services et caractéristiques GATT personnalisés qui ont été définis sur le périphérique. |
| * Codebase Revision: 0.3.0 | | * Codebase Revision: 0.3.0 |
− | * Parameters: None | + | * Paramètre: Aucun |
− | * Response: A list of all custom services and characteristics defined on the device. | + | * Réponse: Une liste de tous les services personnalisé et toutes les caractéristiques définie sur le périphérique. |
| | | |
− | <nowiki># Clear any previous custom services/characteristics | + | <nowiki># Efface tous les services/caractéristiques personnalisés |
| AT+GATTCLEAR | | AT+GATTCLEAR |
| OK | | OK |
| | | |
− | # Add a battery service (UUID = 0x180F) to the peripheral | + | # Ajouter le service "battery" (UUID = 0x180F) 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 | + | # Ajouter la caractéristique "battery measurement" (UUID = 0x2A19), 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 | | OK |
| | | |
− | # Add a custom service to the peripheral | + | # Ajouter un service personalisé 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 |
| 2 | | 2 |
| OK | | OK |
| | | |
− | # Add a custom characteristic to the above service (making sure that there | + | # Ajouter une caractéristique personnalisé sur le service ci-dessus |
− | # is no conflict between the 16-bit UUID and bytes 3+4 of the 128-bit service UUID) | + | # (S'assurer qu'il n'y a pas de conflit entre l'UUID 16 bits et |
| + | # les octets 3+4 sur 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 |
| 2 | | 2 |
| OK | | OK |
| | | |
− | # Get a list of all custom GATT services and characteristics on the device | + | # Obtenir une liste de tous les services GATT personnalisés et |
| + | # de toutes les caractéristiques personnalisées sur le périphérique |
| AT+GATTLIST | | AT+GATTLIST |
| ID=01,UUID=0x180F | | ID=01,UUID=0x180F |