diff options
Diffstat (limited to 'Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/STM32_WPAN/App/app_ble.c')
-rw-r--r-- | Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/STM32_WPAN/App/app_ble.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/STM32_WPAN/App/app_ble.c b/Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/STM32_WPAN/App/app_ble.c index 1de54a167..bd299f79f 100644 --- a/Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/STM32_WPAN/App/app_ble.c +++ b/Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/STM32_WPAN/App/app_ble.c @@ -876,6 +876,11 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void *pckt) 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; |