| Electronic Components Datasheet Search |
|
SWRU301A Datasheet(PDF) 21 Page - Texas Instruments |
|
|
|||||||||||||||||||||||||||||
SWRU301A Datasheet(HTML) 21 Page - Texas Instruments |
|
21 / 39 page ![]() SWRU301 Page 21 of 32 Figure 22 BTool, Read Multiple Characteristic Values 4.5.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.5.4), with the UUID value set to “F4:FF”. The procedure will find one instance of the characteristic with type 0xFFF4, and display “10 2B 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 “2B 00” tell us that the handle of the characteristic value is 0x002B. 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 client characteristic configuration descriptor immediately follows the characteristic value’s handle. Therefore, a value of 0x0001 must be written to handle 0x002C. Enter “0x002C” into the “Characteristic Value Handle” box in the “Characteristic Write” section, and enter “01:00” in the “Value” section (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 peripheral device to the central device. With each notification, the value of the characteristic at handle is displayed in the log window. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |