This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to debug BLE central sd_ble_gap_connect()

Hi,

I am using nrf51822(qfaa), sdk12.3, softdevice s130. I am using the ble_app_uart (both central and peripheral) as reference for my development. I have both central and peripheral module enabled at same time (on device discovery, device with lower mac ID becomes central and other peripheral).

The central device can see the other device advertising. sd_ble_gap_connect() returns SUCCESS inside BLE_GAP_EVT_ADV_REPORT case statement. But after that I never get another ble event (on_ble_evt()), no connect, disconnect or timeout event (I experimented with different SCAN_TIMEOUT values). The other (peripheral) device never gets connection request either (continues advertising).

How can I debug this further?

Note: All the connection parameters are same for both central and peripheral as in the uart example.

Parents
  • Hi,

    Central:

    • Do you get any information printed over the terminal / RTT ? Make sure the log module is enabled.
    • Have you tried debugging, and made sure that you are not running into the error-handler?
    • Does LED1 stop blinking, and stays on after sd_ble_gap_connect() ?

    Peripheral:

    • Are you able to connect to the peripheral using e.g your smartphone with the nRFConnect app?
Reply
  • Hi,

    Central:

    • Do you get any information printed over the terminal / RTT ? Make sure the log module is enabled.
    • Have you tried debugging, and made sure that you are not running into the error-handler?
    • Does LED1 stop blinking, and stays on after sd_ble_gap_connect() ?

    Peripheral:

    • Are you able to connect to the peripheral using e.g your smartphone with the nRFConnect app?
Children
No Data
Related