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

nrf_ble_scan_on_adv_report() never called

Hi,
I am using the UART Client and UART Peripheral example codes on 2 custom boards that have BL652 with NRF52832 with SDK 15.3.0. The Peripheral code seems to work perfect in isolation and I am able to connect and send data to the device using NRF Connect with an Android phone. However, with the Peripheral ON, when I load the client code on another board and try to debug, it takes several minutes to get a first hit on nrf_ble_scan_on_adv_report() after which, the function just drops out without passing adv_uuid_compare(). 

So, it seems that the central dies not receive any advertising data. I am using the default configuration from sdkConfig.h for both. 

Please suggest.

Parents
  • Hi,

    Are you using unmodified versions of the SDK uart client and uart peripheral projects?

    Have you updated the projects to match the clock specification for your custom boards?

    Does both custom boards work as a peripheral?

    Have you enabled any logging? do you get any error message when the central "dies"? not sure what you mean by dies, reset? sleep?

  • Hi,
    Sorry for the typo. I meant 'does' and not 'dies'.
    I am using the unmodified SDK UART central and peripheral codes. Both custom boards work as peripherals without any issue.
    Since posting the question, I have some more observations. I used a BL652 evaluation board BL652-DK and hooked up debugger with the same UART central code but the issue is same and the events for scan_evt_handler() and ble_nus_c_evt_handler() seem to never get triggered.
    Then I conencted a NRF eval board PCA10040 with the same same UART central code. With this, I am able to connect to and communicate with the peripheral implemented on our custom board.
    So, the exact same code for BLE UART central works with the PCA10040 but does not work with BL652, neither on our board, nor on the BL652 evaluation board. The peripheral code works with both though. In the central, I tried to change the macro NRF_SDH_CLOCK_LF_ACCURACY to various values but with no success. I also tried to configure the module of internal clock by setting NRF_SDH_CLOCK_LF_SRC to 0, but with no success.
    Any suggestions, what may be going wrong? Are there any special considerations in hardware or in sdk_config.h while using BL652?

  • I assume you have tried debugging the central board? Do you get any error messages or anything? Is the Softdevice initialized succesfully? What is the return value for sd_ble_gap_scan_start?

    Unfortunately I am not familiar with the BL652, but you should check the board file I guess.

  • Hello,

    Thanks for the reply.

    I do not get any error messages while debugging on the central code. I checked that the return value of sd_ble_gap_scan_start() is also NRF_SUCCESS.

    Can you please elaborate on what is a 'board file'? Is it a specific header file that can affect the performance of the device?

  • The board file is a file that contains your hw conofiguration It is an abstraction so you can map GPIOs to sdk defines in case there are differences in hw. I assume that in your case there could be different usage of gpios on the custom board compared to the DK.

Reply Children
Related