Ligne 2 : |
Ligne 2 : |
| | | |
| == Services BLE == | | == Services BLE == |
− | {{traduction}}
| |
| Les commandes suivantes vous permettent d'interagir avec les différents services GATT présent sur les modules Bluefruit LE lorsque celui-ci fonctionne en mode commande. | | Les commandes suivantes vous permettent d'interagir avec les différents services GATT présent sur les modules Bluefruit LE lorsque celui-ci fonctionne en mode commande. |
| | | |
Ligne 330 : |
Ligne 329 : |
| | | |
| == AT+BLEHIDGAMEPAD == | | == AT+BLEHIDGAMEPAD == |
− | Sends a specific HID gamepad payload out over BLE
| + | Envoi une commande HID gamepad via BLE |
| * Codebase Revision: 0.7.0 | | * Codebase Revision: 0.7.0 |
− | * Parameters: The following comma-separated parameters are available: | + | * Paramètres: Les paramètres suivants (séparés par une virgule) sont disponibles: |
− | ** '''Axe x''': LEFT, RIGHT: If X=-1 then 'LEFT' is pressed, if X=1 then 'RIGHT' is pressed, if X=0 then neither left nor right are pressed | + | ** '''Axe x''': GAUCHE ou DROITE. Si X=-1 alors c'est le bouton 'GAUCHE' qui est pressé. Si X=1 alors c'est le bouton de 'DROITE' qui est pressé. Si X=0 alors aucun des deux boutons (gauche ou droite) est pressé |
− | ** '''Axe y''': UP, DOWN: If Y=-1 then 'UP' is pressed, if Y=1 then 'DOWN' is pressed, if Y=0 then neither up nor down are pressed | + | ** '''Axe y''': HAUT ou BAS. Si Y=-1 alors c'est le bouton 'HAUT' qui est pressé. Si Y=1 ALORS KES LE BOUTON 'BAs' qui est pressé. Si Y=0 alors aucun des deux boutons (haut ou bas) est pressé |
− | ** '''Boutons''': 0x00-0xFF, which is a bit mask for 8 button 0-7 | + | ** '''Boutons''': de 0x00 à 0xFF, qui est un octet dont les différents bits indiquent lequels des 8 boutons sont pressés (boutons de 0-7) |
− | * Output: Nothing | + | * Output: aucune |
− | {{ambox|text=HID gamepad is disabled by default as of version 0.7.6, and must first be enabled via AT+BLEHIDGAMEPADEN=1 before it can be used.}} | + | {{ambox|text=Le gamepad HID est désactivé par défaut depuis la version version 0.7.6 du firmware. Le service HID Gamepad doit être préalablement activé à laide de la commande AT+BLEHIDGAMEPADEN=1 avant de pouvoir l'utiliser.}} |
− | {{ambox|text=Note: You need to send both 'press' and 'release' events for each button, otherwise the system will think that the button is still pressed until a release state is received.}} | + | {{ambox|text=Note: Il est nécessaire d'envoyer les deux événements 'pressé' et 'relâché' pour chaque bouton utilisé. A défaut, le bouton restera "pressé" jusqu'à la réception de la commande de "relâchement" du bouton.}} |
| | | |
− | <nowiki># Press 'RIGHT' and 'Button0' at the same time | + | <nowiki># Presser 'DROITE' et le 'Bouton0' en même temps |
| + | # Boutons = 0b00000001 en binaire -> 1 en décimal -> 0x01 en hexadécimal |
| AT+BLEHIDGAMEPAD=1,0,0x01 | | AT+BLEHIDGAMEPAD=1,0,0x01 |
| | | |
− | # Press 'UP' and 'Button1' + 'Button0' at the same time | + | # Presser 'HAUT' et 'Bouton1' + 'Bouton0' en même temps |
| + | # Boutons = 0b00000011 en binaire -> 3 en décimal -> 0x03 en hexadécimal |
| AT+BLEHIDGAMEPAD=0,-1,0x03</nowiki> | | AT+BLEHIDGAMEPAD=0,-1,0x03</nowiki> |
| | | |
| == AT+BLEMIDIEN == | | == AT+BLEMIDIEN == |
− | Enables or disables the BLE MIDI service.
| + | Active ou désactive le service MIDI ble. |
| * Codebase Revision: 0.7.0 | | * Codebase Revision: 0.7.0 |
− | * Parameters: State, which can be one of: | + | * Paramètre: Activer / Désactiver le service MIDI BLE avec les valeurs suivante: |
− | ** '''1''' ou '''on''' | + | ** '''1''' ou '''on''' - pour activer |
− | ** '''0''' ou '''off''' | + | ** '''0''' ou '''off''' - pour désactiver |
− | * Output: If executed with no parameters, it will return the current state of the MIDI service as an integer indicating if it is enabled (1) or disabled (0). | + | * Sortie: Lorsqu'elle est exécutée sans paramètre, l'interpréteur de commande retourne une valeur numérique correspondant à l'état d'activation du service MIDI BLE. 1 = activé ou 0 = désactivé. |
− | {{ambox|text=Note: This command will require a reset to take effect.}} | + | {{ambox|text=Note: cette commande nécessitera une réinitialisation (ATZ) pour que la modification soit prise en compte.}} |
| | | |
− | <nowiki># Check the current state of the MIDI service | + | <nowiki># Vérifier l'état actuel du service MIDI |
| AT+BLEMIDIEN | | AT+BLEMIDIEN |
| 1 | | 1 |
| OK | | OK |
| | | |
− | # Enable the MIDI Service | + | # Activer le service MIDI |
| AT+BLEMIDIEN=1 | | AT+BLEMIDIEN=1 |
| OK</nowiki> | | OK</nowiki> |
| | | |
| == AT+BLEMIDIRX == | | == AT+BLEMIDIRX == |
− | Reads an incoming MIDI character array from the buffer.
| + | Lit la mémoire tampon et retourne le tableau de caractère MIDI entrant. |
| * Codebase Revision: 0.7.0 | | * Codebase Revision: 0.7.0 |
− | * Parameters: None | + | * Paramètre: Aucun |
− | * Output: The midi event in byte array format | + | * Sortie: l'événement midi retourné sous forme de tableau d'octet |
| | | |
| <nowiki>AT+BLEMIDIRX | | <nowiki>AT+BLEMIDIRX |
Ligne 375 : |
Ligne 376 : |
| | | |
| == AT+BLEMIDITX == | | == AT+BLEMIDITX == |
− | Sends a MIDI event to host.
| + | Envoyer un événement MIDI vers l'hôte. |
| * Codebase Revision: 0.7.0 | | * Codebase Revision: 0.7.0 |
− | * Parameters: The MIDI event in hex array format, which can be either: | + | * Paramètre: l'événement MIDI sous forme d'un tableau hexadécimal, qui peut être soit: |
− | ** A series of full MIDI events (up to 4 events) | + | ** Une série d'événement MIDI complet (jusqu'à 4 événements) |
− | ** Exactly 1 full MIDI event + several running events without status (up to 7) | + | ** 1 événement MIDI complet (exactement) + plusieurs événements '''running events''' sans statut (''several running events without status'') (jusqu'à 7) |
− | * Output: None | + | * Sortie: Aucune |
| | | |
− | <nowiki># Send 1 event (middle C with max velocity) | + | <nowiki># Envoi de un événement (middle C/DO grave avec la vélocité maximale) |
| AT+BLEMIDITX=90-3C-7F | | AT+BLEMIDITX=90-3C-7F |
| OK | | OK |
| | | |
− | # Send 2 events | + | # Envoi de 2 événements |
| AT+BLEMIDITX=90-3C-7F-A0-3C-7F | | AT+BLEMIDITX=90-3C-7F-A0-3C-7F |
| OK | | OK |
| | | |
− | # Send 1 full event + running event | + | # Envoi d'un événement complet + "running event" |
| AT+BLEMIDITX=90-3C-7F-3C-7F | | AT+BLEMIDITX=90-3C-7F-3C-7F |
| OK</nowiki> | | OK</nowiki> |
| | | |
| == AT+BLEBATTEN == | | == AT+BLEBATTEN == |
− | Enables the Battery Service following the definition from the Bluetooth SIG.
| + | Active le service Battery en suivant la définition de "Bluetooth SIG". |
| + | |
| + | Le [https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.battery_service.xml Service Battery] permet d'exposer l'état de la batterie au périphérique appairé. |
| | | |
| * Codebase Revision: 0.7.0 | | * Codebase Revision: 0.7.0 |
− | * Parameters: Whether the battery service should be enabled, via on of the following values: | + | * Paramètre: Indique si le service Battery doit être activé ou désactivé: |
− | ** '''1''' ou '''on''' | + | ** '''1''' ou '''on''' - activer le service |
− | ** '''0''' ou '''off''' | + | ** '''0''' ou '''off''' - désactiver le service |
− | * Output: If executed with no parameters, a numeric value will be returned indicating whether the battery service is enabled (1) or disabled (0). | + | * Sortie: Si la commande est exécutée sans paramètre alors l'interpréteur de commande retourne une valeur numérique indiquant l'état d'activation du service. Activer = 1, Désactiver = 0. |
− | {{ambox|text=This command requires a system reset to take effect.}} | + | |
| + | {{ambox|text=Nécessite une réinitialisation système (ATZ) pour que la modification soit prise en compte.}} |
| | | |
| == AT+BLEBATTVAL == | | == AT+BLEBATTVAL == |
− | Sets the current battery level in percentage (0..100) for the Battery Service (if enabled).
| + | Permet au module d'envoyer le niveau de sa batterie au périphérique central (votre smartphone). |
| + | |
| * Codebase Revision: 0.7.0 | | * Codebase Revision: 0.7.0 |
− | * Parameters: The percentage for the battery in the range of 0..100. | + | * Paramètre: Le pourcentage (0..100) de la batterie à communiquer. |
− | * Output: If executed with no parameters, the current battery level stored in the characteristic. | + | * Sortie: Si la commande est exécutée sans paramètre, l'interpréteur de commande retourne le niveau de batterie actuel tel qu'il à été stocké dans les caractéristiques. |
| | | |
− | <nowiki># Set the battery level to 72% | + | <nowiki># Fixer le niveau de la batterie à 72% |
| AT+BLEBATTVAL=72 | | AT+BLEBATTVAL=72 |
| OK</nowiki> | | OK</nowiki> |
| | | |
| {{Bluefruit-LE-Shield-TRAILER}} | | {{Bluefruit-LE-Shield-TRAILER}} |