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

sd_ble_gap_connect() is not getting connect event after waiting a long time?

My set up contains beagle bone black as Application board. PCA10001 board with S120 Softdevice using nordic_sdk_10  running ble_connectivity example program.

I initiated sd_ble_gap_connect() to thingy52().  Didn't got a connected event after waiting for a longtime. To what extent i should wait? I need to reset the S120 ble radio?

Since then any further connection requests (i.e sd_ble_gap_connect()) returns error code 8. Not processing further requests.

Parents
  • Hi,

    What are scan window and scan interval are you using? How do you know what device to connect to (sd_ble_gap_connect() is used to connect to a known device)? Have you tried to use sd_ble_gap_scan instead? this way you will get adv reports and can parse the advertisement data to identify the device you are looking for.

  • In my IOT Product, I got two ble radios i.e nrf51822. First radio is SCAN_ONLY, second radio was CONNECT_ONLY

    First radio will continuously scans for ble advertisements.  Second radio two initiate ble connections based on advertisements recieved on scan radio.

    #define DEFAULT_SCAN_INTERVAL               0x0044  // (= 68) scan interval in units of 0.625ms, 68*0.625=42.50ms

    #define DEFAULT_SCAN_WINDOW                 0x0022  // (= 34) scan window   in units of 0.625ms, 34*0.625=21.25ms

  • So before you try to call sd_ble_gap_connect the second time you need to call sd_ble_gap_connect_cancel to stop the already running procedure.

    Are you using the same interval and window on both the scan_only and the connect_only device?

    And are you doing active scanning on the scan_only device. I.e. if the scan_only device sends a scan request at the same time as the connect_only device sends the connection request they will block each other.

Reply Children
Related