Electronic Components Datasheet Search
  English  ▼

X  

UM2071 Datasheet(PDF) 36 Page - STMicroelectronics

Part # UM2071
Description  BlueNRG-1 development kit
PDF  56 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM2071 Datasheet(HTML) 36 Page - STMicroelectronics

Back Button UM2071 Datasheet HTML 32Page - STMicroelectronics UM2071 Datasheet HTML 33Page - STMicroelectronics UM2071 Datasheet HTML 34Page - STMicroelectronics UM2071 Datasheet HTML 35Page - STMicroelectronics UM2071 Datasheet HTML 36Page - STMicroelectronics UM2071 Datasheet HTML 37Page - STMicroelectronics UM2071 Datasheet HTML 38Page - STMicroelectronics UM2071 Datasheet HTML 39Page - STMicroelectronics UM2071 Datasheet HTML 40Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 36 / 56 page
background image
BlueNRG-1 sensor profile demo
UM2071
36/56
DocID029370 Rev 3
10.2.2
Add service and characteristics
The BlueNRG-1 BLE stack has both server and client capabilities. A characteristic is an
element in the server database where data is exposed, while a service contains one or
more characteristics. The acceleration service is added with the following command:
aci_gatt_add_service(UUID_TYPE_128,
&service_uuid, PRIMARY_SERVICE, 7,
&accServHandle);
The command returns the service handle on variable accServHandle. The free fall and
acceleration characteristics must now be added to this service thus:
aci_gatt_add_char(accServHandle, UUID_TYPE_128, &char_uuid, 1, CHAR_PROP_NOTIFY,
ATTR_PERMISSION_NONE, 16, 0, &freeFallCharHandle);
aci_gatt_add_char(accServHandle, UUID_TYPE_128, &char_uuid, 6,
CHAR_PROP_NOTIFY|CHAR_PROP_READ, ATTR_PERMISSION_NONE,
GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP, 16, 0, &accCharHandle);
The free fall and acceleration characteristics handles are returned on
freeFallCharHandle and accCharHandle variables respectively.
Similar steps are followed for adding the environmental sensor and relative characteristics.
10.2.3
Enter connectable mode
Use GAP API command to enter one of the discoverable and connectable modes:
aci_gap_set_discoverable(ADV_IND, (ADV_INTERVAL_MIN_MS*1000)/625,
(ADV_INTERVAL_MAX_MS*1000)/625, STATIC_RANDOM_ADDR, NO_WHITE_LIST_USE
sizeof(local_name), local_name, 0, NULL, 0, 0);
Where
local_name[] = {AD_TYPE_COMPLETE_LOCAL_NAME,'B','l','u','e','N','R','G'};
The local_name parameter contains the name presented in advertising data, as per
Bluetooth core specification version 4.1, Vol. 3, Part C, Ch. 11.
10.2.4
Connection with central device
Once the BlueNRG-1 BLE stack is placed in discoverable mode, it can be detected by a
central device. The smartphone app described in Section 10.1: " BlueNRG app for
smartphones " is designed for interact with the sensor profile demos (it also supports the
BlueNRG-1 device).
Any Bluetooth smart or Bluetooth smart ready device like a smartphone can connect to the
BlueNRG-1 BLE sensor profile demo.
For example, the LightBlue application in Apple Store® connects iPhone® versions 4S/5
and above can connect to the BlueNRG-1 sensor profile device. When you use the
LightBlue application, detected devices appear on the screen with the BlueNRG name. By
tapping on the box to connect to the device, a list of all the available services is shown on
the screen; tapping a service shows the characteristics for that service.
The acceleration characteristic can be notified using the following command:
aci_gatt_update_char_value(accServHandle, accCharHandle, 0, 6, buff);
Where buff is a variable containing the three axes acceleration values.
Once this API command has been sent, the new value of the characteristic is displayed on
the phone.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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