EasyManuals Logo

Texas Instruments CC2540 User Manual

Texas Instruments CC2540
29 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #18 background imageLoading...
Page #18 background image
SWRU270
Page 18 of 28
Figure 25
4.3.6 Enabling Notifications
In BLE, it is possible for a GATT server device to “push” characteristic value data out to a client device,
without being prompted with a read request. This process is called a “characteristic value notification”.
Notifications are useful in that they allow a device in a BLE connection to send out as much or as little
data as required at any point in time. In addition, since no request from the client is required, the
overhead is reduced and the data is transmitted more efficiently. The SimpleBLEPeripheral software
contains an example in which notifications can be demonstrated.
The third characteristic in the SimpleGATTProfile has write-only properties, while the fourth
characteristic in the profile has notify-only properties. Every five seconds, the SimpleBLEPeripheral
application will take the value of the third characteristic and copy it into the fourth characteristic. Each
time the fourth characteristic value gets set by the application, the profile will check to see if notifications
are enabled. If they are enabled, the profile will send a notification of the value to the client device.
Before notifications can be enabled, the handle of the fourth characteristic must be found. This can be
done by using the “Discover Characteristic by UUID” process (see section 4.3.4), with the UUID value set
to “F4:FF”. The procedure will find one instance of the characteristic with type 0xFFF4, and display “10
1A 00 F4 FF” (the value of the declaration) in the “Value” box, with “Success” displayed in the “Status”
box. As per the Bluetooth specification, the first byte “10” tells us that the properties of the characteristic
are notify-only. The second and third bytes “1A 00” tell us that the handle of the characteristic value is
0x001A. The fourth and fifth bytes tell the UUID of the characteristic, 0xFFF4.
In order to enable notifications, the client device must write a value of 0x0001 to the client characteristic
configuration descriptor for the particular characteristic. The handle for the characteristic configuration
descriptor immediately follows the characteristic value’s handle. Therefore, a value of 0x0001 must be
written to handle 0x001B. Enter “0x001B” into the “Characteristic Value Handle” box in the
“Characteristic Write” section, and enter “01:00” in the “Value” section (the format can be set to either
“Decimal” or “Hex”; note that the LSB is entered first, and the MSB is entered last). Click the “Write
Value” button. The status box will display “Success”, indicating that the write was successful.
Every five seconds, an attribute protocol Handle Value Notification packet gets sent from the keyfob to
the dongle. With each notification, the value of the characteristic at handle is displayed in the log
window.

Other manuals for Texas Instruments CC2540

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments CC2540 and is the answer not in the manual?

Texas Instruments CC2540 Specifications

General IconGeneral
BrandTexas Instruments
ModelCC2540
CategoryMicrocontrollers
LanguageEnglish

Related product manuals