Datasheet
# Add a battery measurement characteristic (UUID = 0x2A19), notify enabled
AT+GATTADDCHAR=UUID=0x2A19,PROPERTIES=0x10,MIN_LEN=1,VALUE=100
1
OK
# Clear any previous custom services/characteristics
AT+GATTCLEAR
OK
# Add a custom service to the peripheral
AT+GATTADDSERVICE=UUID128=00-11-00-11-44-55-66-77-88-99-AA-BB-CC-DD-EE-FF
1
OK
# Add a custom characteristic to the above service (making sure that there
# is no conflict between the 16-bit UUID and bytes 3+4 of the 128-bit service UUID)
AT+GATTADDCHAR=UUID=0x0002,PROPERTIES=0x02,MIN_LEN=1,VALUE=100
1
OK
Version 0.6.6 of the Bluefruit LE firmware added the ability to use a new 'UUID128' flag to add custom 128-bit UUIDs that aren't related to the
parent service UUID (which is used when passing the 16-bit 'UUID' flag).
To specify a 128-bit UUID for your customer characteristic, enter a value resembling the following syntax:
# Add a custom characteristic to the above service using a
# custom 128-bit UUID
AT+GATTADDCHAR=UUID128=00-11-22-33-44-55-66-77-88-99-AA-BB-CC-DD-EE-FF,PROPERTIES=0x02,MIN_LEN=1,VALUE=100
1
OK
Version 0.7.0 of the Bluefruit LE firmware added the new DESCRIPTION and PRESENTATION keywoards, corresponding the the GATT
Characteristic User Description (http://adafru.it/oIA) and the GATT Characteristic Presentation Format (http://adafru.it/oIB) Descriptors.
The DESCRIPTION field is a string that contains a short text description of the characteristic. Some apps may not display this data, but it should
be visible using something like the Master Control Panel application from Nordic on iOS and Android.
The PRESENTATION field contains a 7-byte payload that encapsulates the characteristic presentation format data. It requires a specific set of
bytes and values to work properly. See the following link for details on how to format the
payload: https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?
u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml (http://adafru.it/oIB)
The following example shows how you might use both of these new fields:
AT+GATTADDCHAR=UUID=0x2A37, PROPERTIES=0x10, MIN_LEN=2, MAX_LEN=3, VALUE=00-40,
DESCRIPTION=HRM Measurement, PRESENTATION=17-00-AC-27-01-00-00
For the Characteristic Presentation Format we have:
Format = IEEE-11073 32-bit FLOAT (Decimal 23, Hex 0x17)
Exponent = 0/None
Unit = Thermodynamic temperature: Degrees Fahrenheit (0x27AC) - Bluetooth LE Unit List (http://adafru.it/oID)
Namespace = Bluetooth SIG Assigned Number (0x01)
Description = None (0x0000)
The results from Nordic's Master Control Panel app can be seen below:
AT+GATTCHAR
© Adafruit Industries
https://learn.adafruit.com/introducing-the-adafruit-bluefruit-le-uart-
friend
Page 90 of 115