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

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_CableReplacement/STM32_WPAN/App/app_ble.c')
-rw-r--r--Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_CableReplacement/STM32_WPAN/App/app_ble.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_CableReplacement/STM32_WPAN/App/app_ble.c b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_CableReplacement/STM32_WPAN/App/app_ble.c
index 2598dbe8e..75b843999 100644
--- a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_CableReplacement/STM32_WPAN/App/app_ble.c
+++ b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_CableReplacement/STM32_WPAN/App/app_ble.c
@@ -496,6 +496,12 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification( void *pckt )
event_type = le_advertising_event->Advertising_Report[0].Event_Type;
event_data_size = le_advertising_event->Advertising_Report[0].Length_Data;
+
+ /* WARNING: be careful when decoding advertising report as its raw format cannot be mapped on a C structure.
+ The data and RSSI values could not be directly decoded from the RAM using the data and RSSI field from hci_le_advertising_report_event_rp0 structure.
+ Instead they must be read by using offsets (please refer to BLE specification).
+ RSSI = *(uint8_t*) (adv_report_data + le_advertising_event->Advertising_Report[0].Length_Data);
+ */
adv_report_data = (uint8_t*)(&le_advertising_event->Advertising_Report[0].Length_Data) + 1;
k = 0;