2022-02-28 02:02 AM
Hi,
the same question was already reported in this topic some years ago.
https://community.st.com/s/question/0D50X00009Xkh0DSAR/bluenrg-missing-le-advertising-report-event
I have the same problem: if I use HCI standard commands, (HCI_LE_SET_SCAN_PARAMETERS & HCI_LET_SET_SCAN_ENABLE) I'm not receiving LE advertising report event.
I'm usign a x-nucleo-bnrg2a1 board w/ BlueNRG GUI 4.2 to send HCI command.
Question: is it possible to use RAW HCI standard commands or only ACI commands are implemented? I'm getting correctly HCI_COMMAND_COMPLETE_EVENT but no LE advertising report event.
This is my setup:
Alessandro
Solved! Go to Solution.
2022-02-28 06:33 AM
Hi @alessandro morniroli ,
I did a quick test using my board and PC GUI and confirm by default I'm receiving advertising reports (ACI commands).
For test purpose, you may use "ACI utilities" test panel :
1- "Init devices" - you can select roles "All"
2- In central mode : you can select "Scanning" -> General Discovery procedure.
This
In this case, are you receiving Advertising reports ?
In case of HCI standard commands :
To use the HCI commands the BlueNRG-2 stack shall be configured like "LL_WITHOUT_HOST". This mode enable all the HCI commands and events.
So, to execute the scan using the HCI commands, you need to follow the sequence below:
1) Reset the BlueNRG, button "HW Reset" of the GUI
2) ACI_HAL_WRITE_CONFIG_DATA with parameters:
Offset=0x2C (this offset is to enable the LL_Without_Host mode)
Length=1
Value=1
3) HCI_LE_SET_SCAN_PARAMETERS with parameters:
LE_Scan_Type=0x0 for Passive Scanning or 0x01 for Active Scanning
LE_Scan_Interval=0x7D0 (for example)
LE_Scan_Window=0x7D0 (for example)
Own_Address_Type=0x00
Scanning_Filter_Policy=0x00
4) HCI_LE_SET_SCAN_ENABLE with parameters:
LE_Scan_Enable=0x01
Filter_Duplicates=0x00 (for example)
With this sequence you can read the EVENT with the ADV report information.
Remember, when the BlueNRG-1 enters in LL_Without_Host mode the GATT commands are DISABLED.
Please let me know if is OK.
Regards,
Sebastien.
2022-02-28 06:33 AM
Hi @alessandro morniroli ,
I did a quick test using my board and PC GUI and confirm by default I'm receiving advertising reports (ACI commands).
For test purpose, you may use "ACI utilities" test panel :
1- "Init devices" - you can select roles "All"
2- In central mode : you can select "Scanning" -> General Discovery procedure.
This
In this case, are you receiving Advertising reports ?
In case of HCI standard commands :
To use the HCI commands the BlueNRG-2 stack shall be configured like "LL_WITHOUT_HOST". This mode enable all the HCI commands and events.
So, to execute the scan using the HCI commands, you need to follow the sequence below:
1) Reset the BlueNRG, button "HW Reset" of the GUI
2) ACI_HAL_WRITE_CONFIG_DATA with parameters:
Offset=0x2C (this offset is to enable the LL_Without_Host mode)
Length=1
Value=1
3) HCI_LE_SET_SCAN_PARAMETERS with parameters:
LE_Scan_Type=0x0 for Passive Scanning or 0x01 for Active Scanning
LE_Scan_Interval=0x7D0 (for example)
LE_Scan_Window=0x7D0 (for example)
Own_Address_Type=0x00
Scanning_Filter_Policy=0x00
4) HCI_LE_SET_SCAN_ENABLE with parameters:
LE_Scan_Enable=0x01
Filter_Duplicates=0x00 (for example)
With this sequence you can read the EVENT with the ADV report information.
Remember, when the BlueNRG-1 enters in LL_Without_Host mode the GATT commands are DISABLED.
Please let me know if is OK.
Regards,
Sebastien.
2022-02-28 11:00 PM
Hi Sebastien,
thank you very much. It's working like a charm as expected w/ LL_Without_Host.
Alessandro