This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE Scanning not working

Hi

I am trying BLE multirole application ble_app_multirole_lesc from the SDK 13.0.0. I am using nRf52832 DK along with GCC toolchain. For debugging I am using Segger RTT and have added some of my own debug string to capture which events I am receiving. Log of the same is as below. The events are as per the peripheral role of the device where my laptop scans and connects with the device successfully. Problem lies with central role where my expectation is to scan for device name declared in variable m_target_periph_name = and to be able to initiate connection from device to laptop. As per the example code scan_start function is supposed to start the scan and event BLE_GAP_EVT_ADV_REPORT is expected which in my case is not being generated.

There were couple of instances when I left my setup for long period and after ~30mins suddenly this event started to be seen but still connection was not attempted.

What should I make sure that I see this event as soon as application and scanning starts ? How to make sure that scanning is working as expected in background ?

APP:INFO:Initializing nrf_crypto.
APP:INFO:Initialized nrf_crypto.
APP:INFO:Generating key-pair
APP:INFO:After generating key-pair
APP:INFO:Converting to raw type
APP:INFO:After Converting to raw type
APP:INFO:Scanning err_code [0]
APP:INFO:Advertising
APP:INFO:LE Secure Connections example started.
APP:INFO:PERIPHERAL: Event [16]
APP:INFO:PERIPHERAL: connected
APP:INFO:PERIPHERAL: Event [33]
APP:INFO:PERIPHERAL: Event [34]
APP:INFO:CENTRAL: BLE_GAP_EVT_SEC_PARAMS_REQUEST
APP:INFO:PERIPHERAL: Event [19]
APP:INFO:CENTRAL: BLE_GAP_EVT_AUTH_STATUS: status=0x88 bond=0x0 lv4: 0 kdist_own:0x43 kdist_peer:0x1
APP:INFO:PERIPHERAL: Event [25]
APP:INFO:PERIPHERAL: Event [17]
APP:INFO:PERIPHERAL: disconnected, reason 0x13
APP:INFO:PERIPHERAL: Event [16]
APP:INFO:PERIPHERAL: connected
APP:INFO:PERIPHERAL: Event [33]
APP:INFO:PERIPHERAL: Event [85]
APP:INFO:PERIPHERAL: Event [34]
APP:INFO:PERIPHERAL: Event [18]
APP:INFO:PERIPHERAL: Event [82]
APP:INFO:PERIPHERAL: Event [80]
APP:INFO:PERIPHERAL: Event [18]
APP:INFO:PERIPHERAL: Event [18]
APP:INFO:PERIPHERAL: Event [17]
APP:INFO:PERIPHERAL: disconnected, reason 0x13

Shishir

Related