cancel
Showing results for 
Search instead for 
Did you mean: 

How to start scanning available BLE beacons around me using B-L475E-IOT01A

PYada.1
Associate III

I am using the B-L475E-IOT01A kit, but I am not able to find any BLE scanning example. I want to detect beacons around me and their details as well i.e RSSI, etc.

Can anyone help me regarding this?

3 REPLIES 3
PYada.1
Associate III

I am using aci_gap_start_observation_procedure() api in place of aci_gap_create_connection() in STM32L4_IOT_P2P_ClientServer example, I have enabled LB_CLIENT = 1 .

I am getting a 0x0c error which is ERR_COMMAND_DISALLOWED.

What should the API sequence before calling aci_gap_start_observation_procedure()?

Winfred LU Can you please help me regarding this?

Winfred LU
ST Employee

It is not allowed possibly because some other procedure is ongoing.

The sequence would be initialize firstly and it is good for observing:

  1. aci_hal_set_tx_power_level()
  2. aci_gatt_init()
  3. aci_gap_init()
  4. aci_gap_start_observation_procedure()

When you are done the observation, terminate it by calling aci_gap_terminate_gap_procedure() with 0x80 in procedure_code.

Imen.D
ST Employee

Hello @PYada.1​ ,

If your issue is solved, please select the answer as “Best�? as this will help other users to find answers faster.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen