Bluefruit-LE-Shield-BLE-Generic

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche


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.

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