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
Parameters: 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
Output: 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
Parameters: None
Output: 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
Parameters: None
Output: 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
Parameters: 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.
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
Parameters: None
Output: The RSSI level (in dBm) if we are connected to a device, otherwise '0'
# Connected to an external device AT+BLEGETRSSI -46 OK # Not connected to an external device AT+BLEGETRSSI 0 OK
Text editor powered by tinymce.