Différences entre versions de « Bluefruit-LE-Shield-BLE-Generic »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
(Page créée avec « {{Bluefruit-LE-Shield-NAV}} {{traduction}} == Commandes génériques BLE == The following general purpose BLE commands are available on Bluefruit LE modules: == AT+BLEP... »)
 
Ligne 10 : Ligne 10 :
  
 
* Codebase Revision: 0.3.0
 
* Codebase Revision: 0.3.0
* Parameters: The TX power level (in dBm), which can be one of the following values (from lowest to higher transmit power):
+
* Paramètres: The TX power level (in dBm), which can be one of the following values (from lowest to higher transmit power):
 
** -40
 
** -40
 
** -20
 
** -20
Ligne 19 : Ligne 19 :
 
** 0
 
** 0
 
* 4
 
* 4
* Output: The current transmit power level (in dBm)
+
* Sortie: The current transmit power level (in dBm)
  
 
{{ambox-stop|text=The updated power level will take affect as soon as the command is entered. If the device isn't connected to another device, advertising will stop momentarily and then restart once the new power level has taken affect.}}
 
{{ambox-stop|text=The updated power level will take affect as soon as the command is entered. If the device isn't connected to another device, advertising will stop momentarily and then restart once the new power level has taken affect.}}
Ligne 48 : Ligne 48 :
  
 
* Codebase Revision: 0.3.0
 
* Codebase Revision: 0.3.0
* Parameters: None
+
* Paramètres: None
* Output: The address type, which can be one of the following values:
+
* Sortie: The address type, which can be one of the following values:
 
** 0 = public
 
** 0 = public
 
** 1 = random
 
** 1 = random
Ligne 61 : Ligne 61 :
  
 
* Codebase Revision: 0.3.0
 
* Codebase Revision: 0.3.0
* Parameters: None
+
* Paramètres: None
* Output: The 48-bit BLE device address in the following format: 'AA:BB:CC:DD:EE:FF'
+
* Sortie: The 48-bit BLE device address in the following format: 'AA:BB:CC:DD:EE:FF'
  
 
  <nowiki>AT+BLEGETADDR
 
  <nowiki>AT+BLEGETADDR
Ligne 72 : Ligne 72 :
  
 
* Codebase Revision: 0.6.5
 
* Codebase Revision: 0.6.5
* Parameters: None
+
* Paramètres: None
* Output: The 48-bit address of the connected central device in hex format. The command will return ERROR if we are not connected to a central device.
+
* Sortie: The 48-bit address of the connected central device in hex format. The command will return ERROR if we are not connected to a central device.
  
 
{{ambox|text=Please note that the address returned by the central device is almost always a random value that will change over time, and this value should generally not be trusted. This command is provided for certain edge cases, but is not useful in most day to day scenarios.}}
 
{{ambox|text=Please note that the address returned by the central device is almost always a random value that will change over time, and this value should generally not be trusted. This command is provided for certain edge cases, but is not useful in most day to day scenarios.}}
Ligne 85 : Ligne 85 :
  
 
* Codebase Revision: 0.3.0
 
* Codebase Revision: 0.3.0
* Parameters: None
+
* Paramètres: None
* Output: The RSSI level (in dBm) if we are connected to a device, otherwise '0'
+
* Sortie: The RSSI level (in dBm) if we are connected to a device, otherwise '0'
  
 
  <nowiki># Connected to an external device
 
  <nowiki># Connected to an external device

Version du 3 juin 2017 à 15:33


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.
Page-under-construction.pngPage(s) en cours de traduction/élaboration.

Page(s) under translation/construction

Commandes génériques BLE

The following general purpose BLE commands are available on Bluefruit LE modules:

AT+BLEPOWERLEVEL

Gets or sets the current transmit power level for the module's radio (higher transmit power equals better range, lower transmit power equals better battery life).

  • Codebase Revision: 0.3.0
  • Paramètres: The TX power level (in dBm), which can be one of the following values (from lowest to higher transmit power):
    • -40
    • -20
    • -16
    • -12
    • -8
    • -4
    • 0
  • 4
  • Sortie: The current transmit power level (in dBm)
# Get the current TX power level (in dBm)
AT+BLEPOWERLEVEL
0
OK
  
# Set the TX power level to 4dBm (maximum value)
AT+BLEPOWERLEVEL=4
OK
  
# Set the TX power level to -12dBm (better battery life)
AT+BLEPOWERLEVEL=-12
OK
  
# Set the TX power level to an invalid value
AT+BLEPOWERLEVEL=-3
ERROR

AT+BLEGETADDRTYPE

Gets the address type (for the 48-bit BLE device address).

Normally this will be '1' (random), which means that the module uses a 48-bit address that was randomly generated during the manufacturing process and written to the die by the manufacturer.

Random does not mean that the device address is randomly generated every time, only that a one-time random number is used.

  • Codebase Revision: 0.3.0
  • Paramètres: None
  • Sortie: The address type, which can be one of the following values:
    • 0 = public
    • 1 = random
AT+BLEGETADDRTYPE
1
OK

AT+BLEGETADDR

Gets the 48-bit BLE device address.

  • Codebase Revision: 0.3.0
  • Paramètres: None
  • Sortie: The 48-bit BLE device address in the following format: 'AA:BB:CC:DD:EE:FF'
AT+BLEGETADDR
E4:C6:C7:31:95:11
OK

AT+BLEGETPEERADDR

Gets the 48-bit address of the peer (central) device we are connected to.

  • Codebase Revision: 0.6.5
  • Paramètres: None
  • Sortie: The 48-bit address of the connected central device in hex format. The command will return ERROR if we are not connected to a central device.
AT+BLEGETPEERADDR
48:B2:26:E6:C1:1D
OK

AT+BLEGETRSSI

Gets the RSSI value (Received Signal Strength Indicator), which can be used to estimate the reliability of data transmission between two devices (the lower the number the better).

  • Codebase Revision: 0.3.0
  • Paramètres: None
  • Sortie: The RSSI level (in dBm) if we are connected to a device, otherwise '0'
<nowiki># Connected to an external device

AT+BLEGETRSSI -46 OK

  1. Not connected to an external device

AT+BLEGETRSSI 0 OK/nowiki>


Basé sur "Bluefruit LE Shield" d'Adafruit Industries, écrit par Kevin Townsend - Traduit en Français par shop.mchobby.be CC-BY-SA pour la traduction
Toute copie doit contenir ce crédit, lien vers cette page et la section "crédit de traduction".

Based on "Bluefruit LE Shield" from Adafruit Industries, written by Kevin Townsend - Translated to French by shop.mchobby.be CC-BY-SA for the translation
Copies must includes this credit, link to this page and the section "crédit de traduction" (translation credit).

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com