Welcome to mirror list, hosted at ThFree Co, Russian Federation.

readme.txt « BLE_HeartRate_ANCS « BLE « Applications « P-NUCLEO-WB55.Nucleo « Projects - github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 897ef50353309d7d557b08b03be44b757ef31d32 (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/**
  @page BLE_HeartRate_ANCS example
  
  @verbatim
  ******************************************************************************
  * @file    BLE/BLE_HeartRate_ANCS/readme.txt 
  * @author  MCD Application Team
  * @brief   Description of the BLE_HeartRate_ANCS example.
  ******************************************************************************
  *
  * Copyright (c) 2020 STMicroelectronics. All rights reserved.
  *
  * This software component is licensed by ST under Ultimate Liberty license 
  * SLA0044, the "License"; You may not use this file except in compliance with 
  * the License. You may obtain a copy of the License at:
  *                               www.st.com/SLA0044
  *
  ******************************************************************************
  @endverbatim

@par Example Description

How to read notifications from Apple Notification Center Service (ANCS) as specified by Apple specification at:
https://developer.apple.com/library/archive/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/
and also use the Heart Rate profile as specified by the BLE SIG.
Note: this application use STM32 sequencer API to schedule SW tasks.
 
The purpose of the Apple Notification Center Service (ANCS) is to give Bluetooth accessories (that connect to iOS devices 
through a Bluetooth Low Energy link) a simple and convenient way to access many kinds of notifications that are generated
 on iOS devices. The publisher of the ANCS service (the iOS phone device) is referred to as Notification Provider (NP)
 and the client of the ANCS service (ie. STM32 WB board) is referred to as a Notification Consumer (NC).


@note Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds)
      based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from
      a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower)
      than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
      To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function.
      
@note The application needs to ensure that the SysTick time base is always set to 1 millisecond
      to have correct HAL operation.

@par Keywords

Connectivity, BLE, IPCC, HSEM, RTC, UART, PWR, BLE protocol, BLE pairing, BLE profile, Dual core

@par Directory contents 
  
  - BLE/BLE_HeartRate_ANCS/Core/Inc/app_common.h              Header for all modules with common definition
  - BLE/BLE_HeartRate_ANCS/Core/Inc/app_conf.h                Parameters configuration file of the application
  - BLE/BLE_HeartRate_ANCS/Core/Inc/app_debug.h               Debug and trace tools
  - BLE/BLE_HeartRate_ANCS/Core/Inc/app_entry.h               Parameters configuration file of the application
  - BLE/BLE_HeartRate_ANCS/Core/Inc/hw_conf.h                 Configuration file of the HW
  - BLE/BLE_HeartRate_ANCS/Core/Inc/hw_if.h                   HW interface to BSP and HAL call
  - BLE/BLE_HeartRate_ANCS/Core/Inc/main.h                    Header for main.c module
  - BLE/BLE_HeartRate_ANCS/Core/Inc/stm32_lpm_if.h            Low layer function to enter/exit low power modes
  - BLE/BLE_HeartRate_ANCS/Core/Inc/stm32wbxx_hal_conf.h      HAL configuration file
  - BLE/BLE_HeartRate_ANCS/Core/Inc/stm32wbxx_it.h            Interrupt handlers header file
  - BLE/BLE_HeartRate_ANCS/Core/Inc/utilities_conf.h          Configuration file of the utilities  
  
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/app_ble.h           Header for app_ble.c module
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/ancs_client_app.h   ANCS client Application
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/ble_conf.h          BLE Services configuration
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/ble_dbg_conf.h      BLE Traces configuration of the BLE services
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/dis_app.h           Header for dis_app.c module
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/hrs_app.h           Header for hrs_app.c module

  - BLE/BLE_HeartRate_ANCS/Core/Src/app_debug.c
  - BLE/BLE_HeartRate_ANCS/Core/Src/app_entry.c               Initialization of the application
  - BLE/BLE_HeartRate_ANCS/Core/Src/hw_timerserver.c          Timer Server based on RTC
  - BLE/BLE_HeartRate_ANCS/Core/Src/hw_uart.c                 UART Driver
  - BLE/BLE_HeartRate_ANCS/Core/Src/main.c                    Main program
  - BLE/BLE_HeartRate_ANCS/Core/Src/stm32_lpm_if.c            Low Power Manager Interface
  - BLE/BLE_HeartRate_ANCS/Core/Src/stm32wbxx_hal_msp.c       MSP Initialization and deinitialisation
  - BLE/BLE_HeartRate_ANCS/Core/Src/stm32wbxx_it.c            Interrupt handlers
  - BLE/BLE_HeartRate_ANCS/Core/Src/system_stm32wbxx.c        stm32wbxx system source file
  
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/ancs_client_app.c   ANCS client Application
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/app_ble.c           BLE Profile implementation
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/dis_app.c           Device Information Service application
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/App/hrs_app.c           Heart Rate Service application
  
  - BLE/BLE_HeartRate_ANCS/STM32_WPAN/Target/hw_ipcc.c        IPCC Driver


     
@par Hardware and Software environment

  - This example runs on STM32WB55xx devices.
  
  - This example has been tested with an STMicroelectronics STM32WB55VG-Nucleo
    board and can be easily tailored to any other supported device 
    and development board.
	
  - This example is by default configured to support low power mode ( No traces - No debugger )
    This can be modified in app_conf.h

@par How to use it ? 

This application requests having the stm32wb5x_BLE_Stack_full_fw.bin binary flashed on the Wireless Coprocessor.
If it is not the case, you need to use STM32CubeProgrammer to load the appropriate binary.
All available binaries are located under /Projects/STM32_Copro_Wireless_Binaries directory.
Refer to UM2237 to learn how to use/install STM32CubeProgrammer.
Refer to /Projects/STM32_Copro_Wireless_Binaries/ReleaseNote.html for the detailed procedure to change the
Wireless Coprocessor binary.  

In order to make the program work, you must do the following:
 - Open your toolchain 
 - Rebuild all files and flash the board with the executable file
 - OR use the BLE_HeartRate_ANCS_reference.hex from Binary directory

 On the android/ios device, enable the Bluetooth communications, and if not done before,
 - Install the ST BLE Profile application on the android device
	https://play.google.com/store/apps/details?id=com.stm.bluetoothlevalidation&hl=en
    https://itunes.apple.com/fr/App/st-ble-profile/id1081331769?mt=8

 - Install the ST BLE Sensor application on the ios/android device
	https://play.google.com/store/apps/details?id=com.st.bluems
	https://itunes.apple.com/us/App/st-bluems/id993670214?mt=8

Considering connection with ios device:
 - Power on the Nucleo board with the BLE_HeartRate_ANCS application
 - Then, click on the App icon, ST BLE Sensor (ios device)
 - connect to a device
 - select the HRanc in the device list
 - call your ios device by using another smartphone, the call will be answered automatically. or, send message to your ios device,the message can be displayed on terminal. 
   Warning: if the HRanc has already been bonded or pairing timeout, you should erase it from bluetooth connected ios device list and press SW3 stored bonded infomation.
            (in ios device settings: select bluetooth icon, then select my device and forget or ignore it).  
 The Heart Rate is displayed each second on the ios device.
 Moreover to display ANCS notifications messages, please open an hyper-terminal on PC 
 connected to Nucleo board by serial STlink Virtual com port with following settings:
    + baud rate: 115200
    + data: 8 bits
    + parity: none
    + stop: 1 bits
    + Flow control: none
    
 - The User buttons are configured as ( SW1 terminates BLE connection, SW2 review ANCS notification 
   and SW3 is used to remove bonded devices, reset  GAP security and terminate BLE connection).
 
For more details refer to the Application Note: 
  AN5289 - Building a Wireless application 
 
 * <h3><center>&copy; COPYRIGHT STMicroelectronics</center></h3>
 */